Skip to content

Conversation

@alt-romes
Copy link
Collaborator

@alt-romes alt-romes commented Oct 7, 2025

It was previously making too many fields required and missing the supportsANSIStyling property

Fixes #17

It was previously making too many fields required and missing the
supportsANSIStyling property

Fixes #17
Copy link
Contributor

@dmjio dmjio left a comment

Choose a reason for hiding this comment

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

Nice find w/ supportsANSIStyling, and yes the nullability is off. Well done. Might be worth it to make smart constructors, with Nothing defaults, but we could probably do in a separate pass.

@alt-romes
Copy link
Collaborator Author

I don't think smart constructors would help library users that much, just add indirection.

Typically you're using the library to receive InitalizeRequestArguments in which case you probably do want to deal with the Maybe to set defaults. Using the library to write a client is also possible but much harder, as most RequestTypes don't instance ToJSON (only FromJSON), so it doesn't matter as much. In the debugger testsuite I now have a test which does construct a InitializeRequestArguments: https://github.com/well-typed/haskell-debugger/blob/f5b775764a78f2e3684c2c533357072983888f66/test/haskell/Test/DAP/RunInTerminal.hs

@alt-romes alt-romes merged commit 01cdca7 into master Oct 8, 2025
1 check passed
@dmjio dmjio deleted the wip/romes/T17 branch October 8, 2025 19:50
@dmjio
Copy link
Contributor

dmjio commented Oct 8, 2025

Yea, that's a good point, we're receiving not constructing, maybe only for testing it would be relevant then.

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.

InitializeRequestArguments does not comply to protocol

3 participants