haskell.manageHLS = "PATH" ignored on initial startup

Aperta Adatta ai principianti
#1,332 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Tranquilla
Stack tecnologico
haskell, typescript, vscode

Direzione di ricerca

Inizia in src/hlsBinaries.ts, in corrispondenza di promptUserForManagingHls, e riproduci il problema con una directory vuota per i dati utente e le estensioni usando l’impostazione devcontainer.json fornita. Il lavoro è completato quando un avvio iniziale con haskell.manageHLS impostato su PATH non mostra il popup di gestione/rilevamento; verifica che il comportamento dell’attuale workaround non sia più necessario.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

type: bug
Your environment

MacOS

Steps to reproduce

run vscode with

code --user-data-dir {empty_dir} --extensions-dir {empty_dir} .

with devcontainer.json having

      "settings": {
        "haskell.manageHLS": "PATH",
Expected behaviour

The "How do you want the extension to manage/discover HLS and the relevant toolchain?" popup window should not appear.

Actual behaviour

The popup window will appear.

Include debug information

According to:
https://github.com/haskell/vscode-haskell/blob/3a8d51f0b15b0a49e98ce47a7786e4bf71c6fbbc/src/hlsBinaries.ts#L350

async function promptUserForManagingHls(context: ExtensionContext, manageHlsSetting: ManageHLS): Promise<ManageHLS> {
  if (manageHlsSetting !== 'GHCup' && (!context.globalState.get('pluginInitialized') as boolean | null)) {
    const promptMessage = `How do you want the extension to manage/discover HLS and the relevant toolchain?

    Choose "Automatically" if you're in doubt.
    `;

I have set manageHlsSetting to "PATH" in the devcontainer.json.
It does not equal to "GHCup", so the first part of the condition is true.
The plugin has not been initialized, so the second part of the condition is also true.
Hence the popup window will appear.

Workaround:
Set manageHlsSetting to "GHCup" in the devcontainer.json,
and set all the keys in "haskell.toolchain" to null to mimic the "PATH" behavior.

Lingua principale
TypeScript
Stelle
594
Fork
99
Merge medio
18h 19m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di haskell/vscode-haskell

Tutte le issue di haskell/vscode-haskell

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.