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

Represent a package in Proc Macro Server more reliably #2042

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

integraledelebesgue
Copy link
Member

@integraledelebesgue integraledelebesgue commented Mar 4, 2025

Changes

  • Proc Macro Server now identifies workspace packages using a Package type which wraps the name and discriminator of the Cairo package
  • This new API abstracts the implementation details about the package ids

@integraledelebesgue integraledelebesgue requested review from Draggu and a team as code owners March 4, 2025 22:35
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch 2 times, most recently from 070bf3d to 2955b2b Compare March 4, 2025 22:49
@integraledelebesgue integraledelebesgue changed the title Use a newtype for the serialized PackageId in Proc Macro Server [Merge After 2.11] Use a newtype for the serialized PackageId in Proc Macro Server Mar 4, 2025
Copy link
Contributor

@piotmag769 piotmag769 left a comment

Choose a reason for hiding this comment

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

I agree with breaking the interface for more soundness tbh

@integraledelebesgue integraledelebesgue changed the title [Merge After 2.11] Use a newtype for the serialized PackageId in Proc Macro Server Use a newtype for the serialized PackageId in Proc Macro Server Mar 6, 2025
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch 2 times, most recently from 3cc25ce to 2946b39 Compare March 6, 2025 12:09
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch from 2946b39 to b72e7a8 Compare March 6, 2025 12:34
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch 2 times, most recently from 6dbfd8c to 31ffcfa Compare March 6, 2025 14:27
@integraledelebesgue integraledelebesgue changed the title Use a newtype for the serialized PackageId in Proc Macro Server Represent a package in Proc Macro Server more reliably Mar 6, 2025
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch from 31ffcfa to d4305f6 Compare March 6, 2025 14:45
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch 3 times, most recently from 9f96409 to d5ad777 Compare March 6, 2025 15:43
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch 2 times, most recently from 5159327 to eedb882 Compare March 7, 2025 14:06
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch from eedb882 to 63f8de6 Compare March 7, 2025 14:10
@integraledelebesgue integraledelebesgue force-pushed the feature/pms-type-model-improvement branch from 63f8de6 to 21027ed Compare March 7, 2025 15:50
/// `PackageId.to_serialized_string()` which is always equal to
/// `scarb_metadata::CompilationUnitComponentId.repr`.
/// Each [`CompilationUnitComponentMacros`] in `macros_for_packages` should have
/// an exclusive `package` field which identifies it in the response.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/// an exclusive `package` field which identifies it in the response.
/// a unique `component` field which identifies it in the response.

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.

4 participants