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

Update schemas to match latest changes #15

Open
1 task
uncenter opened this issue Jan 2, 2024 · 18 comments
Open
1 task

Update schemas to match latest changes #15

uncenter opened this issue Jan 2, 2024 · 18 comments

Comments

@uncenter
Copy link
Member

uncenter commented Jan 2, 2024

This is a "living" issue and will update over time as changes are made in https://github.com/sxyazi/yazi.

  • N/A
@uncenter uncenter pinned this issue Jan 2, 2024
@dydyamotya
Copy link

Hello! Please update [which] key is schema. It is updated in documentation, but causes formatter errors.

@uncenter
Copy link
Member Author

Has there been a release including that change yet? I'm afraid we haven't implemented proper versioning so far and that means unfortunately the schemas will only be updated on new releases.

@dydyamotya
Copy link

I've just installed yazi and downloaded the config from the site, as mentioned in the documentation. And it showed, that the scheme is wrong.

Like that:
image

@uncenter
Copy link
Member Author

uncenter commented Feb 29, 2024

You must have installed it from main, since that PR landed only two weeks ago whereas the latest release was three weeks ago. You can comment out the schema key until the next release. I apologize for the issue, I'm still considering the best way to deal with versioning.

@sxyazi
Copy link
Member

sxyazi commented Mar 1, 2024

I'm still considering the best way to deal with versioning.

Perhaps we can just add it? If it is included in the user's configuration but not defined in our scheme, an error will occur; however, if it is included in our scheme but not defined by the user, no error occurs.

@uncenter
Copy link
Member Author

uncenter commented Mar 1, 2024

That approach doesn't work for all changes though, but you are right it would be inconsequential in this instance. If a property is renamed though, I can't change it since it will likely break the schema for more users than it fixes it for. I don't think it makes sense for me to update the schema for some changes but not others because of that.

@sxyazi
Copy link
Member

sxyazi commented Mar 1, 2024

If a property is renamed though, I can't change it since it will likely break the schema for more users than it fixes it for.

rename is add + delete, such as renaming foo to bar:

  • Add bar
  • Delete foo

We already know that "adding" will not be a problem, and the deletion occurs after our release, so there will be no problem either.

@uncenter
Copy link
Member Author

uncenter commented Mar 1, 2024

I'm not sure I'm willing to manage the complexity and timing of adding/removing properties like you explained around a release schedule I don't control.

@sxyazi
Copy link
Member

sxyazi commented Mar 1, 2024

This is based on the assumption that renaming is not expected to occur frequently. Renaming in the Yazi configuration file has only occurred once so far, renaming layout to ratio, and it was a major change, sxyazi/yazi#461

Most of the time, we simply add new fields or remove existing ones.

@uncenter
Copy link
Member Author

uncenter commented Mar 1, 2024

Still seems like unnecessary complexity when the real goal here is a proper versioning system imo. See #17.

@sxyazi
Copy link
Member

sxyazi commented Mar 1, 2024

Still seems like unnecessary complexity when the real goal here is a proper versioning system imo.

Sorry, I don't understand, could you be more specific - what part do you think is complex?

To me, it simply moves the "adding" work we do at release time to an earlier stage. For deletions, we can add comments like // TODO: remove this and then delete them after release.

@uncenter
Copy link
Member Author

uncenter commented Mar 1, 2024

I'm not a fan of adding debt like that though where the schemes have to be updated so often.

@sxyazi
Copy link
Member

sxyazi commented Mar 2, 2024

I'm not a fan of adding debt like that though

I don't understand why this would be "adding debt"

where the schemes have to be updated so often.

If it's because you don't have enough time, rather than "complexity", I can understand, and I will maintain it myself, as this is much easier than version control and won't require users to manually modify the scheme version in the configuration file every time they update Yazi - I'm not sure how many users would want to do this.

@uncenter
Copy link
Member Author

uncenter commented Mar 2, 2024

won't require users to manually modify the scheme version in the configuration file every time they update Yazi

You've completely misunderstood my point? That was one of the various things versioning allows. We can allow users to just use the latest, or maybe there is a Yazi bug that prevents them from upgrading and in that case they can update the schema URL to pin it at a version and not have issues. Let's continue this in #17.

@uncenter
Copy link
Member Author

uncenter commented Mar 9, 2024

I've just installed yazi and downloaded the config from the site, as mentioned in the documentation. And it showed, that the scheme is wrong.

Like that: image

As Yazi 0.2.4 has been released, the schema should be updated. Apologies for the issues.

@lukeemhigh
Copy link

lukeemhigh commented Aug 30, 2024

Hi, I'm getting schema error for the confirm property:

image

On Yazi 0.3.1 (Arch Linux 2024-08-17)

@uncenter
Copy link
Member Author

Hi, I'm getting schema error for the confirm property:

image

On Yazi 0.3.1 (Arch Linux 2024-08-17)

The schema is actually correctly informing you, though it is out of date (see #30). You are on Yazi 0.3.1, the new confirm feature is in Yazi 0.3.2!

@lukeemhigh
Copy link

Hi, I'm getting schema error for the confirm property:
image
On Yazi 0.3.1 (Arch Linux 2024-08-17)

The schema is actually correctly informing you, though it is out of date (see #30). You are on Yazi 0.3.1, the new confirm feature is in Yazi 0.3.2!

Thank you, I updated to the latest git package in the AUR and all taplo warnings disappeared.

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

No branches or pull requests

4 participants