Skip to content

Conversation

nezia1
Copy link
Collaborator

@nezia1 nezia1 commented Jun 20, 2025

Title. This centralizes every deprecation in a single file, making it a lot easier for developers/consumers (we should also add a changelog, but this is for another PR). I also added an arbitrary baseline deprecation window of 3 months, but this can be discussed here (I'm open to suggestions).

Meta

Related Issue(s): <None>

AI used to generate code included in this PR?: No

All Submissions:

  • Formatted commit message in accordance with CONTRIBUTING.md guidelines
  • Filled in all meta items
  • Mentioned any blockers before the PR can merge
  • Verified there are no conflicting PRs open

New Module Submissions:

  • Followed the general API laid out in CONTRIBUTING.md
  • Wrote tests (or expressed a need for help on tests)

@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch 2 times, most recently from 9c35b50 to 9d26c4a Compare June 20, 2025 15:08
Copy link
Collaborator

@Lunarnovaa Lunarnovaa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Needs some changes.

@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch 5 times, most recently from b93299c to dda55d0 Compare June 22, 2025 01:08
@nezia1 nezia1 requested a review from Lunarnovaa June 22, 2025 01:14
@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch from dda55d0 to 37e3aa9 Compare June 22, 2025 01:16
@nezia1
Copy link
Collaborator Author

nezia1 commented Jun 22, 2025

Additionally rebased and added the removed programs.git.destination option to our centralized file

Comment on lines +17 to +19
(mkRemovedOptionModule
["rum" "programs" "git" "destination"]
"The default destination is now under `~/.config/git`")
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we have a removal date for these too?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really, as this would be part of the history. Once it's removed it's removed, I don't really see a particular reason why we should add a date to this. I guess it might be a little clearer from the user's POV?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, you could say the same for a renamed module. Is the point not that including the mkRemovedOption increases eval time and messyness of the codebase in the longterm, just like mkRenamedOption ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, this shouldn't get special treatment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, you meant it like that. We could just add a comment for removed options, as they are well, already removed (the users don't have to know but we do)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you clarify what you mean?

I think what Lunar and I are saying is that we should still use mkRemovedOption, but include a timer for removal, just like mkRenamedOption. I'm fine with keeping a comment around after removal, if that's what you meant.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant that instead of having our wrapper function that gives the consumer of our module a warning with the upcoming removal date, it should just be a comment on top of the MkRemovedOptionModule call, because the option will just be removed so there's no need to warn the user that the mkRemovedOptionModule will eventually be removed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My worry with comments is that they're harder to remember to delete - I get what you mean, though.

Speaking of remembering to delete things, do we have any plans for automation around deleting stuff after the expiration date?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That would be great. The only issue is that this would likely require a custom Python script using tree sitter, or rnix-parser, which doesn't seem to have been updated in a little while and does not even build (the flake seems to have Cargo related errors).

If anybody would like to dive into writing a custom script for the pipeline, that would be amazing, but it is non blocking for now.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or just a regex string, if you're crazy like I am...

Super busy with other stuff right now, but I'll try to get back to this when I have the chance.

@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch from 37e3aa9 to 47a12b3 Compare July 6, 2025 22:35
@Lunarnovaa
Copy link
Collaborator

Tracking: NixOS/nixpkgs#427073

@nezia1 nezia1 marked this pull request as draft July 28, 2025 13:50
@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch 12 times, most recently from fd81a5f to 7a3875a Compare August 1, 2025 16:06
@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch from 7a3875a to 819b8af Compare August 14, 2025 10:29
@nezia1 nezia1 force-pushed the centralize-deprecations-with-date branch from 819b8af to 2bd397f Compare August 14, 2025 11:55
@a-usr a-usr mentioned this pull request Oct 13, 2025
6 tasks
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.

3 participants