Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Proposal: leave deno run ... for running scripts and deno task ... for running tasks (contrary to recent changes) #25575

Closed
dsherret opened this issue Sep 11, 2024 · 3 comments
Assignees
Labels
suggestion suggestions for new features (yet to be agreed)
Milestone

Comments

@dsherret
Copy link
Member

dsherret commented Sep 11, 2024

Personally I'm not a fan of the recent changes in Deno 1.46 to conflate deno run with deno task. I think deno run should be for running scripts and deno task should be for running tasks. For example, the recent changes to deno run have made it difficult to support running from an import map #19955

To help people with this, I think we should instead have deno run <task> output Did you mean `deno task <task>`?.

@bartlomieju
Copy link
Member

After much deliberation internally we decided not to do it; the error
handling was improved in #25708 to
not suggest available tasks anymore.

@birkskyum
Copy link
Contributor

birkskyum commented Sep 18, 2024

@bartlomieju , it's a bit hard to keep up - can you briefly note just what the final behavior will be for run and task, and to what extend will run be able to execute/suggest tasks?

@bartlomieju
Copy link
Member

deno run <task> works - it's an alias for deno task <task>. deno run will work exactly like before, but if you try to run something like:

$ deno run dev

The Deno will look for ./dev file, if it's not present it will look up dev task in either deno.json or package.json and it doesn't exist you will get an error saying that ./dev file doesn't exist.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
suggestion suggestions for new features (yet to be agreed)
Projects
None yet
5 participants