ref-manual: Undeprecate with-working-directory-pathname.
The mechanism of working-directory-pathname as a parameter doesn't
work very well -- it leaves bogus pathnames around in bands, and it
doesn't really match the OS semantics anyway.
If we simply try to use a parameter getter,
(define (wd-getter pathname)
(or pathname
(pathname-simplify
... (ucode-primitive working-directory-pathname) ...))
(define working-directory-pathname
(make-general-parameter ... wd-getter ...))
then when the REPL tries to preserve the working directory pathname with
(parameterize ((working-directory-pathname (working-directory-pathname)))
...)
it has the side effect of keeping the pathname persistently in bands
again. I tried to find a way around, but really the mechanism of
storing a pathname in userland memory is just not a good way to
reflect the working directory state; should really use directory file
descriptors and fchdir or openat &c.
Some further details:
https://lists.gnu.org/archive/html/bug-mit-scheme/2020-08/msg00002.html
(cherry picked from commit
d102b20a4634882ee3e1c2be300f77b2ca507655)