whyrusleeping / gx

A package management tool
MIT License
1.88k stars 110 forks source link

Duplicate detection only uses the package name, not the import path #169

Open karalabe opened 6 years ago

karalabe commented 6 years ago

Running duplicate dependency detection on go-ipfs produces:

$ gx deps dupes

package sys imported as both QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT and QmTsTrxKNXu8sZLv7FP6p884CHoDbT9upKA1j4FkCy5V7T
package go-detect-race imported as both QmQHGMVmrsgmqUG8ih3puNXUJneSpi13dkcZpzLKkskUkH and Qmf7HqcW7LtCi1W8y2bdx2eJpze74jkbKqpByxgXikdbLF
package go-log imported as both QmRb5jh8z2E8hMGN2tkvs1yHynUanqnZ3UeKwgN1i9P1F8 and QmSpJByNKFX1sCsHBEp3R73FL4NF6FnQTEGyNAXHm2GS52
package sys imported as both QmPXvegq26x982cQjSfbTvSzZXn7GiaMwhhVPHkeTEhrPT and QmTq8ag5pgTCqtGDtmpm1F5TPE2i1H8bcU6295WFKTc5ie
package protobuf imported as both QmXSs8cccbT4zDR95c1iRpYKDqVMzqeF1J6iZcavgE6eNw and QmT6n4mspWYEya864BhCUJEgyxiRfmiSY9ruQwTUNpRKaM

However, some of these are not true duplicates:

And similarly:

Of course, in these cases the duplicates might actually be true positives, but imagine I have github.com/ipfs/go-ipfs/core and github.com/ethereum/go-ethereum/core detected as duplicates.