Are you trying to publish to crates.io? When publishing on crates.io, your dependency will be resolved to the version location from the default registry, not to the path location, which is only used locally. There already exist a package called gate on crates.io and v0.1.0 of it does not have a gates module.
I don't understand what you are referring to here. You can resolve the issue by renaming your gate package to something that is not already taken and publish it before publishing prime.
i need to use the main lib inside core lib and publish
i need to keep the main lib not as published lib
i need to use it as helper function
i changed name to somthing not exist
but not working
error: failed to prepare local package for uploading
Caused by:
no matching package named `corelib` found
location searched: crates.io index
corelib = { path = "../main", version = "0.1.0" }
name = "corelib"
version = "0.1.0"
edition = "2024"
You can't publish crates to crates.io that depend on other crates that aren't also published to crates.io. You have to change the structure of your project or publish your main lib. From the docs I linked above:
crates.io does not allow packages to be published with dependencies on code outside of crates.io, except for dev-dependencies. See the Multiple locations section for a fallback alternative for git and path dependencies.
I didn't mean you should change the file structure, but that you need to get rid of the corelib dependency completely (integrating it into prime) or publish it. There is no other way, you can't publish a crate on crates.io that depends on crates that aren't published there as well. So either publish your depenency or remove it from the [dependencies] section of your manifest file.