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

Fixed semanticdb file copying issue, added more tests #3080

Merged
merged 6 commits into from
Apr 25, 2024
Merged

Conversation

lefou
Copy link
Member

@lefou lefou commented Mar 11, 2024

Added incremental test for JavaModule.semanticDbData and ScalaModule.semanticDbData. Looks like zinc isn't compiling incrementally at all when we stop at an early compiler phase. The test don't really catch that, yet. But I also found a bug where we moved files instead of copying them.

Fix #3077

@lefou
Copy link
Member Author

lefou commented Mar 19, 2024

Looks like in all test cases zinc is never compiling incrementally. More work is needed. Could be related to the fact that we stop after an early compiler phase.

@lefou
Copy link
Member Author

lefou commented Apr 25, 2024

Here are some issues I identified with our current approach to generate semanticdb data in a Scala 2.13 module:

  • When we stop scalac after phase semanticdb-typer, zinc is not able to incrementally compile the next round, therefore we currently always generate all semanticdb files in each run
  • If we don't stop scalac after phase semanticdb-typer, we can generate semanticdb data incrementally, but we also unnecessarily compile all scala files to class files
  • Incremental compilation doesn't seem to clean semanticdb files for removed sources. So, we need to manually remove those that belong to non-existing source files

@lefou lefou changed the title Added incremental tests for semanticDbData Fixed semanticdb file copying issue, added more tests Apr 25, 2024
@lefou lefou merged commit 654f585 into main Apr 25, 2024
38 checks passed
@lefou lefou deleted the semanticdb-tests branch April 25, 2024 09:28
@lefou lefou added this to the 0.11.8 milestone Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

semanticdb files are deleted on every compilation
1 participant