Skip to content

package-root bug in dart2js: import a file with a 'package:' and a relative URL #3147

Closed
@sigmundch

Description

@sigmundch

When importing a file with 'package:' the file should resolve to the same library as if it was imported with a relative URL.

Example to repro this error:
./out/Release_ia32/frog/bin/frog --package-root=./ a.dart

Where a.dart is:

library("a");

import('b.dart', prefix: 'b1');

import('b.dart', prefix: 'b2');

import('package:b.dart', prefix: 'b3');

main() {
  print("${b1.x === b2.x} ${b1.x === b3.x}");
}

And b.dart is:

library("b");

class X {
  const X();
}
final X x = const X();

Metadata

Metadata

Labels

P1A high priority bug; for example, a single project is unusable or has many test failuresweb-dart2js

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions