osmosis-labs / mesh-security-sdk

MIT License
24 stars 12 forks source link

make `mseh-security-sdk` importable #96

Closed Anmol1696 closed 10 months ago

Anmol1696 commented 10 months ago

Overview

Currently when we run the following command to install

go install github.com/osmosis-labs/mesh-security-sdk/x@cb5b4724a890c39983ce56b2900e69ce16b32233

## output
go: downloading github.com/osmosis-labs/mesh-security-sdk v0.2.1-0.20231018094540-cb5b4724a890
go: downloading github.com/osmosis-labs/mesh-security-sdk/x v0.0.0-20231018094540-cb5b4724a890
go: github.com/osmosis-labs/mesh-security-sdk/x@cb5b4724a890c39983ce56b2900e69ce16b32233: module github.com/osmosis-labs/mesh-security-sdk/x@cb5b4724a890c39983ce56b2900e69ce16b32233 found (v0.0.0-20231018094540-cb5b4724a890), but does not contain package github.com/osmosis-labs/mesh-security-sdk/x

Same for demo/ as well.

This makes importing any of the modules difficult.

Not 100% sure what exactly causes this issue, but the hunch is, it might have something to do with various go.mod's itself

Proposed solution

Fixing the various go.mod will help with this. Having a go.work file could help fix this.

Not sure the benifits of having multiple go.mods for x/ and demo/. I am assuming most end users would just want to import x/ and not the demo (since it is a demo app afterall) Seperate one for tests might make sense.

go.mod currently just depend on replace, so the versions are not uptodate as well. We should fix the versions as well.

Why not fix it?

This repo is still under heavy development, it might not make sense to maintain all the versions and imports for now.

Why fix this?

Even though this is in development, there are still usecases of trying to use the mesh-security-sdk in Starship for out of repo setup.

Anmol1696 commented 10 months ago

My bad, i used go install instead of go get. Works well.