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

Propagate file and start/end line/character information for incompatible dependencies #1418

Closed
Tracked by #1202
nfx opened this issue Apr 16, 2024 · 2 comments · Fixed by #1431
Closed
Tracked by #1202

Propagate file and start/end line/character information for incompatible dependencies #1418

nfx opened this issue Apr 16, 2024 · 2 comments · Fixed by #1431
Assignees
Labels
bug Something isn't working migrate/code Abstract Syntax Trees and other dark magic personal/jim backlog for @jimidle

Comments

@nfx
Copy link
Collaborator

nfx commented Apr 16, 2024

Modify to highlight the exact code range where deprecated import happened

Originally posted by @nfx in #1395 (comment)

@nfx nfx added bug Something isn't working migrate/code Abstract Syntax Trees and other dark magic personal/jim backlog for @jimidle labels Apr 16, 2024
@nfx nfx closed this as completed in #1431 Apr 18, 2024
nfx pushed a commit that referenced this issue Apr 18, 2024
…dency graph (#1431)

## Changes

In order to report the location of imports that are either deprecated or
will be migrated automatically, the location of the origin source code
needs to be preserved. The graph of package dependencies now propagates
location information such that reporting can indicate the hierarchy of
dependencies that led to discovery of the deprecated import, or one that
will be automatically migrated.

### Linked issues
<!-- DOC: Link issue with a keyword: close, closes, closed, fix, fixes,
fixed, resolve, resolves, resolved. See
https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword
-->

Resolves #1418 

### Functionality 

- [ ] added relevant user documentation
- [ ] added new CLI command
- [ ] modified existing command: `databricks labs ucx ...`
- [ ] added a new workflow
- [ ] modified existing workflow: `...`
- [ ] added a new table
- [ ] modified existing table: `...`
- [x] modifies dependency graph build logic 

### Tests
<!-- How is this tested? Please see the checklist below and also
describe any other relevant tests -->

- [ ] manually tested
- [x] added unit tests
- [ ] added integration tests
- [ ] verified on staging environment (screenshot attached)

---------

Signed-off-by: Jim.Idle <jimi@idle.ws>
@github-project-automation github-project-automation bot moved this from Triage to Archive in UCX (roadmap) Apr 18, 2024
@nfx nfx reopened this Apr 19, 2024
@github-project-automation github-project-automation bot moved this from Archive to Refined in UCX (roadmap) Apr 19, 2024
@nfx nfx moved this from Refined to Active Backlog in UCX (roadmap) Apr 24, 2024
@ericvergnaud
Copy link
Contributor

@nfx I believe this is already done, or am I missing something ?

@nfx
Copy link
Collaborator Author

nfx commented May 2, 2024

solved in

assert list(builder.problems) == [
DependencyProblem(
'dependency-not-constant', "Can't check dependency not provided as a constant", Path(paths[0]), 2, 0, 2, 35
)
]

@nfx nfx closed this as completed May 2, 2024
@github-project-automation github-project-automation bot moved this from Active Backlog to Archive in UCX (roadmap) May 2, 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 migrate/code Abstract Syntax Trees and other dark magic personal/jim backlog for @jimidle
Projects
Archived in project
2 participants