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

Upgrade to drafter 4 #12

Open
chris48s opened this issue Mar 13, 2018 · 3 comments
Open

Upgrade to drafter 4 #12

chris48s opened this issue Mar 13, 2018 · 3 comments

Comments

@chris48s
Copy link
Owner

chris48s commented Mar 13, 2018

https://github.com/apiaryio/drafter/releases/tag/v4.1.0

@chris48s
Copy link
Owner Author

chris48s commented May 9, 2018

In progress: kylef/draughtsman#1

@chris48s chris48s changed the title Test with Drafter 4.0.0-pre.0 Upgrade to drafter 4 Mar 28, 2020
@chris48s
Copy link
Owner Author

chris48s commented Mar 28, 2020

draughtsman==0.2.0 supports drafter 4, but you've now forked/vendored it.

@chris48s
Copy link
Owner Author

Notes for FutureChris:

  • Drafter 4.1.0 and 5.0.0-rc.1 both drop description from JSON schema (and don't surface it anywhere else). Field descriptions are quite useful :( waaa
  • Drafter update requires some changes to blueprints from downstream users e.g: (array[object], fixed-type) --> (array, fixed-type) which aren't massively obvious from the drafter changelog, but are totally do-able.
  • Drafter 4 won't build in a default manylinux (even manylinux2014_x86_64) container - it throws CMake 3.6 or higher is required. You are running version 2.8.12.2
  • You can fix this by upgrading cmake, but then auditwheel throws ValueError: Could not find soname in django_apiblueprint_view.libs/libm-2-2333ee76.12.so. This means you can't build a valid manylinux wheel (auditwheel --repair wants to vendor in some additional libs)
  • There's a branch at https://github.com/chris48s/django-apiblueprint-view/compare/version3 - don't delete/rebase that because the branch has tagged commits on it e.g: https://github.com/chris48s/django-apiblueprint-view/releases/tag/3.0.0b5 - if you pick thi up again, make a new branch and cherry-pick
  • You did do a pre-release based on the version3 branch at https://pypi.org/project/django-apiblueprint-view/3.0.0b5/ just bundling the compiled libdrafter.so into a -any.whl which works on my machine, despite auditwheel not having run repair on it

Given Drafter 4:

  • Drops a useful feature
  • Requires non-trivial C faffing to package a valid wheel

I've backported some of the other useful bits from that branch on to master, but I'm going to stick with bundling drafter 3.2.7 for the moment. Maybe revisit when there's a stable drafter 5 available. There are various bits of useful code on the version3 branch.

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

1 participant