Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

saw inappropriately expands symbolic links #2082

Open
sauclovian-g opened this issue Jul 31, 2024 · 0 comments
Open

saw inappropriately expands symbolic links #2082

sauclovian-g opened this issue Jul 31, 2024 · 0 comments
Labels
bug error-messages testing usability An issue that impedes efficient understanding and use

Comments

@sauclovian-g
Copy link
Contributor

% bin/saw test.saw 
[00:18:44.386] Loading file ".../saw-script/test.saw"
[00:18:44.387] .../saw-script/test.saw:4:21-4:28: Type mismatch.
   :

Well and good. But now,

% ln -s test.saw other.saw
% bin/saw other.saw       
[00:19:06.439] Loading file ".../saw-script/test.saw"
[00:19:06.440] .../saw-script/test.saw:4:21-4:28: Type mismatch.

Notice that it has expanded the symbolic link other.saw and this causes it to report errors with the name of the link target rather than the filename I gave it. Experimentation shows that if the path to other.saw includes symbolic links to directories, it expands those as well.

This is generally not what you want -- in almost all cases you want tools to use and report the filenames you give them and not try to reinterpret them. Doing so can in some cases lead to confusion (particularly, but not only, if there are automounters involved) and it can also create testing and debugging headaches. (For example: if you check out and build two different versions of saw in different trees, now you can't compare the output from test runs.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug error-messages testing usability An issue that impedes efficient understanding and use
Projects
None yet
Development

No branches or pull requests

1 participant