Skip to content

Update swagger and proto-wire#232

Open
JonathanLorimer wants to merge 4 commits intoawakesecurity:masterfrom
JonathanLorimer:jonathan/update-deps
Open

Update swagger and proto-wire#232
JonathanLorimer wants to merge 4 commits intoawakesecurity:masterfrom
JonathanLorimer:jonathan/update-deps

Conversation

@JonathanLorimer
Copy link

@JonathanLorimer JonathanLorimer commented Apr 14, 2023

This update makes proto3-suite work as part of haskellPackages in unstable nixpkgs.

Copy link
Author

@JonathanLorimer JonathanLorimer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Self review

Comment on lines +69 to +78
"{\"properties\":{\"wrapper\":{\"format\":\"int64\",\"maximum\":9223372036854775807,\"minimum\":-9223372036854775808,\"type\":\"integer\"}},\"type\":\"object\"}"
, expectSchema @TestProtoWrappers.TestUInt64Value
"{\"properties\":{\"wrapper\":{\"maximum\":18446744073709551615,\"format\":\"UInt64Value\",\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"format\":\"int64\",\"maximum\":18446744073709551615,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
, expectSchema @TestProtoWrappers.TestInt32Value
"{\"properties\":{\"wrapper\":{\"maximum\":2147483647,\"format\":\"Int32Value\",\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"maximum\":2147483647,\"format\":\"int32\",\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"format\":\"int32\",\"maximum\":2147483647,\"minimum\":-2147483648,\"type\":\"integer\"}},\"type\":\"object\"}"
, expectSchema @TestProtoWrappers.TestUInt32Value
"{\"properties\":{\"wrapper\":{\"maximum\":4294967295,\"format\":\"UInt32Value\",\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
"{\"properties\":{\"wrapper\":{\"format\":\"int32\",\"maximum\":4294967295,\"minimum\":0,\"type\":\"integer\"}},\"type\":\"object\"}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New swagger seems to sort keys alphabetically now.

Comment on lines -18 to -21
instance Arbitrary TS.ShortText where
arbitrary = fmap TS.fromText arbitrary
shrink = map TS.fromText . shrink . TS.toText

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arbitrary instance for ShortText already provided by quickcheck-instances, this is the reason I increased the lower bound on that dep.

if flag(large-records)
-- large-records support uses newer Dhall APIs. So we need at least 1.34.
build-depends: dhall >=1.34 && < 1.39,
build-depends: dhall >=1.34 && < 1.41.2,
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

swagger2 >= 2.8 requires aeson 2, this conflicted with dhall <1.39 which requires pre-2 aeson. Bumped the upper bound to allow the solver to grab aeson 2.

Comment on lines +1 to +5
packages: ./*.cabal
source-repository-package
type: git
location: https://github.com/awakesecurity/proto3-wire
tag: 8096a1e19431af603655e5c1f2488b5db907836c
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stack was already using a commit pin for proto3-wire, added one for cabal. Also updated the pin in stack (this provides a Data instance for FieldNumber)

@JonathanLorimer
Copy link
Author

@riz0id Could I get a review when you have a moment?

Copy link
Collaborator

@ixmatus ixmatus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JonathanLorimer thanks for the PR. Sorry it took so long to get around to reviewing it.

@ixmatus
Copy link
Collaborator

ixmatus commented Apr 24, 2023

@JonathanLorimer it looks like there's a CI failure:

CallStack (from HasCallStack):
  $, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:1024:20 in Cabal-3.2.1.0:Distribution.Simple.Configure
  configureFinalizedPackage, called at libraries/Cabal/Cabal/Distribution/Simple/Configure.hs:477:12 in Cabal-3.2.1.0:Distribution.Simple.Configure
  configure, called at libraries/Cabal/Cabal/Distribution/Simple.hs:625:20 in Cabal-3.2.1.0:Distribution.Simple
  confHook, called at libraries/Cabal/Cabal/Distribution/Simple/UserHooks.hs:65:5 in Cabal-3.2.1.0:Distribution.Simple.UserHooks
  configureAction, called at libraries/Cabal/Cabal/Distribution/Simple.hs:180:19 in Cabal-3.2.1.0:Distribution.Simple
  defaultMainHelper, called at libraries/Cabal/Cabal/Distribution/Simple.hs:116:27 in Cabal-3.2.1.0:Distribution.Simple
  defaultMain, called at /nix/store/4mdp8nhyfddh7bllbi7xszz7k9955n79-Setup.hs:2:8 in main:Main
Setup: Encountered missing or private dependencies:
quickcheck-instances >=0.3.29 && <0.4

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.

2 participants