Closed rpungin closed 2 weeks ago
I also use meta
package in my other project and tried updating it from 1.12.0 to 1.15.0, but then got an error:
Note: meta is pinned to version 1.12.0 by flutter_test from the flutter SDK.
See https://dart.dev/go/sdk-version-pinning for details.
Because every version of flutter_test from sdk depends on meta 1.12.0 and bdl_flutter_core depends on meta ^1.15.0, flutter_test from sdk is forbidden.
So, because bdl_flutter_core depends on flutter_test from sdk, version solving failed.
You can try the following suggestion to make the pubspec resolve:
* Consider downgrading your constraint on meta: flutter pub add meta:^1.12.0
Is it possible to downgrade to meta
1.12.0 in the dependencies of this package?
I feel your pain but sorry no, if the Google guys are going to persist in pinning releases of flutter to specific versions of dependent packages then things like the are going to happen.
You shouid be able to stay at 10.3.1 unless of course you wanted to take advantage of the new functionality added in 10.4.0 which you won't be able to do until flutter catches up(or even better removes this frankly ridiculous behaviour).
So how are you able to use meta 1.15.0
and have all your dependencies resolved? Why do I have the problem and you don't? I am running the latest version of flutter 3.22.2. My co-worker also has the same problem. Is there a workaround ?
I don't have the problem because mqtt_client is a Dart package, from its pub page you can see its targeted at server side(VM, flutter) and the web(browser and soon to be web assembly). Its only when you use it with flutter you have this problem.
There is no work around as far as the client is concerned, you could try a dev version of flutter, it may have upgraded its package dependencies.
What particular feature do you need in 10.4 that's not in 10.3.1, only two issues have been added, 524 and 531.
Hello, this problem is annoying as I'm trying to make mqtt with a web version of flutter and wss. So issue 531 would be rather useful.
@shamblett , first of all thank you for developing and maintaining this package!
When you say,
its targeted at server side(VM, flutter) and the web(browser and soon to be web assembly).
do you mean that you don't expect it to be used in iOS and Android mobile apps?
@ArnaudMp - So are your saying your broker set up currently will not allow wss connections without specifying specific headers or are you saying it will but the fix for #531 will be of use to you in the future?
If its the former then you need to wait for flutter to catch up with the real world , note that the MQTT spec does not require any headers to be sent using conformant brokers, wss connections should work without this.
If its the latter then you need to stay as you are now with whatever client version you are using.
@rpungin - No that's not at all what I mean, please refer to the packages pub page I've linked above, the client can be used in flutter and subsequently any of its targets, its just that this version(10.4.0) can't as flutter doesn't allow it.
Flutter will pin dependecies for avaoiding breaking changes until they are sure that new versions of the dependencies can compile without issues. Here are some details https://github.com/dart-lang/sdk/blob/main/docs/Flutter-Pinned-Packages.md
Any ways you can always override this try to add meta 1.15.0 by adding the following block to your pubspec.yaml
dependency_overrides: meta: ^1.15.0
and then you can use the latest version
I upgraded
mqtt_client
from 10.2.1 to 10.4.0 and am getting the following error when runningflutter pub get
:This is the output of
flutter --version
: