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

add writeConstraint range validation #165

Closed

Conversation

kossnikita
Copy link
Contributor

@burrbull
Copy link
Member

burrbull commented Oct 3, 2023

I don't it is good to validate field during modification.
There are can be several bugs in one field fixable by different patches.
In this case check will fault between these patches.

@kossnikita
Copy link
Contributor Author

Is it better to add validation to svd_encoder::encode?

@burrbull
Copy link
Member

burrbull commented Oct 3, 2023

I'm not sure. Most of validation work during parsing (for example by svd2rust or svdtools convert).

Maybe just svdtools validate tool?

@kossnikita
Copy link
Contributor Author

I think it would be wrong if svdtools patch produces an invalid file (even if the patch is invalid)

@kossnikita
Copy link
Contributor Author

Maybe just svdtools validate tool?

#153
It won't do the same?

@burrbull
Copy link
Member

burrbull commented Oct 3, 2023

I think it would be wrong if svdtools patch produces an invalid file (even if the patch is invalid)

resonable. Possilbly some optional flag like svdtools patch --post-validate.

@kossnikita kossnikita marked this pull request as draft October 6, 2023 08:37
@burrbull burrbull mentioned this pull request Dec 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check writeConstraint range
2 participants