Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 1, 2025

Current Behavior

Users specifying directory paths in inputs without a trailing slash or glob pattern find that files are not matched. For example, {projectRoot}/src does not match any files, while outputs allows naked directory paths without issue.

Expected Behavior

Documentation clearly explains that directory paths in inputs require a trailing slash or glob pattern:

{ "inputs": [ "{projectRoot}/src/", // ✓ Works (trailing slash) "{projectRoot}/src/**/*", // ✓ Works (glob pattern) "{projectRoot}/src" // ✗ Does NOT work ] }

Changes

  • Reference doc (reference/inputs.mdoc): Added "Directory Paths" section explaining the requirement with examples
  • Guide (configure-inputs.mdoc): Added callout warning at top alerting users to this behavior
  • Both docs note the difference from outputs, which do support naked directory paths

Related Issue(s)

Fixes https://linear.app/nxdev/issue/NXC-2102/clarify-trailing-slash-requirement-for-inputs-in-directory-paths

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • staging.nx.app
    • Triggering command: /usr/local/bin/node node ./bin/post-install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

Issue Title: Clarify trailing slash requirement for inputs in directory paths
Issue Description: Ideally, bring the syntax supported by inputs in line with that supported by outputs. If this is not possible, document the differences so folks aren't confused.

@steven said:

Is it expected that directories listed in inputs must have a trailing slash or a glob pattern?

Doesn't work: {projectRoot}/src
Works: {projectRoot}/src/ and projectRoot}/src/***/**

Is this due to our support for named inputs maybe?

(happy to be pointed to where we're doing this in code, but a quick search for the key inputs has left me with too much to parse through)

In contrast, outputs support naked directories w/o issue.
Fixes https://linear.app/nxdev/issue/NXC-2102/clarify-trailing-slash-requirement-for-inputs-in-directory-paths

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
https://github.com/nrwl/nx

Comment by User d484ef82-7f7d-4a95-be09-9d82ca3905dc:
📋 I wasn't able to determine which GitHub repository to work in.

I think it's one of these, but can you tell me which one is right?

Comment by User :
This thread is for an agent session with githubcopilot.

Comment by User 439b15a6-827b-4258-971a-d86133ad59de:
yeah throw it at copilot for the docs if it's something sticky clients keep hitting. probs just want this page
depending on if you want to denote this on the outputs or inputs page.
https://nx.dev/docs/guides/tasks--caching/configure-outputs
https://nx.dev/docs/guides/tasks--caching/configure-inputs

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
@caleb Do you think this is worth documenting? Could probably just throw it at Copilot if so, since there's a decent amount of context in the thread.

Comment by User :
This comment thread is synced to a corresponding thread in Slack. All replies are displayed in both locations.

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
yeah just misc probably

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
@MaxK -- Is core where you track things for console?

@jon -- Should I create a Linear task for this? (if so, where? Also Core?)

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:

yeah okay, can you make a ticket for that?

Is there a linear board for Console? Or should I do this on github?

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
Ahh the long term fix is part of that other thread from a while ago where the static output takes forever :thinkspin:

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
but long-term, idk

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
so the fix for it now shouldn't be too tricky

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
nope, should be fine (for now). Tbf the way the task graph works right now is bad though. We compute potential tasks graphs for everything which takes a long time. We need to update it so that the graphs are built on demand from the project graph instead. And once that happens in the browser, it might become less trivial

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
Sure thing!

Is there any issue with calling into native/rust code for the graph?

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
yeah okay, can you make a ticket for that? We wanted to look into merging these functions anyways at some point just never got around to it

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
Correct. CLI supports foo/ but graph doesn't expand it without globs added.

With the additional potential addition of a "naked" path being enumerated if it points to a directory as it works for output (pending Jon's discovery).

Comment by User 899d8ea3-41b0-4565-8819-1c9ec8af943a:
well i think functionality is either my business or jon’s business depending in where the mistake is exactly ^^
Just to make sure i’m getting this right: we don’t interpret the SS1 syntax correctly when listing the input files in the graph. It should contain test-file.txt even with the SS1 syntax. The cli correctly picks up the file as an input with SS1 syntax, though.
Is that correct? That it’s a graph-only problem?

Comment by User bfb77a6b-f2e4-4252-a69b-abba8c2d0bf0:
@MaxK While testing this, I also noticed that we don't expand directories in the task graph when using the trailing slash syntax for inputs:

SS 1 is with "inputs": ["{projectRoot}/src/"],
SS 2 is with "inputs": ["{projectRoot}/src/***/**"],

repro

*(sorry if task graph is not under the c...


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI assigned Copilot and llwt Dec 1, 2025
@netlify
Copy link

netlify bot commented Dec 1, 2025

Deploy Preview for nx-docs ready!

Name Link
🔨 Latest commit e777c09
🔍 Latest deploy log https://app.netlify.com/projects/nx-docs/deploys/692d0eea2898dc0008c19947
😎 Deploy Preview https://deploy-preview-33664--nx-docs.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link

vercel bot commented Dec 1, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Updated (UTC)
nx-dev Ready Ready Preview Dec 1, 2025 3:49am
Co-authored-by: llwt <1036428+llwt@users.noreply.github.com>
Copilot AI changed the title [WIP] Clarify trailing slash requirement for inputs in directory paths docs: clarify trailing slash requirement for inputs directory paths Dec 1, 2025
Copilot AI requested a review from llwt December 1, 2025 03:45
Copilot finished work on behalf of llwt December 1, 2025 03:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants