forked from OpenCyphal/nunavut
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Progress on OpenCyphal#91 (OpenCyphal#100)
* Combining additional OpenCyphal#88 test with OpenCyphal#88 fix and OpenCyphal#91 Disabling the Jinja cache results in the unique name generator state disappearing from the global Jinja context: > return _UniqueNameGenerator.ensure_generator_in_globals(env.globals)('c', adj_base_token, '_', '_') E TypeError: 'NoneType' object is not callable .tox/py35-test/lib/python3.5/site-packages/nunavut/lang/c.py:527: TypeError This issue affects all languages. The following test modification indicates that the state gets replaced with None: ------------------------- src/nunavut/lang/__init__.py ------------------------- index bd6524c..135a29a 100644 @@ -226,7 +226,7 @@ class _UniqueNameGenerator: def ensure_generator_in_globals(cls, environment_globals: typing.Dict[str, typing.Any]) -> '_UniqueNameGenerator': from .. import TypeLocalGlobalKey - if TypeLocalGlobalKey not in environment_globals: + if environment_globals.get(TypeLocalGlobalKey) is None: environment_globals[TypeLocalGlobalKey] = cls() return typing.cast('_UniqueNameGenerator', environment_globals[TypeLocalGlobalKey]) Am stuck. Progress on OpenCyphal#91 1) Fixing a problem with unique identifier generation (Issue OpenCyphal#88) 2) Generating C++ data structures (Issue OpenCyphal#91) Still TODO for Issue OpenCyphal#91 is serialization for types. * A new way to generate unique ids in a template
- Loading branch information
1 parent
5ab9cb7
commit 87daa4c
Showing
23 changed files
with
738 additions
and
273 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file was deleted.
Oops, something went wrong.
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.