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

Can't build with current Dart (3.0.0) #1122

Open
davidljung opened this issue May 16, 2023 · 6 comments
Open

Can't build with current Dart (3.0.0) #1122

davidljung opened this issue May 16, 2023 · 6 comments

Comments

@davidljung
Copy link

Following the install instructions gives an immediate error after installing Dart (according to Dart site install instructions) and running "make get" (Ubuntu 22.04).

jungd@Daphnis:~/dev/craftinginterpreters$ make get
Resolving dependencies...
The lower bound of "sdk: '>2.11.0 <3.0.0'" must be 2.12.0'
or higher to enable null safety.

The current Dart SDK (3.0.0) only supports null safety.

For details, see https://dart.dev/null-safety
make: *** [Makefile:10: get] Error 65

Without knowing anything about Dart, I tried editing tool/pubspec.yaml to change the 2.11.0 to 2.12.0, but just caused different error:

Because tool depends on mustache_template <2.0.0 which doesn't support null safety, version solving
  failed.
@jiaad
Copy link

jiaad commented May 19, 2023

I am on macOS
i have installed an older version of DART
i have used those commands:

brew install [email protected]
brew unlink dart && brew link [email protected]

@mslinklater
Copy link

On Ubuntu I uninstalled the default 3+ version of dart

sudo apt-get remove dart

Then installed the newest 2.x version

sudo apt-get install dart=2.19.6-1

This fixed the issue for me.

@aneeshdamle11
Copy link

On Arch Manjaro, Dart version (3.0.7)
Since I just wanted to build and try the interpreters, I built without the dependencies.
my public.yaml:

name: tool
publish_to: none
environment:
  sdk: '>3.0.0'
dependencies:
  charcode: ^1.1.3
  path: ^1.7.0
  pool: ^1.4.0
  sass: ^1.26.5
  string_scanner: ^1.0.5

The below commands worked successfully:

make get
make jlox
make clox

Note: This still fails make

@munificent
Copy link
Owner

Ah, yes. When I get some time, I'll try to update it to the latest.

@pm100
Copy link

pm100 commented Mar 21, 2024

same issue here on windows, I know zero about dart and dont have the bandwidth to learn

@jtagrgh
Copy link

jtagrgh commented Apr 14, 2024

Make sure to clean any build stuff from 3.0 after switching.

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

No branches or pull requests

7 participants