-
Notifications
You must be signed in to change notification settings - Fork 760
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
Add failing test for cyclic allOf + $ref in resolve subtree #1275
Conversation
Come on, @ponelat, you can also add the solution, not just a failing test. |
I preferred the delayed responses, from the more westerly timezones. |
This is MOAR better. |
851f311
to
a72b8d7
Compare
And @ponelat, the build is failing. |
Its in the title @webron . The chunk of text near the top of the page |
Hmmmmmmmm |
Miiiiight be the same issue as #1243. |
An update here: I hacked on this for quite a while on Thursday, but haven't gotten all green lights yet. I've set this aside so I can get some other things into this release cycle, and will pick it back up next week 😄 |
87dfd81
to
2cc4d65
Compare
Here we are again.. I spent about two days this week on this issue and still haven't struck at the heart of it. I'm punting again so I can land some related fixes for tonight's release - they're in the same branch, so I'll need to graft them out. This will be at the top of my list.... Monday. Swagger-Client #1275 notes for week of Monday, April 23
$ref plugin frames:
ok - it is an object inheritance issue.. but it's not an accident. when parsing replace patches when meta patching enabled, we break inheritance before replacing the target location so we can place metadata at the target without it also appearing at the source. disabling that functionality is a bad idea, for a few reasons... (a) a worse user experience and a breaking change, (b) breakage of quite a few tests, and (c) likely to cause strange adverse behavior in Swagger-UI. so that leaves us to work in the other direction - if we can't make specmap's internals more optimistic, we have to make the traverser more pessimistic. traverse's this patch is being considered a mutation, so traverse is walking the mutation's value through the plugins without ever actually applying the mutation patch itself. because the mutation patch disappears, but the patches generated from that mutation persist, the application of the generated patches fail. $ref frame #4 yields no patches - this appears to be causing the mutation patch drop, while its derivatives hang around. |
Also introduces a friendlier Babel configuration in development, tuned for good debugging in Chrome.
3dfa24e
to
a668c2f
Compare
c108b2a
to
e95812a
Compare
OK! Fixed! The solution was to update specmap's internal mutation applier to also break inheritance when meta patching is enabled. This keeps both sides of the system in harmony, avoiding the generation of patches for mutations that have not yet actually been applied but have bled through in specmap state due to inheritance. Note that we also dropped testing for Node.js 4, since it reaches end-of-life this month (https://twitter.com/nodejs/status/968177367033229315). Going forward, we're testing Node.js 6, the latest LTS version, I included the version changes in this PR because... the development experience polishing I did in the process of fixing this required a bump to webpack@3, which needs Node.js 6. |
No description provided.