-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #37 from cgay/registry
A rewrite of workspaces, essentially.
- Loading branch information
Showing
55 changed files
with
977 additions
and
1,262 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# To actually use this filter you must run the following commands in the top-level Def directory. | ||
# git config filter.version.smudge ./scripts/version-smudge.sh | ||
# git config filter.version.clean ./scripts/version-clean.sh | ||
# There is no way to configure that for all users of the repo. | ||
sources/commands/utils.dylan filter=version |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +0,0 @@ | ||
[submodule "ext/sphinx-extensions"] | ||
path = ext/sphinx-extensions | ||
url = https://github.com/dylan-lang/sphinx-extensions.git | ||
[submodule "ext/command-line-parser"] | ||
path = ext/command-line-parser | ||
url = https://github.com/dylan-lang/command-line-parser | ||
[submodule "ext/json"] | ||
path = ext/json | ||
url = https://github.com/dylan-lang/json | ||
[submodule "ext/logging"] | ||
path = ext/logging | ||
url = https://github.com/dylan-lang/logging | ||
[submodule "ext/regular-expressions"] | ||
path = ext/regular-expressions | ||
url = https://github.com/dylan-lang/regular-expressions | ||
[submodule "ext/uncommon-dylan"] | ||
path = ext/uncommon-dylan | ||
url = https://github.com/cgay/uncommon-dylan | ||
[submodule "ext/testworks"] | ||
path = ext/testworks | ||
url = https://github.com/dylan-lang/testworks | ||
[submodule "ext/pacman-catalog"] | ||
path = ext/pacman-catalog | ||
url = https://github.com/dylan-lang/pacman-catalog | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,43 @@ | ||
# Low-tech Makefile to build and install deft. | ||
# Low-tech Makefile to build and install deft. You will need a working "dylan" binary on | ||
# your PATH somewhere. | ||
|
||
DYLAN ?= $${HOME}/dylan | ||
install_dir = $(DYLAN)/install/deft | ||
install_bin = $(install_dir)/bin | ||
install_lib = $(install_dir)/lib | ||
link_target = $(install_bin)/deft-app | ||
link_source = $(DYLAN)/bin/dylan | ||
|
||
git_version := "$(shell git describe --tags --always --match 'v*')" | ||
|
||
.PHONY: build build-with-version clean install install-debug really-install remove-deft-artifacts test dist distclean | ||
|
||
build: remove-deft-artifacts | ||
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry dylan-compiler -build -unify deft-app | ||
|
||
# Hack to add the version to the binary with git tag info. Don't want this to | ||
# be the normal build because it causes unnecessary rebuilds. | ||
build-with-version: remove-deft-artifacts | ||
file="sources/commands/utils.dylan"; \ | ||
orig=$$(mktemp); \ | ||
temp=$$(mktemp); \ | ||
cp -p $${file} $${orig}; \ | ||
cat $${file} | sed "s,/.__./.*/.__./,/*__*/ \"${git_version}\" /*__*/,g" > $${temp}; \ | ||
mv $${temp} $${file}; \ | ||
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry \ | ||
dylan-compiler -build -unify deft-app; \ | ||
cp -p $${orig} $${file} | ||
|
||
# Until the install-deft GitHub Action is no longer referring to deft-app | ||
# we also create a link named deft-app. | ||
really-install: | ||
mkdir -p $(DYLAN)/bin | ||
cp _build/sbin/deft-app $(DYLAN)/bin/deft | ||
ln -f $(DYLAN)/bin/deft $(DYLAN)/bin/deft-app | ||
|
||
install: build-with-version really-install | ||
.PHONY: build clean install remove-deft-artifacts test dist distclean | ||
|
||
# Build and install without the version hacking above. | ||
install-debug: build really-install | ||
build: | ||
dylan update | ||
dylan build deft-app | ||
|
||
# Deft needs to be buildable with submodules so that it can be built on | ||
# new platforms without having to manually install deps. | ||
test: build | ||
OPEN_DYLAN_USER_REGISTRIES=${PWD}/registry \ | ||
dylan-compiler -build deft-test-suite \ | ||
&& DYLAN_CATALOG=ext/pacman-catalog _build/bin/deft-test-suite | ||
install: build | ||
mkdir -p $(DYLAN)/bin | ||
mkdir -p $(DYLAN)/install/deft/bin | ||
mkdir -p $(DYLAN)/install/deft/lib | ||
cp _build/bin/deft-app $(DYLAN)/install/deft/bin/deft | ||
cp -r _build/lib/lib* $(DYLAN)/install/deft/lib/ | ||
# For unified exe these could be hard links but for now they must be symlinks so | ||
# that the relative paths to ../lib are correct. With --unify I ran into the | ||
# "libunwind.so not found" bug. | ||
ln -s -f $$(realpath $(DYLAN)/install/deft/bin/deft) $(DYLAN)/bin/deft | ||
# For temp backward compatibility... | ||
ln -s -f $$(realpath $(DYLAN)/install/deft/bin/deft) $(DYLAN)/bin/deft-app | ||
ln -s -f $$(realpath $(DYLAN)/install/deft/bin/deft) $(DYLAN)/bin/dylan | ||
|
||
test: | ||
dylan update | ||
dylan build deft-test-suite && _build/bin/deft-test-suite | ||
|
||
dist: distclean install | ||
|
||
# Sometimes I use deft to develop deft, so this makes sure to clean | ||
# up its artifacts. | ||
remove-deft-artifacts: | ||
clean: | ||
rm -rf _packages | ||
find registry -not -path '*/generic/*' -type f -exec rm {} \; | ||
|
||
clean: remove-deft-artifacts | ||
rm -rf registry | ||
rm -rf _build | ||
rm -rf _test | ||
rm -rf *~ | ||
|
||
distclean: clean | ||
rm -rf $(install_dir) | ||
rm -f $(link_source) | ||
rm -rf $(DYLAN)/install/deft | ||
rm -f $(DYLAN)/bin/deft | ||
rm -f $(DYLAN)/bin/deft-app | ||
rm -f $(DYLAN)/bin/dylan |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule command-line-parser
deleted from
b2f184
Submodule json
deleted from
d6dabb
Submodule logging
deleted from
e0e87f
Submodule pacman-catalog
deleted from
8b4088
Submodule regular-expressions
deleted from
5fd7d3
Submodule sphinx-extensions
deleted from
05804f
Submodule testworks
deleted from
c149c1
Submodule uncommon-dylan
deleted from
e38f97
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
#!/bin/bash | ||
|
||
echo "$(date -Iseconds) clean $(pwd)" >> /tmp/version.log | ||
sed "s,\"v.*built on.*\",\"DEVELOPMENT_VERSION\",g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/bash | ||
|
||
git_version="$(git describe --tags --always --match 'v*')" | ||
date="$(date -Iseconds)" | ||
echo "$(date -Iseconds) smudge $(pwd)" >> /tmp/version.log | ||
sed "s,DEVELOPMENT_VERSION,${git_version} built on ${date},g" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Module: deft | ||
Synopsis: install subcommand | ||
|
||
|
||
define class <install-subcommand> (<subcommand>) | ||
keyword name = "install"; | ||
keyword help = "Install Dylan packages."; | ||
end class; | ||
|
||
define constant $install-subcommand | ||
= make(<install-subcommand>, | ||
options: list(make(<parameter-option>, | ||
// TODO: type: <version> | ||
names: #("version", "v"), | ||
default: "latest", | ||
help: "The version to install."), | ||
make(<positional-option>, | ||
name: "pkg", | ||
repeated?: #t, | ||
help: "Packages to install."))); | ||
|
||
define method execute-subcommand | ||
(parser :: <command-line-parser>, subcmd :: <install-subcommand>) | ||
=> (status :: false-or(<int>)) | ||
for (package-name in get-option-value(subcmd, "pkg")) | ||
let vstring = get-option-value(subcmd, "version"); | ||
let release = pm/find-package-release(pm/catalog(), package-name, vstring) | ||
| begin | ||
note("Package %= not found.", package-name); | ||
abort-command(1); | ||
end; | ||
pm/install(release); | ||
end; | ||
end method; |
Oops, something went wrong.