-
Notifications
You must be signed in to change notification settings - Fork 90
docs: Render the Cloud Dart SDK versions from a data file #740
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
7341fcc
docs: Render the Cloud Dart SDK versions from a data file
Isakdl 9890db4
ci: Auto-approve Dart version sync PRs
Isakdl 9f9ccb9
docs: Drop the automatic update note from the Dart SDK versions page
Isakdl 7f59582
docs: Keep the Dart SDK versions page at its reference URL
Isakdl 7916c82
Update cloud_docs/reference/dart-sdk-versions.mdx
Isakdl File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| { | ||
| "supportedVersions": [ | ||
| "3.8", | ||
| "3.9", | ||
| "3.10", | ||
| "3.11" | ||
| ], | ||
| "defaultVersion": "3.8" | ||
| } | ||
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| --- | ||
| sidebar_position: 1 | ||
| title: Dart SDK versions | ||
| description: Which Dart SDK versions Serverpod Cloud supports, and how to select the version your deploy builds with using the --dart-version flag, scloud.yaml, .tool-versions, or your pubspec constraint. | ||
| --- | ||
|
|
||
| import versionData from './dart-sdk-versions.json'; | ||
|
|
||
| # Dart SDK versions | ||
|
|
||
| Serverpod Cloud builds your server with one of a fixed set of Dart SDK versions. This page lists the supported versions and shows how to select the one your deploy uses. | ||
|
|
||
| ## Supported versions | ||
|
|
||
| <ul> | ||
| {versionData.supportedVersions.map((version) => ( | ||
| <li key={version}> | ||
| Dart {version} | ||
| {version === versionData.defaultVersion ? ' (default)' : ''} | ||
| </li> | ||
| ))} | ||
| </ul> | ||
|
|
||
| ## How the version is selected | ||
|
|
||
| The `scloud deploy` command reads the Dart SDK version from the first of these sources that sets one: | ||
|
|
||
| 1. The `--dart-version` flag. | ||
| 2. The `dartSdk` field in `scloud.yaml`. | ||
| 3. The `dart` entry in a `.tool-versions` file, in the project directory first and then the workspace root. | ||
| 4. The `environment.sdk` constraint in `pubspec.yaml`. | ||
|
|
||
| Every source accepts an exact version or a pub-style version constraint, such as `3.10`, `^3.9.0`, or `>=3.9.0 <4.0.0`. Serverpod Cloud builds with the highest supported version the constraint allows. If the constraint allows no supported version, the deploy fails with an error that lists the supported versions. | ||
|
|
||
| When no source sets a version, your server builds with Dart {versionData.defaultVersion}. | ||
|
|
||
| ### Pass the flag | ||
|
|
||
| ```bash | ||
| # Deploy with a one-off Dart SDK version override | ||
| scloud deploy --dart-version 3.10 | ||
| ``` | ||
|
|
||
| ### Set the version in scloud.yaml | ||
|
|
||
| ```yaml title="scloud.yaml" | ||
| project: | ||
| projectId: "my-app" | ||
| dartSdk: "3.10" | ||
| ``` | ||
|
|
||
| ### Use your version manager's pin | ||
|
|
||
| Version managers such as mise and asdf pin tool versions in a `.tool-versions` file. Serverpod Cloud reads the `dart` entry: | ||
|
|
||
| ```text title=".tool-versions" | ||
| dart 3.10.4 | ||
| ``` | ||
|
|
||
| ### Use the pubspec constraint | ||
|
|
||
| Without any of the sources above, the SDK constraint in your `pubspec.yaml` decides: | ||
|
|
||
| ```yaml title="pubspec.yaml" | ||
| environment: | ||
| sdk: ">=3.9.0 <4.0.0" | ||
| ``` | ||
|
|
||
| This example builds with the highest supported version, since the constraint allows all of them from 3.9 up. | ||
|
|
||
| ## Related documentation | ||
|
|
||
| - [scloud.yaml schema](/cloud/reference/scloud-yaml-schema) - The `dartSdk` field and how scloud commands preserve it. | ||
| - [Deployments](/cloud/concepts/deployments) - Deploy operations, status checks, and package validation. | ||
| - [`scloud deploy`](/cloud/reference/cli/commands/deploy) - The deploy command and its flags. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.