Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
I'm really not a fan of this attribute. Isn't #771 something that would solve for this? Perhaps I'm still missing some context but the attribute feels like a toggle for some super niche functionality that alone adds unaccounted edge cases but is not currently an issue because there's a small group of users who use this and all do the same thing. I'd love to either have my understanding of this problem space be updated or delete the thing that seems like a hole we punched in the rules to support a few things.
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.
AFAIK, the only use case for
out_binary
is building Wasm modules, so #771 would definitely fix it, but I don't have bandwidth to implementrust_wasm_{binary,library}
myself, so a quick fix it is.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.
I just learned about this attribute and I too am unhappy about it. @UebelAndre do we have a maintainer who supports
wasm
builds? While I don't want to block this PR on it, I think we should either have maintainers/contributors that can pick up #771 and clean up the codebase or discuss whether this is something that we want to support.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.
To my knowledge there isn't a maintainer who supports
wasm
builds. Unless we can find a consumer of this functionality that's willing to cleanly implement the rules and add test then I don't think we can officially say we support this. I'd be reluctantly ok with letting this one through but can't say I'm currently capable of understanding whether or not future changes will cause regressions.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.
Could we get this in? It looks that v0.4.0 was shipped without the fix.
I agree that we should have
rust_wasm_{binary,library}
(and I advocated for this on the PR that addedout_binary
), at which point we could removeout_binary
, but since it's been added and worked for the past few years, breaking it when the fix is so trivial doesn't seem very productive.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.
Could you provide the exact error? Does it happen when you create other targets, eg
rust_shared_library
?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.
@PiotrSikora friendly ping 😅
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.
It happens only for
rust_binary(crate_type = "cdylib", out_binary = True)
.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.
@UebelAndre @scentini friendly ping, either for this or #1339, since it blocks Rust updates in Envoy and Proxy-Wasm.
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.
Hey @PiotrSikora, I don't believe I'll have time in the near future to explore how rust+wasm builds work. Your best bet would be to either explore how the envoy rules work so that you can provide testing for this use case, or find someone willing to do so. In the meantime I consider this use case unsupported.
Re #1339 - did you confirm that it fixes your issue? That one I can work on soon.