Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework swank.asd to produce actual compilation artifact #760

Merged
merged 4 commits into from Mar 14, 2023

Conversation

dkochmanski
Copy link
Member

Until now swank.asd compiled the system files when it was loaded. That is roughly compatible with what slime does when loading swank, however that is not useful for swank that is loaded as a standalone system without slime. Instead of producing compilation artifacts that may be further processed by asdf (either in bundle-op or otherwise) it puts fasls in ~/.slime directory.

When a system "foo" depends on "swank" then before the system "foo" is loaded swank is loaded itself. However if we only compile systems and then try to load a bundle then all we have is the swank-loader artifact - no "SWANK" package nor nothing. This issue has been unnoticed because usually people dump images instead of having separate compilation and loading steps.

This commit defines two systems "swank" and "swank-exts" - one for the core runtime and one for contribs.

@dkochmanski
Copy link
Member Author

(of course the unspoken system that does not dump images is ecl ^_^)

Until now swank.asd compiled the system files when it was loaded. That is
roughly compatible with what slime does when loading swank, however that is not
useful for swank that is loaded as a standalone system without slime. Instead of
producing compilation artifacts that may be further processed by asdf (either in
bundle-op or otherwise) it puts fasls in ~/.slime directory.

When a system "foo" depends on "swank" then before the system "foo" is loaded
swank is loaded itself. However if we only compile systems and then try to load
a bundle then all we have is the swank-loader artifact - no "SWANK" package nor
nothing. This issue has been unnoticed because usually people dump images
instead of having separate compilation and loading steps.

This commit defines two systems "swank" and "swank-exts" - one for the core
runtime and one for contribs.
@dkochmanski dkochmanski force-pushed the master branch 2 times, most recently from 8b9b0bd to 3aec0fc Compare March 8, 2023 16:52
@dkochmanski dkochmanski marked this pull request as draft March 8, 2023 16:54
@dkochmanski dkochmanski marked this pull request as ready for review March 8, 2023 18:30
@dkochmanski
Copy link
Member Author

I've removed fully the kludge that prevented reloading of swank if it is in the different location than the version already loaded in the image. If the user has swank in a custom location and tries to load it, then it is either a deliberate action or broken environment. I'd rather punish users with broken environment than users who know what they are doing (i.e by specifying swank as a dependency).

@dkochmanski
Copy link
Member Author

Somewhat related to #83 and #80 (more to the latter).

This inhibition is tailored for possibly incompatible slime/swank
instances (according to the comment at the top of the file), so there is no need
to prevent loading a different swank version in the image without slime.
Don't prevent reloading the system "swank" even if it was previously loaded by
emacs. If the user wants to reload swank from a different directory then so be
it. Otherwise we can't compile bundles that depend on slime.
@dkochmanski
Copy link
Member Author

@dkochmanski dkochmanski merged commit dd179f4 into slime:master Mar 14, 2023
10 checks passed
easye added a commit to easye/slime that referenced this pull request May 1, 2023
easye pushed a commit to easye/slime that referenced this pull request May 5, 2023
* Rework swank.asd to produce actual compilation artifact

Until now swank.asd compiled the system files when it was loaded. That is
roughly compatible with what slime does when loading swank, however that is not
useful for swank that is loaded as a standalone system without slime. Instead of
producing compilation artifacts that may be further processed by asdf (either in
bundle-op or otherwise) it puts fasls in ~/.slime directory.

When a system "foo" depends on "swank" then before the system "foo" is loaded
swank is loaded itself. However if we only compile systems and then try to load
a bundle then all we have is the swank-loader artifact - no "SWANK" package nor
nothing. This issue has been unnoticed because usually people dump images
instead of having separate compilation and loading steps.

This commit defines two systems "swank" and "swank-exts" - one for the core
runtime and one for contribs.

* swank.asd: inhibit loading swank only when started from emacs

This inhibition is tailored for possibly incompatible slime/swank
instances (according to the comment at the top of the file), so there is no need
to prevent loading a different swank version in the image without slime.

* Remove locking of the system "swank"

Don't prevent reloading the system "swank" even if it was previously loaded by
emacs. If the user wants to reload swank from a different directory then so be
it. Otherwise we can't compile bundles that depend on slime.

* meta: add an entry to NEWS section
easye added a commit to easye/slime that referenced this pull request May 15, 2023
WARNING: Since ABCL's Gray stream implementation has long been
unusable as the basis of communication with SWANK, this doesn't
currently work with any released or unreleased version of the Bear.

<slime#760>
easye added a commit to easye/slime that referenced this pull request Jun 5, 2023
When loaded via ASDF, we align the swank-loader:*source-directory* and
swank-loader:*fasl-directory* special variables to the appropriate
values.  This restores the ability to launch a Swank server from a
Lisp image which has loaded SLIME via ASDF.

See
<slime@dd179f4>
and <slime#760>.
easye added a commit that referenced this pull request Jun 11, 2023
When loaded via ASDF, we align the swank-loader:*source-directory* and
swank-loader:*fasl-directory* special variables to the appropriate
values.  This restores the ability to launch a Swank server from a
Lisp image which has loaded SLIME via ASDF.

See
<dd179f4>
and <#760>.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant