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

discrepancy between lock content for different Mx processors #9725

Open
frichtarik opened this issue Sep 30, 2024 · 7 comments
Open

discrepancy between lock content for different Mx processors #9725

frichtarik opened this issue Sep 30, 2024 · 7 comments
Labels
kind/bug Something isn't working as expected status/needs-reproduction Issue needs a minimal reproduction to be confirmed status/triage This issue needs to be triaged

Comments

@frichtarik
Copy link

Description

i'm getting a strange discrepancy when running poetry lock --no-updates on mac with M1 processor vs M2/M3 for PyYAML package v6.0.1

for M2/M3, there is one additional file in the lock file

{file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},

which then causes "pyproject.toml changed significantly since poetry.lock was last generated." on M1 processor macs.

If i do it other way around and generate lock on M1, this line is not present in the lock and lock is accepted by poetry install on all Mx without a hitch

Workarounds

use M1 to generate lock containing pyyaml package

Poetry Installation Method

pipx

Operating System

Sonoma 14.7

Poetry Version

Poetry (version 1.8.3)

Poetry Configuration

cache-dir = "/Users/filiprichtarik/Library/Caches/pypoetry"
experimental.system-git-client = false
installer.max-workers = null
installer.modern-installation = true
installer.no-binary = null
installer.parallel = true
keyring.enabled = true
repositories.codeartifact.url = "https://<anonymized>.d.codeartifact.eu-west-1.amazonaws.com/pypi/shared/simple/"
solver.lazy-wheel = true
virtualenvs.create = true
virtualenvs.in-project = null
virtualenvs.options.always-copy = false
virtualenvs.options.no-pip = false
virtualenvs.options.no-setuptools = false
virtualenvs.options.system-site-packages = false
virtualenvs.path = "{cache-dir}/virtualenvs"  # /Users/filiprichtarik/Library/Caches/pypoetry/virtualenvs
virtualenvs.prefer-active-python = true
virtualenvs.prompt = "{project_name}-py{python_version}"
warnings.export = false

Python Sysconfig

No response

Example pyproject.toml

No response

Poetry Runtime Logs

there is no failing command
@frichtarik frichtarik added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 30, 2024
@Secrus
Copy link
Member

Secrus commented Sep 30, 2024

Did you try clearing the cache?

@frichtarik
Copy link
Author

this is not my own issue - i've updated lock on my M3 and several team members with M1 did encounter "pyproject.toml changed significantly since poetry.lock was last generated."

this can be reproduced with clear cache on both sides

second option is that there is something fishy within pyyaml configuration itself as we didn't encounter it with any other package

@Secrus
Copy link
Member

Secrus commented Sep 30, 2024

Well, sorry to say that, but without reproduction, there isn't much we can do about that.

@dimbleby
Copy link
Contributor

which then causes "pyproject.toml changed significantly since poetry.lock was last generated." on M1 processor macs.

this is not correct. The cause of that message is that the local pyproject.toml file has been changed since poetry.lock was generated, and the "fix" is just to regenerate the lock file.

additional files showing up in the lock file is likely a result of caching and can be resolved by clearing the cache, but these are two separate questions

@radoering radoering added the status/needs-reproduction Issue needs a minimal reproduction to be confirmed label Oct 3, 2024
@frichtarik
Copy link
Author

frichtarik commented Oct 18, 2024

good morning.
finally I was able to organize colleagues and collect everything related

i've created a small sample project with single dependency and had people with different Mx processors run poetry lock at it

files can be found here, steps for reproduce are in the readme file

https://github.com/frichtarik/debug-poetry-pyyaml
M1 branch contains files produced by M1 macbookpro
M3 branch contains files produced by M3 macbookpro

feel free to try yourself if such devices are available to you

feel free to ask for more data to help you investigate

error with discrepancy between lock and toml is no longer produced, i guess it was some difference in setups, once they are unified, it's not happening anymore

But the underlying issue is real - M2/M3 produces additional package {file = "PyYAML-6.0.1-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a08c6f0fe150303c1c6b71ebcd7213c2858041a7e01975da3a99aed1e7a378ef"},

please notice that it's python 3.12 only, it's not adding the package for any other python version

this situation forces us to either fight over the lock file (add package, remove package, add package) or keep the workaround in place

@dimbleby
Copy link
Contributor

Those who are not seeing that file need to clear their cache

@dimbleby
Copy link
Contributor

Also https://github.com/frichtarik/debug-poetry-pyyaml/compare/M1..M3 does not show the difference that you claim anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working as expected status/needs-reproduction Issue needs a minimal reproduction to be confirmed status/triage This issue needs to be triaged
Projects
None yet
Development

No branches or pull requests

4 participants