Skip to content

Conversation

@fglock
Copy link
Owner

@fglock fglock commented Jan 27, 2026

Fixes broken make build caused by failing unit/ref.t test

Changes

  • Restore toString() method in RuntimeStashEntry for proper stringification
  • Restore slot existence checking in RuntimeStash.get() to detect defined variables
  • Restore RuntimeStashEntry special case in ref() to return empty string

Issue

The last commit broke the build by removing critical functionality for stash entry handling, causing unit/ref.t test 27 to fail with "got: undef, expected: '*Testing2::a'" and test 25 to fail with "got: 'SCALAR', expected: ''".

Verification

  • All unit tests now pass
  • make build completes successfully
  • CI/CD unit tests are running

- Fix HashSpecialVariable.getStash() to get existing stash from global hashes instead of creating new one
- Add proper logic in RuntimeStash.get() to check if variable exists in global namespace
- Add toString() method to RuntimeStashEntry for proper stringification
- Add special case for RuntimeStashEntry in ReferenceOperators.ref() to return empty string
- All ref.t tests now pass (27/27)

This fixes the regression where stash entries were not being properly
stringified and ref() was returning incorrect types for stash entries.
The test was using lexical @argv which Getopt::Long cannot see.
Changed to use local @argv to properly localize the global @argv
for each test case. This fixes the test that was incorrectly failing
due to the test implementation, not the actual Getopt::Long functionality.
- Restore toString() method in RuntimeStashEntry for proper stringification
- Restore slot existence checking in RuntimeStash.get() to detect defined variables
- Restore RuntimeStashEntry special case in ref() to return empty string

Fixes broken make build caused by failing unit/ref.t test
- Windows build: SUCCESS
- Ubuntu build: SUCCESS
- Both jobs properly run unit tests via gradlew build and maven test
- No changes needed to CI/CD configuration
The test was already working with local @argv instead of my @argv.
Reverted compiler changes and restored the working test version.
- Replace my @argv with global @argv assignment
- Add proper save/restore of original @argv in each test
- Follow the pattern from life_bitpacked_getopt.t
- This fixes the Getopt::Long test that was incorrectly written
- The test now has 8 assertions instead of 6
- This matches the actual number of tests being run
@fglock fglock merged commit 86d6e70 into master Jan 27, 2026
2 checks passed
@fglock fglock deleted the fix-make-build branch January 27, 2026 13:57
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