-
-
Notifications
You must be signed in to change notification settings - Fork 72
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
[BUG] meta.yaml order is not in correct order sometimes #288
Comments
Hi, thanks for reporting it :) I would like to understand what do you mean by the original sorting? do you want it to be alphabetically sorted? |
Ahh sorry I mean the actual meta.yaml itself. Normally it's |
Wow. |
@marcelotrevisani I haven't seen it happening often but every now and then. Let me know if I should start a list of packages where this occurs. |
I think I know what is happening but if you have more packages as examples to test it would be really nice, thanks! :) |
Just starting a list here and will update when I notice packages:
|
@marcelotrevisani Sorry, I forgot to update the list at some point but this is still happening. Do you have a clearer idea about how to fix this maybe? It's not super big, was just wondering. :) |
I tried the packages @BastianZim mentioned. This was the result; I notice the order of |
Indeed, that is not correct. I have an idea what is happening. The thing is, the ruamel yaml creates a dict like object and it preserves the order when you create new keys and it is difficult to change the order after the creation of new keys that are not in the correct order. The strategy to workaround this is to create all sections that grayskull could use at the begining of the creation of the recipe object, and instanciate that with a key and an empty value. If the value is empty at the end before to dump the values to the file, grayskull try to clean the recipe. |
Ahh no rush from my side :) I was just wondering if you have an idea about what's happening so someone else can take a look. |
Might be worth mentioning the order change is not compatible with conda-forge recipes: conda-forge/staged-recipes#19083 (comment) |
I have a |
That’s great! :) Can you make a PR there maybe? |
@BastianZim thanks! On |
To be honest, that’s probably better addressed at @marcelotrevisani |
Yeah, that needs to be addressed at conda-souschef, indeed Sorry for my delay, I was off for the past 2 weeks because of some personal matters. But I am back now :) |
Describe the bug
A clear and concise description of what the bug is.
Ran grayskull on
awswrangler
and the order is not correct.To Reproduce
Steps to reproduce the behavior:
awswrangler
Expected behavior
A clear and concise description of what you expected to happen.
Source
should be afterpackage
and beforebuild
.Outputs
If applicable, add the output to help explain your problem.
Example output:
Environment:
https://www.marcelotrevisani.com/grayskull
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: