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

Do not leak crate-private type SourceFingerprint #3159

Merged
merged 2 commits into from
May 20, 2024

Conversation

dahlbaek
Copy link
Contributor

Compiling on rustc 1.71.1 currently triggers a compile-time error:

error[E0446]: crate-private type `SourceFingerprint` in public interface
   --> compiler-core/src/language_server/router.rs:190:5
    |
190 |     pub gleam_toml_fingerprint: SourceFingerprint,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
    |
   ::: compiler-core/src/build.rs:415:1
    |
415 | pub(crate) struct SourceFingerprint(u64);
    | ----------------------------------- `SourceFingerprint` declared as crate-private

For more information about this error, try `rustc --explain E0446`.

This pr implements the staightforward fix, marking gleam_toml_fingerprint crate-private.

Compiling on rustc 1.71.1 currently triggers a compile-time error:

error[E0446]: crate-private type `SourceFingerprint` in public interface
   --> compiler-core/src/language_server/router.rs:190:5
    |
190 |     pub gleam_toml_fingerprint: SourceFingerprint,
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ can't leak crate-private type
    |
   ::: compiler-core/src/build.rs:415:1
    |
415 | pub(crate) struct SourceFingerprint(u64);
    | ----------------------------------- `SourceFingerprint` declared as crate-private

For more information about this error, try `rustc --explain E0446`.

This pr implements the staightforward fix, marking gleam_toml_fingerprint crate-private.
@dahlbaek
Copy link
Contributor Author

closes #3162

Copy link
Member

@lpil lpil left a comment

Choose a reason for hiding this comment

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

Could you make the whole class crate private please

@lpil lpil merged commit e25ccb9 into gleam-lang:main May 20, 2024
11 checks passed
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

2 participants