paulvarache / vscode-taskfile

VSCode integration with https://taskfile.dev
MIT License
24 stars 3 forks source link

Forever "Fetching Build Tasks..." #8

Open bryceschober opened 4 years ago

bryceschober commented 4 years ago

With my current VS Code setup, triggering "Tasks: Run Build Task..." with the extension installed makes it spin forever "Fetching Build Tasks..."

My current hello-world Taskfile.yml is just:

# Update when https://github.com/paulvarache/vscode-taskfile/issues/6 is resolved
version: '2.8'

tasks:

  build-docker:
    cmds:
      - echo "Building Docker..."

The Taskfile extension output log has:

[jsonrpc] 2020/10/13 16:57:01 Found Handler for method initialize
[jsonrpc] 2020/10/13 16:57:01 Sending response: {"result":{"capabilities":{"textDocumentSync":{"openClose":true,"change":1},"completionProvider":{"resolveProvider":true}}},"error":null,"id":0}
[jsonrpc] 2020/10/13 16:57:01 Found Handler for method initialized
[jsonrpc] 2020/10/13 16:57:01 Sending response: {"result":null,"error":null,"id":0}
[jsonrpc] 2020/10/13 16:57:01 Found Handler for method textDocument/didOpen
[jsonrpc] 2020/10/13 16:57:17 Found Handler for method extension/getTasks
[jsonrpc] 2020/10/13 16:57:17 Sending response: {"result":[{"task":{"value":"build-docker","startLine":10,"startCol":2,"endLine":12,"endCol":33},"scope":"/home/bschober/git/ops-data-broker/Taskfile.yml"}],"error":null,"id":1}

I've installed the latest https://github.com/go-task/task/releases/tag/v3.0.0, it runs task build-docker on a terminal as expected, and my VS Code Help > About is:

Version: 1.50.0
Commit: 93c2f0fbf16c5a4b10e4d5f89737d9c2c25488a3
Date: 2020-10-07T06:01:33.073Z (6 days ago)
Electron: 9.2.1
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Linux x64 4.4.0-148-generic
bryceschober commented 4 years ago

Hmm.... Now I notice that when I click to run a task from the explorer pane, I get a notification:

Error running command taskfile.run: Task is not installed. This is likely caused by the extension that contributes taskfile.run.

... even though my terminal disagrees (from VS Code terminal):

$ which task
/usr/local/bin/task
$ task build-docker
task: echo "Building Docker..."
Building Docker...
mhmdio commented 3 years ago

Confirm @bryceschober issue, same here

vscode-taskfile/src/constants.ts should be:

export const BINARY_PATH_KEY = '/usr/local/bin/';
export const LANGUAGE_SERVER_BINARY_PATH = 'lsp-binary';
export const LAST_CHECKED_TIMESTAMP = 'lsp-ts';
export const REPO_URL = 'https://github.com/go-task/task';
paulvarache commented 3 years ago

@mhmdio The BINARY_PATH_KEY is a key used with vscode's globalState to save the path to task's binary so it should stay as is. This is to support the different installation paths across different OS.

I have had other people reporting a similar issue. @mhmdio can you confirm you are using running this on Linux?

mhmdio commented 3 years ago

check #11 @paulvarache