You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generated signature files persist in the build folder even after the file they originated from has been removed/deleted. Files that import these signatures will continue to type check, even though a fresh build (after removing the build folder) will cause issues.
What you did
Create some foo.sdf3 that contains declarations.
Import signatures/foo-sig in Statix.
Rename foo.sdf3 to bar.sdf3.
Build successfully.
Observe that the import in Statix is still valid because the file still exists.
Clean the project through Eclipse.
Build successfully.
Observe that the import in Statix is still valid because even cleaning does not delete unused files in the build folder.
What you expected to happen
Preferably: errors immediately. Acceptable: errors after cleaning the project through Eclipse.
What actually happened
Only deleting the build folder causes the import to fail.
Good catch! Currently we do not delete provided files of tasks that become unobserved and are deleted, as a safety measure to not accidentally delete important files. Maybe we can start deleting files that are in the ./build directory, as these are always generated and safe to delete. That would at least show errors after the build completes.
To get errors immediately on rename, we need to get rid of including directories with generated files, and instead directly depend on the tasks that generate those files, with those tasks returning the list of files they've generated. Then, when an SDF3 file is renamed, the old generated signatures are not provided any more, the generator task does not return those files any more, and the import would fail immediately.
Unfortunately, this is not possible with Statix as Statix only supports directory includes at the moment. Statix would have to be changed to support this, which is nontrivial because includes are handled through Stratego primitives during which we do not have access to the PIE context. A similar problem exists for Stratego, but that is probably easier to fix due to the include logic being executed as part of PIE tasks.
Gohla
added
the
P-High
Priority: high. Should take priority over low and non-prioritized
label
May 11, 2022
Summary
Generated signature files persist in the
build
folder even after the file they originated from has been removed/deleted. Files that import these signatures will continue to type check, even though a fresh build (after removing thebuild
folder) will cause issues.What you did
foo.sdf3
that contains declarations.signatures/foo-sig
in Statix.foo.sdf3
tobar.sdf3
.What you expected to happen
Preferably: errors immediately. Acceptable: errors after cleaning the project through Eclipse.
What actually happened
Only deleting the build folder causes the import to fail.
Context
The text was updated successfully, but these errors were encountered: