-
Notifications
You must be signed in to change notification settings - Fork 20
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
Option to run Smithy CLI without isolated classpath? #27
Comments
@jeskew , Happened to be playing around with Smithy over the weekend, and ran into this too. I've managed to get past the specific issue by commenting out the inclusion of protocol tests in the main settings file because all i wanted was a built smithy binary. That might not work for your friend temporarily, but if it does, there you go. I wonder if the issue itself is because of smithy-gradle-plugin's does this in
...which is passed to smithy-cli's
` Just a suggestion, I couldnt get all the repos building to local maven and gradle repos/caches to actually repro/confirm. |
Update: I did get the local repos/caches working and after changing all use of However, re-enabling protocol tests still fails with tons of errors like pasted below, dont know enough of Smithy's model resolution logic in smithy-build to understand if my fix caused it, or if its unrelated.
|
That would explain the trailing In the meantime, I’ve been using the Smithy CLI directly as a Gradle task so that the project will build on Windows:
The main drawback of this approach is that the model will be recompiled every time the build target is invoked (as opposed to only when the model files change as happens with the smithy Gradle plugin). |
Thanks for the help on this, @vinoddin. I've got two PRs that address this. After merging them, I'll fire it up in Windows to see if I can fix any remaining issues:
After that, we'll see if we can set our tests up to automatically run on Windows too. Update: With the changes in https://github.com/awslabs/smithy/pull/576/files and the above two PRs, I was able to get the Gradle plugin to build and pass all tests on Windows. Smithy's Gradle tests are pretty in-depth integration tests, so this should be working once those are all merged and we cut a release. There are still some failing tests in smithy-build and smithy-cli, but those seem to just be issues we need to fix specifically in the tests. |
Both the main smithy repo and this repo now have windows ci runnning. As mentioned above, there were a few more things that needed touching up on the main smithy repo. If you have any other problems, don't hesitate to open up another issue! |
Run into this issue: smithy-lang/smithy-gradle-plugin#27
Thanks for this plugin! I've been using it without issue on OS X and Linux environments, but a colleague on Windows is getting classpath errors from the
smithyBuildJar
task. A typical error looks like this:Gradle seems to be prepending the module root (
C:\Users\tooth\Workspaces\psf-api\model
) to the enumerated classpath when those entries start with a backslash. I ran the plugin in a debugger and saw that the fileset stored by the collection passed toexecuteCliThread
is correct (e.g., the entries look like\Users\tooth\.gradle\caches\modules-2\files-2.1\software.amazon.smithy\smithy-aws-traits\1.0.8\4c75784ac723e64b88f7f8ce39b9633582a48444\smithy-aws-traits-1.0.8 .jar;C
), but whengetFiles
is called, the classpath entries get the unwanted prefix of the module root path, and when the CLI is invoked with that classpath, it of course can't find any files. I don't think this is due to anything in the plugin itself (at least not as far as I could tell) but may be a more general bug in how classpath entries get translated into aFileCollection
in Gradle's plugin support classes.My ask here is, could you add a configuration flag to the plugin to not run the Smithy CLI in an isolated manner? I see I can choose between a forked process or a Java thread, but both of those options use an incorrect classpath on Windows.
The text was updated successfully, but these errors were encountered: