lingua-franca icon indicating copy to clipboard operation
lingua-franca copied to clipboard

Epic: Simplify the structure of the core repo and factor out Epoch in its own repo

Open cmnrd opened this issue 2 years ago • 0 comments

This epic specifies the new envisioned and simplified project structure as well as concrete incremental steps we can take towards this goal.

Overview

Our current is very bloated and it is hard for newcomers to find their way through the forest of packages and directories. This structure has been been mostly dictated by Xtext and Eclipse. However, since we are moving away from Eclipse as our primary development IDE and Epoch is only one of our supported LF IDEs, we should aim at freeing our core repository from the constraints and overhead that Eclipse imposes. The best way to do this, is to separate our "core" repository from Epoch. Ideally, we strip the lingua-franca repository from all unnecessary Eclipse dependencies and Eclipse related code. This should instead be hosted in a separte Epoch repository where lingua-franca is a submodule.

The Goal

  • The lingua-franca repository should look something like this:
    lingua-franca/
    ├── bin/
    ├── src/
    ├── test/
    
    Of course we will need some additional files and directories for gradle and other meta files, but the idea is to have a single point of entry for the source code. All code that is needed for our command line tools and the language server, should be located within src/. This includes the contents of org.lflang, org.lflang.lfc, org.lflang.diagrams and org.lflang.lds. The primary build tool for this repository would be gradle and any IDE could be used for development
  • The Epoch repository would look similar to the current lingua franca repository. Most notably, org.lflang would become a submodule and point to the lingua-franca repository. The primary build tool for this repository would be maven and Eclipse the main IDE for development.
  • Since the restructuring will be a breaking change, we also want to use the opportunity to fix #1078 and #423. The goal is to clean our git history and push the cleaned history to a new main branch. This way we can keep the old master branch for legacy, but start developing on main in our freshly cleaned up repo.

Action Items

  • [ ] Bundle the core functionality of LF in org.lflang
    • [ ] Move contents of org.lflang.lfc to a subpackage lfc within org.lflang
    • [ ] Move contents of org.lflang.lds to a subpackage lds within org.lflang
    • [ ] Move contents of org.lflang.diagram to a subpackage diagram within org.lflang
  • [ ] Find Epoch specific code in the code-base and move it out of org.lflang.
    • This includes the EclipseErrorReporter, but also any code where we check the mode of operation (standlone vs epoch)
  • [ ] Move all Epoch specific code to its own repository
  • [ ] Apply the new structure to the lingua-franca repository and update the gradle config accordingly
  • [ ] #1078
  • [ ] #423
  • [ ] Make lingua-franca a submodule of Epoch

Optional:

  • [ ] #937 The planned restructuring poses an opportunity for publishing the core package of LF on Maven central.

cmnrd avatar Jul 06 '22 09:07 cmnrd