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

Report failed name resolutions in type signatures #4030

Merged

Conversation

hubertp
Copy link
Contributor

@hubertp hubertp commented Jan 6, 2023

Pull Request Description

Compiler performed name resolution of literals in type signatures but would silently fail to report any problems.
This meant that wrong names or forgotten imports would sneak in to stdlib.

This change introduces 2 main changes:

  1. failed name resolutions are appended in TypeNames pass
  2. GatherDiagnostics pass also collects and reports failures from type
    signatures IR

Updated stdlib so that it passes given the correct gatekeepers in place.

Checklist

Please include the following checklist in your PR:

  • The documentation has been updated if necessary.
  • All code conforms to the
    Scala,
    Java,
    and
    Rust
    style guides.
  • All code has been tested:
    • Unit tests have been written where possible.
    • If GUI codebase was changed: Enso GUI was tested when built using BOTH
      ./run ide build and ./run ide watch.

Compiler performed name resolution of literals in type signatures but
would silently fail to report any problems.
This meant that wrong names or forgotten imports would sneak in
to stdlib.

This change introduces 2 main changes:
1) failed name resolutions are appended in `TypeNames` pass
2) `GatherDiagnostics` pass also collects and reports failures from type
   signatures IR

Updated stdlib so that it passes given the correct gatekeepers in place.
Copy link
Member

@JaroslavTulach JaroslavTulach left a comment

Choose a reason for hiding this comment

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

Great catch. Please also make sure we have a test that can detect when missing types aren't reported properly.

hubertp and others added 2 commits January 9, 2023 10:46
Easy to make the mistake, as indicated by the changes.
…er.enso

Co-authored-by: James Dunkerley <jdunkerley@users.noreply.github.com>
@hubertp hubertp added the CI: Ready to merge This PR is eligible for automatic merge label Jan 9, 2023
@mergify mergify bot merged commit 3379ce5 into develop Jan 9, 2023
@mergify mergify bot deleted the wip/hubert/report-errors-in-type-signatures-184173008 branch January 9, 2023 10:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CI: Ready to merge This PR is eligible for automatic merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants