BUILDSYS-635: esnacc 7.0.11 — granular @ignorevalidation and validation rules - #143
Merged
Merged
Conversation
Add @ignorevalidation on SEQUENCE/operations with named rule masks (snacc-validation-rules.h). New bit 256 forbids AsnOptionalParameters members. Fix tag parsing (C++20 starts_with, mask on ETypeComment). Bump version to 7.0.11. Made-with: Cursor
Made-with: Cursor
Use existing asn-config strcpy_s and platform-functions mytolower instead of MSVC-only _stricmp and strncpy_s/_TRUNCATE. Made-with: Cursor
Add @ignorevalidation no-asn-optional-parameters so sample ASN.1 used by cpp-lib tests and TS prepare passes full default validation. Made-with: Cursor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Release esnacc 7.0.11 with granular ASN.1 comment tag
@ignorevalidation, a shared validation-rules registry, and a new validator that rejects legacyoptionalParams/AsnOptionalParametersbags unless explicitly grandfathered.Enables ProCall to run full default validation in vcxproj builds (no per-project
-ValidationLevelmasking) while keeping legacy published types via inline, rule-specific exemptions in the ASN.1 contracts.Jira: BUILDSYS-635
Version
main)No git tag on the feature branch — tag
7.0/7.0.11(or agreed release tag) should be applied onmainafter merge.Motivation
-ValidationLevelfrom ProCallENetConnection_*vcxproj esnacc invocations.optionalParamsbags; legacy types opt out with@ignorevalidation no-asn-optional-parameters.Behaviour changes
@ignorevalidation(ASN.1 comments)@ignorevalidationis rejected — at least one named rule is required.@deprecatedstill exempts a type/operation from all validation checks.Example (list only rules the type actually violates):
New validation bit 256:
no-asn-optional-parametersFails when a SEQUENCE declares
optionalParams/AsnOptionalParametersunless exempt via@ignorevalidationor@deprecated.Single source of truth
compiler/core/snacc-validation-rules.h(+.cpp) defines all-ValidationLevelbits and@ignorevalidationrule names viaSNACC_VALIDATION_RULES_LIST.unique-operation-idrose-payload-extendableuniform-operation-errorsequence-has-ellipsis...primitive-type-whitelistesnacc_whitelist.txtonlyrose-invoke-event-shapeno-mixed-optional-encoding[n] OPTIONALand untagged OPTIONALno-untagged-optional-members[n]no-asn-optional-parametersoptionalParamsbagCLI
-ValidationLevelunchanged; ProCall builds use default0xffffffff(all checks).Implementation notes
IsValidationExemptSequence/IsValidationExemptOperation:@deprecatedOR matching@ignorevalidationbit.starts_with+string_viewtag constants;m_nIgnoreValidationMaskonETypeComment(fixes tag length / mask storage bugs).snacc_exit_nowdeclaration wrapped inextern "C"insnacc.h(LNK2019 fix when linking C++ parser)..cursor/rules/snacclib7-release-workflow.mdcandAGENTS.md.Consumer follow-up (not in this repo)
global: MRfeature/BUILDSYS-635-ignorevalidationpinslibs/snacclib7→1d51144.asn1_procall/asn1_ucweb: grandfather legacy types with minimal@ignorevalidationrule lists; regenerate stubs after merge.esnacc7.exeintoglobal/buildtools/from mergedmain.Test plan
compilertarget) on VS2022 / vc145ENetROSEInterface.asn1and fullasn1_procallfile set compile with default validation +-comments@ignorevalidationtags honoured (no false positives on grandfatheredoptionalParamstypes)main, refreshglobal/buildtools/esnacc7.exe, bump global pin onmainFiles (15)
snacc-validation-rules.{h,cpp},snacc-validators.c,asn_commentparser.{cpp,h},structure-util.{c,h},asn_comments.{cpp,h},snacc.c,snacc.h,version.h,AGENTS.md, release workflow rule.