Closed Lucki closed 2 years ago
This looks like a Vala compiler bug. I'll compare the output with an older valac
version and report this to Vala devs if I can reproduce this bug.
It also doesn't build with Vala 0.48.20. I guess the problem was backported to the Vala LTS branch.
@Lucki do you remember the last Vala version it built correctly with? Can you easily rollback to that version, verify if it works, and see what's different?
do you remember the last Vala version it built correctly with?
Yes, I've tested that, it's 0.54.3
.
Can you easily rollback to that version, verify if it works, and see what's different?
So in previous versions it creates a temporary variable, but in >= 0.54.4
it inlines GAME_HUB_DATA_PLATFORM_CURRENT
while trying to pass a pointer to it using the &
operator.
GAME_HUB_DATA_PLATFORM_CURRENT
expands into GAME_HUB_DATA_PLATFORM_LINUX
which is an enum constant, so &
here becomes invalid.
I'll try to write a simplified test case later and report this to Vala devs, or you can do it yourself now if you want.
I've reported this to the Vala issue tracker: https://gitlab.gnome.org/GNOME/vala/-/issues/1268
Possible workaround: make Runnable.is_supported
accept non-nullable Platform
and pass Platform.CURRENT
instead of null
everywhere.
It seems the issue is already fixed and fix should be in the next Vala release.
Thanks for looking into it, guess it just was bad timing then.
Fixed by vala 0.54.6
Expected behavior
GameHub compiles correctly with the current vala version.
Actual behavior
The build fails with:
Steps to reproduce
vala
in version0.54.4
or greater.dev
branch.Version and environment