-
Notifications
You must be signed in to change notification settings - Fork 56
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
Convert all assertions to verify
#212
Comments
Related to #213, I wonder if we should finally introduce this programming error before doing this conversion. |
How do we deal with bounds checking ? |
It was discussed to move with the ocean compiled as a library with |
It means we have to compile the whole project with |
I don't see way out of it other than protect all places where it may happen with preceding
I think it should be the goal eventually but of course that requires similar adjustments of other libs and thus will take plenty of time. Idea of providing copy-paste makd snippet to link ocean as |
This really sucks and I think is not practical. OK, we can minimize then the |
I actually don't think it is that bad. We rarely try to index arrays with some data that is not directly derived from its |
But the whole point of this is for times when someone forgets to do the sanity checks :) |
I agree with that but to me it seems much more likely to be caught at (unit)testing stage than failed contract and thus much further in the realm of acceptable. |
verify
PR updating the error handling guidelines: sociomantic-tsunami/sociomantic#10 |
Also related - #96 |
Breakdown of
It might be a good idea to strip out unused code before doing this. (Or deprecate and not bother assessing deprecated code for assertions.) |
Some easy cases exist in old unittests that were never converted to use |
It might be possible to auto-convert these using d1to2fix. @mihails-strasuns-sociomantic what do you think? |
Shouldn't be too hard. I'll have a look. |
Excellent. Let's try to do that first, then we can assess what remains. |
After merging #241:
|
(Adjusted numbers above, filtering out |
Looks like splitting it six ways might work:
|
I'd like to take |
|
I volunteer as a tribute for text :) |
Thanks! So we have:
|
The easiest way to split I'm happy to take |
This finished for initial conversion, right? |
I haven't done my share yet 😊 |
@mathias-lang-sociomantic do you think you can get to it in next few days? Otherwise I am going to take it over as I want to release 3.5.0 this Friday :) |
I definitely won't be able to start before Thursday at best (Brighton), so maybe it's better if you take over, sorry :( |
No problem! |
That should be it for the first stage. |
As discussed many time in the past, the different behaviour of assertions in D1/D2 is problematic. To quote some previous discussion:
Indeed, we are now at the stage of running important server apps in D2 builds and need to address this issue (the change of assertion behaviour) before progressing.
The text was updated successfully, but these errors were encountered: