Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shows as supporting iOS/MacOS/Windows on pub.dev #36

Closed
BlackXDragon opened this issue Apr 25, 2021 · 12 comments
Closed

Shows as supporting iOS/MacOS/Windows on pub.dev #36

BlackXDragon opened this issue Apr 25, 2021 · 12 comments

Comments

@BlackXDragon
Copy link

I understand that windows doesn't support the BlueZ stack, however, pub.dev says this package apparently supports it. I've tested this package on Windows and got the error that it isn't supported.

Please add support for Windows or remove the Windows support tag from pub.dev.

@robert-ancell
Copy link
Collaborator

Couple of issues here:

  • We don't currently have a means of specifying which platforms a package supports, so pub.dev is saying it works on all platforms since the package is pure Dart. Other packages that have native code show as working only on platforms they have code for.
  • The bluez package should actually work fine on Windows, though it's not going to be useful there.
  • If you develop an app that works on both Windows and Linux, then using the bluez package makes sense, and it's just at run time you would decide to use it.

So it really comes down to does the tag on pub.dev relate to a package being compilable on a given platform, or useful. @cbracken - do you have any recommendation on this?

@cbracken
Copy link

cbracken commented May 5, 2021

@stuartmorgan this may be up your alley -- is there any way of hinting platform support to pub when a package is pure Dart?

@BlackXDragon
Copy link
Author

@robert-ancell , I don't quite understand in what sense you mean that the package should work fine on Windows but not be useful. Could you please explain it?

Also, when I try running the example given on Windows, the following is the error I get:

Unhandled exception:
SocketException: Connection failed (OS Error: Unix domain sockets are not available on this operating system.), address = /run/dbus/system_bus_socket, port = 0

@stuartmorgan
Copy link

@stuartmorgan this may be up your alley -- is there any way of hinting platform support to pub when a package is pure Dart?

Not at the moment; that's dart-lang/pub#2353. It's something that we've been discussing recently though as it is coming up more and more often.

@stuartmorgan
Copy link

stuartmorgan commented May 5, 2021

(Well, no good way. I believe you could currently do it by making a no-op Linux-only plugin, and then having this package depend on it, but that would be cumbersome, and I believe have the unwanted side effect of making the package say that it's Flutter-only.)

@robert-ancell
Copy link
Collaborator

@robert-ancell , I don't quite understand in what sense you mean that the package should work fine on Windows but not be useful. Could you please explain it?

This comes down to what the definition of "works" is :) In this case, the bluez code is working fine, but it's in the dbus layer that it's failing to connect. We can't get Unix domain sockets to work on Windows (yet?), but D-Bus can use other transports (e.g. TCP/IP). So in theory, you could have set up D-Bus on Windows, and made a server that ran BlueZ, but this seems like a highly unlikely situation. So it works, but it's not really useful to anyone. All the documentation for bluez.dart mentions this is for Linux but the question is should pub.dev flag this for Windows or not (the issue @stuartmorgan linked to).

@robert-ancell
Copy link
Collaborator

Short answer to this bug is once dart-lang/pub#2353 is resolved, we'll update bluez.dart to implement the recommended behaviour. This package is only expected to be useful on Linux, so that will likely result in us only listing that as the supported platform.

@BlackXDragon
Copy link
Author

Oh, alright! Thanks for the clarification!

@pouryaomidi
Copy link

Hi @robert-ancell, I was also confused as @BlackXDragon that your package is also supported on Windows. I understand the issue with pure dart packages, but it would be nice to add a clarification in your readme. Your answer might technically sound correct but seems confusing when you say it 'works'. When you cannot run it out-of-the-box, it doesn't work.

@robert-ancell
Copy link
Collaborator

@pouryaomidi can you suggest what clarification would help in the readme? It currently states "Provides a client to connect to BlueZ - the Linux Bluetooth stack.".

If the issue is just pub.dev showing the android/ios/macos/windows platform tags, then we need to wait for dart-lang/pub#2353 to resolve, as there is no (practical) means of removing those at this point.

@robert-ancell robert-ancell changed the title Windows support Shows as supporting iOS/MacOS/Windows on pub.dev May 17, 2021
@pouryaomidi
Copy link

Hi @robert-ancell, I would explicitly say: Windows is not supported and pub.dev is showing android/ios/macos/windows because of this issue.

@robert-ancell
Copy link
Collaborator

robert-ancell commented Jul 21, 2021

Updated README.

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

No branches or pull requests

5 participants