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

Support config auto detection with enabled paths #713

Closed
kitsonk opened this issue Sep 13, 2022 · 5 comments
Closed

Support config auto detection with enabled paths #713

kitsonk opened this issue Sep 13, 2022 · 5 comments
Labels

Comments

@kitsonk
Copy link
Contributor

kitsonk commented Sep 13, 2022

Slightly related:
I have a config like so

{
    "deno.enable": true,
    "deno.unstable": true,
    "deno.enablePaths": [
        "./api",
        "./webapp"
    ]
}

and configs in ./api/deno.jsonc and ./webapp/deno.jsonc. However, VS code doesn't seem to take the config into account, especially the import_map option, despite those folders being listed as "paths". I would expect each path to be considered its own Deno app with potentially a config of its own.

See Monorepo discussion: denoland/deno#9126 (comment)

Originally posted by @eric-burel in #701 (comment)

@kitsonk
Copy link
Contributor Author

kitsonk commented Sep 13, 2022

There are two issues here, one is "easy" the other is "hard":

  1. When there is an enabled path, check there for config file auto detection versus the root of the workspace. (easy)
  2. Support multiple config files in the same workspace. (hard) This is due to that there is only one instance of the Deno language server running, and that instance has a configuration. We don't currently have the infrastructure to support multiple configurations in a single running language server and would be a fairly major re-architecture of how that works. Desired, but diffcult.

@eric-burel
Copy link

Thanks for opening a specific issue for this! So until this can be supported, I'll try to investigate how far I can go with just 1 config and import_map. After all, having just one file to manage is also a plus so it's worth it. I'll post updates on the "monorepo discussion" since this repo is specific to the VS Code extension: denoland/deno#9126 (reply in thread)

@Leokuma
Copy link
Contributor

Leokuma commented Jul 11, 2023

@bartlomieju This is fixed now. I just tested on Deno 1.35.0 and VSCode 1.80.0.

niedzielski added a commit to niedzielski/vscode_deno-713 that referenced this issue Jul 16, 2023
Reproduction case for denoland/vscode_deno#713.
@niedzielski
Copy link

This doesn't seem to work for me on Deno v1.35.1, Deno VSCode extension v3.19.1, VSCodium v1.80.1. I have a pretty simple reproduction case here with this structure:

├── deno.json <-- I only know how to resolve std
├── root.test.ts
└── sub
    ├── deno.json <-- I know how to resolve esbuild_deno_loader
    └── sub.ts <-- I import esbuild_deno_loader

deno run sub/sub.ts runs in the CLI but opening sub.ts in VSCode shows typing errors for esbuild_deno_loader. I have the same issue with .ts files as with extensionless executable scripts. The root deno.json is always used but that doesn't have the same import map as the deno.json in the subdirectory.

@bartlomieju bartlomieju reopened this Jul 17, 2023
@nayeemrmn
Copy link
Collaborator

Closing in favour of #787.

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

No branches or pull requests

7 participants