roc-lang / book-of-examples

Software Design by Example in Roc
Other
23 stars 15 forks source link

discuss: how to manage inter-chapter dependencies? #54

Open gvwilson opened 1 month ago

gvwilson commented 1 month ago

Following on from #46: how should dependencies between chapters be managed? I.e., if Chapter B uses code developed in Chapter A, how should Chapter A be structured and how should Chapter B get what it needs? Please add comments to this issue with thoughts and proposals.

Anton-4 commented 1 month ago

Before publishing I think we should use paths to refer to packages in other chapters like here. All other approaches seem worse in the complexity vs benefit trade-off.

For publishing of any final code with inter-chapter dependencies, I would put the imported package on an URL using a github release asset. This makes the chapter code self-contained, and it is also the standard workflow for publishing Roc packages.