-
Notifications
You must be signed in to change notification settings - Fork 179
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
Unify printing of functional arguments #2298
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
2b6ecbf
WIP
Julow 3b718e3
WIP
Julow 43b1627
Restore forcing the closing paren
Julow 4f42418
Restore the outer box structure
Julow 62baf16
Restore inner box structure
Julow 125be21
Restore body indentation
Julow c1c679d
Restore indentation after label and comment
Julow 5fb1af1
fm
Julow 7dfc0fa
Update CHANGES
Julow File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -33,31 +33,31 @@ let foo = | |
~doc:"Toy ID." | ||
~args:[] | ||
~typ:(non_null guid) | ||
~resolve:(fun _ctx x -> x.id) | ||
~resolve:(fun _ctx x -> x.id ) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is a regression. |
||
; field | ||
"name" | ||
~doc:"Toy name." | ||
~args:[] | ||
~typ:(non_null string) | ||
~resolve:(fun _ctx x -> x.name) | ||
~resolve:(fun _ctx x -> x.name ) | ||
; field | ||
"description" | ||
~doc:"Toy description." | ||
~args:[] | ||
~typ:string | ||
~resolve:(fun _ctx x -> x.description |> Util.option_of_string) | ||
~resolve:(fun _ctx x -> x.description |> Util.option_of_string ) | ||
; field | ||
"type" | ||
~doc:"Toy type. Possible values are: car, animal, train." | ||
~args:[] | ||
~typ:(non_null toy_type_enum) | ||
~resolve:(fun _ctx x -> x.toy_type) | ||
~resolve:(fun _ctx x -> x.toy_type ) | ||
; field | ||
"createdAt" | ||
~doc:"Date created." | ||
~args:[] | ||
~typ:(non_null Scalar.date_time) | ||
~resolve:(fun _ctx x -> x.created_at) ] | ||
~resolve:(fun _ctx x -> x.created_at ) ] | ||
|
||
[@@@ocamlformat "wrap-fun-args=true"] | ||
|
||
|
@@ -82,14 +82,14 @@ let foo = | |
| AAAAAAAAAAAAAAAAAAAa -> x.idddddddddddddddddddddddddd | ||
| BBBBBBBBBBBBBBBB -> ccccccccccccccccccccccc ) | ||
; field "id" ~doc:"Toy ID." ~args:[] ~typ:(non_null guid) | ||
~resolve:(fun _ctx x -> x.id) | ||
~resolve:(fun _ctx x -> x.id ) | ||
; field "name" ~doc:"Toy name." ~args:[] ~typ:(non_null string) | ||
~resolve:(fun _ctx x -> x.name) | ||
~resolve:(fun _ctx x -> x.name ) | ||
; field "description" ~doc:"Toy description." ~args:[] ~typ:string | ||
~resolve:(fun _ctx x -> x.description |> Util.option_of_string) | ||
~resolve:(fun _ctx x -> x.description |> Util.option_of_string ) | ||
; field "type" ~doc:"Toy type. Possible values are: car, animal, train." | ||
~args:[] ~typ:(non_null toy_type_enum) ~resolve:(fun _ctx x -> | ||
x.toy_type ) | ||
; field "createdAt" ~doc:"Date created." ~args:[] | ||
~typ:(non_null Scalar.date_time) ~resolve:(fun _ctx x -> x.created_at) | ||
~typ:(non_null Scalar.date_time) ~resolve:(fun _ctx x -> x.created_at ) | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ let () = | |
let () = | ||
very_long_function_name | ||
~very_long_argument_label:(* foo *) | ||
(fun | ||
(fun | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This isn't a regression, this is consistent with fun args that are not the last. |
||
very_long_argument_name_one | ||
very_long_argument_name_two | ||
very_long_argument_name_three | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't stop the difference in the boxes that causes this regression.