Skip to content

Conversation

@ditman
Copy link
Contributor

@ditman ditman commented Jul 24, 2024

Revert "bump to web:^1.0.0"

This reverts commit 696b254.

This reverts commit 696b254.
@ditman
Copy link
Contributor Author

ditman commented Jul 24, 2024

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
Copy link
Owner

a14n commented Jul 24, 2024

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 a14n merged commit 548a7b6 into a14n:new-js-interop Jul 24, 2024
@a14n
Copy link
Owner

a14n commented Jul 24, 2024

8.0.0-dev.4 published

@ditman
Copy link
Contributor Author

ditman commented Jul 24, 2024

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 ditman deleted the bracket-web-dependency branch July 24, 2024 21:46
@ditman
Copy link
Contributor Author

ditman commented Jul 24, 2024

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

flutter/packages@560bda4#diff-cf680b79805a49a4b4b228b2bc0b5060c31ca4f19aa801af996bf120ebd20575R36-R39

@Rexios80
Copy link
Contributor

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

@a14n
Copy link
Owner

a14n commented Jul 25, 2024

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

scripts.
homepage: https://github.com/a14n/dart-google-maps
environment:
sdk: ^3.4.0
Copy link
Contributor Author

@ditman ditman Aug 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just realized a small mistake in v8.0.0; in order for the package:web version bracket to work, this sdk dependency should be: sdk: ^3.3.0.

Requiring ^3.4.0 here is (almost) the same as doing web: ^1.0.0 (not really, but we really really don't need to advance the sdk to support web 0.5.1).

I'll try to create a mini PR ASAP. Sorry for the churn, the new version is working great (and in Wasm!)

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

Successfully merging this pull request may close these issues.

3 participants