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

Remove deprecated encode/decode methods, fix warnings and other… #112

Merged
merged 25 commits into from
Sep 23, 2019

Conversation

jonblatho
Copy link
Contributor

@jonblatho jonblatho commented Jul 24, 2018

Summary of what’s changed:

  • Removed deprecated encode/decode methods; this should make usage of these methods much more pleasant as the ClaimSet type will no longer need to be given explicitly
  • Bumped CryptoSwift version to 0.10.0
  • Resolved the warning about deallocate(capacity:) deprecation
  • Renamed validateExpiary(leeway:) to validateExpiry(leeway:) — the old misspelled method is still available but deprecated
  • Updated decoding unit tests to use ClaimSet instead of Payload
  • Updated encoding unit tests to account for unordered Swift dictionaries — this was causing unwarranted test failures
  • Update LinuxMain.swift for new unit tests
  • Account for CommonCrypto inclusion in Swift 4.2 in Package.swift (allows for builds in Xcode 10 beta and going forward)

With all that said, this PR alone would probably make for a decent 3.0 release given the code-breaking change at the top of the list. Perhaps also consider #99/#106; it’s a quick-and-easy change that people seem to want.

@jonblatho
Copy link
Contributor Author

jonblatho commented Jul 24, 2018

Swift 4 deprecates deallocate(capacity:), but CI builds are failing because deallocate is missing an argument for capacity.

Interesting…are the CI builds really using Swift 4?

Update: After tinkering with the Travis config, builds and tests are passing on all macOS configurations (using Xcode 9.4/Swift 4.1.2) and swift build passes on Trusty but swift test does not. Investigating…

Update 2: Travis builds are passing again. I’ll update the configuration such that it should do the same tests as before, adding back swift test on Ubuntu.

@jakekrog
Copy link

jakekrog commented Aug 6, 2018

@jonblatho I tried out your changes, but when running carthage update --platform ios with Xcode 10 beta 5 I get this:

*** Skipped building JSONWebToken.swift due to the error:
Dependency "JSONWebToken.swift" has no shared framework schemes for any of the platforms: iOS

If you believe this to be an error, please file an issue with the maintainers at https://github.com/jonblatho/JSONWebToken.swift/issues/new

@jonblatho
Copy link
Contributor Author

@jakekrog I unfortunately don’t really have any experience with Carthage at all, let alone enough to handle issues with it. I’m sorry!

@jakekrog
Copy link

jakekrog commented Aug 7, 2018

@jonblatho It was actually my mistake, I didn't realize that the project file had been removed in the master branch.

@plflanagan
Copy link

Is this going to be reviewed/merged any time soon?

@kylef
Copy link
Owner

kylef commented Sep 23, 2019

Thanks @jonblatho!

@kylef kylef changed the title Remove deprecated encode/decode methods, fix warnings and other stuff Remove deprecated encode/decode methods, fix warnings and other… Sep 23, 2019
@kylef kylef merged commit 45e5d4a into kylef:master Sep 23, 2019
This was referenced Sep 23, 2019
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

Successfully merging this pull request may close these issues.

4 participants