Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Switch to new http repo rules #135

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

Merged
merged 2 commits into from
Nov 16, 2018
Merged

Switch to new http repo rules #135

merged 2 commits into from
Nov 16, 2018

Conversation

brandjon
Copy link
Contributor

This upgrades our dependencies to newer versions that are compatible with the new repo rules, and handles the fallout. Also add some comments to WORKSPACE.

rules_python now builds under Bazel 0.19.1 with --incompatible_remove_native_git_repository and incompatible_remove_native_http_archive.

Fixes #105.

This upgrades our dependencies to newer versions that are compatible with the new repo rules, and handles the fallout. Also add some comments to WORKSPACE.

rules_python now builds under Bazel 0.19.1 with `--incompatible_remove_native_git_repository` and `incompatible_remove_native_http_archive`.

Fixes #105.
@brandjon brandjon self-assigned this Nov 15, 2018
@brandjon brandjon requested a review from rupertks November 15, 2018 16:58
@brandjon
Copy link
Contributor Author

Rupert, sending this to you "by default" since you did a couple trivial ones earlier (thanks!), but feel free to send it back for me to find someone else.

WORKSPACE Outdated
git_repository(
name = "io_bazel_rules_sass",
commit = "8b61ad6953fde55031658e1731c335220f881369", # Taken from skydoc's WORKSPACE
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change the comment, let us know what this commit means. Is it a specific release? A tag? Opaque hashes are the worst thing to sync on because it's impossible to tell when it's out of date.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well skydoc didn't explain why they use that version. Updated the comment to add a date.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

url = ("https://pypi.python.org/packages/c6/28/" +
"67651b4eabe616b27472c5518f9b2aa3f63beab8f62100b26f05ac428639/" +
"grpcio-1.6.0-cp27-cp27m-manylinux1_i686.whl"),
urls = [("https://pypi.python.org/packages/c6/28/" +
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this constructed using string concatenation? I'd prefer just one long string, because that would make it clearer that there's only a single URL in the urls attribute.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The multiline form has the advantage of being able to easily read the distinct pieces of the string, for instance that the wheel part of the URL matches the file path attr above. I'm not sure the value of having an unbroken URL is worth it in this case.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SGTM.

"google_cloud_language-0.29.0-py2.py3-none-any.whl"),
urls = [("https://pypi.python.org/packages/6e/86/" +
"cae57e4802e72d9e626ee5828ed5a646cf4016b473a4a022f1038dba3460/" +
"google_cloud_language-0.29.0-py2.py3-none-any.whl")],
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need a hygenic macro to create these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean to factor out the whl name from the url and the downloaded_file_path? I'm not sure what value the macro adds besides code golfing -- What would the macro's arguments be, and what would the URL-minus-the-wheel-name be? Or would you suggest parsing the URL to determine downloaded_file_path?

I'm not even sure I like the downloaded file path being the wheel name as opposed to the default string, <repo name>/file/downloaded, but I kept it this way for compatibility with the existing tests. If I create a macro, that risks users loading it and adopting that convention without us having really thought it out.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, that makes sense. Leave it as-is.

@brandjon
Copy link
Contributor Author

Thanks for the review!

@brandjon brandjon merged commit 9835856 into master Nov 16, 2018
@brandjon brandjon deleted the migrate-repo-rules branch November 16, 2018 19:24
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.