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 partial FFI declarations ignoring partial annotation #3713

Merged
merged 1 commit into from
Feb 12, 2021

Conversation

ergl
Copy link
Member

@ergl ergl commented Feb 12, 2021

Previously, the compiler would ignore any ? annotations on FFI
declarations, which could result in the generated code lacking any
guards for errors, causing the final program to abort at runtime.

h/t to @jemc for noticing what needed to be fixed.

@SeanTAllen
Copy link
Member

@ergl is this a change that impacts on end user code? should it have a changelog entry? I'm thinking no based on the description, but I'm not sure.

@SeanTAllen
Copy link
Member

Actually thinking about it more, I'm going to add a CHANGELOG- fixed

@SeanTAllen SeanTAllen added the changelog - fixed Automatically add "Fixed" CHANGELOG entry on merge label Feb 12, 2021
@ergl
Copy link
Member Author

ergl commented Feb 12, 2021

@SeanTAllen I think this would only affect users that a) tried to raise an error from C code (doubtful) and b) used a declaration. My intuition is that it won't be common, but it could happen, I guess.

@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 3713.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.

@ergl ergl force-pushed the fix_ffi_partial_decls branch from 511853f to 4a69572 Compare February 12, 2021 19:28
Previously, the compiler would ignore any `?` annotations on FFI
declarations, which could result in the generated code lacking any
guards for errors, causing the final program to abort at runtime.
@ergl ergl force-pushed the fix_ffi_partial_decls branch from 4a69572 to 6438237 Compare February 12, 2021 19:29
@SeanTAllen SeanTAllen merged commit 61e165f into main Feb 12, 2021
@SeanTAllen SeanTAllen deleted the fix_ffi_partial_decls branch February 12, 2021 21:05
@SeanTAllen
Copy link
Member

This will go out in the next release which is currently scheduled around the end of the month.

github-actions bot pushed a commit that referenced this pull request Feb 12, 2021
github-actions bot pushed a commit that referenced this pull request Feb 12, 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.

3 participants