Fix #731, Improved error message when reading a data that is not defined in specification tree - #732
Fix #731, Improved error message when reading a data that is not defined in specification tree#732jmorice91 wants to merge 3 commits into
Conversation
90ea64e to
68daabb
Compare
|
Maybe just extend the error message: Or, as Iole suggested: use |
|
This is a fix for a regression that's impacting our users. We should get it out fast. Please separate your review comments about problems that should be fixed before getting this in and improvements that can wait for a later release and should go in a dedicated issue. |
|
@jmorice91 : can you target a merge into |
The default datatype is initialized to a scalar type. It's a "fault" on the user's part because they were using data that isn't defined in the yaml. |
734834c to
b8f8934
Compare
It is done. I have used "--onto" for my rebase. |
|
To be sure, I have to merge in v1.12 or v1.11. |
Is it? In #731 seems to be about array handling. In this PR, I see no test for arrays however. It would be good to add a test that matches the issue reported |
My bad, the issue seem to in fact be about a missing |
| variable_name, | ||
| static_cast<uint8_t>(scalar_type->kind()), | ||
| ref_name | ||
| }; |
There was a problem hiding this comment.
you could do a else if ( (*scalar_type ) == UNDEF_TYPE ) { ... } to handle this case as you were doing before and finish with a else { ... } where you throw an Impl_error for unimplemented scalar kinds
There was a problem hiding this comment.
In this list of else, we are in a case of scalar_datatype. The last else correspond to the unknown case and we return a Type_error as the function nc_scalar_type in this file line 114.
So if I understand correctly, I was mistaken and this is not a bug fix, but an error message clarification. So I guess this doesn't have to go in a quick bugfix release and we can just merge it into |
No problem. We can then take some time to discuss suitable tests. |
jbigot
left a comment
There was a problem hiding this comment.
Ready to merge from my point of view. Only a few small things to change:
- rebase on top of main
- adapt the changelog
- remove the inclusion of iostream unless really required
Add the UNDEF_TYPE/else cases if you feel this is a good thing to do
95db9d6 to
3321218
Compare
3321218 to
f87af67
Compare
List of things to check before making a PR
Before merging your code, please check the following:
.clang-format;Fix #issuekeyword to autoclose the issue when merged.