Skip to content

FR: Glob should allow a way to match files with no extension #5769

Closed

Description

@alexeagle

To minimise the number of inputs to nodejs actions, we restrict the files we download from npm, skipping garbage like design docs, tests, and so on.
Typical glob looks like this:
https://github.com/bazelbuild/rules_nodejs/blob/5829f59771ef87a8a8a9685129fe98261d2d446f/internal/npm_install/npm_install.bzl#L37-L48
but that brings a lot of junk. It would be better to only bring in .json, .js, and .d.ts files like here:
https://github.com/bazelbuild/rules_typescript/blob/00b2c9bea1024ff7792d5e42863ce1e3e42a78bd/BUILD.bazel#L42-L49
However, we often need to run a top-level binary, and so this glob has to make a special case in order to get the file http-server/bin/http-server included in the filegroup.

This issue is a feature request for some way to write a glob pattern that matches all files with no extension.

Activity

  1. added
    untriaged
    team-Bazel
    and removed on Nov 21, 2018
  2. alexeagle commented on Dec 19, 2018

    @alexeagle
    ContributorAuthor

    FWIW, we realized that glob makes the analysis phase hopelessly slow (especially on Windows) so we've stopped using it. We were able to generate BUILD files with explicit file lists by looking on the disk once at install time.

    I think this issue can probably be closed, since rules_nodejs doesn't care anymore.

  3. ittaiz commented on Dec 20, 2018

    @ittaiz
    Member
  4. added and removed
    team-Bazel
    on Jul 23, 2019
  5. removed
    untriaged
    on Jul 24, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions