-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Breaking change in unstable workspaces configuration field #24456
Comments
Thanks for using the new workspace feature, but it's been considered unstable and undocumented so expect breaking changes (see how the flag was removed, but it's still considered unstable #21891). I don't think it's even been announced. I'm updating the title of this issue to reflect this so it's clear. It's going to be released next week in Deno 1.45.
If the field does keep it's name, we won't be doing this because it's been an unstable feature. |
I think Cargo has this right (https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-a-workspace). It's a singular workspace with multiple workspace members. The current form is essentially a shorthand of the following (though this isn't supported atm) and there might be more properties added under there in the future: "workspace": {
"members": ["./member-1", "./member-2"]
} |
I don't think the name
Namely, the usage of 'workspace root' as opposed to 'root workspace' (FWIW npm's docs are a lot more careful). The conclusion in this discussion npm/feedback#510 is that they didn't want to diverge from yarn and don't want to make a breaking change after the fact. But you can see it's controversial. I speculate that the reverse wouldn't have been. As well as the cargo example above, we align with VSCode's effective usage of 'workspace'. |
This makes the naming clear as `"workspace": [...]` is shortform for `"workspace": { "members": [...] }` similar to cargo (https://doc.rust-lang.org/book/ch14-03-cargo-workspaces.html#creating-a-workspace) and leaves this open for future properties. denoland/deno#24456 (comment)
Hey @nayeemrmn and @dsherret, sorry for the late reply and for commenting on a closed issue. I've been AFK dealing with family stuff and birthday celebrations, so I'm just now getting back to everything. Looking back, I realize I was a bit naive in creating this issue without fully understanding (or researching) that I was dealing with a pre-release and undocumented feature 😬. In hindsight, I retract all my previous statements. Lately, I've been diving deep into Rust, and I have to say, following the Cargo semantics of Edit: I also wanted to mention that I just saw the new documentation for the workspaces feature, and it does a phenomenal job explaining it all. 👏🏼 You guys rock |
Forgive me if this has been discussed or announced somewhere and if I've overlooked it. I couldn't find any issues related to this after a cursory search just now. Also, please forgive me in advance for this somewhat longwinded post.
Background:
I've been using the new-ish workspaces feature over the last few months in my monorepo projects that I manage with Deno. The root
deno.json
files included a"workspaces"
field that instructed Deno of the child projects living beneath it. This setup has been working just fine for at least a month or two now.Issue:
Fast forward to Wednesday or Thursday last week, I spooled up a codespace configured to upgrade my Deno installation to the latest canary build upon start-up. As soon as I attempted to run a task to execute all unit tests in the monorepo and generate coverage for all workspace members, I encountered this error:
No, I definitely did not. At this point, I felt like I was experiencing a Bernstein/Berenstain Bears situation. I checked my configuration files for several other projects on my local machine, confirming that on a slightly older canary build, the
workspaces
configuration worked fine.Concerns:
Intuitiveness: The previous name
"workspaces"
is much more intuitive than its singular sibling"workspace"
. The former clearly indicates a list of projects managed by that configuration file and aligns with existing naming conventions established by package managers like pnpm, yarn, and npm.Abrupt Change: This unannounced breaking change in a patch/pre-patch release is counterintuitive and shortsighted. I understand it is a canary build, which is why I've decided to air my concerns before it is rolled out for good.
User Impact: This will impact users who have been eagerly adapting their monorepos to use Deno given its newfound support for the pattern. Without a warning or transition plan, it effectively breaks every project like mine from one version to the next. I'd imagine I wouldn't be the only one upset about that.
Suggested Resolution:
"workspaces"
field during the adoption period for the new naming convention.I appreciate your attention to this matter and look forward to your response.
The text was updated successfully, but these errors were encountered: