Open MeAmAnUsername opened 2 years ago
Thanks for the reliable reproduction. It seems that permission analysis, an analysis step executed after regular type-checking, is failing. This can happen when regular type-checking encounters an error (often a reference that does not resolve). However, I agree that it should fail more graciously than this.
I retried the commit manually and then used a diff. Apparently I forgot to rename typeArgsOk
on line 480 in statics/type.stx
.
That means the issue is resolved for me, feel free to close it.
I'll leave it open, because we had the issue more often, and this is a nice reproduction.
Bug description Analysis of Statix Spec fails after renaming some functions
Versions Eclipse: org.eclipse.platform.ide 4.16.0.I20200604-0540 Spoofax: org.metaborg.spoofax.eclipse 2.6.0.20210914-132345-master System: Mac OS X x86_64 10.14.6 Statix setup: multi-file
Steps to reproduce the behavior https://github.com/MeAmAnUsername/pie/tree/bug-statix-spec-nabl2-analysis-fails/lang/lang (note the branch and directory) Either: Build standalone with Gradle Go to the project root directory (i.e. directory with
lang
,api
,root
etc.) in the terminal Run./gradlew :pie.lang.root:pie.lang:build
Note: make sure you use Java 8 when running Gradle, e.g. with the flag-Dorg.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home
if you usesdkman
Import into eclipse and build there Requires eclipse, maybe requires Gradle installed / some Gradle plugin for Eclipse Import the language project (i.e.
lang/lang
) in eclipse using Gradle 6.8 or 6.9.1 and Java 8 Build the projectBuild with Gradle in devenv This requires checking out some other metaborg projects as well. Go to the project root directory (i.e. directory with
lang
,api
,root
etc.) in the terminal Run./gradlew cleanAll buildAll --info --stacktrace
Note: make sure you use Java 8 when running Gradle, e.g. with the flag-Dorg.gradle.java.home=/Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home
if you usesdkman
Observed behavior Build fails with an error. This is consistent, it happened after cleaning the project, restarting Eclipse, running in Gradle in devenv, after checking out another commit, rebuilding, and then going back to this commit, cleaning, restarting and rebuilding, and when building the language project standalone with Gradle. Error log (from Eclipse, but all of them fail with the same Stratego error)
Expected behavior Build succeeds
Additional context Caused by this commit (i.e. previous commit works). This commit renames
typeArgsOk
totypeOfTypeArgs
(along with some related functions). The error seems to indicate that it fails on thetype_arg
relation, which is related in the sense that the typeOfTypeArg function makes a declaration in that relation. I have no clue why this rename leads to this failure.