Skip to content

Bump prism to 1.9.0 in the rubocop benchmark to fix CI - #563

Merged
eregon merged 1 commit into
ruby:mainfrom
eregon:bump-prism-rubocop
Oct 27, 2026
Merged

eregon merged 1 commit into
ruby:mainfrom
eregon:bump-prism-rubocop

Conversation

@eregon

@eregon eregon commented Oct 27, 2026

Copy link
Copy Markdown
Member

Fixes https://github.com/truffleruby/truffleruby/actions/runs/40510552782/job/122211001277#step:1:17
which failed with:

compiling build/shared/util/pm_string.o
src/util/pm_string.c: In function ‘pm_string_mapped_init’:
src/util/pm_string.c:186:17: error: storing the address of local variable
‘source’ in ‘*string.source’ [-Werror=dangling-pointer=]
186 |         *string = (pm_string_t) { .type = PM_STRING_CONSTANT, .source =
source, .length = 0 };
|        
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/util/pm_string.c:185:23: note: ‘source’ declared here
  185 |         const uint8_t source[] = "";
      |                       ^~~~~~
src/util/pm_string.c:118:36: note: ‘string’ declared here
  118 | pm_string_mapped_init(pm_string_t *string, const char *filepath) {
      |                       ~~~~~~~~~~~~~^~~~~~
src/util/pm_string.c: In function ‘pm_string_file_init’:
src/util/pm_string.c:282:17: error: storing the address of local variable
‘source’ in ‘*string.source’ [-Werror=dangling-pointer=]
282 |         *string = (pm_string_t) { .type = PM_STRING_CONSTANT, .source =
source, .length = 0 };
|        
~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/util/pm_string.c:281:23: note: ‘source’ declared here
  281 |         const uint8_t source[] = "";
      |                       ^~~~~~
src/util/pm_string.c:210:34: note: ‘string’ declared here
  210 | pm_string_file_init(pm_string_t *string, const char *filepath) {
      |                     ~~~~~~~~~~~~~^~~~~~
cc1: all warnings being treated as errors
make: *** [Makefile:53: build/shared/util/pm_string.o] Error 1
<internal:core> core/kernel.rb:613:in 'Kernel#system': command failed
(RuntimeError)
	from extconf.rb:51:in 'block in Object#make'
	from <internal:core> core/dir.rb:363:in 'Dir.chdir'
	from extconf.rb:50:in 'Object#make'
	from extconf.rb:68:in '<main>'

extconf failed, exit code 1

Gem files will remain installed in
/home/runner/.rubies/truffleruby-head/lib/gems/gems/prism-1.4.0 for inspection.

Which was trigger by ubuntu-latest becoming 26.04.

Surprisingly the corresponding job on this repo also uses ubuntu-latest but was run on 24.04:
https://github.com/ruby/ruby-bench/actions/runs/40529770004/job/122279069041#step:1:17


prism 1.4.0 fails to compile its native extension on non-CRuby engines with GCC 15, as found on the ubuntu-26.04 runner image that ubuntu-latest is migrating to. On those engines prism's extconf.rb builds libprism via the gem's own Makefile, which uses -Werror, and GCC 15 reports:

src/util/pm_string.c:186:17: error: storing the address of local
variable 'source' in '*string.source' [-Werror=dangling-pointer=]

prism 1.6.0 fixed this by using a static empty_source array, so use the latest prism release. rubocop stays at 1.79.1 so the workload is unchanged.

prism 1.4.0 fails to compile its native extension on non-CRuby engines
with GCC 15, as found on the ubuntu-26.04 runner image that ubuntu-latest
is migrating to. On those engines prism's extconf.rb builds libprism via
the gem's own Makefile, which uses -Werror, and GCC 15 reports:

  src/util/pm_string.c:186:17: error: storing the address of local
  variable 'source' in '*string.source' [-Werror=dangling-pointer=]

prism 1.6.0 fixed this by using a static empty_source array, so use the
latest prism release. rubocop stays at 1.79.1 so the workload is unchanged.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@eregon
eregon merged commit 3cb699d into ruby:main Oct 27, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants