-
Notifications
You must be signed in to change notification settings - Fork 105
Adds support for pubspec.lock files #104
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
Conversation
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.
Apologies for the late review here, our team has been managing other priorities.
src/Microsoft.ComponentDetection.Detectors/pub/PubComponentDetector.cs
Outdated
Show resolved
Hide resolved
src/Microsoft.ComponentDetection.Detectors/pub/PubComponentDetector.cs
Outdated
Show resolved
Hide resolved
.WithNamingConvention(UnderscoredNamingConvention.Instance) | ||
.Build(); | ||
|
||
dynamic pubspec = deserializer.Deserialize<System.Dynamic.ExpandoObject>(text); |
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.
Can the deserialization contract be captured in a class like https://github.com/microsoft/component-detection/blob/main/src/Microsoft.ComponentDetection.Detectors/pnpm/PnpmYaml.cs so we aren't using dynamic objects?
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.
I tried that in an earlier commit, and my testing was running into parsing failures because the lock files weren't consistent enough. The dynamic object seems to be more reliable, but I may have missed something. jhutchings1@829c548
src/Microsoft.ComponentDetection.Detectors/pub/PubComponentDetector.cs
Outdated
Show resolved
Hide resolved
@cobya I think I've addressed most of your outstanding feedback on this one. Do you want to have another look? |
We should also add some test cases to verification tests |
Going through some older PRs now, do we still want this to get merged in @jhutchings1 |
Whoa, this is an old one. I would look to @jonjanego and @ncouraud on this one. I'm not sure if there have been breaking changes to the formats in the last few years. |
Closing this PR just because it's duplicated in #888, But I can merge the code from this PR into there if we can confirm that there haven't been breaking changes/ it is still needed. |
This PR adds support for pubspec.lock files, which are used in Flutter and Dart projects.