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

Serialization opt-ins #77

Closed
5 tasks done
LVMVRQUXL opened this issue May 16, 2023 · 0 comments · Fixed by #90
Closed
5 tasks done

Serialization opt-ins #77

LVMVRQUXL opened this issue May 16, 2023 · 0 comments · Fixed by #90
Assignees
Labels
common Item related to all platforms.
Milestone

Comments

@LVMVRQUXL
Copy link
Contributor

LVMVRQUXL commented May 16, 2023

Description

In the build.gradle.kts file, we opt-in at the module level the experimental API of the kotlinx.serialization library.

languageSettings.optIn("kotlinx.serialization.ExperimentalSerializationApi")

But this is a bad idea because it simply removes all warning about these usages that could break at any point in time.
This way of disabling warnings linked to the use of experimental APIs also doesn't communicate the real stability of a declaration to consumers.

This is why we decide to remove this compiler argument for communicating the usage of an experimental API at the declaration level, by propagating the experimental annotation or marking the declaration with an Opt-in annotation.

Like suggested by the Kotlin team, we should choose between propagating an experimental annotation or marking a declaration with an Opt-in annotation:

  • if the experimental type is part of our public API, we should propagate the annotation
  • if the experimental declaration is an implementation detail, we should:
    • propagate the annotation if it's not in our control
    • opt-in the experimental declaration.

Checklist

  • Wait for the issue Commits verification #82 to be resolved for working on safer commits.
  • Remove the compiler option.
  • Check if a declaration uses the experimental serialization API and do something (propagate/opt-in) with it if so.
  • Update the Unreleased section in changelog.
  • Document the decision-making about using experimental APIs in the discussions.
@LVMVRQUXL LVMVRQUXL added security Security vulnerabilities. common Item related to all platforms. labels May 16, 2023
@LVMVRQUXL LVMVRQUXL added this to the 4.2.0 milestone May 16, 2023
@LVMVRQUXL LVMVRQUXL self-assigned this May 16, 2023
@LVMVRQUXL LVMVRQUXL assigned LVMVRQUXL and unassigned LVMVRQUXL May 27, 2023
LVMVRQUXL added a commit that referenced this issue Jun 5, 2023
Impacted types: NotEmptyList, NotEmptyMap and NotEmptySet.
LVMVRQUXL added a commit that referenced this issue Jun 5, 2023
Impacted types: NotEmptyList, NotEmptyMap and NotEmptySet.
@LVMVRQUXL LVMVRQUXL removed the security Security vulnerabilities. label Mar 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
common Item related to all platforms.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant