Skip to content

Add compiler versions constraints for interpreter signal handler [fixup #14766]#15178

Merged
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:fix/interpreter-forward-compatibility
Nov 13, 2024
Merged

Add compiler versions constraints for interpreter signal handler [fixup #14766]#15178
straight-shoota merged 2 commits intocrystal-lang:masterfrom
straight-shoota:fix/interpreter-forward-compatibility

Conversation

@straight-shoota
Copy link
Member

This is a follow-up to #14766. The new primitives are only available in master
This patch ensures forward compatibility for the latest stable compiler (Crystal 1.14) and below.

It would be useful to have a macro that checks for the availability of primitives.

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:system kind:regression Something that used to correctly work but no longer works topic:compiler:interpreter labels Nov 11, 2024
@straight-shoota straight-shoota self-assigned this Nov 11, 2024
@straight-shoota straight-shoota force-pushed the fix/interpreter-forward-compatibility branch from 4fb9ad0 to ad01192 Compare November 11, 2024 13:15
@straight-shoota straight-shoota force-pushed the fix/interpreter-forward-compatibility branch from e6ba3a2 to a4ef8b0 Compare November 11, 2024 20:36
@straight-shoota straight-shoota added this to the 1.15.0 milestone Nov 12, 2024
@straight-shoota straight-shoota merged commit 489cdf1 into crystal-lang:master Nov 13, 2024
@straight-shoota straight-shoota deleted the fix/interpreter-forward-compatibility branch November 13, 2024 14:57
@straight-shoota straight-shoota changed the title Add compiler versions constraints for interpreter signal handler Add compiler versions constraints for interpreter signal handler [fixup #14766] Nov 15, 2024
straight-shoota added a commit that referenced this pull request Jun 16, 2025
The guard clauses introduced in #15178 to protect using the API for #14766 are wrong. The guards check for instance methods, which are never defined because we're using class methods instead.
As a result, the fix for #12241 was never actually applied.
The spec file uses the same guard clause, so it didn't run.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind:bug A bug in the code. Does not apply to documentation, specs, etc. kind:regression Something that used to correctly work but no longer works topic:compiler:interpreter topic:stdlib:system

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants