Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Package 'log4dart' is depended on from both sources 'hosted' and 'git'

Trying to review a tutorial from the following links:

http://blog.dartwatch.com/2012/03/building-client-server-dart-app-part-1.html http://blog.dartwatch.com/2012/03/building-client-server-dart-app-part-2.html

Here's my pubspec.yaml:

name:  myapp
description:  A sample application

dependencies:
  log4dart: any
  mongo_dart: 0.0.1
  unittest: { sdk: unittest }
  crimsonhttp:
    git: git://github.com/chrisbu/CrimsonHttp.git

And here's the error:

Resolving dependencies...

Package 'log4dart' is depended on from both sources 'hosted' and 'git'.

It doesn't matter if I add 'log4dart' to pubspec (any) or not. The error is always the same. 'log4dart' got installed from 'mongo_dart' anyway. Has anyone any kind of experience with that particular error message? To me, it seem so what like a circular dependency issue.

solution Until 'crimsonhttpd' get's the issue fixed or accepts my pull request, use my repository from github with following pubspec example:

name:  myapp
description:  A sample application

dependencies:
  mongo_dart: 0.0.1
  unittest: { sdk: unittest }
  crimsonhttp:
    git: git://github.com/geekrumper/CrimsonHttp.git
  log4dart:
like image 609
Ed Michel Avatar asked Oct 31 '12 10:10

Ed Michel


1 Answers

John is correct, the workaround is to specify the same git repo for log4dart that crimson does.

Packages are identified by their (source, description) pair. For hosted packages, the description is just the package name, but for Git packages the description also includes the Git URL. So two Git checkouts of log4dart from different repositories would also be incompatible.

I've opened two bugs to fix up the packages you're trying to use:

  • https://github.com/Solvr/log4dart/issues/5 -- Update: fixed!
  • https://github.com/chrisbu/CrimsonHttp/issues/7 -- Update: fixed!
like image 194
Seth Ladd Avatar answered Oct 04 '22 22:10

Seth Ladd