Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools not built in subfolders with build-tools #21119

Closed
lcheylus opened this issue Mar 27, 2024 · 0 comments · Fixed by #21120
Closed

Tools not built in subfolders with build-tools #21119

lcheylus opened this issue Mar 27, 2024 · 0 comments · Fixed by #21120
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@lcheylus
Copy link
Contributor

lcheylus commented Mar 27, 2024

Describe the bug

With the last V version (V 0.4.5 f6a00fa), I have an error when I'm trying to build tools (cmd/tools/) with build-tools target. Tools with sources in sub-directories (vast, vcreate, vdoc, vpm, vvet and vwhere) are not built.

Same error with build on Linux Debian/amd64 and OpenBSD-current/amd64.

Reproduction Steps

  • Clone sources via git clone
  • Build V compiler via make
  • Build tools with ./v build-tools

=> tools in sub-directories are not built.

Expected Behavior

Every tool in cmd/tools and sub-directories are built with ./v build-tools

Current Behavior

Tools with sources in sub-directories (vast, vcreate, vdoc, vpm, vvet and vwhere) are not built with ./v build-tools.

Possible Solution

After some code analysis, this issue was not present in V version 0.4.4. It seems that commit 6a4f293 is the root cause.

  • cmd/tools/vbuild-tools.v: vast, vcreate, vdoc, vpm, vvet and vwhere (sources in sub folders) are initially skipped, then added into a test session.
  • cmd/tools/modules/testing/common.v: function worker_trunner, line 546, build is skipped for the tools list above.

I have a working fix : line 546 => if !ts.build_tools && (abs_path in ts.skip_files)

With this fix, every tool are built during ./v build-tools

I am going to submit a PR with this fix.

V version

V 0.4.5 f6a00fa

Environment details (OS name and version, etc.)

  • Linux Debian testing/amd64
  • OpenBSD current/amd64

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.

@lcheylus lcheylus added the Bug This tag is applied to issues which reports bugs. label Mar 27, 2024
lcheylus added a commit to lcheylus/v that referenced this issue Mar 27, 2024
- In 'cmd/tools/vbuild-tools.v', vast, vcreate, vdoc, vpm, vvet and
  vwhere tools (sources in subfolders) are initially skipped, then
  added into a test session.
- During session run (function 'worker_trunner'), build was skipped for
  the tools list above.

- Fix vlang#21119

Signed-off-by: Laurent Cheylus <foxy@free.fr>
lcheylus added a commit to lcheylus/v that referenced this issue Mar 27, 2024
- In 'cmd/tools/vbuild-tools.v', vast, vcreate, vdoc, vpm, vvet and
  vwhere tools (sources in subfolders) are initially skipped, then
  added into a test session.
- During session run (function 'worker_trunner'), build was skipped for
  the tools list above.

- Fix vlang#21119

Signed-off-by: Laurent Cheylus <foxy@free.fr>
lcheylus added a commit to lcheylus/v that referenced this issue Mar 27, 2024
- In 'cmd/tools/vbuild-tools.v', vast, vcreate, vdoc, vpm, vvet and
  vwhere tools (sources in subfolders) are initially skipped, then
  added into a test session.
- During session run (function 'worker_trunner'), build was skipped for
  the tools list above.

- Fix vlang#21119

Signed-off-by: Laurent Cheylus <foxy@free.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant