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 NullablePointer type constraint check being omitted in FFI declarations #3758

Merged
merged 1 commit into from
May 21, 2021

Conversation

ergl
Copy link
Member

@ergl ergl commented May 10, 2021

We're only interested in ignoring the "guard" part of a use command, but
we still want to go through the arguments to check for any possible
errors during the expr pass. In particular, we're interested in the
NullablePointer constraint check.


043dbb1 added the original code that ignored use statements during the expr pass.

I don't know the specific rationale, but it seems we can do this check in a more fine-grained manner so that the rest of a use statement goes through the expr pass.

Fixes #3757

Edit: I made this a draft PR since I'm sure there could be a better way of doing this if I understood the reason for ignoring use statements.

@ergl ergl requested review from jemc and SeanTAllen May 10, 2021 14:56
@ergl ergl changed the title Make the expr pre check for use commands more fine-grained Fix NullablePointer type constraint check being omitted in FFI declarations May 10, 2021
@ergl ergl force-pushed the ergl/fix_3757 branch from a89fe4e to 579d19d Compare May 10, 2021 15:09
@SeanTAllen
Copy link
Member

I am going to defer to @jemc on this one. This isn't my areas of expertise.

@ergl ergl marked this pull request as ready for review May 20, 2021 18:19
@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label May 20, 2021
@ponylang-main
Copy link
Contributor

Hi @ergl,

The changelog - fixed label was added to this pull request; all PRs with a changelog label need to have release notes included as part of the PR. If you haven't added release notes already, please do.

Release notes are added by creating a uniquely named file in the .release-notes directory. We suggest you call the file 3758.md to match the number of this pull request.

The basic format of the release notes (using markdown) should be:

## Title

End user description of changes, why it's important,
problems it solves etc.

If a breaking change, make sure to include 1 or more
examples what code would look like prior to this change
and how to update it to work after this change.

Thanks.

Copy link
Member

@jemc jemc left a comment

Choose a reason for hiding this comment

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

Good catch!

@SeanTAllen
Copy link
Member

@ergl do you think this is deserving of a release ahead of schedule?

@ergl
Copy link
Member Author

ergl commented May 20, 2021

@SeanTAllen Although the original issue should only result in the compiler crashing, I had cases where compiling the offending code in debug mode produced a segfaulting binary, so I'd go with probably yes

@SeanTAllen
Copy link
Member

@ergl ok. once this gets release notes, and is merged, i'll do a release this weekend.

…FI declarations

This commit makes the expr pre check for use commands more fine-grained:
we're only interested in ignoring the "guard" part of a use command, but
we still want to go through the arguments to check for any possible
errors during the expr pass. In particular, we're interested in the
NullablePointer constraint check.
@ergl ergl force-pushed the ergl/fix_3757 branch from 579d19d to 90d786a Compare May 20, 2021 19:33
@SeanTAllen SeanTAllen merged commit 5e676cf into main May 21, 2021
@SeanTAllen SeanTAllen deleted the ergl/fix_3757 branch May 21, 2021 12:15
github-actions bot pushed a commit that referenced this pull request May 21, 2021
github-actions bot pushed a commit that referenced this pull request May 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check on NullablePointer[A] type constraint doesn't work with FFI declarations
4 participants