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

Fix regression in parsing requirements due to invalid entry points config. #536

Merged
merged 1 commit into from
Sep 17, 2021

Conversation

UebelAndre
Copy link
Contributor

@UebelAndre UebelAndre commented Sep 17, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • Does not include precompiled binaries, eg. .par files. See CONTRIBUTING.md for info
  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature (please, look at the "Scope of the project" section in the README.md file)
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Dependencies which have a potentially invalid entry_points.txt file will currently cause parsing dependencies to fail, rendering your code unbuildable.

Issue Number: N/A

What is the new behavior?

The entry_points functionality should at this point never result in a fatal error when parsing dependencies. This allows dependencies to continue to be generated as they did before in the event that entry_points.txt is malformed.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

@google-cla google-cla bot added the cla: yes label Sep 17, 2021
@UebelAndre UebelAndre changed the title Avoid failing to parse requirements due to invalid entry points config. Fix regression in parsing requirements due to invalid entry points config. Sep 17, 2021
@UebelAndre UebelAndre force-pushed the entrypoint branch 2 times, most recently from 35d7be5 to a461c3c Compare September 17, 2021 17:14
@UebelAndre
Copy link
Contributor Author

@alexeagle Requesting you as the reviewer since you were the reviewer for #523 and will likely have the most context.

# https://docs.python.org/3.7/library/configparser.html#configparser.ConfigParser
# https://docs.python.org/3.7/library/configparser.html#configparser.Error
except configparser.Error:
pass
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wish we could do something more in this case. We could warn, but developers are warnings-blind (for good reasons) plus this would be printed during repository rule execution which will scroll off the screen before you actually try to use the generated entry point scripts.

@alexeagle alexeagle merged commit ea1bb2b into bazelbuild:main Sep 17, 2021
@UebelAndre UebelAndre deleted the entrypoint branch September 17, 2021 23:42
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