Dominique Unruh
2018-07-18 15:23:01 UTC
Hi,
I think the following should (depending on the intended semantics of
sessions) either give an error or have a different behavior.
In a specific setup (see below) involving sessions, the Draft session, and
a symlinked directory, jEdit will load the same theory file twice, once as
A.A and once as Draft.A. There will be no error message. Both A's in the
theory panel will open the same file, but editing that file will affect
only one of the two instances of A in the Isabelle backend. (E.g., typing
nonsense will produce red marks in the theory panel in only one of the
A's.) The other A is effectively read-only.
How to reproduce?
- Untar the attached tgz (in Linux).
- It contains a session root directory dir1, and a symlink dir2 to dir1
- The session root contains a session A with A.thy, a session B = A +
B.thy, and a sessionless file Test.thy (e.g., a scratch file) importing
A.thy without qualification
- Run Isabelle with parameters "jedit -d dir2 dir2/B.thy dir2/Test.thy
Observations:
- The effect does not occur when first cd'ing into dir2.
- The effect can also be avoided by always using qualified imports in
scratch-theories (like Test.thy)
- The effect can be avoided by avoiding symlinks
- Possibly the theory import as I did it is "improper" user behavior
(although convenient for experimentation), this is why I wrote that there
should probably an error message.
Best wishes,
Dominique.
I think the following should (depending on the intended semantics of
sessions) either give an error or have a different behavior.
In a specific setup (see below) involving sessions, the Draft session, and
a symlinked directory, jEdit will load the same theory file twice, once as
A.A and once as Draft.A. There will be no error message. Both A's in the
theory panel will open the same file, but editing that file will affect
only one of the two instances of A in the Isabelle backend. (E.g., typing
nonsense will produce red marks in the theory panel in only one of the
A's.) The other A is effectively read-only.
How to reproduce?
- Untar the attached tgz (in Linux).
- It contains a session root directory dir1, and a symlink dir2 to dir1
- The session root contains a session A with A.thy, a session B = A +
B.thy, and a sessionless file Test.thy (e.g., a scratch file) importing
A.thy without qualification
- Run Isabelle with parameters "jedit -d dir2 dir2/B.thy dir2/Test.thy
Observations:
- The effect does not occur when first cd'ing into dir2.
- The effect can also be avoided by always using qualified imports in
scratch-theories (like Test.thy)
- The effect can be avoided by avoiding symlinks
- Possibly the theory import as I did it is "improper" user behavior
(although convenient for experimentation), this is why I wrote that there
should probably an error message.
Best wishes,
Dominique.