Skip to content
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

Migrate rules_rust for https://github.com/bazelbuild/bazel/issues/7153 and https://github.com/bazelbuild/bazel/issues/7152 #235

Closed

Conversation

hlopko
Copy link
Member

@hlopko hlopko commented Jun 20, 2019

This PR migrates rules_rust for following Bazel incompatible changes:

7152 is trivial, just not compatible with Bazel <= 0.21 which at this point is fine I guess?

7153 part is very controversial. I think we're missing Bazel APIs in ProtoInfo to implement fully correct code. The PR passes the test suite, but that says nothing about the actual quality of my code :) It introduces many bugs:

  • I created Add more test targets for proto support #234 to demonstrate edge cases that are missed before this PR, and well, they are still missed after this PR.
  • I honestly didn't understand the current implementation, especially why was _compute_proto_source_path introduced (I know very little about protos), it may be that this PR broke smth I don't understand yet.

So pls bear with me and be careful with your review :)

Thanks!

@damienmg
Copy link
Collaborator

This PR migrates rules_rust for following Bazel incompatible changes:

7152 is trivial, just not compatible with Bazel <= 0.21 which at this point is fine I guess?

This is fine by me, but the compatibility check need to be updated.

7153 part is very controversial. I think we're missing Bazel APIs in ProtoInfo to implement fully correct code. The PR passes the test suite, but that says nothing about the actual quality of my code :) It introduces many bugs:

  • I created Add more test targets for proto support #234 to demonstrate edge cases that are missed before this PR, and well, they are still missed after this PR.
  • I honestly didn't understand the current implementation, especially why was _compute_proto_source_path introduced (I know very little about protos), it may be that this PR broke smth I don't understand yet.

The problem is the way path is relative to the root of the repository for proto. E.g. if you include a proto @repo1//my/path:to.proto in your proto //my:own.proto then the path of the first proto in the second one will be my/path/to.proto in the proto descriptor (without the repo definition) whereas short_path will return external/repo1/my/path/to.proto. The proto compiler needs the list of proto descriptor and the path of the file they represent.

I would need to test on my personal computer to see if I it still works fine with external repositories.

So pls bear with me and be careful with your review :)

No worries :)

Thanks!

@hlopko
Copy link
Member Author

hlopko commented Jul 2, 2019

@damienmg Did you get to test this PR?

@damienmg
Copy link
Collaborator

damienmg commented Jul 2, 2019 via email

@aiuto
Copy link

aiuto commented Aug 18, 2019

friendly ping

@hlopko
Copy link
Member Author

hlopko commented Aug 22, 2019

Rules rust are already migrated for both incompatible flags. This PR is obsolete.

@hlopko hlopko closed this Aug 22, 2019
@hlopko hlopko deleted the migrate_to_strip_import_prefix branch November 6, 2019 19:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants