311 Commits

Author SHA1 Message Date
ArchiBot
cd0078e83e Automatic translations update 2022-06-26 02:42:45 +00:00
Łukasz Domeradzki
715ed034df Unify WebBrowser API in regards to nullable bodies (#2593)
* Unify logic for nullable bodies

* Update ArchiWebHandler.cs

* Misc
2022-06-01 21:13:40 +02:00
JustArchi
6178b12bb1 Fix invalid STD retry on 429 without json body
It's getting more and more complicated... We have places where we accept errors but still want relevant JSON body (most of the Steam error-places), and now we also have a place where we expected error to not carry one. Moreover, we still want to account for invalid JSON body on 2xx and retry on them.

So let's make the code even more complicated than it already is by adding yet another endpoint that does exactly the same what the other endpoint does BUT allows us us to optionally accept null/invalid body on success/errors/both, lol. I hate myself.

Maybe we can obsolete the first endpoint eventually and stick with just the second?
2022-05-28 20:41:52 +02:00
JustArchi
c9b1e46013 Avoid crash when executing STD command with disabled STD plugin 2022-05-26 11:47:11 +02:00
JustArchi
9162752b99 Misc 2022-05-19 21:38:40 +02:00
JustArchi
4436e8dc43 Add STD command trigger for STD plugin 2022-05-19 21:34:57 +02:00
ArchiBot
f853c61821 Automatic translations update 2022-05-16 02:25:24 +00:00
Archi
f083bb2d3b Closes #2558 2022-04-23 13:11:10 +02:00
ArchiBot
14512aec71 Automatic translations update 2022-04-21 02:36:31 +00:00
Sebastian Göls
b8bfcd5df3 Simplify LogNullError calls (#2554)
* Remove necessity of nameof(...) in calls to ArchiLogger.LogNullError(...)

* Upgrade Madness

* Upgrade Madness

* Split up compound null log statements
2022-04-13 23:16:36 +02:00
Archi
d6ed6e81a4 Let's try declaring base Chinese instead 2022-04-06 15:43:13 +02:00
Łukasz Domeradzki
ceb021dbdf Use windows-latest runner again (#2547)
* Attempt at resolving https://github.com/actions/virtual-environments/issues/5189

* Clean up dockerfiles from no longer required workarounds
2022-04-04 22:06:03 +02:00
Archi
cc83222c3e Use shorter syntax for json properties 2022-03-22 16:33:47 +01:00
ArchiBot
021d414143 Automatic translations update 2022-03-09 02:19:23 +00:00
Archi
e00ee2cc55 Misc 2022-02-26 01:26:13 +01:00
Archi
8893fc8e70 Misc 2022-02-26 01:21:37 +01:00
Archi
c1d9d04071 Rider cleanup & improvements 2022-02-18 15:40:33 +01:00
ArchiBot
9d88972ae0 Automatic translations update 2022-02-18 02:12:06 +00:00
ArchiBot
19a0be1d26 Automatic translations update 2022-02-10 02:08:21 +00:00
ArchiBot
ab8ceab055 Automatic translations update 2022-02-09 02:12:42 +00:00
ArchiBot
4dbb964ba9 Automatic translations update 2022-02-08 02:09:13 +00:00
ArchiBot
5a2cd25fa1 Automatic translations update 2022-01-26 02:13:04 +00:00
ArchiBot
959056523a Automatic translations update 2022-01-22 02:07:28 +00:00
ArchiBot
e89dad5792 Automatic translations update 2022-01-20 02:17:19 +00:00
ArchiBot
cdffde2d76 Automatic translations update 2022-01-16 02:16:57 +00:00
ArchiBot
25690056da Automatic translations update 2022-01-12 09:33:03 +00:00
ArchiBot
e33c340183 Automatic translations update 2022-01-07 02:17:56 +00:00
Archi
1809028c77 Rider cleanup 2022-01-06 20:22:38 +01:00
ArchiBot
39e7a73cd2 Automatic translations update 2022-01-03 02:13:56 +00:00
ArchiBot
e2ff80cc46 Automatic translations update 2021-12-25 02:12:16 +00:00
Archi
81a92d6781 Misc 2021-12-20 18:27:54 +01:00
ArchiBot
cdd4ff9128 Automatic translations update 2021-12-17 02:30:16 +00:00
ArchiBot
4c70a71072 Automatic translations update 2021-12-15 02:11:17 +00:00
ArchiBot
73b3fe4c8a Automatic translations update 2021-12-14 02:13:18 +00:00
ArchiBot
d60b932dfa Automatic translations update 2021-12-13 02:11:22 +00:00
ArchiBot
92a946c1cb Automatic translations update 2021-12-12 02:12:16 +00:00
Archi
225003c5d1 Try to fix netf, once again into the breach 2021-12-12 01:44:17 +01:00
Archi
4f598d5c8f Latest Rider cleanups 2021-12-12 01:12:54 +01:00
Archi
e259f9e32f STD: Misc 2021-12-11 15:17:28 +01:00
Archi
c2cabfba49 STD: Add additional safeguards against depot keys corruption 2021-12-11 15:11:35 +01:00
Archi
0eab358af9 Plugins breaking: Convert all synchronous interface methods to Task
Okay, I wish we had uncovered it earlier as part of V5.2 but it has bitten us in the back just now, so I'm addressing it as part of monthly cycle instead.

Previously used void methods did not allow async operations in plugins in a "nice way". If plugin didn't require synchronization with the ASF and just minded its own business, it wasn't half bad as it could use async void signature. However, if plugin by any chance had to do something BEFORE ASF continued with the rest of the logic, it had to explicitly leave non-async void signature and call its async-capable stuff in synchronous manner (usually with Wait() or .Result), which is vastly suboptimal.

This was visible even in our STD plugin, which previously had (and still has) GlobalCache initialization in OnASFInit(). If that cache initialization took a bit longer time, STD would hit InvalidOperationException() in OnLicenseList() callback as global cache didn't load yet while we were already long past OnASFInit().

Therefore, I've decided to make a breaking change for a very good reason - all previous methods were converted to tasks, which allows from plugin to do one of three things:

- If plugin is async and requires synchronization (like STD), it can declare itself as async await, and do its awaits as-needed, and ASF will wait for those.
- If plugin is truly synchronous (and not just a synchronous signature with awful Wait() or .Result, see above), it can simply return Task.CompletedTask and has exactly the same logic.
- Finally, if plugin calls some async stuff but doesn't need ASF synchronization, it can "offload" itself from it by calling e.g. ASF's Utilities.InBackground() with whole logic, while returning Task.CompletedTask from the main method. This will allow it to effectively do what async void previously did, by just hooking into the process without intention of slowing it down.

All in all I'm confident this approach, while a bit counter-intuitive at first, will result in better compatibility between ASF and the plugins, as if I wanted to fix my STD issue right now without that breaking change, I'd have to actually call .Result on my async global cache loader function, which is utterly stupid if we can fix ASF to do the right thing instead.

This "approach" can be commonly found in some other libs with similar to ASF's event-hook behaviour, e.g. Discord.Net.

You'll sadly need to do some method signature changes in all of your plugins, as the core OnLoaded() was also changed. See the ones I did in SteamTokenDumperPlugin.cs if you need a practical example, and see ExamplePlugin.cs if you need further explanation.
2021-12-08 16:52:27 +01:00
ArchiBot
a5cd6314e4 Automatic translations update 2021-11-28 02:07:25 +00:00
ArchiBot
ece06abbc7 Automatic translations update 2021-11-21 02:10:14 +00:00
Archi
c709d529c1 Closes #2455 2021-11-18 21:33:06 +01:00
Archi
62effc4af1 STD: Postpone registering updated app change numbers
This is important as we don't want to miss a depot, by moving it below we ensure that all depot tasks succeeded before we mark appIDs as "finished with"
2021-11-15 19:53:46 +01:00
Archi
260875da7e Use shared Random across ASF
This also removes PublicAPI of ASF's "shared random"
2021-11-11 19:34:21 +01:00
Archi
d46e532458 Code cleanup 2021-11-10 21:47:42 +01:00
Archi
1e6ab11d9f Use file-scoped namespaces 2021-11-10 21:23:24 +01:00
Sebastian Göls
fb4eb0b03a Use Madness via global usings (#2447)
* Use Madness via global usings

* Apply feedback

* Disable false positive null warning
2021-11-09 16:33:09 +01:00
ArchiBot
62704be1f3 Automatic translations update 2021-11-04 02:10:42 +00:00