a14n / dart-google-maps

A library to use Google Maps JavaScript API v3 from Dart scripts.
Apache License 2.0
130 stars 66 forks source link

Allow a range of package:web dependencies #136

Closed ditman closed 4 months ago

ditman commented 4 months ago

Revert "bump to web:^1.0.0"

This reverts commit 696b254341bc75a407d827c2835f55d961301959.

ditman commented 4 months ago

But why?

This would help us smoothly land the following PRs in order:

I had to do something similar with my js-interop package for GIS, see here:


@a14n is there any problem that I'm not seeing by maintaining the >=0.5.1 <2.0.0 range? It seems I didn't need any code changes in the JS-interop code itself, only in the examples (that are assuming 1.0.0 already)

a14n commented 4 months ago

If we go back to web: ">=0.5.1 <2.0.0" and dart pub downgrade then there are analysis errors on innerHTML assignments in examples like:

A value of type 'JSString' can't be assigned to a variable of type 'String'. Try changing the type of the variable, or casting the right-hand type to 'String'.

That's why I changed that. But if it makes your migration easier I can publish a temporary version. I just don't want to have this kind of issue with the final release.

a14n commented 4 months ago

8.0.0-dev.4 published

ditman commented 4 months ago

there are analysis errors on innerHTML assignments in examples

But example is not part of the lib that people use, right?

Why not make the example an actual app, so it has its own pubspec.yaml? That way we can set the dependency to web: ^1.0.0 there (that's what I did with the GIS web sdk at least).

I haven't looked deep at how examples work/are built in this package, but I can set example as a separate app, if it helps!

ditman commented 4 months ago

Another way of supporting the old innerHTML behavior in web:>=0.5.1 <2.0.0 is with something like this :)

https://github.com/flutter/packages/pull/7077/commits/560bda454bb20edeef351a3dcf3f6cada7ba8956#diff-cf680b79805a49a4b4b228b2bc0b5060c31ca4f19aa801af996bf120ebd20575R36-R39

Rexios80 commented 4 months ago

I agree with examples being their own app if they cause issues

a14n commented 4 months ago

Forget my concern about examples. It's fine. Let me know if I can publish a final version of 8.0.0.