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

refactor: runner, parser #77

Closed
64 tasks done
metaist opened this issue Aug 23, 2024 · 6 comments
Closed
64 tasks done

refactor: runner, parser #77

metaist opened this issue Aug 23, 2024 · 6 comments

Comments

@metaist
Copy link
Owner

metaist commented Aug 23, 2024

  • cargo.toml
    • workspace
    • ds-supported tasks
  • composer.json
  • makefile
    • workspace
    • help (non-standard)
    • cmd
    • argument interpolation (non-standard; pdm-style + numbered)
    • composite
    • task reference (non-standard)
    • composite args
    • shell in composite
    • env / env-file (via command)
    • error suppression (only at start of command)
    • working directory (via command)
  • package.json
    • workspace
    • help (non-standard)
    • cmd
    • argument interpolation (non-standard)
    • composite (non-standard; pre- and post- only; use ds <first> <second>)
    • task reference (non-standard)
    • shell in composite (use: ds <cmd>)
    • env / env-file (use: ds -e <cmd>)
    • error suppression (use: ds +<cmd>)
    • working directory (use: ds --cwd <dir> <cmd>)
  • ds.toml / pyproject.toml: ds
    • workspace
    • cmd / shell
    • call (only supported in pyproject.toml)
    • composite (alias: chain)
    • task reference
    • shell in composite
    • env / env-file (alias: env_file)
    • cwd (alias: working_dir)
  • pyproject.toml: pdm
    • workspace (non-standard)
    • cmd / shell
    • call
    • composite
    • task reference
    • shell in composite
    • env / env-file
    • working_dir
    • site_package (not supported)
    • shared options
    • argument interpolation
    • pdm placeholder (not supported)
    • error suppression
    • help
    • pre_ and post_
    • hook scripts (not supported)
  • pyproject.toml: poetry
    • workspace (non-standard)
    • call
  • pyproject.toml: rye
    • workspace
    • cmd
    • env / env-file
    • chain
    • call
  • uv.toml / pyproject.toml: uv
    • workspace

* = non-standard
^ = not supported

metaist added a commit that referenced this issue Aug 23, 2024
@metaist
Copy link
Owner Author

metaist commented Aug 23, 2024

Part of the logic here should be to be stricter about formats. If HTML taught us anything its that if you're too lax in how you parse things you start messing up the ecosystem. XHTML taught us that you can't undo this easily.

I want to make sure that I'm pulling the appropriate values from each format and not encouraging behavior that is inappropriate in the individual formats that I support.

@metaist
Copy link
Owner Author

metaist commented Aug 23, 2024

package.json/composer.json are the simplest formats because they only support a mapping of names (strings) to commands (strings). That's why ds has a CLI-version of task behaviors: it provides support to these formats.

@metaist
Copy link
Owner Author

metaist commented Aug 23, 2024

One question is whether something like error suppression should be supported in the text-based formats or if you need to write ds +cspell instead of +cspell. In the former case, at least it's a valid bash command and pnpm could execute it. In the latter case it's not valid bash so it throws an error.

So while it would be shorter, I'm going to move towards being compatible with other tools and not needlessly mess them up.

@metaist
Copy link
Owner Author

metaist commented Aug 25, 2024

Each parser needs some way to handle:

  • workspace members
  • workspace excludes
  • disabled tasks
  • task.help
  • task.cmd
  • task.args
  • task.depends
  • task.cwd
  • task.env (env-file)
  • task.keep_going

@metaist
Copy link
Owner Author

metaist commented Aug 25, 2024

Parsers:

  • ds_toml
  • pyproject_toml (pdm, rye, uv, ds)
  • package_json (npm, yarn, pnpm, bun)
  • cargo_toml
  • uv_toml
  • composer_json
  • makefile

metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
@metaist
Copy link
Owner Author

metaist commented Aug 28, 2024

Just a few more unit tests and I can close this.

metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 28, 2024
metaist added a commit that referenced this issue Aug 29, 2024
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

No branches or pull requests

1 participant