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

Refactor file handling #1050

Draft
wants to merge 13 commits into
base: main
Choose a base branch
from
Draft

Conversation

VuiMuich
Copy link
Member

Description

So far this is just a refactor to get started with cleaning up file handling.

I am still considering if pulling all the path handling into a similar module in leftwm-core, or if this would be kind of redundant, as many Path and PathBuf references are tied directly to the respective lib anyways.

Type of change

  • Development change (no change visible to user)
  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation only update (no change to the factual codebase)
  • This change requires a documentation update

Updated user documentation:

Please insert user documentation that should be updated (as in the wiki).

See CONTRIBUTING.md User Documentation section for further details.

Note: Manual page changes must be performed in a commit, not in this PR section.

Checklist:

  • Ran make test-full locally with no errors or warnings reported
    Note: To fully reproduce CI checks, you will need to run make test-full-nix. Usually, this is not neccesary.
  • Manual page has been updated accordingly
  • Wiki pages have been updated accordingly (to perform after merge)

@VuiMuich
Copy link
Member Author

Getting the return type of fn read_ron_config is bugging me out.
That part of Rust has always been a weak point for me and now my Rust is even getting a bit rusted (pun almost intended).
But I am positive I can figure this out eventually...

@VuiMuich VuiMuich marked this pull request as ready for review March 31, 2023 21:22
@VuiMuich VuiMuich requested a review from hertg March 31, 2023 21:22
@VuiMuich
Copy link
Member Author

Thanks to the awesome support of Eskaan, this is review ready I believe.

Copy link
Member

@hertg hertg left a comment

Choose a reason for hiding this comment

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

Didn't test, just glanced over the changes and they look good to me

@VuiMuich
Copy link
Member Author

VuiMuich commented Apr 2, 2023

Just noticed I broke leftwm check -m, but I am not sure, if we really can deprecate the migration already...

@VuiMuich VuiMuich marked this pull request as draft April 4, 2023 11:07
@VuiMuich
Copy link
Member Author

VuiMuich commented Apr 4, 2023

Going back to draft, as I noticed now that I fixed the migration, fallback to toml works no more.

I mean, we could go this route and don't load toml any more but still keep the migration routine around for anyone migrating from an old version...
This would simplify a lot.

@hertg
Copy link
Member

hertg commented Apr 4, 2023

Going back to draft, as I noticed now that I fixed the migration, fallback to toml works no more.

I mean, we could go this route and don't load toml any more but still keep the migration routine around for anyone migrating from an old version... This would simplify a lot.

Depends on how long ago the switch to ron was released? If it's fair to assume that most people have migrated, I think going that route is fine as long as we communicate it clearly in the release notes and our announcement channel. We don't have to keep technical debt around for too long, given that we are still in a kind of "beta" state with the project anyway.

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.

None yet

3 participants