From 639737f84e2fb5b15ed2f06a77aec3b994d0af0a Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Sat, 13 Apr 2024 14:06:03 -0600 Subject: [PATCH 1/3] VCPKG: Add baseline for 4/13/2024. --- vcpkg.json | 1 + 1 file changed, 1 insertion(+) 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", From 4ba87c6063d57c73d903d43d315c1bb716f34157 Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Sat, 13 Apr 2024 22:49:11 -0600 Subject: [PATCH 2/3] CI: Update vcpkg during CI system initialization. --- .github/actions/initialize-linux-env/action.yml | 5 ++++- .github/actions/initialize-windows-env/action.yml | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) 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 From 7ed34444c62cc75954425f29c4f04149647fdb1c Mon Sep 17 00:00:00 2001 From: Supakorn 'Jamie' Rassameemasmuang Date: Sat, 20 Apr 2024 11:51:42 -0600 Subject: [PATCH 3/3] LSP: Add mutex to on change to ensure changes are not done concurrently. --- include/lspserv.h | 2 ++ src/lspserv.cc | 1 + 2 files changed, 3 insertions(+) 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;