Skip to content

Initial attempt at checks_ext#375

Draft
jonasfj wants to merge 2 commits into
google:masterfrom
jonasfj:checks_ext
Draft

Initial attempt at checks_ext#375
jonasfj wants to merge 2 commits into
google:masterfrom
jonasfj:checks_ext

Conversation

@jonasfj

@jonasfj jonasfj commented Jun 8, 2026

Copy link
Copy Markdown
Member

There is a bit of AI experimentation going on here.

I think more extensions for check() is a good thing, maybe some of the good ideas from here can one day land in package:checks -- this package is an attempt to be more opinionated in the direction that check(something) should be useful, for most cases of something.

Some open questions:

  • (A) check(myCompleter).isCompleted() vs check(myCompleter.isCompleted).isTrue(), where is the line for what extensions should offer and what should be preprocessed?
  • (B) Messages from check('a\nb\n\c').lines.contains('a') say has lines that:, but maybe the messages could be where lines ... or something else, because .lines is not really a property of String, but useful a derived value.
  • (C) Sometimes, I find the error messages less than pretty, maybe that's a bug or maybe that's just the way they should be.
  • (D) Maybe, I need better guidelines for:
    • When to add extensions and what methods/properties to add.
    • What words / terms to use in description messages.
    • When to use custom pretty printing in description messages.
  • (E) So far this package has minimal external dependencies, but we could add dependency on some popular packages to add check-extensions for types that they offer.

CC @natebosch WDYT?

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.

1 participant