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

[Bug]: pnpm workspace projects with no pkg cause rdeps query failures #1837

Open
jbedard opened this issue Jul 2, 2024 · 1 comment
Open
Labels
bug Something isn't working

Comments

@jbedard
Copy link
Member

jbedard commented Jul 2, 2024

What happened?

Some pnpm workspace projects have no npm_package target (the name defined by npm_translate_lock(npm_package_target_name)) because they are never linked into the package store. Projects such as "apps" are part of the pnpm workspace, have dependencies etc, but will most likely never be depended on so do not have npm_package targets. However it seems that target may still be referenced by a target generated by rules_js.

Version

Language(s) and/or frameworks involved: ts+js

How to reproduce

Declare a pnpm workspace, 2 projects, 1 project without an `npm_package`, then run an `rdeps` query such as:

bazel query 'rdeps(//...)'

Any other information?

No response

@jbedard jbedard added the bug Something isn't working label Jul 2, 2024
@stabai
Copy link

stabai commented Jul 2, 2024

Ran a query to trace paths between one of the files I was searching for rdeps of and the package that was missing.

Query:

bazel query "allpaths( \
  '//packages/common:common_npm_package', \
  '//packages/common:workflows/workflowsDependencyGraph.ts')"

Result:

//packages/common:_common_swcrc
//packages/common:_common_swcrc_copy_srcs_to_bin
//packages/common:_common_swcrc_js_filegroup
//packages/common:_gen_tsconfig_common
//packages/common:common
//packages/common:common_npm_package
//packages/common:common_npm_package_files
//packages/common:common_transpile
//packages/common:common_typings
//packages/common:tsconfig_common.json
//packages/common:workflows/workflowsDependencyGraph.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants