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

Panic with deno info in BYONM #25903

Closed
lucacasonato opened this issue Sep 27, 2024 · 5 comments · Fixed by #25947
Closed

Panic with deno info in BYONM #25903

lucacasonato opened this issue Sep 27, 2024 · 5 comments · Fixed by #25947
Assignees
Labels
bug Something isn't working correctly
Milestone

Comments

@lucacasonato
Copy link
Member

{
  "nodeModulesDir": "manual",
  "imports": {
    "chalk": "npm:chalk@^5.3.0"
  }
}
$ deno install
$ deno info npm:chalk --json
============================================================
Deno has panicked. This is a bug in Deno. Please report this
at https://github.com/denoland/deno/issues/new.
If you can reliably reproduce this panic, include the
reproduction steps and re-run with the RUST_BACKTRACE=1 env
var set and include the backtrace in your report.

Platform: linux x86_64
Version: 2.0.0-rc.6+88a4f8d
Args: ["deno", "info", "npm:chalk", "--json"]

thread 'main' panicked at cli/resolver.rs:792:47:
internal error: entered unreachable code
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
@lucacasonato lucacasonato added the bug Something isn't working correctly label Sep 27, 2024
@bartlomieju bartlomieju added this to the 2.0.0 milestone Sep 27, 2024
@yazan-abdalrahman
Copy link
Contributor

@lucacasonato @bartlomieju
It should work or return an error instead of being unreachable?

@yazan-abdalrahman
Copy link
Contributor

@lucacasonato

It should either provide an error stating "BYONM resolver is not supported in this context" or support it.

@dsherret
Copy link
Member

@yazan-abdalrahman sorry, I should have assigned this one to me, but I'm going to do this one because it requires a bit of investigation and is in the hot path for 2.0.

@dsherret dsherret self-assigned this Sep 30, 2024
@yazan-abdalrahman
Copy link
Contributor

@yazan-abdalrahman sorry, I should have assigned this one to me, but I'm going to do this one because it requires a bit of investigation and is in the hot path for 2.0.

I found something that I'm not sure if it's correct. I altered the condition to make info go through CliNpmResolverCreateOptions::Managed rather than CliNpmResolverCreateOptions::Byonm, and it returned this result.

deno.factory.rs.2024-09-30.16-42-35.mp4

@dsherret

@dsherret
Copy link
Member

It's not. We don't want to use the managed resolver when using byonm ("manual") resolution.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug Something isn't working correctly
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants