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

fix for Issue/104 #106

Closed
wants to merge 11 commits into from
Closed

Conversation

thirtytwobits
Copy link
Member

This fixes #104 and improves our duplicate detection logic to be more sustainable by only looking at files that are of interest to the target files.

thirtytwobits and others added 11 commits May 27, 2024 12:46
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.
Co-authored-by: Pavel Kirienko <[email protected]>
Co-authored-by: Pavel Kirienko <[email protected]>
This changes our logic for detecting duplicate definitions on case-sensitive file-systems to only operate on files of interest and to fix this detection logic per issue OpenCyphal#104.

If globular searches find duplicates we do not waste time detecting this until/unless these duplicates are actually considered when parsing target definitions.
Comment on lines +1187 to +1196
"greenland/colliding/IceBerg.1.0.dsdl",
dedent(
"""
@sealed
"""
),
)

wrkspc.new(
"greenland/COLLIDING/IceBerg.1.0.dsdl",

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These two should collide as we can't trust capitalization of the File system?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This goes to stability. The assertion is the outputs of pydsdl should be the same for a given set of inputs if run on a case-sensitive or case-insensitive filesystem. Because these are two different files on one and the same file on another we prevent it to avoid this ambiguity.

@pavel-kirienko
Copy link
Member

I assume this is superseded by #107; please reopen if I got it wrong

@thirtytwobits thirtytwobits deleted the issue/104 branch July 11, 2024 02:27
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.

Incorrect comparison of paths for namespace resolution
3 participants