TelluIoT / ThingML

The ThingML modelling language
https://github.com/TelluIoT/ThingML
Apache License 2.0
101 stars 32 forks source link

Clean up ThingMLCompiler and Context interfaces #244

Open jakhog opened 5 years ago

jakhog commented 5 years ago

IMO, the ThingMLCompiler and Context classes have turned into a bit of a mess, with references to directories or other things being set all over the place. I think it is time to have another look at what those classes contain, and try to move some of their features to arguments in the methods where they are actually needed.

To provide some concrete examples of what is strange:

If you have experienced any other strangeness, feel free to post them here so we can fix it in a single sweep.

brice-morin commented 5 years ago

Not to mention Debug, which should be redone as a ThingML tool. Debug can be quite useful, but the way it has been done turned out quite messy.

The InputDirectory may be used indirectly by some annotation e.g. to include some files like this ../lib/my.file so that we can use relative paths. Though I am not completely sure, maybe we can the path of the thingml element another way. So we need to double check that one.