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

Skip generated impls using Erased attribute. #1184

Merged
merged 3 commits into from
Dec 12, 2024
Merged

Skip generated impls using Erased attribute. #1184

merged 3 commits into from
Dec 12, 2024

Conversation

maximebuyse
Copy link
Contributor

Fixes #1070

Instead of just skipping generated impls, this adds the Erased attribute to them so that the body is dropped but they still exist in the engine. This allows for them to be moved by bundling thus removing the spurious let open.

@maximebuyse
Copy link
Contributor Author

Two comments here:

  • the skip attribute seems to have been removed so maybe we can remove the corresponding logic in import_thir?
  • there is a coq test that fails because of this (it generates a type class instance with dummy methods), maybe this means we should also implement the Erased attribute in the other backends.

@maximebuyse
Copy link
Contributor Author

Two comments here:

* the `skip` attribute seems to have been removed so maybe we can remove the corresponding logic in `import_thir`?

* there is a coq test that fails because of this (it generates a type class instance with dummy methods), maybe this means we should also implement the `Erased` attribute in the other backends.

For coq, I added a quick fix: it filters out trait impls that have the Erased attribute. I opened #1185 to add full support for Erased in the coq backend.

@maximebuyse maximebuyse requested a review from W95Psp December 12, 2024 15:17
@maximebuyse
Copy link
Contributor Author

Two comments here:

* the `skip` attribute seems to have been removed so maybe we can remove the corresponding logic in `import_thir`?

* there is a coq test that fails because of this (it generates a type class instance with dummy methods), maybe this means we should also implement the `Erased` attribute in the other backends.

For skip we discussed it and it is indeed unused so I removed the logic. @W95Psp You can finish your review, I am done with my changes.

Copy link
Collaborator

@W95Psp W95Psp left a comment

Choose a reason for hiding this comment

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

Looks great, thanks!

@W95Psp W95Psp added this pull request to the merge queue Dec 12, 2024
Merged via the queue into main with commit 62f7bfa Dec 12, 2024
15 checks passed
@W95Psp W95Psp deleted the fix-1070 branch December 12, 2024 17:11
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.

Cyclic dependency introduced by bundling with let open
2 participants