Skip to content

Same packaged referenced from two paths isn't recognized #41

@nathan-fiscaletti

Description

@nathan-fiscaletti

If you have a package in a directory named somepackage and import it from your main package using

import (
    "./somepackage"
)

and then you have another package named otherpackage and import somepackage in it using

import(
    "../somepackage"
)

It will be picked up as two separate packages, one being ./somepackage and the other being ../somepackage.

Potential Fix

For local packages like this, would it work better to resolve the absolute paths of relative packages. If two are the same, ommit one.
Afterwards, you can update their names again by generating the relative path to the package from the main package. Does this make sense?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions