Repository vs Packages Distros #17
Replies: 2 comments 4 replies
-
So you are pointing out that we have two types of audiences for the content of this repo: library maintainers, and library users. I definitely see how you are thinking and why your suggestion here have great merit. But let's ponder alternatives and pros and cons.
Let's look at some effects:
Let's think a bit about this before taking the decision. But, please add what other things you think needs to be considered, and also what you consider the biggest reasons for or against a particular solution. |
Beta Was this translation helpful? Give feedback.
-
Packages ProposalAfter having thought about it thoroughly, I've come to the conclusion that best solution for separating maintainers files from distribution files and packages, the following solution might the best one, which is very similar to the one adopted in the StdLib:
What I had in mind here is something similar to what we've been doing in the StdLib repository, to simplify maintenance of the documentation. I.e. to use real Alan sources for the examples code and transcripts shown in the documentation, by leveraging Asciidoctor We then added a custom SED script to further "sanitize" those examples which are intended for inclusion in the final package, by removing the region-tags comment lines. Also, we've added region tag comments to the StdLib sources, which allows us to comment excerpts from the StdLib sources in its Manual, which are also sanitized away by the scripts that deploy the library sources to the package folder. All of this might seem a bit complicate, but it's not, especially when automated (it's a set it and forget it think) and allows us to ensure that every snippet of code in the documentation (whether from the StdLib sources or from its example file) actually mirrors the latest sources, and that all the transcripts shown in the docs also mirror any changes to the messages and/or ALAN default messages and behaviour. Not only this allows us to ensure always up-to-date references, but it also makes it very easy for us to catch any significant changes in the StdLib or ALAN behaviour (whether intentional, accidental or due to a bug). So, with this system, we have ample margin to decide how each folder should be named, including adopting version based conventions, since Ruby could handle all that in simple and neat way from within Rake files. For any complex tasks, there is most likely a Ruby gem that can handle it (SemVer, Git interfacing, stream editing a la SED, etc.). But Rake already provides most of the needed functionality to create packages via its If it's OK with, I'd like to start working along these lines, e.g. to add the documentation and prepare the Rakefile, and experimenting with packaging (on dev branches). The whole idea is that to create/update distribution packages, it should be sufficient to run Rake locally (e.g. |
Beta Was this translation helpful? Give feedback.
-
@thoni56, I was thinking that we should consider this repository as the development site of the various libraries, and that we'll probably end up having a GitHub Pages website where end users can download the stable libraries and their documentations.
This implies that we should be free to add test suites to each library, in order to ensure that code tweaks and new features don't break previous one, and that we can freely use complex scripts to handle automation, and even use AsciiDoc sources for creating the final HTML (or PDF, etc.) docs that will end up in the final distribution package — all of which would, of course, make the repository less friendly to authors non involved with libraries maintenance work.
I'm already seeing that the native library documents (
INDEX.md
,NOTES.md
, etc.) are going to pose a challenge in terms of keeping them up-to-date with library changes, especially if we keep them in Markdown. AsciiDoc would simplify the task, especially if we embed ADoc text snippets in the actual library sources comments, and theninclude::[]
them into the documentation. We can always strip those ADoc comments (or their tags) from the distributed sources (just we're doing it already in the StdLib source).That was just an example (it doesn't need to that way), but it demonstrates that separating the repository contents from the actual distributed packages allows us more freedom in terms of how to organize our developers' contents, and automating how the distribution packages are generated.
The original documents in these libraries were simple plaintext files, which are not so exciting, but probably are better for end users than a markdown document which they might not have a tool to render it with. So my guess is that the ideal solution would be to deliver any docs in HTML format, since everyone has a browser, and AsciiDoc definitely delivers nicer HTML docs, and allows us to centralize many shared snippets and attributes thanks to
include::[]
directives (not to mention that we already have a good experience with Asciidoctor, and many ready-made custom resources to exploit).Do you agree that this should be the general direction this repository is going to take? (details being defined as we go along, toward our first v1.0.0 release).
Beta Was this translation helpful? Give feedback.
All reactions