Skip to content

feat(cli): alias --unstable-sloppy-imports to --sloppy-imports #29780

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

Merged

Conversation

kingsword09
Copy link
Contributor

closes: #29705
Alias --unstable-sloppy-imports to --sloppy-imports

@anonhostpi
Copy link

anonhostpi commented Jun 17, 2025

Why? What does this achieve? There's no documentation on #29705

@anonhostpi
Copy link

Are you trying to bypass the review process of making an unstable flag seem stable?

@bartlomieju
Copy link
Member

Are you trying to bypass the review process of making an unstable flag seem stable?

What makes you say that this contributor is trying to bypass a review process? There's no formalized review process to stabilize a flag and it's at the discretion of the core team to do that.

@anonhostpi
Copy link

Nothing, I was just scrutinizing the quality of the PR. At a surface-level this appears to have qualities of an XZ-utils attack. Not saying that it is, just asking why it has been set up that way.

@bartlomieju
Copy link
Member

There's not much else to do when stabilizing a flag - it's really just flipping a value.

@anonhostpi
Copy link

anonhostpi commented Jun 17, 2025

I mean ultimately up to you dog, if you trust this contributor, go for it.

The lack of documentation on this ticket or the cited one when discussing unstable features is a red flag.

To be clear, I'm not saying it is one way or the other, just at the surface, looks questionable.

@kingsword09
Copy link
Contributor Author

I just saw that there was an issue and thought I'd try to contribute.

@dsherret dsherret added this to the 2.4.0 milestone Jun 17, 2025
Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks for the PR, @kingsword09

We'll merge this one for the 2.4 release (I skipped approval for now and will merge once we're done doing patch releases for 2.3)

@nayeemrmn
Copy link
Contributor

It's strange that the config file (preferred?) equivalent is still 'unstable'. There should be a "sloppyImports": true deno.json field to go with this.

@bartlomieju
Copy link
Member

It's strange that the config file (preferred?) equivalent is still 'unstable'. There should be a "sloppyImports": true deno.json field to go with this.

I literally had the same revelation 15m ago. We also discussed features field in the past. Not sure if we should do this stabilization in this release.

@nayeemrmn
Copy link
Contributor

Some arguments for top-level keys "sloppyImports": true as opposed to "features": ["sloppy-imports"]:

  • Most experimental features are stabilised by making them enabled unconditionally. There won't/shouldn't be many settings like this.
  • Having both "unstable": [] and "features": [] would feel confusing and redundant, yet renaming unstable to features wouldn't communicate instability.
  • Usual alignment with the --sloppy-imports flag. You wouldn't have to check the docs to infer one syntax from the other.

@dsherret
Copy link
Member

dsherret commented Jul 1, 2025

I agree about adding a sloppyImports: true top level config. It also makes it more discoverable and allows flipping the default in the future.

Copy link
Member

@dsherret dsherret left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@dsherret dsherret enabled auto-merge (squash) July 1, 2025 16:23
@dsherret dsherret merged commit 1946d35 into denoland:main Jul 1, 2025
61 of 69 checks passed
@kingsword09 kingsword09 deleted the feat-alias-unstable-sloppy-imports branch July 1, 2025 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Alias --unstable-sloppy-imports to --sloppy-imports
5 participants