Skip to content
This repository has been archived by the owner on Apr 21, 2024. It is now read-only.

New workspace model #46

Merged
merged 3 commits into from
Dec 21, 2022
Merged

New workspace model #46

merged 3 commits into from
Dec 21, 2022

Conversation

cgay
Copy link
Member

@cgay cgay commented Dec 18, 2022

See the doc changes in this commit for a full explanation of how workspaces
work now. In short, dylan-package.json usually suffices to define a workspace,
but workspace.json (if it exists) overrides.

The dylan new application and dylan new library commands no longer generate
a workspace.json file.

@@ -7,7 +7,7 @@ Synopsis: Utilities for use by dylan-tool commands
// Using the comment markers enables recovery if someone commits a string
// other than "HEAD" by accident. git's `ident` attribute doesn't use tag
// names and `filter` looks more complex than it's worth.
define constant $dylan-tool-version :: <string> = /*__*/ "HEAD" /*__*/;
define constant $dylan-tool-version :: <string> = /*__*/ "v0.7.0-5-g0b64cb3" /*__*/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Somebody committed a string other than HEAD by accident.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A shocking lapse of mental coordination. Fixed.

(Do let me know if there's a better way to accomplish putting the version in the code.)

``dylan-package.json`` file in the top-level directory which describes its
attributes. A package currently corresponds to a single Git repository. A
package has a set of versioned releases.
``dylan-package.json`` file in the top-level directory. A package currently
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using :file: role

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Neat. Let me defer this for now, since I need to update all file references. I had been trying to decide between foo, "foo", and foo for files and this answers that question.


workspace
A directory containing a "workspace.json" file. Most ``dylan`` commands may be
run from anywhere within the workspace directory.
The directory in which the ``dylan`` tool operates. Effectively this means a
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using :program: role

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deferring to separate PR again.

A directory containing a "workspace.json" file. Most ``dylan`` commands may be
run from anywhere within the workspace directory.
The directory in which the ``dylan`` tool operates. Effectively this means a
workspace is where the "_build" and "registry" directories are generated. In
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggest using :file: role

``dylan`` subcommands need to be run inside a workspace so that they can
interrelated packages. The ``dylan`` tool often needs to find the root of the
workspace, for example to decide where to write the "registry" directory or to
invoke ``dylan-compiler``. It does this by looking for one of the following
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:program:

invoke ``dylan-compiler``. It does this by looking for one of the following
files, in the order shown, and by using the directory containing the file:

1. workspace.json -- A place to put workspace configuration settings.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:file: here and in following

See the doc changes in this commit for a full explanation of how workspaces
work now. In short, dylan-package.json usually suffices to define a workspace,
but workspace.json (if it exists) overrides.

The `dylan new application` and `dylan new library` commands no longer generate
a workspace.json file.
@cgay cgay merged commit 6aa6474 into dylan-lang:master Dec 21, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants