-
Notifications
You must be signed in to change notification settings - Fork 184
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
Add support for optional paths #472
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR! Left a few comments, mostly about Rust stuff
c2f87b0
to
991b7a7
Compare
Note: This PR is designed to be merged as a semi-linear merge, or more likely, a regular merge. This will preserve commit history. |
I would not worry about preserving commit history here. Reviewing and merging PRs commit-by-commit is usually only helpful for incremental refactors, large changes, or a mix of mechanical and manual changes. I don't think this PR qualifies, and I have been reviewing it as a single chunk. |
…e defined either as `"$path": "src"` or `"$path": { "optional": "src" }`
991b7a7
to
3ae5206
Compare
3ae5206
to
49acd39
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Digging the latest round of changes!
It looks like there's a test failure, make sure you commit your updated Insta snapshot tests.
This should be the last feedback from me. If everything works from here, then I think we're good to go. I'd appreciate it if you would also file a PR on https://github.com/rojo-rbx/rojo.space with documentation updates! 😊
rojo-test/serve-tests/add_optional_folder/src/node_modules.project.json
Outdated
Show resolved
Hide resolved
I'll be taking a look at this today, sorry for the delay. |
49acd39
to
069e2c8
Compare
Iterating to merge this in for 7.0 stable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Going through with merging this, and opened an issue about the remaining issue.
* Add PathNode with optional fields to project. This allows a path to be defined either as `"$path": "src"` or `"$path": { "optional": "src" }` * Make $path truly optional * Prevent rojo from erroring if no project node is resolved * Use match instead of if-statement * Add end-to-end tests (credit to MobiusCraftFlip for initial scenario) * Pass option with ref inside instead of reference to option * Empty commit to restart GitHub Actions * Simplify build test * Minimize serve test: it fails * Simplify serve test even more * Ignore failing serve test Co-authored-by: Lucien Greathouse <[email protected]>
Closes #383 by adding the fields
"path": "src"
or"path": { "optional": "src" }
which indicates that the path is optional. Also adds a unit test by @MobiusCraftFlip adjusted for this format.I recommend reviewing this PR commit-by-commit for clarity.
This pull request enables scenarios with
node_modules
and other tools that sometimes create folders and sometimes does not.