Skip to content

odd module mismatch, vlib/sync vs coreutils/src/syncΒ #27151

Closed

Description

@JalonSolov

Describe the bug

V seems to think there is a connection between vlib/sync module and src/sync directory in coreutils.

Reproduction Steps

  1. git clone https://github.com/vlang/coreutils
  2. cd coreutils
  3. v -d trace_same_results -stats src/uptime/uptime_nix_test.v

Expected Behavior

Clean test.

Current Behavior

$ v -d trace_same_results -stats src/uptime/uptime_nix_test.v
/home/jalon/git/v/vlib/v/ast/table.v:101:21: builder error: bad module definition: /home/jalon/git/v/vlib/v/ast/table.v imports module "sync" but /home/jalon/git/coreutils/src/sync/sync.v is defined as module `main`
   99 |     pointer_size      int
  100 |     // cache for type_to_str_using_aliases
  101 |     cached_type_to_str shared map[u64]string
      |                        ~~~~~~
  102 |     // counters and maps for anon structs and unions, to avoid name conflicts.
  103 |     anon_struct_names   map[string]int // anon struct name -> struct sym idx
/home/jalon/git/v/vlib/v/ast/table.v:101:21: builder error: bad module definition: /home/jalon/git/v/vlib/v/ast/table.v imports module "sync" but /home/jalon/git/coreutils/src/sync/sync_nix.c.v is defined as module `main`
   99 |     pointer_size      int
  100 |     // cache for type_to_str_using_aliases
  101 |     cached_type_to_str shared map[u64]string
      |                        ~~~~~~
  102 |     // counters and maps for anon structs and unions, to avoid name conflicts.
  103 |     anon_struct_names   map[string]int // anon struct name -> struct sym idx
$

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.5.1 6cafb40

Environment details (OS name and version, etc.)

|V full version      |V 0.5.1 ed5fc1638abe439f5b4d5d31e0c91a81af065b94.6cafb40
|:-------------------|:-------------------
|OS                  |linux, "CachyOS"
|Processor           |32 cpus, 64bit, little endian, AMD Ryzen 9 7950X 16-Core Processor
|Memory              |13.29GB/30.48GB
|                    |
|V executable        |/home/jalon/git/v/v
|V last modified time|2026-05-13 02:00:55
|                    |
|V home dir          |OK, value: /home/jalon/git/v
|VMODULES            |OK, value: /home/jalon/.vmodules
|VTMP                |OK, value: /tmp/v_1000
|Current working dir |OK, value: /home/jalon
|                    |
|Git version         |git version 2.54.0
|V git status        |0.5.1-1555-g6cafb401
|.git/config present |true
|                    |
|cc version          |cc (GCC) 16.1.1 20260430
|gcc version         |gcc (GCC) 16.1.1 20260430
|clang version       |clang version 22.1.3
|tcc version         |tcc version 0.9.28rc 2025-02-13 HEAD@f8bd136d (x86_64 Linux)
|tcc git status      |thirdparty-linux-amd64 696c1d84
|emcc version        |N/A
|glibc version       |ldd (GNU libc) 2.43

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.

Activity

  1. added
    BugThis tag is applied to issues which reports bugs.
    on May 13, 2026
  2. medvednikov commented on May 24, 2026

    @medvednikov
    Member

    Fixed in 0381e5d

  3. added a commit that references this issue on May 24, 2026
    975b313
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugThis tag is applied to issues which reports bugs.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions