Conversation
| import Analysis.File as A | ||
| import Analysis.Reference as A | ||
| import Data.Aeson | ||
| import Source.Language as Language | ||
| import Source.Source as Source | ||
| import qualified System.Path as Path | ||
| import qualified System.Path.PartClass as Path.PartClass | ||
| import Analysis.File as A | ||
| import Analysis.Reference as A | ||
| import Data.Aeson | ||
| import Source.Language as Language | ||
| import Source.Source as Source |
There was a problem hiding this comment.
Expect lots of this sort of thing due to autoformatter. Apologies.
| Right pth <- fmap Path.parse (b .: "path") | ||
| pth <- b .: "path" |
| fromSource :: Path.PartClass.AbsRel ar => Path.File ar -> Language -> Source -> Blob | ||
| fromSource :: FilePath -> Language -> Source -> Blob |
| blobFilePath = Path.toString . blobPath | ||
| blobFilePath = blobPath |
There was a problem hiding this comment.
I opted not to eliminate this in favour of blobPath because I didn't want to get dragged into that refactoring in the same PR. Still, it would be nice.
| let ?project = Path.relDir "external/tree-sitter-ql" | ||
| let ?project = "external/tree-sitter-ql" |
There was a problem hiding this comment.
We aren't currently building with bazel, but I did my best to keep these changes bazel-friendly at least.
| useJD <- (Path.hasExtension ".json" (Path.absRel ref) &&) <$> fmap isJust (Path.findExecutable "jd") | ||
| useJD <- (takeExtension ref == ".json" &&) <$> fmap isJust (findExecutable "jd") |
There was a problem hiding this comment.
pathtype generally mimics filepath's API pretty closely, so most of the changes either just drop conversions to/from strings, or drop the module prefix and use the mimicked symbol. In this case, pathtype does something completely different for some reason, so there's some actual logic to this change.
I did double-check that takeExtension returns the ..
This PR removes uses of and dependencies on
pathtypefrom the rest of the repo.Depends on #687. In particular, CI won't succeed until we publish
semantic-source0.2 to hackage.