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

Revert "Revert dataclass engine params (#8540)" #8548

Closed

Conversation

cosmicexplorer
Copy link
Contributor

@cosmicexplorer cosmicexplorer commented Oct 28, 2019

Problem

This reverts commit 1aae1b5, with the intent to re-land #8181.

Solution

  • Add a few import-time type checks when constructing Rule subclasses to provide better error messaging when engine Params are constructed that are unhashable. See update engine README for @dataclasses #9446 for more info.

[ci skip-rust-tests] # No Rust changes made.

[ci skip-jvm-tests] # No JVM changes made.

Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Yay! Thank you for updating this.

src/python/pants/engine/README.md Outdated Show resolved Hide resolved
src/python/pants/engine/README.md Outdated Show resolved Hide resolved
src/python/pants/engine/README.md Outdated Show resolved Hide resolved
src/python/pants/engine/README.md Outdated Show resolved Hide resolved
src/python/pants/engine/rules.py Outdated Show resolved Hide resolved
src/python/pants/engine/rules.py Outdated Show resolved Hide resolved
src/python/pants/util/meta.py Outdated Show resolved Hide resolved
@cosmicexplorer cosmicexplorer force-pushed the python-dataclasses branch 2 times, most recently from 739bf3b to 6740a9d Compare November 25, 2019 07:47
@cosmicexplorer cosmicexplorer force-pushed the python-dataclasses branch 3 times, most recently from 526c647 to 45bd259 Compare April 1, 2020 06:51
Copy link
Contributor

@Eric-Arellano Eric-Arellano left a comment

Choose a reason for hiding this comment

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

Would you be willing to split this up into two separate PRs?

  1. Docs only change.
  2. Validation that dataclasses are being used correctly.

I think that would make this easier to review and land.

@cosmicexplorer
Copy link
Contributor Author

Great idea!! Will do!!

This reverts commit 1aae1b5.

review comments

fix indentation

[ci skip-rust-tests]  # No Rust changes made.

[ci skip-jvm-tests]  # No JVM changes made.

fix formatting

[ci skip-rust-tests]  # No Rust changes made.

[ci skip-jvm-tests]  # No JVM changes made.

fix test failure

[ci skip-jvm-tests]  # No JVM changes made.

[ci skip-rust-tests]  # No Rust changes made.

[ci skip-jvm-tests]  # No JVM changes made.
# Delete this line to force CI to run the JVM tests.
[ci skip-jvm-tests]  # No JVM changes made.
@Eric-Arellano
Copy link
Contributor

Closing because we want this documentation to live in https://pants.readme.io/docs/plugins-overview. Once those docs are done, I think we'll want to delete this README.

I'll incorporate your (very helpful!) changes in those docs, and I'd love any feedback on them once ready :)

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 this pull request may close these issues.

2 participants