shadow-internal-symbols deprecation breaks Tvix users #599

Closed
opened 2024-12-10 10:00:15 +00:00 by flokli · 2 comments

Describe the bug

I have some repos using Niv to pin dependencies. The sources.nix file created by Niv seems to make use of this feature, essentially breaking all Niv users currently.

55422d6f26/nix/sources.nix (L88)

Steps To Reproduce

  1. Go to a repo using Niv, try to evaluate some attribute importing sources.nix
  2. See error

Expected behavior

This might be intentional, I'm not sure. But I'd prefer a strategy where Lix would only warn about this for some time, and popular upstream users of this feature (like Niv) would be given time to accomplish this differently. It'll also take some time for downstream Niv users to update their sources.nix files.

## Describe the bug I have some repos using Niv to pin dependencies. The `sources.nix` file created by Niv seems to make use of this feature, essentially breaking all Niv users currently. https://github.com/nmattia/niv/blob/55422d6f2618cd2195eeafa3f16ae63fde723c15/nix/sources.nix#L88 ## Steps To Reproduce 1. Go to a repo using Niv, try to evaluate some attribute importing sources.nix 2. See error ## Expected behavior This might be intentional, I'm not sure. But I'd prefer a strategy where Lix would only warn about this for some time, and popular upstream users of this feature (like Niv) would be given time to accomplish this differently. It'll also take some time for downstream Niv users to update their sources.nix files.
flokli added the
bug
label 2024-12-10 10:00:15 +00:00
Member

Unfortunately the error message is misleading. The line of Niv in question is completely unproblematic, but it throws an error because it happens to be parsed in a context that has __findFile overwritten. As far as I can tell, Niv does not override __findFile, therefore it must be happening in external code calling this file with scopedImport and a respective override.

I'll check later, but this should not be breaking all Niv users, but only this specific project setup

Unfortunately the error message is misleading. The line of Niv in question is completely unproblematic, but it throws an error because it happens to be parsed in a context that has `__findFile` overwritten. As far as I can tell, Niv does not override `__findFile`, therefore it must be happening in external code calling this file with `scopedImport` and a respective override. I'll check later, but this should not be breaking all Niv users, but only this specific project setup
piegames changed title from shadow-internal-symbols deprecation breaks niv users to shadow-internal-symbols deprecation breaks Tvix users 2024-12-10 16:19:32 +00:00
Member

This issue was mentioned on Gerrit on the following CLs:

  • commit message in cl/2295 ("libexpr: Undeprecate overriding __nixPath")
<!-- GERRIT_LINKBOT: {"cls": [{"backlink": "https://gerrit.lix.systems/c/lix/+/2295", "number": 2295, "kind": "commit message"}], "cl_meta": {"2295": {"change_title": "libexpr: Undeprecate overriding __nixPath"}}} --> This issue was mentioned on Gerrit on the following CLs: * commit message in [cl/2295](https://gerrit.lix.systems/c/lix/+/2295) ("libexpr: Undeprecate overriding __nixPath")
Sign in to join this conversation.
No milestone
No project
No assignees
3 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#599
No description provided.