-
-
Notifications
You must be signed in to change notification settings - Fork 31
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
Remove duplicate netcdf
entry (triggers "Type application/netcdf is already registered as a variant of application/netcdf.")
#50
Conversation
netcdf
entrynetcdf
entry (triggers "Type application/netcdf is already registered as a variant of application/netcdf.")
Please check |
@halostatue I've updated |
In general, PRs should just be for the YAML files; I do the conversion (there are three conversions now) as part of the release process. It’s not a big deal. |
So I’ve done a quick bit of checking, and the story isn’t great at this point. Removing the type from the provisional file won’t do any good, because there’s a provisional registration with IANA, so the next run of Removing it from - !ruby/object:MIME::Type
content-type: application/netcdf
encoding: base64
extensions:
- nc
- cdf
registered: false I deliberately do not permit the customization of the provisional file, and we don’t currently overlay the provisional data on the existing types files, so we either:
We would need to probably keep the provisional file so that we can see when types are removed from provisional registration without being promoted to official registration (maybe we keep those but mark them as The third option is the correct option, but it is also a lot of code change in the support code because it would now need to deal with promotion and/or removal. I also don’t know how important the extensions are for Unfortunately, the means that this PR cannot be merged as is. I’m not closing it yet, as we need to figure out the correct resolution. |
Thanks for the very detailed response! The warning may confuse people, but it's not urgent. We've opted to just add a line that ignores it, which works for us until the issue is resolved. I'll let you decide if/when to close this, and thanks again for the explanation. |
Any updates on this issue? The warning is quite annoying due to it outputs the message to STDOUT and |
Not at the moment, sorry. It’s not a trivial issue to resolve. If you’d like to open an issue on mime-types/ruby-mime-types, I can look at ways that this message can be suppressed (it won’t be removed, but I could suppress it either with an environment variable or by checking a common environment variable like |
IMO the problem is, the library shows a warning message to the wrong audience (application developers). It's not understandable to app devs, not marked with its provenance (source lib name), and finally, app devs have no way to resolve it. Instead, the message seems aimed at I submitted a PR to make this |
This is incorrect. The message is to developers who use |
How can those people be better supported? |
I don’t have an answer for that—as the lack of resolution to this PR and other possible fixes shows. It is problematic when multiple matching types are added, so the warning isn’t inappropriate. There’s no way to say "ignore any warnings while loading this, but then start showing warnings after this is loaded". Even if there were, I’m not sure whether that would be the right thing to do, because there’s a more fundamental issue of duplicate data in this database, and it appears to be unavoidable with the design constraints currently present. |
This situation is creating a lot of clutter in our logs. It started appearing after Rails 7 upgrade. This also affects our cron scripts that run periodically. All of them are sending the warning output and notifying us. Is there a way to get rid of this warning? |
I have addressed this properly in #53 and will be releasing a new version of Thanks for your contribution, @shioyama and my apologies for how long it took to resolve this. |
This seems to be a duplicate entry. We've encountered an issue where the second entry triggers a warning here:
https://github.com/mime-types/ruby-mime-types/blob/5b931d70d74f3d1ba25babac03237ae450ca5c5b/lib/mime/types.rb#L189-L193
This emits
Type application/netcdf is already registered as a variant of application/netcdf.
I've just removed the first of the two. The change traces back to 8c995e61 released in v3.2022.0105.
This change is