Thursday, May 23, 2024
HomeGolangHow you can import a neighborhood module *with out* re-downloading the imported...

How you can import a neighborhood module *with out* re-downloading the imported module’s dependencies? – Getting Assist

I’ve a module sample_project, which has a go.mod like this:

module sample_project

go 1.21.6

change native.mod/module_to_import => ../module_to_import

require ( v1.13.11

However module_to_import has a substitute for as a result of it makes use of the arbitrum model of ethereum-go, which has some arbitrum-related stuff (varieties, capabilities, and so forth).
Right here’s its go.mod:

module module_to_import

go 1.21.6

change => ./go-ethereum

require (

Now, that is sample_project’s primary.go:

import (
	imported_utils "native.mod/module_to_import/utils"

The issue is that when doing go run primary.go, it would try to obtain all of the packages required by module_to_import and I get an error like this:

module discovered (v1.13.11), however doesn’t comprise bundle

I need to use the native bundle which resides in ../module_to_import/go-ethereum. How can I do it?

I suppose (however am not sure) that including your personal go-ethereum substitute will do the trick. Have tyou tried that?



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments