Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 5 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

Expand All @@ -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
Expand Down
1 change: 1 addition & 0 deletions sources/commands/update.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -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 :: <int>, written :: <int>, no-platform :: <seq>)
= ws/update-registry(ws, releases, actives);
Expand Down
13 changes: 8 additions & 5 deletions sources/workspaces/workspaces.dylan
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ define class <workspace> (<object>)
init-keyword: multi-package?:;

// Default library to build, for the LSP server to open, etc.
slot workspace-default-library-name :: false-or(<string>) = #f;
slot %default-library-name :: false-or(<string>) = #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
Expand All @@ -61,6 +61,12 @@ define class <workspace> (<object>)
slot active-packages-scanned? :: <bool> = #f;
end class;

define function workspace-default-library-name
(ws :: <workspace>) => (name :: <string?>)
ws.%default-library-name
| (ws.%default-library-name := find-default-library(ws));
end function;

define function lids-by-library
(ws :: <workspace>) => (t :: <istring-table>)
if (ws.%lids-by-library.empty?)
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down