Skip to content
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

Add version numbers for workspace dependencies #2027

Merged
merged 1 commit into from
Jan 31, 2025

Conversation

hallipr
Copy link
Member

@hallipr hallipr commented Jan 27, 2025

  • Workspace dependencies should include version to accommodate cargo package
  • Path based Intra-repo dev-dependencies should use local paths, not workspace = true
    • This is because, at package time, dev dependencies don't resolve correctly when the local dependency is unpublished but has a version number referenced in the workspace toml.

Copy link
Member

@heaths heaths left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As long as everything keeps working, sure. But the nightly build failure concerns me somewhat. Is this because package paths lead to a loop where, for some reason, versions don't?

@hallipr
Copy link
Member Author

hallipr commented Jan 29, 2025

As long as everything keeps working, sure. But the nightly build failure concerns me somewhat. Is this because package paths lead to a loop where, for some reason, versions don't?

I think it may be due to circular references between dev/non-dev packages.

Consider:

[package]
name = "one"
version = "1.0.1"

[dependencies]
two = { path = ../two, version = "1.0.1" }

and

[package]
name = "two"
version = "1.0.1"

[dev-dependencies]
one = { path = ../one, version = "1.0.1" }

We can't package "one" until we've published (at least locally) "[email protected]"
The same for "two"

If we remove the version from the dev-dependency, then we can package "two" using the source version of "one"
then we can package "one" using the package version of "two"

@heaths
Copy link
Member

heaths commented Jan 29, 2025

Do you know which packages are at fault? We use some packages in tests e.g., azure_identity has azure_core in its dependencies, but we may have azure_identity in azure_core's dev-dependencies. Maybe we need to strip those examples/integration tests if indeed that's the problem.

@hallipr hallipr force-pushed the users/pahallis/dep-versions branch from d3b57e2 to c870876 Compare January 31, 2025 21:15
@hallipr
Copy link
Member Author

hallipr commented Jan 31, 2025

Do you know which packages are at fault? We use some packages in tests e.g., azure_identity has azure_core in its dependencies, but we may have azure_identity in azure_core's dev-dependencies. Maybe we need to strip those examples/integration tests if indeed that's the problem.

There are 2 circular dependencies:

=> dependency
-> devDependency

azure_core_test => azure_core_test_macros
azure_core_test_macros -> azure_core_test

typespec_client_core => typespec_macros
typespec_client_core -> typespec_macros
typespec_macros -> typespec_client_core

@hallipr hallipr merged commit 74b6956 into main Jan 31, 2025
13 checks passed
@hallipr hallipr deleted the users/pahallis/dep-versions branch January 31, 2025 23:39
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.

None yet

3 participants