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

repository_ctx.sha256 for safer repository rules #1711

Closed
pcj opened this issue Sep 1, 2016 · 4 comments
Closed

repository_ctx.sha256 for safer repository rules #1711

pcj opened this issue Sep 1, 2016 · 4 comments
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request
Milestone

Comments

@pcj
Copy link
Member

pcj commented Sep 1, 2016

Repository context should expose a sha256 function that returns a sha256 string for a given path file artifact. Makes it easier to write safer repository rules. Please indicate if a PR for such a function would be welcome.

@damienmg
Copy link
Contributor

damienmg commented Sep 2, 2016

That makes sense to me but we need to do an API review first. However the full skylark repository hasn't gone through such an API review yet. I am cleaning it as a first step and then we can discuss this further.

@damienmg damienmg added type: feature request P3 We're not considering working on this, but happy to review a PR. (No assignee) category: extensibility > skylark remote repositories labels Sep 2, 2016
@damienmg damienmg added this to the 1.0 milestone Sep 2, 2016
@kchodorow
Copy link
Contributor

This is probably more easily solvable via #1410. See also #991 (closed in favor of #1410).

@pcj
Copy link
Member Author

pcj commented Sep 2, 2016

Could also be addressed via allowing FileURLConnection's (file urls) in ctx.download, at which it becomes a generic cp with sha256 checking capability.

@jin
Copy link
Member

jin commented Nov 6, 2018

I believe this is now handled by @aehlig's work on repository rule return values and bazel sync.

@jin jin closed this as completed Nov 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 We're not considering working on this, but happy to review a PR. (No assignee) type: feature request
Projects
None yet
Development

No branches or pull requests

4 participants