Skip to content
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

Add local git uri support for userPlugins and the abbility for userPlugins to specify their own derivation #40

Open
wants to merge 120 commits into
base: main
Choose a base branch
from

Conversation

SpiderUnderUrBed
Copy link

This might not be fully finished, nor fully tested, I moved everything like regex to the top and separated github and git pattern matching, I removed coercion and instead did mapping later and used types.oneOf to choose from one of several pattern types such as package, path, git, GitHub.

TODO:
Right now I am not utilizing the rev I get from git, which I can use for version pinning.

I am open for suggestions on how to improve this.

@SpiderUnderUrBed
Copy link
Author

fixes #39

@SpiderUnderUrBed
Copy link
Author

I am having issues with the plugin being properly imported, maybe this is specific to the local git uri, further testing is needed.

@KaylorBen
Copy link
Owner

Sorry I've been busy for the past few days, Ill be able to look this over and maybe write some code for it in a couple days from now

@KaylorBen
Copy link
Owner

The original code for the plugins was taken from a user flake I found, so I don't fully understand how it works

SpiderUnderUrBed added a commit to SpiderUnderUrBed/nixcord that referenced this pull request Oct 28, 2024
@SpiderUnderUrBed SpiderUnderUrBed changed the title Add local git uri support for userPlugins Add local git uri support for userPlugins and the abbility for userPlugins to specify their own derivation Oct 29, 2024
@SpiderUnderUrBed
Copy link
Author

SpiderUnderUrBed commented Oct 29, 2024

@KaylorBen I am developing a vencord plugin as I mentioned, I am dealing alot with dynamic imports and bundlers, so I see fit to include the abbility for userplugins to specify their own derivation, which is optional, also I would like to address this in the same PR as git uri support and userplugin derivation are already quite intertwined in my PR. What do you think of this?

At the very least, a setting to enable this abbility for userplugin derviations.
Also the code isnt quite ready for review, its probably missing some documentation and cleaning up.

SpiderUnderUrBed added a commit to SpiderUnderUrBed/nixcord that referenced this pull request Oct 30, 2024
@KaylorBen
Copy link
Owner

Testing this now, thanks for putting a lot of work into it, and sorry I haven't looked that deep into it. Should be fine to merge if it doesn't cause any issues.

@SpiderUnderUrBed
Copy link
Author

SpiderUnderUrBed commented Nov 29, 2024

The git branch is polluted, I had issues with local testing so I had to push all my changes to a testing branch, I don't know why it is merging the wrong histories (or appearing so).

Aside from that, I made it more modular, I added the git uri and path functionality, and the ability for userplugins to specify their own derivation, and I understand most of the code which had no documentation.

I plan to:
-Remove all remnants of testing, which includes my traces
-add documentation to undocumented areas
-add documentation to my code
-Ensure the correct history will be merged

Some of these changes arnt things I done which confuses me, like hash changes.
Excuse me if I said something dumb, I don't do many PRs.

After a bit of more work then it'll be OK to merge.

@KaylorBen
Copy link
Owner

I pulled it and it builds my config correctly w/t custom plugins and such, so just a matter of removing testing stuff and traces and it should be good I think.

…ded the abbilities for plugins to be built as derivations"

added testing for coerceGit

Revert 'package update'

added the abbility to specify a local git repo successfully and without error, note: will need to clean up comments after testing

Added userplugin custom derviation support

Making sure userplugins is evaluated

Undoing inherit

ensure that a local path works

added vencordPkgs as a input

added debugging

Re-added testing on new branch

Changed defaultVencord to vencordPkgs (as I changed it in my testing)

Fixed rebase mishap

Removed some traces
@SpiderUnderUrBed SpiderUnderUrBed marked this pull request as ready for review January 24, 2025 04:43
@SpiderUnderUrBed
Copy link
Author

Hey, @KaylorBen, Can you have a look at this please?

The changes disappeared because of the previous merge for some reason
@DontEatOreo
Copy link
Collaborator

This PR has 108 commits. Could you please rebase and only keep the relevant commits for the PR?

@SpiderUnderUrBed
Copy link
Author

SpiderUnderUrBed commented Jan 24, 2025

Yeah sorry, some rebase mishap caused the repository current comits to be treated as my commits, my changes are like 3, I'll fix it.

@DontEatOreo
Copy link
Collaborator

@SpiderUnderUrBed Could you share some user plugins? I'd like to test your PR, but since I don't use any third-party plugins, I can't really test it

Also, please run nixfmt-rfc-style on the code if you haven't already. Let me know if you need help rebasing the PR

@SpiderUnderUrBed
Copy link
Author

I need help rebasing the PR, once the PR is rebased, I will then share some user plugins and format it, then also add more documentation, the only commits I need to keep are the recent ones made solely by me, you can pick up which ones by comparing it to the repo commit history. Also could you share the steps you took to fix it please, so I know how to fix such a issue in the future.

@DontEatOreo
Copy link
Collaborator

Okay, so it looks like we've got just one commit that actually matters:
717c9fb

Since your current branch is kinda messy, let's just redo it (the branch) from
scratch. I'll walk you through it using the git CLI, since that's the most
universal way to explain it

Here's the plan:

  1. Make a backup: git switch --create main-copy

  2. Go back to the main: git switch main

  3. Add the upstream repo:

    • If you use HTTPS, run git remote add upstream https://github.com/KaylorBen/nixcord.git
    • If you use SSH, run git remote add upstream [email protected]:KaylorBen/nixcord.git instead
  4. Grab the latest changes from upstream: git fetch upstream

  5. Reset your local main to match upstream's: git reset --hard upstream/main

  6. Cherry-pick the good commit: git cherry-pick 717c9fb42c052090d91134f8b7e381ec4234f3d7

  7. Resolve the merge conflict, then git cherry-pick --continue

Now you've got a clean main with just the stuff you need. You said that you
wanted to add docs so now will be the time to make the commits for this

  1. Squash your changes
    • Run git rebase -i HEAD~N. (Replace N with however many commits you made,
      e.g if you made 2 extra commits, you will write 3)
    • In the editor, change "pick" for the original commit (717c9fb) to "reword"
      and the "pick" for the other commits to "squash".

When you're finally done, just force push it with
git push --set-upstream origin main --force

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants