-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Implement assert() messages #24213
Comments
Hey, @jmesserly or @vsmenon, do you want to file a relevant bug for DDC? |
@gbracha can you provide any updates from the DEP's discussion on whether the optional param can be type annotated with dynamic or String ? Thanks! |
From a chat with @gbracha : The type annotation for the optional parameter will be a String. |
Bumping to 1.14, not a critical 1.13 thing |
Not sure what the status of this is. |
As far as I can tell:
I believe the consensus opinion on the DEP committee is that any object should be allowed. |
Clearing out 1.15 milestone as the last full push to dev has happened. If any changes are required before 1.15 is shipped, please file a merge request |
Are we leaving the support behind a flag for 1.50, or are we removing the flag? |
Curious, what was implemented? https://github.com/sethladd/dep_assert_with_optional_message/blob/master/proposal.md or something else? |
Something more general. The message is allowed to be any expression (not just a string literal). |
Marking VM complete based on https://codereview.chromium.org/2564623003/ |
Not quite there yet: #24215 (comment) |
Moving to 1.22, we need to get this completed. |
Removing behind a flag from title also now that we are ready to not have this flagged |
Now that #24215 is closed, is there any reason that this should not be closed as well? |
@munificent do we have tests in place? Also, we should spec somewhere what we actually added (which sounds like it was different from the DEP). |
That's the spec of 'General expressions in assert', which just allows you to use an |
Did some basic testing passing this program to a recent build:
|
Yes, but they are a little scattered:
The latter two make sense to be different. I think we should eventually unify the first three. A lesson I took away from this is that the language team should try to manage testing a new feature so that we don't pawn it off on the implementers and get redundant or spotty tests. |
I like the sound of this. It would go a long way toward helping to avoid confusion when different teams have different ideas about to interpret the spec, or how corner cases should be handled. |
Yeah, I totally agree. Leaf and I talked about this yesterday. At the same time, I don't want the language team to implement all of the tests. Aside from having limited bandwidth, I think it's really useful to get help from people such as yourself who are really skilled at coming up with all of the tricky edge cases that we want to test. So I'm thinking it should be a collaborative process, but the language team should probably own setting up the framework that the implementers can put tests into. |
Sounds good to me. |
Closing this for 1.22 as the last item (#28136) landed! |
The DEP committee feels Seth's proposal for an optional message to
assert()
is far enough along to be ready for a real implementation.the implementation should be gated behind a flag called "assert-message".The implementations can and should now remove the flag.
This is the main tracking bug. Each implementation's specific bug is below:
The text was updated successfully, but these errors were encountered: