diff --git a/.github/actions/initialize-linux-env/action.yml b/.github/actions/initialize-linux-env/action.yml index ef0dbb500..67851bdb8 100644 --- a/.github/actions/initialize-linux-env/action.yml +++ b/.github/actions/initialize-linux-env/action.yml @@ -13,9 +13,12 @@ runs: - name: Setup OpenGL shell: bash run: sudo apt-get install libxi-dev libgl1-mesa-dev libglu1-mesa-dev mesa-common-dev libxrandr-dev libxxf86vm-dev + - name: Run git fetch on vcpkg + shell: bash + run: cd "$VCPKG_INSTALLATION_ROOT" && git checkout . && git fetch && git pull && ./bootstrap-vcpkg.sh - name: Cache Vcpkg id: cache-vcpkg uses: actions/cache@v3 with: path: ~/.cache/vcpkg/archives - key: ${{ runner.os }}-vcpkg-cache \ No newline at end of file + key: ${{ runner.os }}-vcpkg-cache diff --git a/.github/actions/initialize-windows-env/action.yml b/.github/actions/initialize-windows-env/action.yml index 8f472fd00..8e29f97da 100644 --- a/.github/actions/initialize-windows-env/action.yml +++ b/.github/actions/initialize-windows-env/action.yml @@ -7,6 +7,14 @@ runs: uses: ashutoshvarma/setup-ninja@v1.1 with: version: 1.10.0 + - name: Update vcpkg + shell: pwsh + run: | + Push-Location "$env:VCPKG_INSTALLATION_ROOT" + git fetch + git pull + ./bootstrap-vcpkg.bat + Pop-Location - name: Cache Vcpkg id: cache-vcpkg uses: actions/cache@v3 diff --git a/include/lspserv.h b/include/lspserv.h index 286c75b6c..d4b22dbda 100644 --- a/include/lspserv.h +++ b/include/lspserv.h @@ -175,6 +175,8 @@ namespace AsymptoteLsp unique_ptr symmapContextsPtr; unique_ptr>> fileContentsPtr; std::string plainFile; + + std::mutex onChangeMutex; }; class TCPAsymptoteLSPServer : public lsp::TcpServer, public AsymptoteLspServer diff --git a/src/lspserv.cc b/src/lspserv.cc index 328cf9e47..df3aa11ac 100644 --- a/src/lspserv.cc +++ b/src/lspserv.cc @@ -317,6 +317,7 @@ std::string wslUnix2Dos(std::string const& unixPath) void AsymptoteLspServer::onChange(Notify_TextDocumentDidChange::notify& notify) { + std::lock_guard lk(onChangeMutex); logInfo("text change notification"); auto& fileChange = notify.params.contentChanges; diff --git a/vcpkg.json b/vcpkg.json index b91b2cb61..80d1f6374 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -3,6 +3,7 @@ "name": "asymptote", "version": "0.0-snapshot", + "builtin-baseline": "ad3bae57455a3c3ce528fcd47d8e8027d0498add", "dependencies": [ "zlib", "glm",