-
-
Notifications
You must be signed in to change notification settings - Fork 60
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
Bugfixes for 1.0.2 #393
Bugfixes for 1.0.2 #393
Conversation
Thanks. I quick glance at the diff shows that there have been more changes. But: It's really hard to tell if they are significant. Some are only whitespace changes, formatting changes, code moved to other files, or other minor changes. But I cannot easily see if there are also real changes. |
I read through the changes there and they all seem to be referred to in the release log here: https://github.com/citation-style-language/schema/releases/tag/v1.0.2 The moving of cs:choose is unchanged as far as I can see. The csl-data.json file is not changed other than the move. The deletion of code marked obsolete is fine. There are two changes of |
Ok, I've tested with:
The only errors I'm still getting should be legitimate:
|
We can find and replace those I think? @adam3smith |
wait, why did we remove title-short? Wasn't that added in 1.0.1 specifically to allow testing for the presence of a short title? (and I don't understand the sub-verbo part, sorry) |
When I asked how testing would work, the answer was to test like |
Either this, or we need to add a test condition |
@adam3smith You're right. That being removed would have been an error introduced at the same time as the |
@adam3smith The "sub-verbo" thing is that in 1.0.1 the term was called |
I don't know what this refers to but I think @denismaier is right in preserving every deprecation in the schema. I can't tell if you're all on the same page there -- it seems the solution to some problems is to re-add to the spec, and to others, it's to do a find-and-replace across the styles repo. IMO the RNC should be able to validate all styles targeting 1.0+. If it can't, then it's a bit of a stretch to say that these changes are truly deprecations, because you'd suddenly be telling people their valid 1.0.1 styles are no longer valid. I wonder -- can you move all the deprecated items to a separate file? Does RNC let you merge in some deprecations into the regular schema, even in deeply nested nodes? I think this is what the MathML schema does over here, but I'm not sure. If you did, then making use of deprecated items could be made an error, if you didn't include the |
Also no matter what other features you add to replace |
@cormacrelf you maybe want to look at the 1.1 branch and see what you think. We tried to raise these questions when we were working on that last year, but didn't really get any feedback. Our general conclusion was versioned schemas + versioned files should give us more flexibility to deprecate and remove things. It might be 1.1 really gets called 2.0 in the end. IDK. |
Yes, like @bdarcus said, after discussion, it seemed reasonable that requiring versions to be indicated in CSL JSON from 1.1 onwards permitted it to remove elements or change a data structure (e.g., to change title from a string to an object). CSL JSON without a version would be assumed to be CSL 1.0 compatible. |
OK, but, with apologies for re-opening that, is that the right decision? |
I think that's an important discussion, but maybe we should really focus now on getting 1.0.2 out and not so much on the general question of how to deal with old stuff. So, I don't think anyone here opposes adding |
Agreed that the larger discussion should go somewhere else and doesn't affect 1.0.2.
No strong feelings on this, but I'd be comfortable removing it because a) it only affects styles and not the data model and b) the number of styles it'll affect will be minimal. |
Agreed. |
After running trang tests pass again. Good to merge now? |
OK to merge from my end
…Sent from my phone
On Fri, Jun 18, 2021, 10:53 Denis Maier ***@***.***> wrote:
After running trang tests pass again. Good to merge now?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#393 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA7PWUQSIJZFYBQAYK5XLLTTNMU5ANCNFSM46ZWAFSA>
.
|
@cormacrelf - on this specific question below (which I neglected to answer earlier; was probably pressed for time):
I think so. But I think the schemas then become more difficult to maintain (they necessarily get more complicated than they already are). But I can experiment a bit again, and post findings, if we settle on this as necessary.
Why not just use different versions of the schema, e.g. different files, to validate different versions? It's clear there are upsides; what's the downside? PS - maybe we should call 1.1 instead 2.0? |
Might (not sure ATM) be feasible to have the following schemas:
The first two would be discrete versions of the same files, while the last would simply import and customize those. Main thing is, we need the schemas to be:
|
Thanks for pushing for comment, Bruce, it's worthwhile :) I understand there to be at least five different questions to answer here:
My thinking so far is:
|
This is generally in order of your items, but doesn't perfectly align, so I'm not numbering them @cormacrelf. What to call it is mostly a marketing question, and I actually don't care. The exception is what the spec says about supporting previous versions. I don't have a strong view here either. Unless there are objections, let's table that 2.0 idea then. I'm aware of strategies to do this, which is why I'd rather not. The schemas are already difficult to manage; not because they're poorly designed, I think, but because the logic is complicated. I'm less knowledgeable about JSON Schema, other than coming to the conclusion it's much less powerful than RNG. So things we can contemplate in the latter we can't in the former. If we add back title as string literal, then we will need to add language to the spec about what to do with it. I don't have the link handy ATM for our previous discussions on this, but splitting titles gets hairy, and I don't think we should require CSL processors to worry about that. So we'd need to figure out some details here. In short, how should/must a CSL 1.1. processor handle a request for printing a subtitle, if there is no subtitle input data, but there is a title? Maybe we should start a new issue just for this? Are there any other issues here that need focused discussion that warrants a new issue? |
Just bumping this, since we haven't resolved it :-) |
That's why I liked the "do not manage it using actual RNC kept in the repo, just write a script to merge an old branch with the new for a validator" option I will try this out and report how it goes |
But my question is "why?" What's the advantage of having one "schema", however it's constructed and maintained, validating multiple versions, rather than multiple schemas? |
There is no validation-wise difference between a user or computer program looking at the version attribute and applying e.g. the 1.0.2 validator, and a relax-ng validator unconditionally applying the Walsh disjunction of But it is largely orthogonal to the choice of how you handle deprecations. It doesn't do any magic for that, because if you decide to remove deprecated features, there is no choice among the multi-schema options (whether baked into the RNC or manually selected) that will correctly validate the use of a deprecated feature in a version post-deprecation, which was the whole point of deprecating rather than removing and making breaking changes. |
This makes
@form
optional again. With this change 1.0 styles can again be validated.Edit: This also re-adds
title-short
andcontainer-title-short
.Question: How can I now check how that compares to 1.0.1?