-
Notifications
You must be signed in to change notification settings - Fork 121
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
CreatePom parsing update with maven type and classifier tags #358
CreatePom parsing update with maven type and classifier tags #358
Conversation
@@ -7,7 +7,9 @@ object CreatePom { | |||
def toXml: Elem = { | |||
<dependency> | |||
<groupId>{self.group.asString}</groupId> | |||
<artifactId>{self.artifact.asString}</artifactId> | |||
<artifactId>{self.artifact.asString.split(":")(0)}</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this split needed? why isn't it just self.artifact.artifactId
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we're concatenating the packaging and classifier in MavenArtifactId this pulls out just the ArtfiactId string. In the current state the MavenArtifactId.asString is really the artifact id, classifier, and packaging all concatenated together.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but look here:
artifactId: String, |
isn't self.artifact.asString.split(":")(0) == self.artifact.artifactId
?
I understand the concatenation, but I'm saying access it directly before the concatenation. Note the confusing artifact vs artifactId difference. I'm not saying self.artifact.asString
I'm saying self.artifact.artifactId
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh gotcha yeah that makes sense! will update that's much clearer
thanks for the PR. Just one question/suggestion. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for the PR
I'm trying to figure out why I'm not being shown an option to approve your PR to run in the CI. |
Oh weird, I hope I forked/setup the PR the right way. Do you maybe have to be assigned instead of just a reviewer? |
can you merge master in and see if that fixes? |
I think we had the CI setup wrong: #359 |
looks like we do have a test failure. |
could you run |
Yeah sorry I'm a bazel newbie so idk what my issue is but I keep getting errors in protobuf that causes it to fail building?
|
looks like your version of bazel is incompatible with the current rules. Try with the script in the repo:
|
Yeah I tried running the script, and also confirmed I'm running bazel v4.2.0, and I also tried bazelisk with no luck.
|
@johnynek sorry for the lag, finally got tests to pass I just need to add a test case for a dependency with a non-empty < classifier > tag |
thanks for sticking with it. It seems the tests still aren't passing. I'm sorry the project doesn't build for you. It shouldn't depend on your environment, but I guess something in one of the rules we depend on does... Maybe we need to update the version of the scala rules. I really don't know. |
@johnynek weird the tests are passing for me locally, and just did a pull to make sure I'm up to date `jakestebbins@Jake-Stebbins-MacBook-Pro bazel-deps % ./bazel test --cache_test_results=no //... Executed 8 out of 8 tests: 8 tests pass. |
can you try |
Yeah it looks like it just failed the parsegenerateddoctest once, but in the latest CI run its showing the tests passed and errored in the command run after `jakestebbins@Jake-Stebbins-MacBook-Pro bazel-deps % ./bazel test --cache_test_results=no --runs_per_test=10 //... Executed 8 out of 8 tests: 7 tests pass and 1 fails locally. |
huh... failed again |
Yeah I just ran it again with the same --runs_per_test=10 flag and it passed |
I don't see how your change could have broken this test since your change is downstream of the code being tested. I'll merge and we can address the test. Thanks! |
Sweet, thanks so much for all of the help! |
thank you! I appreciate your help! |
I left the MavenArtifactId class untouched to just fix this in CreatePom and avoid breaking other things that depend on that class. I wasn't able to get bazel to run tests for me(even on master), but confirmed that mvn was able to handle the classifier and type tags using the same format as what's in the updated CreatePomTest!