From 391d01d3423ef45323af2a5629828f57d9ea39a7 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Tue, 6 Feb 2024 05:23:39 +0000 Subject: [PATCH 1/3] Minor changes to output of publish command --- sources/commands/publish.dylan | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sources/commands/publish.dylan b/sources/commands/publish.dylan index 92be803..1949890 100644 --- a/sources/commands/publish.dylan +++ b/sources/commands/publish.dylan @@ -37,10 +37,10 @@ define method execute-subcommand name, pm/release-version(release), ws/$dylan-package-file-name); error(message); end; - if (yes-or-no?(format-to-string("About to publish %s, ok? [ok/yes/no]", release))) + if (yes-or-no?(format-to-string("About to publish %s, ok? [yes/no] ", release))) let file = pm/publish-release(cat, release); - note("Package file written to %s. Commit the changes and submit a" - " pull request.", file); + note("Package file written to %s.\n" + "Commit the changes and submit a pull request.", file); else note("Aborted."); end; From cee7a5a7e61d9b3a09b49d364ab524ac88cdafe9 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Tue, 6 Feb 2024 05:24:23 +0000 Subject: [PATCH 2/3] add-release: set release-package to the package plus some comment changes --- sources/pacman/catalog.dylan | 19 +++++++++---------- sources/pacman/packages.dylan | 4 +++- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/sources/pacman/catalog.dylan b/sources/pacman/catalog.dylan index c438e89..b477689 100644 --- a/sources/pacman/catalog.dylan +++ b/sources/pacman/catalog.dylan @@ -349,19 +349,19 @@ define method load-catalog-package-file cat.catalog-package-cache[name] := package end method; -// Publish the given release by writing a new catalog file that contains the -// given release. Signals if the release is not newer than any -// existing releases for the package. +// Publish a new catalog file that contains the given release. Signals +// if the release is not newer than any existing releases for +// the package. define function publish-release (cat :: , release :: ) => (file :: ) let name = package-name(release); - let old-package = find-package(cat, name); + let cat-package = find-package(cat, name); let new-package = release-package(release); - if (old-package) + if (cat-package) // Include the releases from the existing package when we write the file. // new-package was created by loading dylan-package.json, and doesn't have - // any of the existing releases in it. (Maybe that should be fixed though.) - for (rel in package-releases(old-package)) + // any of the existing releases in it. + for (rel in package-releases(cat-package)) add-release(new-package, rel); end; end; @@ -371,9 +371,8 @@ define function publish-release " latest release (%s)", release-to-string(release), release-to-string(latest)); end; - // Note that we write new-package rather than old-package, meaning that the + // Note that we write new-package rather than cat-package, meaning that the // package-level attributes from dylan-package.json (e.g., "description") - // will overwrite the package-level attributes from the catalog, if they're - // different. + // will replace the package-level attributes from the catalog. write-package-file(cat, new-package) end function; diff --git a/sources/pacman/packages.dylan b/sources/pacman/packages.dylan index a08519e..0243d19 100644 --- a/sources/pacman/packages.dylan +++ b/sources/pacman/packages.dylan @@ -23,7 +23,7 @@ end function; // releases belongs in . define class () // Back pointer to package containing this release. - constant slot release-package :: , + slot release-package :: , required-init-keyword: package:; // Note that this may be a semantic version or a branch version even though technically @@ -407,6 +407,7 @@ define function add-release if (v < version) add!(pkg.package-releases, release); sort!(pkg.package-releases, test: \>); + release.release-package := pkg; done(); elseif (v = version) if (rel ~= release) @@ -417,6 +418,7 @@ define function add-release end for; add!(pkg.package-releases, release); sort!(pkg.package-releases, test: \>); + release.release-package := pkg; end block; release end function; From 4aa52cd1714555f5fed2ca83233bb0085f640db9 Mon Sep 17 00:00:00 2001 From: Carl Gay Date: Tue, 6 Feb 2024 05:25:59 +0000 Subject: [PATCH 3/3] Update version to 0.11.0 --- dylan-package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dylan-package.json b/dylan-package.json index b557be0..0e55b04 100644 --- a/dylan-package.json +++ b/dylan-package.json @@ -1,6 +1,6 @@ { "name": "dylan-tool", - "version": "0.10.1", + "version": "0.11.0", "category": "language-tools", "contact": "dylan-lang@googlegroups.com", "description": "Manage Dylan workspaces, packages, and registries",