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

Raises Error: multiple bump targets #231

Open
Milly opened this issue Aug 18, 2024 · 3 comments
Open

Raises Error: multiple bump targets #231

Milly opened this issue Aug 18, 2024 · 3 comments

Comments

@Milly
Copy link
Contributor

Milly commented Aug 18, 2024

@molt/action In github action in Denops.vim (eb9ef6a):
https://github.com/vim-denops/denops.vim/actions/runs/10436394656/job/28901411214#step:3:480

deno run --allow-env --allow-read --allow-write --allow-net --allow-run=deno,git --no-prompt --unstable-kv jsr:@molt/[email protected]
...
Error: multiple bump targets for jsr:@std/async

Also, when running the @molt/cli, an AssertionError without message.

> deno task update
Task update deno run --allow-env --allow-read --allow-write --allow-run=git,deno --allow-net=jsr.io,registry.npmjs.org jsr:@molt/cli **/*.ts
error: Uncaught (in promise) AssertionError
    throw new AssertionError(msg);
          ^
    at assert (https://jsr.io/@std/assert/1.0.2/assert.ts:21:11)
    at new Update (https://jsr.io/@molt/core/0.19.6/mod.ts:189:5)
    at Dependency.check (https://jsr.io/@molt/core/0.19.6/mod.ts:137:14)
    at eventLoopTick (ext:core/01_core.js:168:7)
    at async Promise.all (index 0)
    at async Command.actionHandler (https://jsr.io/@molt/cli/0.19.6/main.ts:71:20)
    at async Command.execute (https://jsr.io/@cliffy/command/1.0.0-rc.5/command.ts:1940:7)
    at async Command.parseCommand (https://jsr.io/@cliffy/command/1.0.0-rc.5/command.ts:1772:14)
    at async https://jsr.io/@molt/cli/0.19.6/main.ts:113:1

I'm guessing the cause is probably the same.
How should I deal with this?

@Milly
Copy link
Contributor Author

Milly commented Aug 18, 2024

I tried the following and it worked fine in this simple case:

File: a.ts

import * as _ from "jsr:@std/async@^1.0.0";

File: b.ts

```ts
import * as _ from "jsr:@std/async@^0.224.0";

Run:

> deno run -A jsr:@molt/cli a.ts b.ts
� @std/async 0.224.2 → 1.0.3 (^1.0.0, ^0.224.0 → ^1.0.0)

@hasundue hasundue moved this to Todo in Deno Aug 18, 2024
@Milly
Copy link
Contributor Author

Milly commented Aug 20, 2024

In denops.vim, a non-existent version of @std/async was defined as a test fixture for testing the dependencies cache. This was the direct cause of the error.

File: tests/denops/testdata/no_check/cli_constraint_error_on_issue_401.ts

import * as _ from "jsr:@std/[email protected]";

Does molt/cli have a function to exclude files? I couldn't use --ignore because it ignores dependencies.

I want it like this:

deno run -A jsr:@molt/cli --exclude no_check **/*.ts

It would also be good if the same could be done with molt-action:

steps:
  - uses: hasundue/molt-action@v1
    with:
      source: "**/*.ts"
      exclude: "no_check"

@hasundue
Copy link
Owner

hasundue commented Aug 23, 2024

@Milly Sorry for my late response, and appreciate your effort for investigating the problem 🙏

  • Panicking on a non-existent version is a bug. Should be fixed to just warn it gracefully.

Does molt/cli have a function to exclude files?

No, unfortunately. You may utilize the glob of your shell though.

  • I'm positive to add exclude option and input to the CLI and the action respectively.

I'm preparing for the moving on the weekend these days, so I'm afraid but it is unlikely for these tasks done before that.

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

No branches or pull requests

2 participants