Skip to content

Remove dependency to derive crate #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Aug 1, 2024
Merged

Conversation

termoshtt
Copy link
Member

@termoshtt termoshtt commented Aug 1, 2024

In order to publish the pyo3-stub-gen crate to crates.io, pyo3-stub-gen-derive must be exists in crates.io even if it is optional dependency.

@termoshtt termoshtt self-assigned this Aug 1, 2024
@termoshtt termoshtt force-pushed the remove-derive-depenency branch from 1d1bb96 to 1a6ec38 Compare August 1, 2024 12:32
@termoshtt termoshtt marked this pull request as ready for review August 1, 2024 12:32
@termoshtt termoshtt merged commit 3a62d00 into main Aug 1, 2024
17 checks passed
@termoshtt termoshtt deleted the remove-derive-depenency branch August 1, 2024 12:33
termoshtt added a commit that referenced this pull request Aug 2, 2024
Reverts #15 with modified Cargo.toml setting.


https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#the-role-of-the-version-key
> Note: [crates.io](https://crates.io/) does not allow packages to be
published with dependencies on code published outside of
[crates.io](https://crates.io/) itself
([dev-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies)
are ignored).

So the problem is `dev-dependency.pyo3-stub-gen` in
`pyo3-stub-gen-derive/Cargo.toml` specifies version `0.1.0`, which did
not exists on crates.io. This version specification is not needed, and
removed in this PR.

Then, we do not have cyclic dependency. We can release
`pyo3-stub-gen-derive` first, and then `pyo3-stub-gen`.
Scyrc pushed a commit to Scyrc/pyo3-stub-gen that referenced this pull request May 8, 2025
In order to publish the `pyo3-stub-gen` crate to crates.io,
`pyo3-stub-gen-derive` must be exists in crates.io even if it is
optional dependency.
Scyrc pushed a commit to Scyrc/pyo3-stub-gen that referenced this pull request May 8, 2025
Reverts Jij-Inc#15 with modified Cargo.toml setting.


https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#the-role-of-the-version-key
> Note: [crates.io](https://crates.io/) does not allow packages to be
published with dependencies on code published outside of
[crates.io](https://crates.io/) itself
([dev-dependencies](https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#development-dependencies)
are ignored).

So the problem is `dev-dependency.pyo3-stub-gen` in
`pyo3-stub-gen-derive/Cargo.toml` specifies version `0.1.0`, which did
not exists on crates.io. This version specification is not needed, and
removed in this PR.

Then, we do not have cyclic dependency. We can release
`pyo3-stub-gen-derive` first, and then `pyo3-stub-gen`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant