diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 77ab588..9b79413 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -12,7 +12,7 @@ jobs: matrix: image: [musl64] variant: ['', '-musl', '-glibc2.31'] - target: ['x86-64', 'arm64', 'riscv64'] + target: ['x86_64', 'arm64', 'riscv64'] include: # set default docker platform and image suffix. - {docker-platform: linux/amd64 ,docker-image-suffix: '', makeopts: musl } diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index 5951496..4fe8c13 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -6,7 +6,7 @@ on: jobs: build: - runs-on: ${{ matrix.target == 'arm64' && 'macos-14' || 'macOS-12' }} + runs-on: ${{ matrix.target == 'arm64' && 'macos-14' || 'macos-15-intel' }} strategy: fail-fast: false matrix: diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4d3e03c..1b5614b 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -63,3 +63,51 @@ jobs: shell: msys2 {0} run: | make -f scripts/Makefile latest-version win-upload + + build-windows-arm64: + runs-on: windows-11-arm + timeout-minutes: 90 + env: + RESULT_NAME: windows-aarch64 + RESULT_PATH: windows-aarch64 + RESULT_PATH_SUB: roswell + + environment: SET_VERSION + + steps: + - run: git config --global core.autocrlf false + - uses: actions/checkout@v2 + - uses: msys2/setup-msys2@v2 + with: + msystem: CLANGARM64 + path-type: inherit + release: true + update: true + install: >- + base-devel + p7zip + autotools + mingw-w64-clang-aarch64-toolchain + mingw-w64-clang-aarch64-autotools + - name: Run MSYS2 once + shell: msys2 {0} + run: | + pwd + echo $MSYSTEM + echo $MSYSTEM_CARCH + echo $PATH + - name: Build + shell: msys2 {0} + run: | + clang -v + ./bootstrap + CC=clang ./configure + make + make install + make pack.zip + - name: Upload + env: + GITHUB_OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + shell: msys2 {0} + run: | + make -f scripts/Makefile latest-version win-upload diff --git a/ChangeLog b/ChangeLog index 29f1527..6fe5c0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +roswell (26.02.116-1) unstable; urgency=low + + * Fix: failure to load djula on sbcl 2.5.11 environment. + * Fix: declaration-definition disagreement in src/cmd-run.h. (reported by ItsMeForLua and fixed by Trichiurus-lepturus) + * Fix: support sbcl lisp-implementation-version returning '2.4.10.roswell'. + * Change: Allegro CL upgraded to release 11.0express. (by Xiaming Chen) + * Change: ros command return 1 when script file not found. + * Change: ros fmt rewritten to use cl-indentify. + + -- SANO,Masatoshi Tue, 24 Feb 2026 06:39:51 +0900 + roswell (24.10.115-1) unstable; urgency=low * New: tested on darwin/ppc environment. diff --git a/Makefile.am b/Makefile.am index db7e060..cef26dd 100644 --- a/Makefile.am +++ b/Makefile.am @@ -122,7 +122,7 @@ winrelease: roswell/Makefile cp lisp/*.lisp lisp/*.ros lisp/*.el roswell/lisp cd documents;MSYSTEM=MINGW64 make roswell.chm cp documents/roswell.chm roswell/documents - 7z a Roswell-`if [ "$$MSYSTEM" = "MINGW64" ];then echo x86_64 ;else echo i686; fi`.zip roswell/ros.exe roswell/lisp/*.* roswell/documents/roswell.chm + 7z a Roswell-`if [ "$$MSYSTEM" = "MINGW64" ];then echo x86_64 ;elif [ "$$MSYSTEM" = "CLANGARM64" ];then echo aarch64; else echo i686; fi`.zip roswell/ros.exe roswell/lisp/*.* roswell/documents/roswell.chm debian: ros debian/debian.ros all test: @@ -171,7 +171,7 @@ $(PACK).tar.bz2: roswell/Makefile pack: $(PACK).tar.bz2 -WINPACK = roswell_$(VERSION)_$(shell if [ "$$MSYSTEM" = "MINGW64" ];then echo amd64 ;else echo i686; fi) +WINPACK = roswell_$(VERSION)_$(shell if [ "$$MSYSTEM" = "MINGW64" ];then echo amd64 ;elif [ "$$MSYSTEM" = "CLANGARM64" ];then echo aarch64; else echo i686; fi) pack.zip: $(PACK).tar.bz2 7z a $(WINPACK).zip roswell diff --git a/configure.ac b/configure.ac index ea7120a..9e94dfb 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.59]) -AC_INIT([roswell],[24.10.115],snmsts@gmail.com) +AC_INIT([roswell],[26.02.116],snmsts@gmail.com) CFLAGS=${CFLAGS=""} CXXFLAGS=${CXXFLAGS=""} diff --git a/lisp/fmt.ros b/lisp/fmt.ros index 648a906..9d8145e 100644 --- a/lisp/fmt.ros +++ b/lisp/fmt.ros @@ -5,17 +5,30 @@ exec ros -Q -N roswell -- $0 "$@" |# (progn ;;init forms (ros:ensure-asdf) - #+quicklisp - (progn - (unless (ql:where-is-system :lem) - (roswell:roswell '("git" "clone" "https://github.com/cxxxr/lem.git")) - (roswell.util:read-call "roswell.util:local-project-build-hash" :rebuild t)) - (ql:quickload '("swank" "lem" "lem-lisp-syntax") :silent t))) + #+sbcl (require "sb-introspect") + #+quicklisp (ql:quickload '("cl-indentify") :silent t)) (defpackage :ros.script.fmt.3707812168 (:use :cl)) (in-package :ros.script.fmt.3707812168) +(defun function-lambda-list (fn) + "Portably retrieve a function's lambda list." + (ignore-errors + #+sbcl + (funcall (find-symbol "FUNCTION-LAMBDA-LIST" "SB-INTROSPECT") fn) + #-sbcl nil)) + +(defun register-macro-templates () + "Auto-detect macros with &body and register cl-indentify templates." + (do-all-symbols (sym) + (when (macro-function sym) + (let* ((arglist (function-lambda-list (macro-function sym))) + (body-pos (position '&body arglist))) + (when body-pos + (setf (indentify:indent-template sym) + `(:style :call :count ,body-pos))))))) + (defun system (path) (let ((* (when (and (probe-file path) (equal (pathname-type path) "asd")) @@ -37,15 +50,39 @@ exec ros -Q -N roswell -- $0 "$@" (list c))))) (when * (ql:quickload * :silent (not (ros:verbose))) - (lem-lisp-syntax.indent:indentation-update) + (register-macro-templates) (r (asdf:find-system *)))))) +(defun register-standard-templates () + "Override templates to match Lem/Emacs/SLIME indentation." + ;; if: (&rest nil) in Lem - all args aligned with first arg + (setf (indentify:indent-template 'if) '(:count 3)) + ;; case/typecase: (4 &rest (&whole 2 &rest 1)) - clause body at paren+1 + (dolist (sym '(case ccase ecase typecase ctypecase etypecase)) + (setf (indentify:indent-template sym) + '(:count 1 :sub (nil nil (:style :list))))) + ;; cond: (&rest (&whole 2 &rest 1)) - clause body at paren+1 + (setf (indentify:indent-template 'cond) + '(:count 0 :sub (nil (:style :list))))) + +(defun format-file (file) + (let ((result (with-output-to-string (out) + (with-open-file (in file) + (indentify:indentify in out))))) + (with-open-file (out file :direction :output :if-exists :supersede) + (with-input-from-string (in result) + (loop for line = (read-line in nil) + while line + do (write-string (string-right-trim '(#\Space #\Tab) line) out) + (terpri out)))))) + (defun main (&rest argv) "go fmt like something" + (indentify:load-default-templates) + (register-standard-templates) (dolist (arg (if argv - (prog1 (loop for arg in argv - append (or (system arg) (list arg))) - (lem-lisp-syntax:indentation-update)) + (loop for arg in argv + append (or (system arg) (list arg))) (ignore-errors (let* ((name (first (last (pathname-directory *default-pathname-defaults*)))) (path (probe-file (make-pathname :name name :type "asd")))) @@ -53,18 +90,6 @@ exec ros -Q -N roswell -- $0 "$@" (append (directory "*.lisp") (directory "*.ros"))))))) (if (probe-file arg) - (let ((buffer (lem-base:find-file-buffer arg))) - (setf (lem-base:buffer-syntax-table buffer) - lem-lisp-syntax:*syntax-table*) - (setf (lem-base:variable-value 'lem-base:calc-indent-function :buffer buffer) - 'lem-lisp-syntax:calc-indent) - (lem-base:indent-points (lem-base:buffer-start-point buffer) - (lem-base:buffer-end-point buffer)) - (loop with regexp = "[ ]+$" ;; remove trailing spaces. - for start = (lem-base:search-forward-regexp (lem-base:copy-point (lem-base:buffer-start-point buffer)) regexp) - while start - for end = (lem-base:search-backward-regexp (lem-base:copy-point start) regexp) - do (lem-base:delete-between-points start end)) - (lem-base:write-to-file buffer (lem-base:buffer-filename buffer))) + (format-file arg) (format *error-output* "~A does not exist" arg)))) ;;; vim: set ft=lisp lisp: diff --git a/lisp/init.lisp b/lisp/init.lisp index 0e7c9cc..78095b6 100644 --- a/lisp/init.lisp +++ b/lisp/init.lisp @@ -308,13 +308,25 @@ As a hacky side effect, files with the same name as PROVIDE is not loaded. (or *version-cache* (setf *version-cache* (roswell '("roswell-internal-use" "version") :string t))))) +(defun implementation-version () + "cut off after third? dot from lisp-implementation-version" + (let ((version (lisp-implementation-version))) + (loop with j = 0 + for i from 0 to (1- (length version)) + when (eql (aref version i) #\.) + do (incf j) + (when (= j 3) + (return-from implementation-version (subseq version 0 i)))) + version)) + + #+sbcl (when (ignore-errors (string-equal (opt "impl") "sbcl-bin" :end1 8)) (flet ((source (version) (let ((path (merge-pathnames (format nil "src/sbcl-~A/" version) (opt "homedir")))) (when (probe-file path) (sb-ext:set-sbcl-source-location path))))) - (or (source (lisp-implementation-version)) + (or (source (implementation-version)) (source "git")))) (defun source-registry (arg &rest rest) @@ -433,7 +445,8 @@ As a hacky side effect, files with the same name as PROVIDE is not loaded. (with-open-file (in arg) (body in))) (*latest-system* (apply 'hook (cons arg *argv*))) - (t (format t "script ~S does not exist~%" arg))))) + (t (format t "script ~S does not exist~%" arg) + (quit 1))))) (defun stdin (arg &rest rest) (declare (ignorable arg rest)) diff --git a/lisp/install-allegro.lisp b/lisp/install-allegro.lisp index 2d42942..7f15e14 100644 --- a/lisp/install-allegro.lisp +++ b/lisp/install-allegro.lisp @@ -13,7 +13,7 @@ (version (getf argv :version))) (let ((os (intern uname :keyword)) (machine (intern uname-m :keyword))) - (cond ((find version '("11.0bexpress" + (cond ((find version '("11.0express" "10.1express") :test 'equal) (format nil "~@{~A~}" diff --git a/lisp/locations.lisp b/lisp/locations.lisp index 8e5167b..04192b1 100644 --- a/lisp/locations.lisp +++ b/lisp/locations.lisp @@ -54,7 +54,7 @@ (export (defvar *allegro-agreement-uri* - '(#+darwin ("11.0bexpress" . "https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf") + '(#+darwin ("11.0express" . "https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf") ("10.1express" . #1="https://franz.com/ftp/pub/legal/ACL-Express-20170301.pdf") ("100express" . #1#) ("101b" . "http://franz.com/products/licensing/FSLA10.1.beta.pdf")))) diff --git a/lisp/util-template.lisp b/lisp/util-template.lisp index 8e6c3eb..677984f 100644 --- a/lisp/util-template.lisp +++ b/lisp/util-template.lisp @@ -1,7 +1,7 @@ #+ros.init (roswell:include '("util" "system") "util-template") #+quicklisp -(ql:quickload '("uiop" "djula") :silent t) +(ignore-errors (ql:quickload '("uiop" "djula") :silent t)) (defpackage :roswell.util.template (:use :cl) (:export @@ -113,7 +113,8 @@ :name (format nil "roswell.init.~A" template-name))) (defun apply-djula (template-string stream params) - (apply 'djula::render-template* (djula::compile-string template-string) stream + (apply (read-from-string "djula::render-template*") + (read-call "djula::compile-string" template-string) stream `(,@params :author ,(author) :email ,(email) diff --git a/roswell.asd b/roswell.asd index 60a910b..0a12ca7 100644 --- a/roswell.asd +++ b/roswell.asd @@ -1,5 +1,5 @@ (defsystem "roswell" - :version "24.10.115" + :version "26.2.116" :author "SANO Masatoshi" :license "MIT" :depends-on ("simple-date-time" "split-sequence" "plump" "zip") diff --git a/scripts/install-for-ci.sh b/scripts/install-for-ci.sh index f675830..41f5e52 100644 --- a/scripts/install-for-ci.sh +++ b/scripts/install-for-ci.sh @@ -1,7 +1,7 @@ #!/bin/sh set -e -ROSWELL_RELEASE_VERSION=24.10.115 +ROSWELL_RELEASE_VERSION=26.02.116 ROSWELL_TARBALL_PATH=$HOME/roswell.tar.gz ROSWELL_DIR=$HOME/.roswell ROSWELL_REPO=${ROSWELL_REPO:-https://github.com/roswell/roswell} @@ -33,10 +33,16 @@ log () { fetch () { echo "Downloading $1..." - if curl --no-progress-bar --retry 10 -o $2 -L $1; then - return 0; + if curl --no-progress-bar --retry 10 --connect-timeout 30 \ + --max-time 300 -o "$2" -L "$1" 2>&1; then + echo "✓ Successfully downloaded $1" + return 0 else - echo "Failed to download $1." + code=$? # capture curl's exit code immediately + echo "✗ Failed to download $1" + echo " URL: $1" + echo " Destination: $2" + echo " Curl exit code: $code" exit 1 fi } diff --git a/src/cmd-run.h b/src/cmd-run.h index a8b1508..ddd045a 100644 --- a/src/cmd-run.h +++ b/src/cmd-run.h @@ -24,7 +24,7 @@ extern char** cmd_run_acl(int argc,char** argv,struct sub_command* cmd); extern char** cmd_run_lispworks(int argc,char** argv,struct sub_command* cmd); extern char** cmd_run_mkcl(int argc,char** argv,struct sub_command* cmd); extern char** cmd_run_npt(int argc,char** argv,struct sub_command* cmd); -extern LVal register_runtime_options(); +extern struct proc_opt* register_runtime_options(struct proc_opt* cmd); int setup(char* target,char* env,char* impl); #define SETUP_SYSTEM(sys,msg) {\ cond_printf(0,"%s",msg); \ diff --git a/src/util_windows.c b/src/util_windows.c index 653cf1e..0934632 100644 --- a/src/util_windows.c +++ b/src/util_windows.c @@ -23,12 +23,18 @@ char* uname_m(void) { return q("x86-64"); if(carch && strcmp(carch,"i686")==0) return q("x86"); + if(carch && strcmp(carch,"aarch64")==0) + return q("arm64"); char* msystem=getenv("MSYSTEM"); if(msystem && strcmp(msystem,"MINGW64")==0) return q("x86-64"); if(msystem && strcmp(msystem,"MINGW32")==0) return q("x86"); -#if defined(_WIN64) + if(msystem && strcmp(msystem,"CLANGARM64")==0) + return q("arm64"); +#if defined(__aarch64__) + return q("arm64"); +#elif defined(_WIN64) return q("x86-64"); #elif defined(_WIN32) BOOL isWow64 = FALSE;