diff --git a/Makefile b/Makefile index 9ef2b52..b2c4e72 100644 --- a/Makefile +++ b/Makefile @@ -10,14 +10,14 @@ git_version := $(shell git describe --tags --always --match 'v*') # just build with "deft build" so the unnecessary rebuilds that this would cause aren't # an issue. build: - dylan update + deft update file="sources/commands/version.dylan"; \ orig=$$(mktemp); \ temp=$$(mktemp); \ cp -p $${file} $${orig}; \ cat $${file} | sed "s|_NO_VERSION_SET_|${git_version} built on $$(date -Iseconds)|g" > $${temp}; \ mv $${temp} $${file}; \ - dylan build deft-app; \ + deft build deft-app; \ cp -p $${orig} $${file} install: build @@ -35,9 +35,8 @@ install: build ln -s -f $$(realpath $(DYLAN)/install/deft/bin/deft) $(DYLAN)/bin/dylan test: - dylan update - OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build deft-test-suite \ - && _build/bin/deft-test-suite + deft update + deft test dist: distclean install @@ -46,7 +45,7 @@ clean: rm -rf registry rm -rf _build rm -rf _test - rm -rf *~ + find . -name '*~' -exec rm -f {} \; distclean: clean rm -rf $(DYLAN)/install/deft diff --git a/sources/commands/update.dylan b/sources/commands/update.dylan index b7fd942..37905b8 100644 --- a/sources/commands/update.dylan +++ b/sources/commands/update.dylan @@ -29,6 +29,7 @@ define function update-workspace *package-manager-directory*, subdirectory-locator(ws/workspace-directory(ws), pm/$package-directory-name))) + verbose("Package directory: %s", pm/package-manager-directory()); let (releases, actives) = ws/ensure-deps-installed(ws); let (total :: , written :: , no-platform :: ) = ws/update-registry(ws, releases, actives); diff --git a/sources/workspaces/workspaces.dylan b/sources/workspaces/workspaces.dylan index 632dd98..feaa3a3 100644 --- a/sources/workspaces/workspaces.dylan +++ b/sources/workspaces/workspaces.dylan @@ -37,7 +37,7 @@ define class () init-keyword: multi-package?:; // Default library to build, for the LSP server to open, etc. - slot workspace-default-library-name :: false-or() = #f; + slot %default-library-name :: false-or() = #f; // These three %lids-by-* slots are computed lazily rather than in load-workspace // because some deft commands don't need them. They only contain the LIDs that match @@ -61,6 +61,12 @@ define class () slot active-packages-scanned? :: = #f; end class; +define function workspace-default-library-name + (ws :: ) => (name :: ) + ws.%default-library-name + | (ws.%default-library-name := find-default-library(ws)); +end function; + define function lids-by-library (ws :: ) => (t :: ) if (ws.%lids-by-library.empty?) @@ -119,9 +125,6 @@ define function load-workspace & dp-file & (ws-file.locator-directory ~= dp-file.locator-directory)))); ws-file & load-workspace-config(ws, ws-file); - if (~ws.workspace-default-library-name) - ws.workspace-default-library-name := find-default-library(ws); - end; ws end function; @@ -201,7 +204,7 @@ define function load-workspace-config let json = load-json-file(file); let deflib = element(json, $default-library-key, default: #f); if (deflib) - ws.workspace-default-library-name := deflib; + ws.%default-library-name := deflib; end; end function;