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

Allow commands to be disabled #661

Open
1 task done
nielsenko opened this issue Mar 14, 2024 · 1 comment
Open
1 task done

Allow commands to be disabled #661

nielsenko opened this issue Mar 14, 2024 · 1 comment

Comments

@nielsenko
Copy link

Is there an existing feature request for this?

  • I have searched the existing issues.

Command

No response

Description

Recently two new commands was added to melos: format and analyze which just wrap dart format and dart analyze.

In my project format script is somewhat more complex than the default command:

  format:
    description: Format code.
    # while we wait for https://github.com/dart-lang/dart_style/issues/864
    run: >-
      find lib test integration_test -name '*.dart' -not -name '*.g.dart' -not -name '*.realm.dart' -not -name 'realm_bindings.dart' 2> /dev/null
      | xargs dart format --fix
    exec: 
      concurrency: 1 # only one project at a time to keep output sane

It would be nice to:

  1. Have the option of disabling a command, to avoid people using it mistakenly.
  2. Get a warning if you have a script that conflict with a command
  3. Perhaps even overwrite the behavior of a command with a script (a bit controversial as it will mess with users expectations).

Reasoning

I got briefly bitten by this as I updated from 4.1.0 to 5.1.0

Additional context and comments

No response

@spydon
Copy link
Collaborator

spydon commented Mar 14, 2024

This was the reason that we made it a breaking change even though it technically wasn't one. Having a warning sounds like a good idea, overwriting the built-in commands sounds like it could be error-prone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants