This is the mail archive of the kawa@sourceware.org mailing list for the Kawa project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
On 11/21/2014 10:35 AM, Per Bothner wrote:
On 11/21/2014 05:55 AM, Seth Alves wrote:If a library definition has an (include ...) clause, it works out best if the path is considered relative to the sld file. Kawa appears to consider the path to be relative to users current working directory.Note the latter is the value of the (current-path) parameter, not the directory of the JVM process.Section 4.1.7 of the r7rs document says:Note: Implementations are encouraged to search for files in the directory which contains the including file, and to provide a way for users to specify other directories to search. Would it be possible to get kawa to act this way?The problem is that Kawa (and other Scheme implementations) has both include and include-relative. Historical include was relative to the current path, while include-relative is relative to the current file.
But isn't the (include ...) which is the child of an r7rs (define-library ...) different than these other forms of include? This one should be relative-only so that r5rs .scm files can be wrapped by .sld files and so that the user doesn't accidentally load something unexpected.
If both are paths checked, I'm confused about why my example fails. (I'll re-attach for the list).
My compromise is that *both* functions search both locations, but include first searches current-directory and then file-relative, and include-relative does the opposite.I think this is a reasonable compromise betwn backward-compatibility and r7rs.I might add a parameter to change the default. Just as we have -Dkawa.import.pathwe could have -Dkawa.include.path.P.S. Any reason why you're not using the Kawa mailing list for these questions?I think that would be more appropriate.
Sorry, just doing lazy reply-tos. I'll switch to the list. -seth
Attachment:
kawa-relative-include.tar.gz
Description: application/gzip
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |