GithubHelp home page GithubHelp logo

homebrew-dart's Introduction

Dart for Homebrew

This is the official Dart tap for homebrew.

Mac users can use these formulae to easily install and update Dart SDK. Both dev and stable channels are supported.

Initial setup

If you don't have homebrew, install it from their homepage.

Then, add this tap:

brew tap dart-lang/dart

Installing

To install the Dart SDK:

brew install dart

Tip: Once installed, homebrew will print the path to the Dart SDK. Use this path to configure Dart support in your IDE (like WebStorm).

Updating

Simply run:

brew update
brew upgrade dart

Dev Releases

To install dev channel releases, instead of the stable ones, add a --head flag after the brew commands:

brew install dart --head

Note, when updating dev releases, homebrew doesn't always update to the latest version (see Homebrew/legacy-homebrew#13197). In order to upgrade to the latest dev release, run:

brew reinstall dart

Specific stable versions

To install a specific dart version run brew install [email protected]. This installs the latest 2.8 release including security patches, i.e. 2.8.1.

To use the specific version in your IDE or in scripts use the SDK you find under /usr/local/opt/[email protected]/libexec.

It is supported to install multiple dart versions in parallel. The dart executable in PATH will continue to link to the dart or dart-beta formula. Installing [email protected] alone doesn't add the dart executable to the user PATH.

SDK path

Many tools, such as editors, ask you to specify the Dart SDK installation directory. After installing via homebrew you can use the path HOMEBREW_INSTALL/opt/dart/libexec, where HOMEBREW_INSTALL is the path to your homebrew installation directory (running brew --prefix on the command line will display it).

homebrew-dart's People

Contributors

apjanke avatar athomas avatar danschultz avatar davenotik avatar dependabot[bot] avatar devoncarew avatar dragonfax avatar kasperpeulen avatar keertip avatar kevmoo avatar lrhn avatar mattoddie avatar msbit avatar nicolasgarnier avatar passsy avatar redbrogdon avatar ricowind avatar sestegra avatar sethladd avatar sortie avatar stargator avatar whesse avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebrew-dart's Issues

Doesn't install 2.15

Android Studio told me that 2.15 is available. But I just get this:

% brew upgrade dart Warning: dart-lang/dart/dart 2.14.2 already installed

Permission issue on installation

I type

brew install dart

on my Mac and I get

Error: Permission denied @ unlink_internal - /usr/local/lib/node_modules/@angular/cli/node_modules/.bin/in-install

Unable to upgrade to dart 1.8?

Just tried to upgrade to Dart 1.8 through brew upgrade and got this:

nivco> brew upgrade dart
Error: dart-1.7.2 already installed

require_relative only exists in Ruby 1.9+

The dart and dartium formulae both use require_relative, which was introduced in Ruby 1.9. OS X 10.8 and lower use Ruby 1.8; only 10.9 and newer include a newer Ruby.

Since require_relative is called when the formulae are loaded, any user on 10.8 or earlier that runs a command that loads the formula (like brew outdated) will get an ugly failure; see Homebrew/legacy-homebrew#33057.

cannot install via brew

Error: uninitialized constant Dartsdk
Please report this bug:
    https://github.com/Homebrew/homebrew/wiki/troubleshooting
/usr/local/Library/Homebrew/formulary.rb:15:in `const_get'
/usr/local/Library/Homebrew/formulary.rb:15:in `get_formula_class'
/usr/local/Library/Homebrew/formulary.rb:76:in `klass'
/usr/local/Library/Homebrew/formulary.rb:50:in `get_formula'
/usr/local/Library/Homebrew/formulary.rb:198:in `factory'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `block in formulae'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `map'
/usr/local/Library/Homebrew/extend/ARGV.rb:12:in `formulae'
/usr/local/Library/Homebrew/cmd/install.rb:27:in `install'
/usr/local/Library/brew.rb:131:in `<main>'

Installing Dart 1

I'm trying to install Dart 1 using homebrew using the new dart@1 formula: #53

When I run the search command I can see the new formula:

brew search dart@
==> Searching local taps...
dart-lang/dart/dart :heavy_check_mark:       dart-lang/dart/dart@1       dart-lang/dart/dart@2       dartsim

When I run the install command, it installs the formula in a separate directory in the Cellar/ directory:

brew install dart@1 --with-dartium

screen shot 2018-06-25 at 3 21 23 pm

So this doesn't seem very useful AFAICT. I normally run brew switch to switch between new and old versions of homebrew packages (which sets up all of the symlinks for you)

Copying the contents of dart@1/1.24.3 into dart/1.24.3 doesn't work completely (pub and other commands don't work quite right)

How do we use these new formula?

Does `brew install dart` installs the SDK or just the dart exec?

after running brew install dart I tried setting the /usr/local/Cellar/dart/1.6.0 directory as the SDK folder in WebStorm but WebStorm is not accepting it.

I though this was installing the SDK isn't it?

Here is ls -l on /usr/local/Cellar/dart/1.6.0:

total 8
-rw-r--r--  1 nivco  admin  231 Oct 14 16:20 INSTALL_RECEIPT.json
drwxr-xr-x  8 nivco  admin  272 Oct 14 16:20 bin
drwxr-xr-x  9 nivco  admin  306 Oct 14 16:20 libexec

Here is ls -l on a regular SDK folder downloaded from dartlang.org:

total 24
-rw-r--r--@  1 nivco  eng  997 Aug 26 22:29 README
drwxr-xr-x@  9 nivco  eng  306 Aug 26 22:29 bin
drwxr-xr-x@  6 nivco  eng  204 Aug 26 22:29 include
drwxr-xr-x@ 23 nivco  eng  782 Aug 26 22:29 lib
-rw-r--r--@  1 nivco  eng    6 Aug 26 22:29 revision
drwxr-xr-x@  2 nivco  eng   68 Aug 26 22:29 util
-rw-r--r--@  1 nivco  eng    6 Aug 26 22:29 version

Something I'm missing?

Unable to Install

❤  xjdr @ master | brew install dart
==> Installing dart from dart-lang/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/1.15.0/sdk/dartsdk-macos-x64-release.zip

curl: (35) Server aborted the SSL handshake
Error: Failed to download resource "dart"
Download failed: https://storage.googleapis.com/dart-archive/channels/stable/release/1.15.0/sdk/dartsdk-macos-x64-release.zip```

Update Existing Global Packages on Update of Dart

Dart programs installed with pub global activate will not work after updates of Dart, complaining about kernel incompatibility. The fix is to do pub global activate {{package}} after every Dart update. It is less of a hassle for the end-user/developer to have them auto-updated once Dart is updated.

For posterity, I've been using this one-liner after Dart updates to update all installed global packages:

dart pub global list | awk '{system("dart pub global activate " $1)}'

Can't find the path to Dartium for WebStorm

WebStorm is now asking for the path to Dartium, but it won't let me choose the symlink, and trying to find the actual path is painful because /usr isn't even accessible from the Finder, and I imagine if the version changes the path will change too (it's in 1.6.0 now) thus breaking the path set in WebStorm?

Calling <<-EOS.undent is deprecated

Was told "Please report this to the dart-lang/dart tap!" so here i am .

➜  ~ brew info dart
dart-lang/dart/dart: stable 1.24.3, devel 2.0.0-dev.19.0
The Dart SDK
https://www.dartlang.org/
Not installed
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--with-content-shell
	Download and install content_shell -- headless Dartium for testing
--with-dartium
	Download and install Dartium -- Chromium with Dart
--devel
	Install development version 2.0.0-dev.19.0
Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/dart.rb:72:in `caveats'
Please report this to the dart-lang/dart tap!

Warning: Calling <<-EOS.undent is deprecated!
Use <<~EOS instead.
/usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/dart.rb:72:in `caveats'
Please report this to the dart-lang/dart tap!

==> Caveats
Please note the path to the Dart SDK:
  /usr/local/opt/dart/libexec

--with-dartium:
  To use with IntelliJ, set the Dartium execute home to:
    /usr/local/opt/dart/Chromium.app

pub build (transformers) unable to infer dart-sdk location.

I'm attempting to run the angular transformer on a project and I get the following error:
Loading angular transformers...
Error on line 15, column 3 of pubspec.yaml: Error loading transformer: Invalid arguments(s): sdkDirectory must be provided.

After a bit of researching, I believe this is because pub cannot infer the location of the dart-sdk due to where the brew formula is putting files.

Unable to upgrade to latest dev channel

This is odd, and I think recently started to happen:

sethladd@sethladd-macbookair ~/Code/dartlang.org (master)$ brew update
Updated Homebrew from f3dfb9ef to 4b1a2b72.
==> Updated Formulae
android-ndk        dart-lang/dart/dartium     macvim
android-platform-tools     denominator            moc
cairo              fzf                mvnvm
chkrootkit         google-sql-tool        st
collectd           jboss-forge            stklos
commonmark         juju-quickstart        tor
dart-lang/dart/dart    ld64
==> Deleted Formulae
xar
sethladd@sethladd-macbookair ~/Code/dartlang.org (master)$ brew upgrade dart
Error: dart 1.9.0-dev.10.2 already installed
sethladd@sethladd-macbookair ~/Code/dartlang.org (master)$ 

[dartium] Version missing in filename “dartium--content_shell-macos.zip”

...resulting in the following error:

==> Upgrading dart-lang/dart/dartium
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/1.11.3/dartium/dartium-ma
######################################################################## 100,0%
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/1.11.3/dartium/content_sh
Already downloaded: /Library/Caches/Homebrew/dartium--content_shell-macos.zip
Error: SHA256 mismatch
Expected: 04199ec06dd3dc94ef219f1817a34cf6f4c9ec7650bd1f597fb5155ebd9abe94
Actual: cbde87a5becb2ca4c8256e624a2eab6943df26f58125cb2b65cc38496c15f3a9
Archive: /Library/Caches/Homebrew/dartium--content_shell-macos.zip
To retry an incomplete download, remove the file above.

[email protected] not found MacOS

Hi there,

I'm trying to install dart 2.12.0 and brew doesn't seem to find it:

brew tap dart-lang/dart
brew install [email protected]
Warning: No available formula or cask with the name "[email protected]".
==> Searching for similarly named formulae...
Error: No similarly named formulae found.
==> Searching for a previously deleted formula (in the last month)...
Error: No previously deleted formula found.
==> Searching taps on GitHub...
Error: No formulae found in taps.

Any ideas ?

brew install dart —— Error: Xcode alone is not sufficient on Mojave

MacBook-Pro:~ ruby$ brew tap dart-lang/dart
MacBook-Pro:~ ruby $ brew install dart
==> Installing dart from dart-lang/dart
Error: Xcode alone is not sufficient on Mojave.
Install the Command Line Tools:
xcode-select --install

There are two versions of Xcode on my MacBook Pro 2019:

Xcode Version 10.2.1 (10E1001)
Xcode-beta

Homebrew Deprecation DEVEL

Warning: Calling 'devel' blocks in formulae is deprecated! Use 'head' blocks or @-versioned formulae instead.
Please report this issue to the dart-lang/dart tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
/usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart/dart.rb:29

Out of Date with Webstorm

This is referenced in the official docs.

This is out of date.

The current 1.11.3 version does not meet the min reqs for latest WebStorm dart plugin of 1.12

Flutter install fails when dart is already installed

❯ which flutter
flutter not found

~/htdocs/evcc master* ⇣⇡ 6s
❯ which dart
/usr/local/bin/dart

~/htdocs/evcc master* ⇣⇡
❯ brew install flutter                              
==> Downloading https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.22.4-stable.zip
Already downloaded: /Users/andig/Library/Caches/Homebrew/downloads/10b169e1dde563ba8ca7738adf52153d5f9d56a7353b49ebb8b6d0a731360871--flutter_macos_1.22.4-stable.zip
==> Installing Cask flutter
==> Purging files for version 1.22.4 of Cask flutter
Error: It seems there is already a Binary at '/usr/local/bin/dart'.

~/htdocs/evcc master* ⇣⇡ 1m 22s
❯ brew remove dart
Uninstalling /usr/local/Cellar/dart/2.10.4... (510 files, 429MB)

~/htdocs/evcc master* ⇣⇡
❯ brew install flutter
==> Downloading https://storage.googleapis.com/flutter_infra/releases/stable/macos/flutter_macos_1.22.4-stable.zip
Already downloaded: /Users/andig/Library/Caches/Homebrew/downloads/10b169e1dde563ba8ca7738adf52153d5f9d56a7353b49ebb8b6d0a731360871--flutter_macos_1.22.4-stable.zip
==> Installing Cask flutter
==> Linking Binary 'dart' to '/usr/local/bin/dart'.
==> Linking Binary 'flutter' to '/usr/local/bin/flutter'.
🍺  flutter was successfully installed!

It would be nicer experience if Flutter would just us the existing dart. As far as I can tell both where installed from this tap:

❯ brew tap 
adoptopenjdk/openjdk
azure/functions
dart-lang/dart
golangci/tap
homebrew/cask
homebrew/cask-fonts
homebrew/core
homebrew/services
minio/stable
sass/sass
saulpw/vd

Please define best practices

Can you please outline best practices for using Dart Editor with this formula in the README.

In the editor.properties file I'm providing the variable
dart.sdk=/usr/local/Cellar/dart/1.8.5/

This works well enough. However, this file seems to get over written by the Dart Editor upgrade process.

dartdocgen not able to find SDK

–(adam)–(0|ttys004)–(Tue Dec 02|10:02:46)— — -
–(~/dart)–($ git clone https://github.com/achilleasa/dart_cassandra_cql.git
–(adam)–(0|ttys004)–(Tue Dec 02|10:02:50)— — -
–(~/dart)–($ cd dart_cassandra_cql/ && pub install
[....]
–(adam)–(0|ttys004)–(Tue Dec 02|10:07:54)— — -
–(~/dart/dart_cassandra_cql)–($ dartdocgen --compile --no-include-sdk --no-include-dependent-packages --out docs --package-root ./packages  .
Using default options for documenting a single package: --start-page=dart_cassandra_cql
Package Root: ./packages
Added to libraries: ./lib/dart_cassandra_cql.dart
Added to libraries: ./lib/driver/client.dart
Added to libraries: ./lib/driver/connection.dart
Added to libraries: ./lib/driver/exceptions.dart
Added to libraries: ./lib/driver/logging.dart
Added to libraries: ./lib/driver/protocol.dart
Added to libraries: ./lib/driver/query.dart
Added to libraries: ./lib/driver/stream.dart
Added to libraries: ./lib/driver/types.dart
Skipping part "./lib/driver/client/client.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/client/result_stream.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/connection/async_queue.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/connection/connection.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/connection/connection_pool.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/connection/pool_configuration.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/connection/simple_connection_pool.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/authentication_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/cassandra_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/connection_failed_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/connection_lost_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/driver_exception_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/no_healthy_connections_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/exception/stream_reservation_exception.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/logging/logger.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/authentication/authenticator.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/authentication/password_authenticator.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/frame/frame_decompressor.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/frame/frame_parser.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/frame/frame_reader.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/frame/frame_writer.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/internal/exception_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/auth_response_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/batch_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/execute_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/prepare_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/query_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/register_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/requests/startup_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/auth_challenge_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/auth_success_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/authenticate_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/error_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/event_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/prepared_result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/ready_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/result_metadata.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/rows_result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/schema_change_result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/set_keyspace_result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/protocol/messages/responses/void_result_message.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/query/batch_query.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/query/query.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/query/query_interface.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/stream/chunked_input_reader.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/stream/chunked_output_writer.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/stream/type_decoder.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/stream/type_encoder.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/codec_registry.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/custom_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/frame.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/frame_header.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/tuple.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/type_spec.dart". Part files should be in "lib/src".
Added to libraries: ./lib/driver/types/uuid.dart
Skipping part "./lib/driver/types/enums/batch_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/compression.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/consistency.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/data_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/enum.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/error_code.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/event_registration_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/event_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/header_flag.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/header_version.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/opcode.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/protocol_version.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/query_flag.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/result_type.dart". Part files should be in "lib/src".
Skipping part "./lib/driver/types/enums/row_result_flag.dart". Part files should be in "lib/src".
Unhandled exception:
FileSystemException: Cannot find SDK directory starting from , path = '/usr/local/Cellar/dart/1.8.0-dev.4.6/libexec/bin/snapshots'
#0      rootDirectory (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/pkg/docgen/lib/src/package_helpers.dart:32)
#1      getMirrorSystem (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/pkg/docgen/lib/src/generator.dart:121)
#2      generateDocumentation (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/pkg/docgen/lib/src/generator.dart:82)
#3      docgen (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/pkg/docgen/lib/docgen.dart:51)
#4      main (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/pkg/docgen/bin/docgen.dart:43)
#5      main (file:///Volumes/data/b/build/slave/dart-editor-mac-dev/build/dart/xcodebuild/DerivedSources/ReleaseX64/utils_wrapper.dart:12)
#6      _startIsolate (dart:isolate-patch/isolate_patch.dart:237)
#7      _startMainIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:192)
#8      _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:130)

Dartium path shown on "brew upgrade dart" is incorrect

From @sanfordredlich on July 29, 2015 15:59

Hi, it shows: "/usr/local/opt/dart/Chromium.app" when it should be "/usr/local/opt/dartium" because that's how the symlinks are actually set up. See output below:

| ~ @ Sanfords-MBP (sanford)
| => brew upgrade dart
==> Upgrading 1 outdated package, with result:
dart-lang/dart/dart 1.11.1
==> Upgrading dart-lang/dart/dart
==> Downloading https://storage.googleapis.com/dart-archive/channels/stable/release/1.11.1/sdk/dartsdk-macos-x64-release.zip

################################################################## 100.0%

==> Caveats
Please note the path to the Dart SDK:
/usr/local/opt/dart/libexec

--with-dartium:
To use with IntelliJ, set the Dartium execute home to:
/usr/local/opt/dart/Chromium.app
==> Summary
🍺 /usr/local/Cellar/dart/1.11.1: 224 files, 31M, built in 2.4 minutes


| /usr/local/opt/dart @ Sanfords-MBP (sanford)
| => cd ..
total 44
lrwxr-xr-x 1 sanford admin 23B Nov 8 2014 autoconf -> ../Cellar/autoconf/2.69
lrwxr-xr-x 1 sanford admin 21B Jul 29 08:48 dart -> ../Cellar/dart/1.11.1
lrwxr-xr-x 1 sanford admin 24B Jun 4 08:50 dartium -> ../Cellar/dartium/1.10.1
lrwxr-xr-x 1 sanford admin 24B Jan 15 2015 exercism -> ../Cellar/exercism/1.9.0
lrwxr-xr-x 1 sanford admin 19B May 30 07:10 hub -> ../Cellar/hub/2.2.1
lrwxr-xr-x 1 sanford admin 22B Nov 4 2014 mysql -> ../Cellar/mysql/5.6.21
lrwxr-xr-x 1 sanford admin 24B Nov 4 2014 openssl -> ../Cellar/openssl/1.0.1j
lrwxr-xr-x 1 sanford admin 25B Nov 8 2014 pkg-config -> ../Cellar/pkg-config/0.28
lrwxr-xr-x 1 sanford admin 21B Nov 8 2014 rbenv -> ../Cellar/rbenv/0.4.0
lrwxr-xr-x 1 sanford admin 29B Nov 8 2014 ruby-build -> ../Cellar/ruby-build/20141028
lrwxr-xr-x 1 sanford admin 19B Nov 7 2014 wget -> ../Cellar/wget/1.16


| /usr/local/opt @ Sanfords-MBP (sanford)
| => pwd
/usr/local/opt

Copied from original issue: dart-lang/sdk#23918

brew location messages are inconsistent, confusing

When you install dartium using brew in the new world, you get a location in a different format from the Dart SDK location.

$ brew install dart --with-content-shell --with-dartium
...
Please note the path to the Dart SDK:
  <path-to-homebrew>/opt/dart/libexec

--with-dartium:
  To use with IntelliJ, set the Dartium execute home to:
    <path-to-homebrew>/Cellar/dart/1.10.1/Chromium.app
...

It'd look better and be easier to document if the Dartium location was instead the equivalent (as far as I can tell) <path-to-homebrew/opt/dart/Chromium.app.

Also, do we really want to mention IntelliJ by name, when WebStorm is what we've been recommending more? Perhaps:

The Dart SDK path (required by tools such as WebStorm) is:
  <path-to-homebrew>/opt/dart/libexec

--with-dartium:
The Dartium path (required by tools such as WebStorm) is:
  <path-to-homebrew>/opt/dart/Chromium.app

Linuxbrew Support

I'm filing this issue to track work I am doing to support Linuxbrew. This will make the Dart Tap work with Linux and Mac, without any effort required.

Submit Dart to homebrew-core

Wouldn't it be useful to have a core formulae for dart SDK? Developers could leverage it to distribute their tools via homebrew core.

Can't upgrade dart with brew

$ brew upgrade
==> Upgrading 3 outdated packages, with result:
dart-lang/dart/dart 1.13.0-dev.5.0, git 2.6.0, libusb 1.0.20
==> Upgrading dart-lang/dart/dart
Error: The following formula:
dart
cannot be installed as a a binary package and must be built from source.
To continue, you must install Xcode from the App Store,
or the CLT by running:
xcode-select --install

Removal of pub binary breaks installation script in the formula

brew upgrade dart
==> Upgrading 1 outdated package:
dart-lang/dart/dart HEAD -> HEAD
==> Upgrading dart-lang/dart/dart
  HEAD -> HEAD

==> Downloading https://storage.googleapis.com/dart-archive/channels/dev/release/2.14.0-321.0.dev/sdk/dartsdk-macos-x64-release.zip
######################################################################## 100.0%
Warning: Your Xcode (12.4) is outdated.
Please update to Xcode 12.5 (or delete it).
Xcode can be updated from the App Store.

Error: An exception occurred within a child process:
  Errno::EACCES: Permission denied @ rb_sysopen - /Users/vegorov/homebrew/Cellar/dart/HEAD/bin/pub

Add Dart Editor

Would it be possible to add a formulae for the Dart Editor?

Or would this conflict with it's own update mechanism?

How to remove dart --HEAD?

Hi @athomas, I have an issue where

s-MBP:~ johnappleseed$ brew info dart
dart-lang/dart/dart: stable 2.8.4, HEAD
The Dart SDK
https://dart.dev
Conflicts with:
  dart-beta (because dart-beta ships the same binaries)
/usr/local/Cellar/dart/2.8.4 (502 files, 486MB) *
  Built from source on 2020-06-30 at 14:13:49
From: https://github.com/dart-lang/homebrew-dart/blob/master/dart.rb
==> Options
--HEAD
	Install HEAD version
==> Caveats
Please note the path to the Dart SDK:
  /usr/local/opt/dart/libexec
s-MBP:~ johnappleseed$ 

How do I only use the stable release 2.8.4? Thanks.

brew linkapps is deprecated

With brew 1.1.8 brew linkapps and brew unlinkapps is deprecated. When it is eventually removed will something need to be done so the installed Dartium/Content Shell will be the correct version?

Bad cpu type error with m1 mac

thomas@Thomass-Air ~ % dart
zsh: bad CPU type in executable: dart

It seems the current repo does not support m1 natively.

Can't install previous version from brew

I need to install Dart SDK 2.10.0.
How can i do this?

brew install https://raw.githubusercontent.com/dart-lang/homebrew-dart/3960174d4783525f7206002baefb664c896c3160/dart.rb
Updating Homebrew...
==> Auto-updated Homebrew!
Updated Homebrew from de8f487b8 to 1f6c1e974.
No changes to formulae.

Error: Calling Installation of dart from a GitHub commit URL is disabled! Use 'brew extract dart' to stable tap on GitHub instead.
 brew extract --version=2.10.0 dart dart-lang/homebrew-dart
==> Searching repository history
Error: dart: Calling 'devel' blocks in formulae is disabled! Use 'head' blocks or @-versioned formulae instead.
Please report this issue to the homebrew/core tap (not Homebrew/brew or Homebrew/core), or even better, submit a PR to fix it:
  /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/dart.rb:16

Workaround:

cd /usr/local/Homebrew/Library/Taps/dart-lang/homebrew-dart
git checkout 3960174d4783525f7206002baefb664c896c3160
cp dart.rb /tmp
brew install --build-from-source /tmp/dart.rb
brew switch dart 2.10.0

How can you make it easier?

Versioning support

It would be cool, if this tap provided formulas for all major/minor versions: 1.23, 1.22.1 and so on.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.