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

Port pytruth as lib/truth #361

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Port pytruth as lib/truth #361

wants to merge 2 commits into from

Conversation

fenollp
Copy link
Contributor

@fenollp fenollp commented Mar 11, 2021

Hi there,
I've just finished porting https://github.com/google/pytruth to Starlark for use in https://github.com/FuzzyMonkeyCo/monkey which requires expressive assertions.

I understand these are the points that should require discussion (some/all are mentioned in the package docs):

  • starlark strings aren't iterable but are sometimes turned into rune tuples in this lib for convenience on the user of the lib
  • duplicate counter compares string serialization of values instead of hash. (pytruth works around this)

Please share your thoughts and take some time to do a bit of reviewing :)

@tetromino
Copy link
Collaborator

There are 3 different Starlark implementations: this one in Go, the Java one built into Bazel, and the Rust one. And my immediate reaction to adding a major feature (a new module) to just the Go implementation would be negative.

Is it possible to write something good enough for your use case in pure Starlark and distribute it as a separate package that any Starlark interpreter can use?

If it's not possible, what is a minimal set of new interpreter features that you would need in order to be able to write it in pure Starlark?

@tetromino tetromino added the question Further information is requested label Jul 10, 2021
Signed-off-by: Pierre Fenoll <[email protected]>
Signed-off-by: Pierre Fenoll <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants