Skip to content

Don't evaluate logical pathname translations at read-time.

ecl_parse_namestring() is called at read-time by sharp_P_reader() when a literal #P"" pathname is used. At this time, the logical pathname translations have not been setup, so the pathname will always be defined as non-logical (except for #P"SYS:" pathnames, which translation is defined earlier by ECL), and later translating will skip the lookup in the translation table. (See cl_translate_logical_pathname()'s early return.)

This problem does not exhibit itself in interpreted mode, because the namestring is parsed when it is met, i.e. after the translations have been setup.

This change makes it so that if a string is parsed as a logical hostname, then it will be treated as such, which is as the specification says. (See PARSE-NAMESTRING.)

This does mean that this is a breaking change. Previously, (TRANSLATE-LOGICAL-PATHNAME #P"FOO:BAR;BAZ") was returning NIL, it will now error as the pathname is now recognized as logical, and the host will always be searched in the translations.

Fixes #404 (closed)

Edited by username-removed-397096

Merge request reports