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

buildPythonPackage is not found correctly #468

Open
elikoga opened this issue Dec 21, 2024 · 2 comments
Open

buildPythonPackage is not found correctly #468

elikoga opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working enhancement New feature or request

Comments

@elikoga
Copy link

elikoga commented Dec 21, 2024

What happened
The bug you encountered

Steps to Reproduce
Steps to reproduce the behavior:

  1. Go to 'https://noogle.dev/f/pkgs/pythonPackages/buildPythonPackage'
  2. Click on 'Click to function definition'
  3. See error: Not the correct definition

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: [e.g. iOS]
  • Browser [e.g. chrome, safari]
  • Version [e.g. 22]
  • Screen resolution (optional)

or

Smartphone (please complete the following information):

  • Device: [e.g. iPhone6]
  • OS: [e.g. iOS8.1]
  • Browser [e.g. stock browser, safari]
  • Version [e.g. 22]
@elikoga elikoga added the bug Something isn't working label Dec 21, 2024
@hsjobeki
Copy link
Collaborator

Uh weird. Will investigate that

@hsjobeki
Copy link
Collaborator

hsjobeki commented Dec 26, 2024

Currently it is not possible to display the documentation (since it doesnt exist), nor the source position.

The correct position is:

https://github.com/NixOS/nixpkgs/blob/master/pkgs/development/interpreters/python/python-packages-base.nix#L46

but it is not possible to retrieve this position (yet) callPackage and makeOverridablePythonPackage wrap this function and effectively create a new function with different source position.

https://github.com/NixOS/nixpkgs/blob/master/lib/trivial.nix#L1000 (trivial.setFunctionArgs)

There is no transformation in the value-world to get back to the original function

Someone could however write dedicated static analysis that operates on the ast to handle makeOverridablePythonPackage specifically. Similar to how did this for makeOverridable already.

@hsjobeki hsjobeki added the enhancement New feature or request label Dec 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants