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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

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

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
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.

🎊

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