Skip to content

v.pref: error with exit if coroutines not supported#26342

Merged
spytheman merged 1 commit into
vlang:masterfrom
lcheylus:coroutines-error
Jan 13, 2026
Merged

v.pref: error with exit if coroutines not supported#26342
spytheman merged 1 commit into
vlang:masterfrom
lcheylus:coroutines-error

Conversation

@lcheylus

Copy link
Copy Markdown
Contributor

When building with -use-coroutines, immediate exit with error message if coroutines not supported (OS != Linux/macOS).

  • Before this fix, build on OpenBSD/amd64: error message then build continues and fails.
$ ./v -use-coroutines examples/coroutines/simple_coroutines.v
coroutines only work on macos & linux for now
================== C compilation error (from tcc): ==============
cc: tcc: error: file '/home/fox/dev/vlang.git/thirdparty/photon/photonwrapper.so' not found
=================================================================
Try passing `-g` when compiling, to see a .v file:line information, that correlates more with the C error.
(Alternatively, pass `-show-c-output`, to print the full C error message).
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
  • With this fix, immediate exit with error message:
$ ./v -use-coroutines examples/coroutines/simple_coroutines.v
coroutines only work on macOS & Linux for now

Signed-off-by: Laurent Cheylus <foxy@free.fr>

@spytheman spytheman left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is indeed a better choice 🤔 .
Thank you @lcheylus 🙇🏻 .

@spytheman spytheman merged commit eef91ce into vlang:master Jan 13, 2026
80 of 81 checks passed
@lcheylus lcheylus deleted the coroutines-error branch January 13, 2026 12:34
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