Closed norberturkiewicz closed 5 years ago
I have a very old version of CAS7 but can't find (probably lack access to) it on GitHub to replace with the latest that might display the errors you describe.
@PhilLast I made you a collaborator.
Having failed to read the config file acre computes the target as the name of the project folder.
I can't remember why at present and will have to test the difference if it's removed but this is then prefixed by the location from which the ]openproject
command was called, in this case presumably ⎕SE.SALT
.
This technique is used successfully in various item commands such as ]erase
so that an item can be entered as other than an FQN if the user is in the project space when that location is prefixed.
Here is the reason for the current behaviour:
]openproject project #.space
Please wait - Reading 4 files from .../acre4projects/project/APLSource
#.space
'#.TOP'⎕NS''
)CS #.TOP
#.TOP
]openproject project space
Please wait - Reading 4 files from .../acre4projects/project/APLSource
#.TOP.space
If the supplied project space is not already prefixed with "#." acre prefixes it with the calling space which is normally or likely to be "#." anyway. The examples above demonstrate that this is a not unreasonable outcome. Problems arise when no project space is supplied either by the config file or the argument and it defaults to the folder name which is unlikely to begin with "#." and need not even be a valid APL name. Also as in this issue where the command is called from within ⎕SE
.
The code will be changed to use only "#." rather than the current space in those situations described. I can't be sure but nor can I imagine any situation where this change could cause any undesired change in behaviour.
And where an error occurs in reading an existing config file acre will signal out immediately rather than behaving as though the file didn't exist and thus compounding the problem.
@PhilLast I agree with the error signal if the config file fails. Now that we've worked with Acre-Desktop 4 for a while, I'm more inclined to omit automatic failover behavior when settings are invalid or missing and not optional. Also. I agree that hash should be the default parent for all projects without an explicit root namespace.