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

make data runtime-only to align with ecosystem norms #2977

Open
ajwerner opened this issue Nov 1, 2024 · 3 comments · May be fixed by #3005
Open

make data runtime-only to align with ecosystem norms #2977

ajwerner opened this issue Nov 1, 2024 · 3 comments · May be fixed by #3005

Comments

@ajwerner
Copy link

ajwerner commented Nov 1, 2024

In the current rules_rust rules, the data attribute is available both at compile time and at runtime whereas the compile_data is just available at runtime. There is no attribute that describes runtime-only dependencies. This is unfortunate; changing runtime dependencies shouldn't force a recompilation and relinking of an executable.

In order to align with the rest of the bazel ecosystem, we should change data to not be available at compile time. This will be a breaking change, but it's worth it.

@illicitonion
Copy link
Collaborator

I think this makes sense to do - it was a mistake that we used data for both back in the past.

Ideally we should introduce a flag to control this behaviour to make migration easier. Introduce the flag (I don't really mind what default we use), and delete the flag a release or two later when people have had an opportunity to migrate.

Happy to review a PR doing this!

@dzbarsky
Copy link
Contributor

dzbarsky commented Nov 5, 2024

I can send a PR but I may not get to it for a few weeks. If anyone else is motivated in the meantime, go for it

@ajwerner
Copy link
Author

@dzbarsky I got motivated: #3005

ajwerner added a commit to ajwerner/rules_rust that referenced this issue Nov 18, 2024
ajwerner added a commit to ajwerner/rules_rust that referenced this issue Nov 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants