* Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity
@ 2023-09-01 9:33 Vili Aapro
2023-09-25 9:26 ` Maxime Devos
0 siblings, 1 reply; 4+ messages in thread
From: Vili Aapro @ 2023-09-01 9:33 UTC (permalink / raw)
To: guile-devel
Dear all,
for Geiser (specifically, `geiser-edit-symbol-at-point') compatibility, we would like the Guile procedure `program-source' always to return absolute paths; for this, we would need compiler co-operation. Specifically, it would be desirable to make Guile compiler always write absolute paths in .go files.
At the moment, this is not the case, and `edit-symbol-at-point' fails for `iota' because `program-source' returns a relative path "ice-9/boot-9.scm".
We discussed this on `geiser-guile'; see https://gitlab.com/emacs-geiser/guile/-/issues/33 .
Thank you,
Vili Aapro
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity
2023-09-01 9:33 Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity Vili Aapro
@ 2023-09-25 9:26 ` Maxime Devos
2023-09-25 9:36 ` Vili Aapro
0 siblings, 1 reply; 4+ messages in thread
From: Maxime Devos @ 2023-09-25 9:26 UTC (permalink / raw)
To: Vili Aapro, guile-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 1464 bytes --]
Op 01-09-2023 om 11:33 schreef Vili Aapro:
> Dear all,
>
> for Geiser (specifically, `geiser-edit-symbol-at-point') compatibility, we would like the Guile procedure `program-source' always to return absolute paths; for this, we would need compiler co-operation. Specifically, it would be desirable to make Guile compiler always write absolute paths in .go files.
>
> At the moment, this is not the case, and `edit-symbol-at-point' fails for `iota' because `program-source' returns a relative path "ice-9/boot-9.scm".
>
> We discussed this on `geiser-guile'; see https://gitlab.com/emacs-geiser/guile/-/issues/33 .
Sounds like a very bad idea. The absolute file name would be somewhere
in the build directory, which very likely doesn't exist anymore on a
typical installation.
Also bad for relocatable installs -- I don't if Guile actually supports
them, but I've heard that Lilypond would find them useful.
Instead of the absolute file name, you would need a file name relative
to the module path -- i.e., it should record ice-9/boot-9.scm, not
/tmp/guile-build/modules/ice-9/boot-9.scm. I suppose that whatever code
is responsible for loading .go/.scm can be adjusted to add a prefix
turning it in an absolute file name.
> One wrong way to find out the absolute path would be to go through
> %load-path, but the semantics of that would break under mutation.
> Best regards,
Can you elaborate?
Maxime Devos.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity
2023-09-25 9:26 ` Maxime Devos
@ 2023-09-25 9:36 ` Vili Aapro
2023-09-25 9:51 ` Maxime Devos
0 siblings, 1 reply; 4+ messages in thread
From: Vili Aapro @ 2023-09-25 9:36 UTC (permalink / raw)
To: Maxime Devos; +Cc: guile-devel
On Mon, 25 Sep 2023 11:26:31 +0200
Maxime Devos <maximedevos@telenet.be> wrote:
> Sounds like a very bad idea. The absolute file name would be somewhere
> in the build directory, which very likely doesn't exist anymore on a
> typical installation.
Yes, you are right.
> I suppose that whatever code
> is responsible for loading .go/.scm can be adjusted to add a prefix
> turning it in an absolute file name.
Yes, this must be the way. The loader should do the job.
> > One wrong way to find out the absolute path would be to go through
> > %load-path, but the semantics of that would break under mutation.
> Can you elaborate?
I was just thinking of a dirty fix on the Emacs side of things, to search for the module through %load-path, that that would break when %load-path was mutated.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity
2023-09-25 9:36 ` Vili Aapro
@ 2023-09-25 9:51 ` Maxime Devos
0 siblings, 0 replies; 4+ messages in thread
From: Maxime Devos @ 2023-09-25 9:51 UTC (permalink / raw)
To: Vili Aapro; +Cc: guile-devel
[-- Attachment #1.1.1: Type: text/plain, Size: 1298 bytes --]
Op 25-09-2023 om 11:36 schreef Vili Aapro:
> On Mon, 25 Sep 2023 11:26:31 +0200
> Maxime Devos <maximedevos@telenet.be> wrote:
>
>> Sounds like a very bad idea. The absolute file name would be somewhere
>> in the build directory, which very likely doesn't exist anymore on a
>> typical installation.
>
> Yes, you are right.
>
>> I suppose that whatever code
>> is responsible for loading .go/.scm can be adjusted to add a prefix
>> turning it in an absolute file name.
>
> Yes, this must be the way. The loader should do the job.
>
>> > One wrong way to find out the absolute path would be to go through
>> > %load-path, but the semantics of that would break under mutation.
>> Can you elaborate?
>
> I was just thinking of a dirty fix on the Emacs side of things, to search for the module through %load-path, that that would break when %load-path was mutated.
Can you elaborate on that -- i.e., how would mutating %load-path break
things? Perhaps you mean that if %load-path is changed after the module
is loaded, then the source file that was found (after changing
%load-path) might not be the the actual source file?
I don't think it's much of a concern in practice, but I suppose it's
worth addressing somehow.
Best regards,
Maxime Devos.
[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 929 bytes --]
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 236 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-09-25 9:51 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-01 9:33 Feature request: make Guile compiler always write absolute paths in .go files for Geiser compatiblity Vili Aapro
2023-09-25 9:26 ` Maxime Devos
2023-09-25 9:36 ` Vili Aapro
2023-09-25 9:51 ` Maxime Devos
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).