-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
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 cursor to 0.44.11, add multi-platform support, modify update sh #371260
Conversation
352509f
to
e2a8167
Compare
I formatted with nixfmt, but I have no idea how to push that change properly? I've just committed with |
I think I was supposed to @sarahec I haven't tested on x86_84-darwin or either linux outputs, and I don't know how to test the update script but the mac catalog produced an output and I got the right hashes I think |
You can "squash" your nixfmt commit into the main one, see https://www.geeksforgeeks.org/git-squash/ Then |
What to expect next:
Also, I want to restructure this a bit. Let me see if can send a commit through to make your life easier. |
P.S. Go ahead an mark this as a "draft" for now (under reviewers on the PR page) so we don't have multiple reviewers on it yet. We'll mark it "ready for review" when done. |
All right, I mentioned a refactor. First step: we normally break apart the "version update" step from the "add new platforms" step. Rather than have you split this into two commits and manage them both, I'm submitting a PR for the update: #371295 I would like to have you review it.
Once this merges, I'll tell you how to get the changes into your branch. (Hint, you update (We'll get to managing multiple commits in a PR later. One step at a time! You'll want to add your name to the list of maintainers soon and we'll use it as the example.) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A few easy changes to get you started. Once you make these, commit the changes locally, squash them into the previous commit, then force push.
fi | ||
''; | ||
|
||
meta = { | ||
meta = with lib; { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with lib
is deprecated, please remove and refer to lib inline (as per the original file).
Background: https://discourse.nixos.org/t/why-are-there-so-many-ways-to-reference-lib-and-do-they-matter/2920
nixfmt --version |
Looks good to me! |
Let's imagine you've pressed "sync fork" on Github. Now your Next, use Note that the CONTRIBUTING.md file says OK, so about the screen you saw:
You only need
You may want to flip the order of these -- maintainers first, then cursor updates, as you're changing the cursor code more often. So you run
If you switch the first two lines and save the file, you'll switch the order of the commits:
Now any squashes happen to the top of the list. Remember to Fixing the mixed up mergeSend me the output of |
|
Hi Alex, just checking in. I assume school has you busy. I'll be here when you want to continue work on this. |
Hi, I'm reading your previous message to fully comprehend. |
Here: |
I've added myself to maintainers list. I'm hesitent to try but I'm going to run a |
Your merge and push look good. We still have some changes to make, but you navigated the first git hurdles. Let's take a moment to sort out the commits. Looking at master...aspauldingcode:nixpkgs:cursor-add-platforms I see five commits:
Notice that I have them with the newest commit first. That's the order you'll see in a Here's what reviewers expect to see: This combines all of the code-cursor changes into one commit that is newer than the maintainers change. I also rewrote the names into the nixpkgs standard. You do it like this:
pick 12345 formatted, removed with lib
pick 23456 add aspauldingcode to contributors list
pick 34567 Merge branch 'NixOS:master' into cursor-add-platforms
pick 45678 Merge branch 'NixOS:master' into cursor-add-platforms
pick 56789 update cursor to 0.44.11, add multi-platform support, modify update sh
pick 67890 ...something else...
pick 12345 formatted, removed with lib
pick 34567 Merge branch 'NixOS:master' into cursor-add-platforms
pick 45678 Merge branch 'NixOS:master' into cursor-add-platforms
pick 56789 update cursor to 0.44.11, add multi-platform support, modify update sh
pick 23456 add aspauldingcode to contributors list
pick 67890 ...something else...
squash 12345 formatted, removed with lib
squash 34567 Merge branch 'NixOS:master' into cursor-add-platforms
squash 45678 Merge branch 'NixOS:master' into cursor-add-platforms
pick 56789 update cursor to 0.44.11, add multi-platform support, modify update sh
pick 23456 add aspauldingcode to contributors list
pick 67890 ...something else...
What's nextExtracting update.shOnce you have this down to two commits in the right order, I'd like you to move Why? The whole derivation is getting a bit long and hard to read. We can simplify it by separating the update script into its own file. Fixing the source version updateYou'll want to construct all four URLs and their corresponding hashes as shell variables (example: The goal is for this to be an "all or nothing" update -- either we get good downloads for all platforms on this version and do the update or we skip it for now. Other than that, I'm confident the rest should be minor fixes. P.S. We will also need to rebase this atop master again, but let's wait until you've done the steps above. |
That looks like you're working in |
The bottom left says I am in cursor add platforms branch |
Apologies for the silence, I had a ghastly stomach bug. Can you run this and let me know what you see? git switch cursor-add-platforms
git log -n 8 This will show the last eight commits in the branch. (Here's the documentation: https://git-scm.com/docs/git-log) |
|
That looks good. One more check (a trick I just looked up): This shows only the changes on your branch. I'm assuming that this part is your branch: commit aaa1625d3ce3c0b9f973693b207a11128e78f63a (HEAD -> cursor-add-platforms, origin/cursor-add-platforms)
Author: aspauldingcode <[email protected]>
Date: Tue Jan 7 14:34:45 2025 -0800
formatted, removed with lib
commit 14b5340c91a129c6ac436eda6f8a21125b688bdf
Author: aspauldingcode <[email protected]>
Date: Tue Jan 7 14:26:26 2025 -0800
add aspauldingcode to contributors list
commit bfc3d5c74825e839497f7948509fbb533c8959d6
Merge: d95d8ffb9ac2 1944a966101b
Author: Alex S. <[email protected]>
Date: Sun Jan 5 18:39:51 2025 -0800
Merge branch 'NixOS:master' into cursor-add-platforms Can you run (I'm trying to get us back to a place where you can combine the commits into two: adding yourself to the maintainers and the cursor-specific changes) |
Since we're stuck struggling with git, and I would like to get you through the PR process (so you can see the whole thing), let's do this:
git switch master
git fetch upstream master
git checkout -b add-aspaulding Then edit the maintainers file again (sorry), save it, and push your changes. Then create a PR from that and let me know about it so I can approve. After that, we can finish the multi-platform support. Also, I'm going to push some changes to |
I think this is what happened: should I maybe start over with a fresh fork? the only file I've changed is contributors and the cursor package |
That would explain the state of the branch. The fresh fork is a good idea. |
Supercedes #371208
"Updated code-cursor to 0.44.11.
Added aarch64-linux and both darwin platforms.
Modified passthru Update Script to include mac release catalog"
^ Please summarise the changes you have done and explain why they are necessary here ^
For package updates please link to a changelog or describe changes, this helps your fellow maintainers discover breaking updates.
For new packages please briefly describe the package or provide a link to its homepage.
-->
Things done
nix.conf
? (See Nix manual)sandbox = relaxed
sandbox = true
nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD"
. Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/
)Add a 👍 reaction to pull requests you find important.