CI: Windows FastC generated C calls _wgetcwd without a declaration (MSVC)

Open
#32,763 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
18/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Active
Tech stack
c
Domain
build-system

Research direction

Start with the MSVC CI failure in vlib/v/gen/fastc/integer_callback_patterns_test.v and inspect the kept generated src.unit3.c around the _wgetcwd call, checking which headers and prototypes precede it. Compare against the C._wgetcwd declaration in vlib/builtin/cfns.c.v and the call in vlib/os/os.c.v. Done means the nested FastC regressions pass on Windows MSVC and TCC with Linux and Windows GCC controls still green, without disabling tests.

Written by the indexing model from the issue text.

Description

Executed failure and recurrence

  • Master 593657221cd2ef2063d41979a7b827e8cb12ecd5, Windows MSVC shard 3, completed 2026-11-22 22:11:32 UTC. vlib/v/gen/fastc/integer_callback_patterns_test.v:167 fails when nested FastC-generated src.unit3.c:5096 reports error: implicit declaration of function '_wgetcwd'. Compiler warnings about WIN32_LEAN_AND_MEAN and incompatible pointers are separate diagnostic context.
  • Windows MSVC shard 0 at 22:28:41 UTC repeats implicit declaration of function '_wgetcwd' in vlib/v/gen/fastc/loom2v_test.v:228 from generated src.unit3.c:3186 (and has another separate path expectation failure).

Root candidates

vlib/os/os.c.v calls C._wgetcwd in the Windows getcwd path, with a declaration in vlib/builtin/cfns.c.v, yet the nested FastC C unit does not make a C prototype visible before the call under the strict bundled compiler. Need inspect exact kept C includes/declarations, FastC build flag/header ordering and Windows CRT <direct.h> vs explicit declaration—do not assume a missing cfns.c.v declaration or change global headers without proof. Current master 44bbfa43 only changed bootstrap scripts/workflows and the source remains plausibly applicable. Original introduction commit unknown.

Repair gate

Reduce a tiny Windows FastC V program calling os.getwd()/current directory, retain src.unit3.c, inspect definition/prototype ordering, then fix minimal FastC header/registration emission. Run original MSVC and TCC nested FastC regressions plus Windows GCC and Linux GCC/Clang controls. No test disable, diagnostic suppression or speculative assertions. No patched native Windows run available.

Normalized root R396, investigating, first 22:11 UTC and last 22:28 UTC November 22, 2026.

[!NOTE]
You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

Dominant language
V
Stars
38.1k
Forks
2.3k
Avg merge
1d 1h
Merged PRs (30d)
682

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from vlang/v

All issues in vlang/v

Similar issues

More Build System issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.