codex
codex copied to clipboard
stack: Support dependency which are fetched from git.
+1
It also seems that extra-deps from hackage (not from stackage) don't work either.
I'm not sure if this is the same issue, but I have a stack.yaml that looks a bit like this:
resolver: lts-6.0
packages:
- /home/andrew/src/afcowie/rosterium
- .
ie, I'm referring to a local package I'm concurrently developing, but at present codex doesn't at present process it in the output codex.tags file.
@aloiscochard if this seems relatively trivial, then perhaps you could point to the area in the code that would need to be tweaked and I will see about getting someone at work to tackle it.
AfC
I made a very, very simple work-around script for Snowdrift.coop.
Please keep three things in mind about it, though:
-
At time of writing, you must first edit
stack.yaml
to use a sufficient version of Codex. Please see Snowdrift's to see how, searching for "codex" in the file. You may also want to bear in mind that the reported version is lagging. Once #76 is pushed to Hackage,stack.yaml
and the script itself should be simplified. -
It depends on
stack build --dry-run
to download non-Hackage Git deps. That behavior is not gauranteed by Stack doc, so it may not hold for future versions of Stack. I use the method to avoid downloading something a second time and to avoid the unneeded build, since we're only tagging source, not compiling. -
It generates a couple things you'll want to add to
.gitignore
: adummy.cabal
file and alinked-for-non-Cabal-tagging
directory soft link.
EDIT: and a fourth thing: the script assumes that it is somewhere in the project directory.