Linux TCC VLS go-to-definition resolves imported enum member to its enum type (master CI)

Open
#32,753 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
22/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Domain
devtools

Research direction

The failing case is imported_enum_value in vlib/v/tests/vls/goto_def_test.v, queried at line 129, column 25 of goto_def_test_data.vv, for sample_mod1.PublicEnum1.a. The member a is declared at vlib/v/tests/vls/sample_mod1/sample.v:25, but the lookup returns the type declaration at line 23. Run ./v -cc tcc -no-retry-compilation -silent vlib/v/tests/vls/goto_def_test.v first, then compare with GCC or Clang. Done means all 34 assertions pass with the expected destinations unchanged.

Written by the indexing model from the issue text.

Description

Executed regression (R387 — investigation, not a queue report)

On master 593657221cd2ef2063d41979a7b827e8cb12ecd5, Linux TCC shard 1 job 137340573353 actually failed on 2026-11-22 at about 20:30 UTC, after 1,794 other VLIB tests passed (219 skipped). Exact failing suite vlib/v/tests/vls/goto_def_test.v, under VFLAGS=-cc tcc -no-retry-compilation, VTEST_FAIL_FAST=1, VJOBS=4. The 34-case go-to-definition test passed 33/34; solely imported_enum_value fails:

  • Query goto_def_test_data.vv line 129, column 25, for imported sample_mod1.PublicEnum1.a.
  • Expected value declaration vlib/v/tests/vls/sample_mod1/sample.v:25:1 (the a member).
  • Actual destination sample.v:23:9 (the PublicEnum1 type declaration).

This is an executed semantic VLS lookup mismatch, not a job cancellation, setup failure, fixture intentionally failing or diagnostic notice; don't change expected value to the type merely to make CI pass. Both the fixture and expectation are byte-for-byte the same in earlier 11ecc52b; the nearby parser source changes through 593657 only adjust comments. Introduction SHA and applicability on latest corrected master remain unknown; do not blame the new top commit or close because newer jobs are queued.

Next action

Run exact ./v -cc tcc -no-retry-compilation -silent vlib/v/tests/vls/goto_def_test.v on current revision and compare with GCC/Clang and the earlier fixed 11ecc52b TCC shard. Instrument imported enum-member resolution (member token range vs imported enum type token range), imported-module symbol/index cache, and new/old parser paths. Fix the actual destination mapping while retaining all 34 assertions; add a focused imported-enum member definition regression. Source changes need V self/fmt and real native TCC VLS validation. No local complete V checkout is currently available to this CI repair task.

[!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 DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.