Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
code_generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Christopher
code_generator
Wiki
Asciidoc
Developer documentation
Changes
Page history
New page
Templates
Clone repository
[Developer] Add section about writing to the FS
authored
6 years ago
by
Rico Bergmann
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
asciidoc/Developer-documentation.asciidoc
+13
-0
13 additions, 0 deletions
asciidoc/Developer-documentation.asciidoc
with
13 additions
and
0 deletions
asciidoc/Developer-documentation.asciidoc
View page @
3f546547
...
...
@@ -198,3 +198,16 @@ not generated automatically. Thus they need to be added to the JAR manually.
NOTE: Generating these classes is currently being worked on.
== Writing to the File system [[compilation]]
The process of compiling and packaging an `SModel` is pretty straightforward: all `SClasses` need
to be written to the file system. Afterwards the Scala compiler may be invoked and the resulting
byte-code files will be put into a JAR-file.
For executing this workflow a visitor will be used once again. The `SModelFSWriter` will write each
`SClass` to the file system upon each `visit`. Once the whole `SModel` is being visited, the visitor
knows it is done and starts compilation as well as packaging. During this step, other resources
such as the model diagram images will be copied as well.
Although the general steps are quite simple, some details do introduce difficulties. Namely copying
files into a JAR may only be done by streaming the data into the JAR. Furthermore setting up the
compiler requires the classpath to be adapted to the current environment.
This diff is collapsed.
Click to expand it.