Open FroMage opened 8 years ago
I would wholeheartedly agree with a ceylon src
that would take GitHub URLs, but adding those URLs to the code... personally I don't really like the idea.
Why not? Maven does that. It's useful, it also points the users to where the entire source code is, and which tag/branch to use in the module documentation.
Where How does maven do that? I've never seen Java code with URLs to their source code repos.
Well, in the pom.xml
of course, that's where Maven defines modules.
But that's indeed a Maven-only project-level artifact. That's not something we have. But on the other hand it's the only logical place we have. Ah well.
For me the problem is maintaining those annotations. If I do a git branch I have to remember to update the annotations, and there must exist at least one commit in which the annotations are wrong.
Maven has the release plugin which tries to atomically keep version control and poms in sync when you release version x and start on version y. I tried to use it once and it was not an experience I'd wish to repeat or inflict on users.
Another problem is that you cannot guarantee that the binary you're running was actually compiled from the source code you've obtained.
So I don't really have a problem with the url
and repositoryType
attributes, it's the branch which just looks flaky, because it's so hard to maintain right. What might work better was a way to insert a git hash automatically at compile time. We'd need plugins for each RCS, but maybe we'd only need to support git initially.
We should add the following annotation to the language module:
So we can annotate modules to point to the source repository. Then,
ceylon src ceylon.openshift/1.3.0
will prompt:Pros:
Cons:
branch
parameter on release (perhapsceylon version --set
should prompt to include this change?)