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

Stop using external parser services #609

Merged
merged 7 commits into from
Jan 27, 2025
Merged

Stop using external parser services #609

merged 7 commits into from
Jan 27, 2025

Conversation

katzj
Copy link
Member

@katzj katzj commented Nov 26, 2024

This is a pretty substantial change in that it stops doing any parsing of manifests by sending things over the network to a parsing service. To do so, it drops support for parsing carthage, clojars, hackage, hex, and swift manifest files. But none of these end up being parsed from within libraries and we don't support them.

For yarn and conda, which had external parser services, I've written logic that can live within as they're both relatively easy to parse natively. Individual commits should make sense

Copy link
Contributor

@havocp havocp left a comment

Choose a reason for hiding this comment

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

Seems like the right path

dependencies = call_conda_parser_web(info, kind)[kind.to_sym]
dependencies.map { |dep_kv| Dependency.new(**dep_kv.merge(type: "runtime")) }
end
def self.parse_name_requirement_from_matchspec(ms)
Copy link
Contributor

Choose a reason for hiding this comment

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

if a regex is two problems there are a lot of problems here 😂

Copy link
Contributor

@tiegz tiegz left a comment

Choose a reason for hiding this comment

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

🎊

katzj added 7 commits January 27, 2025 20:52
This stops using yarn-parser and instead does parsing locally
for yarn.lock (v1 and v2)
Parse conda's environment.yaml file natively by reimplementing
the version parsing from MatchSpec. Also drops support for our fake
environment.yml.lock "lockfile" as we should instead generate
something client side vs trying to fake a solve here
Removes the other parsers which require an external parser service
as they reduce overall reliability
@katzj katzj force-pushed the no-external-parsers branch from 43ee92e to ee37ac4 Compare January 27, 2025 20:54
@katzj katzj merged commit 3990f90 into main Jan 27, 2025
2 checks passed
@katzj katzj deleted the no-external-parsers branch January 27, 2025 20:56
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.

3 participants