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

Make identity mapping optional and introduce functionality to handle unresolved dependencies #298

Closed
wants to merge 5 commits into from

Conversation

Nour-Mws
Copy link
Collaborator

@Nour-Mws Nour-Mws commented Apr 6, 2023

⚠️ Do not merge until the following has landed:

Closes #257

The following is not relevant anymore for this PR now that we've decided to defer the discussion on whether normal users need to be able to disable the identity mapping as a separate option. These are now tracked in #314.

To do before this becomes ready for review:

  • Add the identity_mapping field to settings
  • If identity mapping on, log a message telling the user to turn it off for more accurate results
  • Add a different exit code for the case where there are unresolved dependencies
  • Add an unresolved deps section to the human output
  • Change the output message for undeclared deps to make it clear that those are import names (not deps names)

Nour-Mws added 5 commits April 6, 2023 22:57
Extract the different categories of dependencies in the parameters into
their own lists/dicts:
- non_locally_installed_deps
- locally_installed_deps
- user_defined_deps

Define the toml-formatted user mapping from the user_defined_deps dict once

Instead of manually definining the expected resolved dict of deps for
each case, define a function that constructs this dict by taking advantage
of the fact that the sets of deps extracted above are disjoint.
- Make identity mapping optional for the resolver function
- Add a new type of DependenciesMapping: UNRESOLVED
- Add a new default resolver for unresolved deps to create a package that:
    - associates no import names (an empty set) to a dependency
    - sets DependenciesMapping type to UNRESOLVED
@Nour-Mws Nour-Mws added this to the Mapping strategy milestone Apr 6, 2023
@Nour-Mws Nour-Mws force-pushed the nour/refactor-resover-tests branch 5 times, most recently from e7443ab to 3725cef Compare April 20, 2023 17:27
Base automatically changed from nour/refactor-resover-tests to main April 24, 2023 07:06
@Nour-Mws
Copy link
Collaborator Author

Closing in favor of a new PR.

@Nour-Mws Nour-Mws closed this Jul 27, 2023
@Nour-Mws Nour-Mws deleted the nour/optional-identity branch October 16, 2023 12:44
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.

Report dependencies not found via mappings available to FawltyDeps
1 participant