Skip to content

web_package and ts_devserver use different root paths #728

Closed

Description

@jbedard

Affected Rule

ts_devserver, web_package

Description

ts_devserver and web_package treat bazel-out/genfiles differently.

ts_devserver strips all references to bazel-out/genfiles and treats bazel-out/genfiles/src-root the same. web_package does not strip bazel-out/genfiles

Minimal Reproduction

(coming soon, if necessary)

Anything else relevant?

ts_devserver and web_package would preferably share the same logic for this

Activity

  1. alexeagle commented on Apr 29, 2019

    @alexeagle
    Collaborator

    what would the additional_root_paths look like? I wouldn't expect a user needs to configure tools to resolve from all three roots, that should be built-in (meaning bazel-bin/src/foo, bazel-genfiles/src/foo, and src/foo should all be addressed the same way)

  2. jbedard commented on Apr 29, 2019

    @jbedard
    CollaboratorAuthor

    Ideally (correct me if I'm wrong...):

    1. bazel-* would never show up in a url
    2. URLs for for the same resources would be the same in ts_devserver and web_package
    3. you can use additional_root_paths to (consistently) strip other paths

    Right now:

    • ts_devserver swaps /bazel-out/darwin-fastbuild/bin with /{workspace}, where web_package does not
    • web_package strips the path to the BUILD target, ts_devserver does for some but not others (not those in bazel-*?)

    I guess I tried achieving this by manually setting additional_root_paths to contain the bazel-out dir, where it should just happen automatically?

    (then I got confused and assumed the inconsistency was because of inconsistent var support, which might be completely wrong...)

  3. jbedard commented on Apr 29, 2019

    @jbedard
    CollaboratorAuthor

    I think this can be resolved by just adjusting https://github.com/bazelbuild/rules_nodejs/blob/0.28.0/internal/web_package/web_package.bzl#L77-L81 - and maybe share that logic with ts_devserver...

    I'll try to come up with a fix.

  4. changed the title [-]variables in additional_root_paths inconsistent between web_package and ts_devserver[/-] [+]web_package and ts_devserver use different root paths[/+] on Apr 30, 2019
  5. added a commit that references this issue on Apr 30, 2019
    745c9f8
  6. jbedard commented on Apr 30, 2019

    @jbedard
    CollaboratorAuthor

    I've updated the issue description.

  7. added a commit that references this issue on Apr 30, 2019
    97e1593
  8. added a commit that references this issue on May 8, 2019
    6b2b019
  9. added a commit that references this issue on Jun 6, 2019
    188ae59
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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions