-
-
Notifications
You must be signed in to change notification settings - Fork 305
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update nannou-new
to work with cargo workspaces
#448
Comments
Interestingly enough, workspaces have broken In d6d5d38, the examples directory was moved from In addition to (note: the hypothetical steps in following description do not match The problem stems with the lack of versioning on the repo as a whole. Say we query crates.io to find the most up to date At this point we have to grab it from github directly, which I think is acceptable, however, there is currently not a way to determine the proper version of the template file to grab. If we naively clone the Currently, the What I see as the best solution (but I'm sure there are plenty that I haven't thought of) is for this repo to start tagging commits that are pushed to crates. Because this repo is organized as a workspace, the semantics of tags are not perfectly obvious, but two solutions could work out well:
Having the tags means that What are your thoughts? What feels like something we could get implemented so that the |
Another option is to move the template files to the This is by far the easiest to implement and requires no release workflow or repo organizational changes, however, what I see as a downside to this approach is that the template files would no longer be in the
|
Yes, agreed this sounds great! We're careful to synchronise all the "breaking" version updates across all of the nannou libraries in the workspace. For example, Perhaps adding tags for these minor version updates (e.g. I don't have any experience with git tags myself - is adding these retroactively something that can be done in a PR? Or will this require editing the git history? I imagine it might be the latter - if so let me know and I'll try to get around to this asap!
Don't be! I really appreciate the thought that's going into this :) |
SchemeGiven that the breaking changes are accounted for, I think that a workspace-wide tag for every minor- version could work out well for this! Even if we're only tagging minor versions, I would advocate for the tags being Tags, GitHub and ReleasesIgnoring GitHub for a moment, a tag simply marks a point in time. There is no code change or commit for a tag's creation, its basically a bookmark on a specific (existing) commit to say "hey this is a noteworthy moment in time" GitHub, or at least GitHub's UI muddies the water a tiny bit. There is no ability to create a tag (even though there is a view for them), only a "release" (which in turn, creates a tag). I'll show the differences in the next section. ProcessTagsThe process is relatively simple from the command line, and can be done retroactively, however there is no ability to put them through an approval process such as a PR. To tag from the command line:
I ran the following commands on my fork. Feel free to take a look, but when you're reading this, the pretend If I go to my fork's tag listing by clicking here We'll see that Curiously enough, we'll also see it in the Releases tab, but it is not what GitHub calls a release...it seems that they are displayed to give context to releases with regards to tags ReleasesAs far as I know, a "release" is a github specific thing that associates a tag with a deliverable/artifact such as a compiled binary. (GitHub conveniently creates zip and tar.gz archives of every tag already). A release is created from the "Draft a new release" button in the Release tab from last screenshot. You can name the release, and create an associated tag (or use an existing one), and upload the artifacts Once created, the releases tab looks like this: That fake 0.15.0 release was created at my fork's master branch's HEAD. It also created the ReversibilityBoth tags and releases can be deleted from GitHub, so there is no concern of pushing something that is irrevocable. RecommendationIf you don't mind pushing directly from the command line, I feel that tags are sufficient and nicely minimal for the simple use-case. |
@mitchmindtree thank you so much! I have A nice side-effect of the tagging that I hadn't considered is that we can now access raw versioned files at URLs such as |
This could be done by first checking for a
Cargo.toml
containing a[workspace]
. If one is found, it could be updated to include the new crate before the directory is created.The text was updated successfully, but these errors were encountered: