Skip to content

Commit

Permalink
Forward -testfilter to nogo and fix failure in case of no srcs (baz…
Browse files Browse the repository at this point in the history
…el-contrib#4075)

**What type of PR is this?**

Bug fix

**What does this PR do? Why is it needed?**

Without this, nogo runs on the external test sources when compiling the
internal test library, which can result in missing deps errors and is
also wasteful. Since filtering out files made certain nogo actions run
on no files, also fix a bug that affects this situation by writing out
an empty log in addition to an empty facts file.

The code that checks imports and builds the importcfg was shared between
`compilepkg` and `nogo` and is now extracted into a common method. Along
the way, have it output the file into the working directory, which
simplifies cleanup, makes the file easier to find and avoids writing
files unknown to Bazel into the output directory.

Also removes some unused test files.

**Which issues(s) does this PR fix?**

Fixes bazel-contrib#4062
Fixes bazel-contrib#4070
Fixes bazel-contrib#4073

**Other notes for review**
  • Loading branch information
fmeum authored and tyler-french committed Sep 4, 2024
1 parent 02c557f commit 818fe81
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions go/private/actions/archive.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load(
"//go/private:context.bzl",
"get_nogo",
)
load(
"//go/private:context.bzl",
"get_nogo",
Expand Down

0 comments on commit 818fe81

Please sign in to comment.