nix icon indicating copy to clipboard operation
nix copied to clipboard

Revert "Revert "Adapt scheduler to work with dynamic derivations

Open Ericson2314 opened this issue 2 years ago • 6 comments

Motivation

This fixes dynamic derivations, reverting #9081. #9052 However will be reintroduced unless this is modified somehow.

Context

This reverts commit 8440afbed756254784d9fea3eaab06649dffd390.

Priorities

Add :+1: to pull requests you find important.

Ericson2314 avatar Nov 20 '23 22:11 Ericson2314

this is a variation on "recording package.optional in poetry.lock is a bad idea". https://github.com/python-poetry/poetry/issues/3188 is another example.

in this case it is get_extra_package_names() that does not recognise that importlib-metadata is required by the sphinx extra: because it sees that extra and assumes that the first sphinx it finds will be just fine for the rest of its analysis. But the first sphinx it finds is the newer one that does not need importlib-metadata, and after that it never considers the other.

the Right Way to fix this IMO is not to put optional in the lockfile at all: this is a misunderstanding of what the lockfile really is. Rather the installer-solver ought to start out knowing what extras it is solving for, and just return the right answer.

I expect that sorting that out will be quite the tangle for someone.

dimbleby avatar Aug 16 '24 20:08 dimbleby

Might be fixed in the main branch.

1.8.3:

$ poetry install --dry-run --all-extras | grep importlib-metadata
  - Installing importlib-metadata (8.2.0): Skipped for the following reason: Not required

main:

$ poetry install --dry-run --all-extras | grep importlib-metadata
  - Installing importlib-metadata (8.2.0)

radoering avatar Aug 16 '24 21:08 radoering

Pretty sure it isn't, maybe the luck of which sphinx happens to show up first during get_extra_package_names() is unstable

dimbleby avatar Aug 16 '24 22:08 dimbleby

Apparently I knew about this at https://github.com/python-poetry/poetry/pull/6372#issue-1360542275

dimbleby avatar Aug 17 '24 00:08 dimbleby

I am going to consider this a solved issue.

Secrus avatar Oct 13 '24 21:10 Secrus

This is not a solved issue

dimbleby avatar Oct 13 '24 22:10 dimbleby