Skip to content

Comments

Remove top-level calls to LibGC.has_method? for backwards compat#15635

Merged
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:fix/gc-bindings-backward-compat
Apr 7, 2025
Merged

Remove top-level calls to LibGC.has_method? for backwards compat#15635
straight-shoota merged 1 commit intocrystal-lang:masterfrom
straight-shoota:fix/gc-bindings-backward-compat

Conversation

@straight-shoota
Copy link
Member

has_method? in top-level macro expressions was broken before Crystal 1.7.0 (fixed in #12848).
On older compiler versions LibGC.has_method?(:set_stackbottom) would always return false and break assumptions about available lib symbols.
This patch simply moves the macro expression into the def body. We don't need this on the top level.

More details in #15633 (comment)

Resolves #15633

@straight-shoota straight-shoota added kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:runtime labels Apr 4, 2025
@straight-shoota straight-shoota self-assigned this Apr 4, 2025
@straight-shoota straight-shoota added this to the 1.16.0 milestone Apr 4, 2025
@straight-shoota straight-shoota merged commit f632a0e into crystal-lang:master Apr 7, 2025
36 checks passed
@straight-shoota straight-shoota deleted the fix/gc-bindings-backward-compat branch April 7, 2025 20:49
@straight-shoota straight-shoota changed the title Remove top-level LibGC.has_method? for backwards compat Remove top-level calls to LibGC.has_method? for backwards compat Apr 7, 2025
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. topic:stdlib:runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

how to go from bootstrap (1.5.1) to 1.15.1

3 participants