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

Add VS2022 support #6

Merged
merged 5 commits into from
Aug 17, 2022
Merged

Add VS2022 support #6

merged 5 commits into from
Aug 17, 2022

Conversation

DarkOoze
Copy link

@DarkOoze DarkOoze commented Feb 1, 2022

Update to the latest SDK package.
Some refactoring was needed on some of the async part.

Migrated package.config to PackageReference.
Remove application signature to be able to use the IniWrapper package.
Some packages is no longer needed as Microsoft.VisualStudio.SDK contaions most assets.
Fix issue logging from non UI threads.
@hekarroko
Copy link

@LaggAt hello! Kindly, could you review/merge this? We'd appreciate it, if you make it possible to use the extension in Visual Studio 2022

@LaggAt
Copy link
Owner

LaggAt commented Aug 16, 2022

I'm sorry, I didn't see that earlier.
I'll download/test this as soon as possible.

for the key file (.snk) I think we should add a new key as github secret, so that noone is able to release a modified assembly signed by us and causes issues. Thoughts on that?

Thanks for your work, I'll try to find some hours for a review/test.

add changelog
push testing version to 1.9 (stable VS2022 Support should be 2.0)
@LaggAt LaggAt merged commit 3cbd83f into LaggAt:master Aug 17, 2022
@LaggAt
Copy link
Owner

LaggAt commented Aug 17, 2022

I merged it into master + testing, to have an appveyor.com build to test in my environment.
Thanks for your work.

If you want to test with me, vsix file is here:
https://ci.appveyor.com/api/buildjobs/u7f9wvhykuebi13n/artifacts/ActivityWatchVS.vsix
Code signing key may still change for 2.0

@hekarroko
Copy link

hekarroko commented Aug 17, 2022

@LaggAt thanks!
I've installed an extension and I noticed something. Probably Python/Rust API are inconsistent between each other. So, the extension fails to publish metrics to a bucket with Rust server implementation running. After switching to Python impl, editor usage statistic appears.

version":"v0.11.0 (rust)

I can not investigate more to provide details. But I've read, Rust implementation is the default choice for the future and is 2 years in use by developers already.
At least, both servers return some data after HTTP GET Requests (for example /api/0/buckets/).

@hekarroko
Copy link

Also I see, stats for top editor files/projects are not accurate, probably. But I don't really know how it's counting, to make any assumptions on it. For instance, I edited a file for at least 20 sec, but metrics doesn't increment, I've tried several times.
I hope, it's a right place to report...

@LaggAt
Copy link
Owner

LaggAt commented Aug 18, 2022

yes, metrics are strange now. Did have it running the whole day while working and have some seconds tracked.
I need to investigate.

About the Rust version:
there are issues like this one: ActivityWatch/aw-server-rust#174
seems this is not 100% API compatible.
Since there are no releases up to no (at least what I can see on Github) let's wait until there is an official version.

@LaggAt
Copy link
Owner

LaggAt commented Aug 18, 2022

Well, after considering the efforts necessary, it might still be the better option to continue on the out-of-proc variant here:
https://github.com/LaggAt/ActivityWatchVS2022

They are in phase two now since some days and feature remote UI:
https://devblogs.microsoft.com/visualstudio/visualstudio-extensibility/

Still much of reading, to decide where to go further.

@LaggAt
Copy link
Owner

LaggAt commented Aug 18, 2022

Well, another thought is to abandon the 2017/2019 code base and continue on the out-of-proc model here:
https://github.com/LaggAt/ActivityWatchVS2022

Just pushed what is working so far ... no UI, some Console logs, pushing data works, some bugs probably.

@hekarroko
Copy link

hekarroko commented Aug 18, 2022

@LaggAt thanks for your attention and efforts! I really appreciate it. Also @DarkOoze - my respect for your Pull Request. I'm happy to have this extension and enrich ActivityWatcher metrics [when this extension will be operational =)].

I believe, it's better to keep moving with the latest/neweset VS extension-writing model (If I really get your posts right, it's late night for me). IMHO, I don't mind you to drop VS 2017/2019 support also, if it's hard to support both approaches of writing extensions or any other time/energy consuming reason.

Still much of reading, to decide where to go further.

If I could help... But it seems it's up to you to decide on next steps.
Please, feel free to address me any proposals on testing new versions and giving reports on them.

@LaggAt
Copy link
Owner

LaggAt commented Aug 19, 2022

Well, support for up to 2019 is there anyway, using the latest stable here. The new model is just nicer, and the code is much better than the first VS extension ever written by me. Think I will investigate on this weekend.

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