From 0c2b152c7c04886b0d1a42be3482a0b7cca1aaca Mon Sep 17 00:00:00 2001 From: VSteveHL Date: Mon, 7 Jul 2025 10:51:51 +0800 Subject: [PATCH 1/4] feat: Modify GitHub workflow file MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I have modified the `.github/workflows/release.yaml` file and made the following changes: - Removed the `repo` variable: - This variable specifies which repository the release targets. Since its default value is the current repository, I believe leaving it empty is reasonable. - Added `name` - Added `tag_name` - Added `body` to provide some contextual information. --- .github/workflows/release.yaml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d2a887c2..376beb70 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -46,8 +46,15 @@ jobs: - name: Release uses: softprops/action-gh-release@v2 with: - repo: ufo5260987423/scheme-langserver + name: Scheme LangServer Auto-generated Build + tag_name: automated_build files: | build/scheme-langserver-x86_64-linux-glibc build/scheme-langserver-x86_64-linux-musl + body: | + This is an automated release of Scheme LangServer. + + **Commit:** ${{ github.sha }} + **Branch:** ${{ github.ref_name }} + **Pipeline Run:** ${{ github.run_id }} From 25e88a9122d24db45c8830c5339bfa3ac284aba4 Mon Sep 17 00:00:00 2001 From: VSteveHL Date: Mon, 7 Jul 2025 13:27:03 +0800 Subject: [PATCH 2/4] fix: Fix Dockerfile.musl issue preventing --static compilation In commit 0d7952775bf576ae2cc862319c54b831e571411e, a modification was made to `.github/workflows/release.yaml`, adding the `--static` parameter in the "Compile executable on Linux musl" step. However, the corresponding `Dockerfile.musl` was not updated, which caused errors during the build process. This commit adds the `util-linux-static` package to `Dockerfile.musl`, allowing the build to proceed successfully. --- Dockerfile.musl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile.musl b/Dockerfile.musl index a507f523..50bf9eb6 100644 --- a/Dockerfile.musl +++ b/Dockerfile.musl @@ -52,8 +52,8 @@ RUN akku install FROM alpine:latest ENV DEBIAN_FRONTEND=noninteractive -RUN apk update && apk add \ - git alpine-sdk util-linux-dev libuuid make +RUN apk update && apk add --no-cache \ + git alpine-sdk util-linux-dev libuuid make util-linux-static # add chez scheme COPY --from=build-chez /usr/bin/scheme /usr/bin/ From 63f3e42b789865b6453ee7e6c9611ed63468185e Mon Sep 17 00:00:00 2001 From: VSteveHL Date: Wed, 9 Jul 2025 22:28:33 +0800 Subject: [PATCH 3/4] sync from xmain --- analysis/package-manager/txt-filter.sls | 7 ++----- analysis/workspace.sls | 15 +++++++-------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/analysis/package-manager/txt-filter.sls b/analysis/package-manager/txt-filter.sls index 96bc88e8..45ffdff2 100644 --- a/analysis/package-manager/txt-filter.sls +++ b/analysis/package-manager/txt-filter.sls @@ -4,14 +4,11 @@ (chezscheme) (scheme-langserver util io) (scheme-langserver virtual-file-system file-node) - (only (srfi :13 strings) string-suffix? string-prefix? string-contains string-index-right string-index string-take string-drop string-drop-right)) + (only (srfi :13 strings) string-suffix?)) -(define (generate-txt-file-filter list-path) +(define (generate-txt-file-filter) (lambda (path) - ;; (pretty-print `(DEBUG: ,path)) (cond - [(string-contains path "akku") #f] [(string-suffix? ".scm.txt" path) #t] - [(file-directory? path) #t] [else #f]))) ) \ No newline at end of file diff --git a/analysis/workspace.sls b/analysis/workspace.sls index f76f2a26..65710f42 100644 --- a/analysis/workspace.sls +++ b/analysis/workspace.sls @@ -85,18 +85,17 @@ [(path identifier threaded? type-inference?) (init-workspace path identifier 'r6rs threaded? type-inference?)] [(path identifier top-environment threaded? type-inference?) ;; (pretty-print `(DEBUG: function: init-workspace)) - (let* ([root-file-node - (init-virtual-file-system path '() - (cond - ;todo:add more filter - [(equal? 'r7rs top-environment) (generate-txt-file-filter (string-append path "/tests/r7rs"))] - [(equal? 'akku identifier) (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))] - [else (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))]))] + (let* ([facet + (case identifier + [txt (generate-txt-file-filter)] + [akku (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))] + [else (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))])] + [root-file-node (init-virtual-file-system path '() facet)] [root-library-node (init-library-node root-file-node)] [file-linkage (init-file-linkage root-file-node root-library-node)] [batches (get-init-reference-batches file-linkage)]) (init-references root-file-node root-library-node file-linkage threaded? batches type-inference?) - (make-workspace root-file-node root-library-node file-linkage identifier threaded? type-inference?))])) + (make-workspace root-file-node root-library-node file-linkage facet threaded? type-inference?))])) ;; head -[linkage]->files ;; for single file From 9e445a12cd3bae8116f04962fbea485d089ca30a Mon Sep 17 00:00:00 2001 From: VSteveHL Date: Wed, 9 Jul 2025 23:03:26 +0800 Subject: [PATCH 4/4] feat: Add top-environment parameter to the workspace type - Added (immutable top-environment) to define-record-type workspace - Modified the refresh-workspace function to determine which filter to use based on top-environment --- analysis/workspace.sls | 13 ++++++++++--- tests/analysis/test-workspace.sps | 11 +++++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/analysis/workspace.sls b/analysis/workspace.sls index 65710f42..3e8cd330 100644 --- a/analysis/workspace.sls +++ b/analysis/workspace.sls @@ -63,11 +63,18 @@ (immutable facet) ;only for identifer catching and type inference (immutable threaded?) - (immutable type-inference?))) + (immutable type-inference?) + (immutable top-environment))) (define (refresh-workspace workspace-instance) (let* ([path (file-node-path (workspace-file-node workspace-instance))] - [root-file-node (init-virtual-file-system path '() (generate-akku-acceptable-file-filter (string-append path "/.akku/list")))] + [top-environment (workspace-top-environment workspace-instance)] + [filter + (case top-environment + ['r6rs (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))] + ['r7rs (generate-txt-file-filter)] + [else (generate-akku-acceptable-file-filter (string-append path "/.akku/list"))])] + [root-file-node (init-virtual-file-system path '() filter)] [root-library-node (init-library-node root-file-node)] [file-linkage (init-file-linkage root-file-node root-library-node)] [batches (get-init-reference-batches file-linkage)]) @@ -95,7 +102,7 @@ [file-linkage (init-file-linkage root-file-node root-library-node)] [batches (get-init-reference-batches file-linkage)]) (init-references root-file-node root-library-node file-linkage threaded? batches type-inference?) - (make-workspace root-file-node root-library-node file-linkage facet threaded? type-inference?))])) + (make-workspace root-file-node root-library-node file-linkage facet threaded? type-inference? top-environment))])) ;; head -[linkage]->files ;; for single file diff --git a/tests/analysis/test-workspace.sps b/tests/analysis/test-workspace.sps index 153a6eba..5364ee48 100755 --- a/tests/analysis/test-workspace.sps +++ b/tests/analysis/test-workspace.sps @@ -76,12 +76,11 @@ (test-end) (test-begin "init-workspace-basic-test") -(let* ([workspace (init-workspace (current-directory) 'akku 'r7rs #f #f)] - [root-file-node (workspace-file-node workspace)] - [root-library-node (workspace-library-node workspace)]) - ;; (pretty-print `(DEBUG: workspace ,workspace)) - (test-equal #f (null? root-file-node)) - (test-equal #f (null? root-library-node))) +(let* ([workspace (init-workspace (string-append (current-directory) "/tests/resources/r7rs") 'txt 'r7rs #f #f)] + [root-file-node (workspace-file-node workspace)] + [root-library-node (workspace-library-node workspace)]) + (test-equal #f (null? root-file-node)) + (test-equal #f (null? root-library-node))) (test-end) (exit (if (zero? (test-runner-fail-count (test-runner-get))) 0 1))