You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The two test-all failures (here and on #4339 and #4340, which stack on this) come from building CRuby, not from the tests. ruby/ruby still uses the old pm_constant_id_list_t API in two places. CI only shows the first one, because make stops at compile.o before it compiles vm.o:
prism_compile.c:3611 sets the removed field when it builds the synthetic pm_def_node_t for mandatory_only_iseq:
prism_compile.c:3611:14: error: 'pm_constant_id_list_t' has no member named 'capacity'
3611 | .capacity = def_node->locals.capacity
Deleting that line is enough, since .size there already comes from parameters_node->requireds.size.
vm_eval.c:1871, which is compiled as part of vm.c, calls pm_constant_id_list_init(&parent_scope->locals) with the old one-argument signature. pm_constant_id_list_init(result.arena, &parent_scope->locals, 0) keeps its behaviour, because the loop after it fills the list with pm_constant_id_list_append.
I compiled both call sites, unchanged, against this branch's constant_pool.h. They give exactly those two errors (too few arguments to function call, expected 3, have 1 for the second), and with both changes they compile cleanly. Nothing else in ruby/ruby outside prism/ uses the API this changes, so the sync needs both changes.
Also, the CHANGELOG entry covers the struct change, but pm_constant_id_list_init is exported and its signature changed too, from (list) to (arena, list, size). It also now sets size instead of starting the list empty. That could be worth a line for other C API users.
Edited: the first version of this comment missed vm_eval.c and said CRuby doesn't call pm_constant_id_list_init.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.