Skip to content

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.

2 participants