-
-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use of custom scalar codecs requires that elm executable be available in PATH #276
Comments
Hello @rjdellecese, thank you for opening the issue. Thanks an excellent point! Would you be up for making a PR to try to refine this? I'd love some help to improve things here. Some research on the different Elm bin lookup strategiesI'm not sure what the most reliable way would be, those are good ideas, though. I dug into it a bit because I remembered seeing something like the rtfeldman/node-elm-compiler@bdeb661 Note that this is the project that rtfeldman/node-test-runner@ece680b (Here are the commits around there, I couldn't find anything else related: https://github.com/rtfeldman/node-test-runner/commits/4464502226aabd13e74d86c3b43e81c8107fe22c#diff-b9cfc7f2cdf78a7f4b91a753d10865a2). Note that You can also see where it uses it in the latest version of the code here. It looks like it just checks the PATH unless you provide a path to the compiler in the CLI flags: https://github.com/rtfeldman/node-test-runner/blob/master/lib/elm-test.js#L100 Next stepsI'm thinking that just adding an option for Let me know if you're interested in giving it a shot! I think this is the code you need to add it:
|
Wow, this is great! Thank you for doing all that research @dillonkearns! I’d be happy to take a crack at it—I’ll aim to give it a shot in the next few days. |
So the use case here seems to be “I want elm-graphql to use my locally installed
@rjdellecese Could you try running using |
@lydell I no longer have access to the project whence this issue arose, so I can't test it there, unfortunately. But I do know that it was using Pinging @shamshirz and @hritchie, in case they are able/have the time to test this out on the codebase where I originally ran into this issue! |
@rjdellecese In this case, the equivalent of
|
@lydell per yarnpkg/yarn#733, it does seem like This seems verifiable in a pretty straightforward way, but I'm not sure that I'll have the time to anytime soon. Given that, I'm happy to have this issue closed until/unless someone can investigate further! |
I works even in that case.
|
Well then, I'm not sure what the issue was, and without access to the problem code anymore, I can't explore this any further! So I'll close this issue. Thanks for your input @lydell—I'm sure it will be helpful should anyone else run into a problem like this one. |
@rjdellecese To close the loop on this, going from |
The custom scalar codecs feature is great! But I've discovered that when using it, it adds a new requirement to my build process through its use of
elm make
when verifying the scalar codecs file, here:elm-graphql/generator/src/elm-graphql.ts
Line 187 in 1c89a0d
I would prefer to be able to use the same Elm executable that is used to compile my Elm project (which for me and I would guess most people is the one in
node_modules/.bin/elm
). I can accomplish this by adding that to the PATH of my build environment, but I wonder if there is a better way, like passing this path as a command-line argument to theelm-graphql
executable? Or perhaps the executable should also check for anelm
binary in that location?The text was updated successfully, but these errors were encountered: