This repository was archived by the owner on Feb 24, 2020. It is now read-only.
makelib: Fix go-find-directories symlink problem #3824
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use the current working directory and not MK_TOPLEVEL_ABS_SRCDIR when
processing 'go list' output in go-find-directories.
Our invocation of 'go list' in the go-find-directories function uses
paths relative to the current working directory and so the output of
that command will have file paths based on the current working
directory. The make file variable MK_TOPLEVEL_ABS_SRCDIR is initialized
with make's abspath function. The abspath function (GNU Make 4.1) will
resolve symlinks. This difference in resolved and unresolved symlinks
causes problems in the go-find-directories function output when building
from a path that includes a symlink.
Fixes 'make unit-check' errors like these when building in a directory
that has a symlink in its path:
stat ./_/home/runner/workspace/src/github.com/.../builds/build-rkt-none/api/v1: no such file or directory
Semaphore-ci uses symlinks, and that is where I found this problem.
Here's a simple test: