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

Deprecate/drop Windows.Devices namespace in favour of System.Device #620

Closed
networkfusion opened this issue May 30, 2020 · 14 comments · Fixed by nanoframework/nf-interpreter#2283 or nanoframework/Samples#209
Milestone

Comments

@networkfusion
Copy link
Member

networkfusion commented May 30, 2020

This brings it inline with expected .netCore 5 namespaces and would aid compatibility towards .Net Standard support.

Mark old classes with something lke
[ObsoleteAttribute("This namespace is obsolete. Use System.Device namespace instead.", true)]

@networkfusion networkfusion added this to the Backlog milestone May 30, 2020
@josesimoes josesimoes added FOR DISCUSSION Open for discussion. Contributes from the community are welcome/expected. and removed For Discussion labels Jun 1, 2020
@networkfusion networkfusion changed the title Depreciate/drop Windows.Devices namespace in favour of System.Device Deprecate/drop Windows.Devices namespace in favour of System.Device Jun 4, 2020
@alberk8
Copy link

alberk8 commented Jun 9, 2020

I second the change.

@networkfusion
Copy link
Member Author

PR for DAC nanoframework/System.Device.Dac#24

@networkfusion
Copy link
Member Author

PR for Gpio nanoframework/Windows.Devices.Gpio#134

@josesimoes josesimoes added Priority: Medium Status: In progress Type: Enhancement and removed FOR DISCUSSION Open for discussion. Contributes from the community are welcome/expected. Type: Feature request labels Aug 24, 2020
@josesimoes josesimoes modified the milestones: Backlog, vFuture Aug 24, 2020
@Ellerbach
Copy link
Member

And would be great if the API can aligned with https://github.com/dotnet/iot/tree/master/src/System.Device.Gpio. That would make it easier to switch and share some code between both nanoFramework and .NET IoT.

@josesimoes
Copy link
Member

And would be great if the API can aligned with https://github.com/dotnet/iot/tree/master/src/System.Device.Gpio. That would make it easier to switch and share some code between both nanoFramework and .NET IoT.

That's exactly the plan. Now that we've decided to move away from the UWP API, that's the next one we plan to adhere to.

Are you willing to give us a hand with this?

This is not a challenging task, just that it takes time, has most methods just need renaming and others parameters tweaking. Not to mention the documentation comments.
Anything needed to be changed at the native end we can take care of it.

Let me know. 🙂

@krwq
Copy link

krwq commented Sep 14, 2020

will you provide nano version of the System.Device.Gpio package (perhaps with some stuff stripped off)? I'm in favor of having IoT repo sharing some code with this if so (there are likely only few classes which need sharing) but we'd need to add some kind of CI to make sure we don't break anything by accident in the future. We're fine with adding some ifdefs in the code or something to make it easier for nano. Would be nice to be able to get Iot.Device.Bindings (or at least large part of it) to work on nano

@Ellerbach
Copy link
Member

Are you willing to give us a hand with this?

Yes and as @krwq mentionned, we need to decide what to keep and what to remove also the interfaces. A lot of the bindings we have in .NET IoT are using Span and the functions from nanoFramework are all byte[]. Later today as soon as I'll have a little bit of time I'll publish the work I've been doing with Span and simple wrapper over I2C and Gpio. So a large part of the work is already done as well.

@Ellerbach
Copy link
Member

@josesimoes so posted the last week evening and weekend work here: https://github.com/Ellerbach/nanoFrameworkIoT

@josesimoes
Copy link
Member

@krwq @Ellerbach that's awesome! 👏

I just did a quick check on the GPIO classes on IoT Core and that's pretty much as I remember it. Which is good as most of it is the same or very close to what we have.

Here's my suggestion: baby steps. Let's start with GPIO before moving to others (I2C, etc) this can be a PoC and we can learn from the process what's the best way to tackle it.
Any changes required at the native end: we can accommodate that easily.

On the code sharing: that would be great. Let's find out what's the best and efficient way to make that happen. That doesn't prevent that work is started on the API migration.

@stale
Copy link

stale bot commented Nov 14, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale The issue/PR hasn't seen any activity from the past 60 days. label Nov 14, 2020
@stale stale bot closed this as completed Nov 21, 2020
@josesimoes
Copy link
Member

Very much active

@josesimoes josesimoes reopened this Nov 21, 2020
@stale stale bot removed the stale The issue/PR hasn't seen any activity from the past 60 days. label Nov 21, 2020
@josesimoes
Copy link
Member

⚠️ ALL WINDOWS.DEVICES libraries will have one last stable release published on the next release cycle.

Following which the repositories will be archived and the libraries won't receive any further updates.

@networkfusion
Copy link
Member Author

networkfusion commented Apr 19, 2022

@josesimoes , before this issue is closed, we should also make sure there are no [active] samples that use it (or archive them)...
image

We also need to purge any documentation that relies on them, and (if necessary) let people know they need to update their cmake-variants.json files...

@networkfusion
Copy link
Member Author

Note that the Can namespace is still behind...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants