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

refactor: simplify the deserializer of PyPiRequirement #744

Merged

Conversation

orhun
Copy link
Contributor

@orhun orhun commented Jan 31, 2024

closes #621

@orhun
Copy link
Contributor Author

orhun commented Jan 31, 2024

P.S. I also tried:

            .map(|map| {
                PyPiRequirement::deserialize(de::value::MapAccessDeserializer::new(map))
                    .map_err(Error::custom)
            })

which resulted in stack overflow 💀

thread 'project::manifest::python::tests::test_deserialize_pypi_requirement_from_map' has overflowed its stack
fatal runtime error: stack overflow

So I kept the logic.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

LGTM!

@ruben-arts ruben-arts merged commit 7244c09 into prefix-dev:main Jan 31, 2024
9 checks passed
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.

refactor PyPiRequirement to use serde_untagged
3 participants