-
-
Notifications
You must be signed in to change notification settings - Fork 11
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
Adding support for file-based reads and externalized type dependencies #103
Conversation
This is non-breaking change that adds a new public method: read_files - a file-oriented entry point to the front end. This takes a list of target DSDL files allowing the user to maintain an explicit list instead of depending on globular filesystem discovery. Furthermore this method returns a set which is the transitive closure of types depended on by the target list of types. This allows consumers to track dependencies and compiler back ends to generate .d files and otherwise support incremental builds. The new method may increase performance for systems with large pools of messages when generating code for a small sub-set as it only considers the target and dependencies of the target when parsing dsdl files.
ping? Any chance I can get a review on this? |
@thirtytwobits Sorry, I will do it today/tomorrow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to be continued
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see the comments to #101.
Suppose I invoke read_files
with a root namespace foo
and a DSDL definition named foo.foo.Bar.1.0
; is this going to work? What about foo.baz.foo.Bar.1.0
?
Co-authored-by: Pavel Kirienko <[email protected]>
Co-authored-by: Pavel Kirienko <[email protected]>
But there's a future import for that
…On Thu, Jun 20, 2024, 01:14 Scott Dixon ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In noxfile.py
<#103 (comment)>:
> - "--strict",
- f"--config-file={ROOT_DIR / 'setup.cfg'}",
- "pydsdl",
- env={
- "MYPYPATH": str(THIRD_PARTY_DIR),
- },
- )
- session.run(
- "pylint",
- str(ROOT_DIR / "pydsdl"),
- env={
- "PYTHONPATH": str(THIRD_PARTY_DIR),
- },
- )
+ if is_oldest_python(session):
+ # we run mypy and pylint only on the oldest Python version to ensure maximum compatibility
But then it won't be compatible with 3.8.
—
Reply to this email directly, view it on GitHub
<#103 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZFIZAWRDF3TUYINF7ZS53ZIH7GDAVCNFSM6AAAAABILVRJOSVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMZDCMRZGA4TCNZTGY>
.
You are receiving this because your review was requested.Message ID:
***@***.***>
|
Co-authored-by: Pavel Kirienko <[email protected]>
Okay. Just the |
I tried pushing this but it says your diff --git a/noxfile.py b/noxfile.py
index f9e73d2..61a409b 100644
--- a/noxfile.py
+++ b/noxfile.py
@@ -122,6 +122,3 @@ def docs(session):
def is_latest_python(session) -> bool:
return PYTHONS[-1] in session.run("python", "-V", silent=True)
-
-def is_oldest_python(session) -> bool:
- return PYTHONS[0] in session.run("python", "-V", silent=True) |
This change is already in my PR. |
I believe all issues are addressed now? |
I fixed the CI build errors on my end. Everything is ready to go. |
…Cyphal/pydsdl/pull/101\#discussion_r1590898374 and replace a few deprecated typing entities with modern alternatives
This is non-breaking change that adds a new public method:
read_files - a file-oriented entry point to the front end. This takes a list of target DSDL files allowing the user to maintain an explicit list instead of depending on globular filesystem discovery. Furthermore this method returns a set which is the transitive closure of types depended on by the target list of types. This allows consumers to track dependencies and compiler back ends to generate .d files and otherwise support incremental builds.
The new method may increase performance for systems with large pools of messages when generating code for a small sub-set as it only considers the target and dependencies of the target when parsing dsdl files.