Links containing special characters do not work

The following markdown should be valid. But the checker reports a broken link.
# Contributors ✨

[Contributors](#contributors-)

Created pull request #227

This was fixed by #277 ?

A really good question. I do not remember the exact problem and my description above could be better ... I will close it.
#227 just adds a test for that. As it is not failing it seems that everything is ok.


Port to kotlinx-serialization

I'd like to port the Jackson code to kotlinx-serialization, mostly to avoid reflection, but also to have clear annotations on classes that are user for serialization (and thus need special attention when refactoring). before I start, are there any objections to use kotlinx-serialization?

I think I originally thought about using KotlinX, but the problem I quickly ran into was the range of versions of Kotlin I needed this project to support in order to support the wide number of Gradle Versions this needed to support.
I don't remember what the earliest version of Gradle this project attempts to support is, but the version of of Kotlin shipped with that version of Gradle didn't have spectacular KotlinX json support IIRC.
This is also why this project wasn't able to use the latest version of Jackson, because later versions of Jackson depend upon Kotlin reflection API features that don't exist in some of the earlier releases of Gradle.
So, I guess, in summary, I'd check if it's even possible first, before trying to do a whole overhaul

I'd check if it's even possible first

Would a simple stub implementation and see if it compiles / passes test be enough for that check?

Passing tests is the most important part. You'll want to make sure it passes a test with the oldest version of Gradle.
Also, at the end of the day, this isn't my codebase anymore. I'm not with Gradle anymore unfortunately. You'll have to get @bigdaz to sign off on this change too.
My comment from yesterday was mostly to provide information about the potential pitfalls you may encounter.

You'll have to get @bigdaz to sign off on this change too.

Yes, waiting for @bigdaz to confirm this being a good thing as well.

I'm actually considering going the other way, and porting the entire codebase to Java. Using Kotlin for a plugin that needs to support a wide range of Gradle versions adds complexity and limitations. For one example, we are stuck with Kotlin 1.3 (which is now deprecated for removal).
That said, I'm OK with any refactoring that retains the current set of supported Gradle versions: https://github.com/gradle/github-dependency-graph-gradle-plugin?tab=readme-ov-file#gradle-compatibility

Would a simple stub implementation and see if it compiles / passes test be enough for that check?

Not really. The best way would be to fork the project and ensure that the Java CI with Gradle workflow continues to pass.

I'm actually considering going the other way, and porting the entire codebase to Java. Using Kotlin for a plugin that needs to support a wide range of Gradle versions adds complexity and limitations. For one example, we are stuck with Kotlin 1.3 (which is now deprecated for removal).

In hindsight, this was likely the way I should have gone when writing it originally. I really wanted to work on a project in Kotlin though. And my idealism and preference for language drove the decision over the practical problem I was trying to solve.
Sorry Daz for the added headache I left you with because of that original decision. 😬 Hope you can forgive me.

@sschuberth I'm not a Kotlin expert by any means, and this approach sounds very promising, if feasible. The project is already using the ShadowJar task to create a single shaded jar, but I don't think it's done in a way to make the plugin Kotlin-independent. (The ShadowJar code was implemented by @JLLeitschuh and I've never really investigated).
If you are willing to take a look at improving this, it would be most appreciated! Otherwise I'll certainly take a look before I undertake any conversion to Java.

Make the plugin completely self-contained though being written in Kotlin.

Note to myself: https://github.com/GradleUp/gr8 could become useful here.


Cannot login to Jenkins Master server

Hello SIr,
I have been trying to setup a WINDOWS agent for Jenkins Server.
In doing so I could not properly connect to Jenkins master and then started to configure the global security settings. I tried to test for authorization through user and after that I am getting this error as I login to my Jenkins master UI (http://:8080/login?from=%2F)
Getting the following error every time after the login screen with username and password:

Please help me resolve the issue as I cannot go forward with further work.
Thanks
Debasis Pal

This is the network error please refresh the page in browser.

you can use below step to resolve i had faced the same while morning

I am constrained to try this option of crumb for PCSRF security, as I am not being able to invoke the landing page of Jenkins GUI after I provide my login credentials.
Anyway after trying many options which did not work, I was forced to remove my Jenkins installation on AWS Linux and went for re-installation and configuration, after which I am back to normal operations.
Anyway, I will remember this solution in case in future I encounter such problems related to PCSRF
Thanks
Debasis

please close the issue.


Handle queryParameters first deserialization with qs ?

Hello,
As there is no consensus on seriliazation style: deepObject explode:  true  ( like explained here ), some users cannot use the API as they think it would work.
Like explained this issue on the specs, many users uses qs under the hood so for example, if I have an endpoint like this :
  /api/exercises/{id}:
    parameters:
        - name: id
          in: path
          description: "The exercise ID"
          required: true
          schema:
            type: integer
        - name: includeOptions
          in: query
          description: "To include additional properties when fetching exercise"
          schema:
            $ref: "#/components/schemas/IncludeOptions"
components:
  schemas:
    IncludeOptions:
      type: object
      description: "To include additional properties when fetching exercise(s)"
      properties:
        includeCreator:
          type: boolean
          default: false
          description: "Must we include the creator of exercise(s) ?"
        includeMetrics:
          type: boolean
          default: true
          description: "Must we include the metrics of exercise(s) ?"
        includeDescription:
          type: boolean
          default: true
          description: "Must we include the description of exercise(s) ?"
        includeTags:
          type: boolean
          default: true
          description: "Must we include the tags of exercise(s) ?"

And simulate a request inside a unit test done with supertest
const check = await request
            .get("/api/exercises/42")
            .set('Authorization', 'bearer ' + JWT_TOKEN)
            .query('includeOptions%5BincludeCreator%5D=true')
            .query('includeOptions%5BincludeMetrics%5D=false')
            .query('includeOptions%5BincludeDescription%5D=false')
            .query('includeOptions%5BincludeTags%5D=false')
            .send();

expect(check.status).toBe(200);

gives me an 400 error with the following message :
Request has one or more errors
  In query parameters
    Received unexpected parameters: includeOptions[includeCreator], includeOptions[includeMetrics], includeOptions[includeDescription], includeOptions[includeTags]
      Possible causes
        In query parameter "includeOptions"
          Unable to parse value
            The value is not formatted properly

If you need the code to generate the query parameters
var qs = require('qs');
var obj  = {
    "includeOptions": {
        "includeCreator" : true,
        "includeMetrics" : false,
        "includeDescription" : false,
        "includeTags": false,
    }
}
var str = qs.stringify(obj);
console.log(str);

Currently, I am using this workaround ( that has the drawback of disable openapi-enforcer type deserialization ) :
module.exports = function () {
    return (req, res, next) => {
        // After qs (or querystring ), we may need to do additional stuff
        if (Object.keys(req.query).length > 0) {
            // disable openapi-enforcer validation of query parameters
            req.url = req.url.split("?")[0];
            req.originalUrl = req.originalUrl.split("?")[0];
        }
        next();
    }
};

Give me a little more context for where this problem is originating. Are you using the openapi-enforcer-middleware or are you using your own request handler intermediary?
Do you have a repository I could look at to understand this problem better?

I am using the openapi-enforcer-middleware.
I don't have one if I have to create one, it will be similar to the one I created to showcase some bugs previously , using the part of OAS and the supertest example  I give above

I am using the openapi-enforcer-middleware.
I reused the previously used minimal demo project to showcase this bug

OK, I think I've got this figured out. The parameter parser needs to decodeURIComponent for those query parameters. If you take the same test as before but decode the query parameters it works.
I've found a spot where I think it makes sense to add that decode, but I'm going to write some tests to make sure it doesn't affect other things.
The below code seems to work. Notice that I removed the %05B and %05D.
const check = await request
            .get("/api/exercises/42")
            .set('Authorization', 'bearer ' + JWT_TOKEN)
            .query('includeOptions[includeCreator]=true')
            .query('includeOptions[includeMetrics]=false')
            .query('includeOptions[includeDescription]=false')
            .query('includeOptions[includeTags]=false')
            .send();

expect(check.status).toBe(200);

Let me know if you're seeing other behavior. I'll start the fix.

I think you can reuse this function to detect that on Mozilla docs :
function containsEncodedComponents(x) {
  // ie ?,=,&,/ etc
  return (decodeURI(x) !== decodeURIComponent(x));
}

A few examples were given :
console.log(containsEncodedComponents('%3Fx%3Dtest')); // ?x=test
// expected output: true

console.log(containsEncodedComponents('%D1%88%D0%B5%D0%BB%D0%BB%D1%8B')); // шеллы
// expected output: false


use shared MEF components instead of static fields

The CI is a bit borked right now and we are in the middle of an office move.
Kevin

@KevinRansom I think it's kind of important to have that fixed right now.

Confused. What does office move have to do with CI server?

None of the people in redmond are allowed in the building, and many are in fact off work yesterday and today...

Still don't understand what this has to do with a CI server. ;-)

Self hosted in the corner of said office? ;)

@forki @isaacabraham I'm on it.

OK, well, this change looks good to me.  Total MEF voodoo :)


--to-clipboard not working

I'm having trouble with copying the generated images to my clipboard.
While generally the plugin works great and I've been able to generate png's in my configured path, images don't appear on the clipboard.
I saw a reference to xclip in the code, although seemingly just to check if the executable exists. So since I'm on wayland, I replaced /bin/xclip with a symlink to /bin/wl-copy (the wayland copy-to-clipboard binary).
This works everywhere else on the command line, etc. But not from the nvim silicon plugin.
I've tried the following:

:'<,'>Silicon --to-clipboard, which results in the error message failed to parse command-line argument: '--to-clipboard'
:'<,'>Silicon --to-clipboard=true, after double checking the flag parsing code. This gives a success message, but doesn't actually put anythign on the clipboard
Setting g:to-clipboard = true in the config
Adding an inotifywait listener on /bin/xclip does fire when executing the :Silicon command in nvim, I see a /bin/xclip OPEN notification

Any idea what I might be doing wrong?

Hi,
you need to escape the space:
:'<,'>Silicon\ --to-clipboard

BTW: there is a shortcut for --to-clipboard: -c
Regards

crap...
event with --to-clipboard it writes a file:  --to-clipboard.png. But also copies to clipboard.
Is there a chance to fix it and have only one output: either a file or clipboard?

So the way I have been using it is as follows. I highlight a few lines, then just execute Silicon from cmd mode (:'<,'>Silicon) which results in the highlighted lines of text being fed into Silicon via the plugin and my clipboard being filled with the generated image. Seems to work without a hitch :+1: :crossed_fingers:

I see now. --to-clipboard can be omitted. But it also writes a file.


List examples of other OSS apps with pluggable client-side auth architectures

For gathering ideas and inspiration for how we want to design the auth API.
Some things that we want to look for:

OpenID vs OAuth handling
OAuth providers in npm packages
Projects that use a common API for all OAuth providers
Client-side implementations, server-side is discussed in #366

https://marmelab.com/react-admin/

What I gathered from react-admin so far:
An interface like this one is used to define authentication providers:
const authProvider = {
    login: params => Promise.resolve(),
    logout: params => Promise.resolve(),
    checkAuth: params => Promise.resolve(),
    checkError: error => Promise.resolve(),
    getPermissions: params => Promise.resolve(),
};

^ from https://marmelab.com/react-admin/Authentication.html
The interface is similar to the one we have internally, although it's split into more methods. Biggest difference is that ours is centered around getting an OAuth access token with the correct scopes, while that is handled as a side-effect in react admin.
It seems like auth is mostly centered around password-based flows, and the authorization parts bit are more direct but could probably be adopted to fit OAuth: https://marmelab.com/react-admin/Authorization.html
SO question about using react-admin with OIDC: https://stackoverflow.com/questions/54763687/react-admin-with-openid-connect

Initial API has been settled and implemented.


FAILURE: Build failed with an exception.

C:\flutter\.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31: error: cannot find symbol
  private ThreadedInputConnectionProxyAdapterView proxyAdapterView;
          ^
  symbol:   class ThreadedInputConnectionProxyAdapterView
  location: class InputAwareWebView
C:\flutter\.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112: error: cannot find symbol
        new ThreadedInputConnectionProxyAdapterView(
            ^
  symbol:   class ThreadedInputConnectionProxyAdapterView
  location: class InputAwareWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':webview_flutter:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 6s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

Could this be a solution? https://github.com/flutter/flutter/issues/82800

@nshibu
What flutter version are you on ? It seems compiler can't find the methods listed in the error for webview_flutter plugin.
Can you provide pubspec.yaml ?
Or you can also try to run flutter clean or flutter pub cache repair and then flutter run to see if it helps.

I get the same problem

@nshibu
What flutter version are you on ? It seems compiler can't find the methods listed in the error for webview_flutter plugin.
Can you provide pubspec.yaml ?
Or you can also try to run flutter clean or flutter pub cache repair and then flutter run to see if it helps.

Flutter 2.0.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 1d9032c7e1 (3 weeks ago) • 2021-04-29 17:37:58 -0700
Engine • revision 05e680e202
Tools • Dart 2.12.3

I find error, like writed in this issue 82800

@nshibu
What command are you running to get this error ? Can you provide steps to replicate this ?
@ivtimur If you switch to 2.0.5, do you still get same issue or no ?

@ivtimur If you switch to 2.0.5, do you still get same issue or no ?

I don't know, i just fix this problem and run my app )
You can try to repeat this problem, just install the version 2.0.6

I get Same issue and nothing working for me

[ ] .

Using  latest flutter and latest android studio
All steps tried  but not able to resolve this even webview_flutter ^2.0.4  not working

location: class InputAwareWebView
D:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112: error: cannot find symbol
new ThreadedInputConnectionProxyAdapterView(

Look, the error message says that you have version 2.0.6 installed

My app is working only with 2.0.4 (2.0.5 is not published).
Here is my app (subfolder study_designer), which fails with that error on the newer 2.0.6 release:
https://github.com/hpi-studyu/studyu/tree/dev/study_designer

I looked at the archive for 2.0.6, and the file has the right extension. I suspect this may be a Windows path length issue causing the filename to be truncated somehow.

@jonasfj Has anything changed about the way the zips are created recently? This file has existed for quite a while so I'm not sure why 2.0.6 would be behaving differently than 2.0.4.

Flutter 2.2.0 • channel stable • https://github.com/flutter/flutter.git Framework • revision b22742018b (5 days ago) • 2021-05-14 19:12:57 -0700 Engine • revision a9d88a4d18 Tools • Dart 2.13.0

flutter clean
flutter pub cache repair (this file gets changed from ThreadedInputConnectionProxyAdapterView.java to ThreadedInputConnectionProxyAdapterView.jav)
flutter run

Windows 10 path:
E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter
`E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:31: error: cannot find symbol
private ThreadedInputConnectionProxyAdapterView proxyAdapterView;
^
symbol:   class ThreadedInputConnectionProxyAdapterView
location: class InputAwareWebView
E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\InputAwareWebView.java:112: error: cannot find symbol
new ThreadedInputConnectionProxyAdapterView(
^
symbol:   class ThreadedInputConnectionProxyAdapterView
location: class InputAwareWebView
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
2 errors
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':webview_flutter:compileDebugJavaWithJavac'.

Compilation failed; see the compiler error output for details.
`

offcourse I change the file ThreadedInputConnectionProxyAdapterView.jav to .java and it works:
flutter run (OK)

Just to be sure that the issue is with the archive, not a change in the unzipping process: can someone with this issue confirm that if you clear your pub cache and then build with the version pinned to 2.0.4 it does work?

Pubspec.yaml: webview_flutter: 2.0.4

flutter clean
flutter pub cache repair
flutter run

works like a charm (deleter the 2.06 webview in E:\flutter.pub-cache\hosted\pub.dartlang.org:
Pubspec.yaml: webview_flutter: 2.0.6

flutter clean
flutter pub cache repair
flutter run

this makes this file ThreadedInputConnectionProxyAdapterView.jav in E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter

@stuartmorgan This just hit me. Downloading the package from pub shows the filename incorrect.
https://storage.googleapis.com/pub-packages/packages/webview_flutter-2.0.6.tar.gz
I assume its a max-path packaging issue. For the moment would a simple class rename and package version push me a good temporary solution until the underlying issue can be resolved?

@stuartmorgan This just hit me. Downloading the package from pub shows the filename incorrect. (in the actual archive)
https://storage.googleapis.com/pub-packages/packages/webview_flutter-2.0.6.tar.gz
I assume its a max-path packaging issue. For the moment would a simple, class rename and package version push, be a good temporary solution until the underlying issue can be resolved?

I have 2.0.4 and 2.0.6 installed in these paths:

E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.6\android\src\main\java\io\flutter\plugins\webviewflutter\ThreadedInputConnectionProxyAdapterView.jav
E:\flutter.pub-cache\hosted\pub.dartlang.org\webview_flutter-2.0.4\android\src\main\java\io\flutter\plugins\webviewflutter\ThreadedInputConnectionProxyAdapterView.java

Wouldnt that be the same issue ?

This is strange. When I said "I looked at the archive for 2.0.6, and the file has the right extension" above, that was based on downloading the archive from pub.dev on my Mac and opening it. I just tried the same thing from my Windows 10 machine, and manually opening it, and it looks correct there too. So I tried making a test app that fetches and opens it via pub thinking it was something about how pub was decompressing it, but it's fine there too (i.e., the file has the right name in the pub cache directory); I can't reproduce this at all.
Maybe this is a CDN issue? @slightfoot what is the exact size of the 2.0.6 archive you download, and what is its MD5 checksum?
I'm seeing:

1192378 bytes
41965e9defa981ede28f85991ecfc2ea

[Solved] Flutter Webview throws compiling error -ThreadedInputConnectionProxyAdapterView location: class InputAwareWebView

For the moment would a simple, class rename and package version push, be a good temporary solution until the underlying issue can be resolved?

This file has existed with this name since 2019. Without understanding what the underlying issue is, I have no idea if that would actually help.

This is a problem with long file names... If I download: https://storage.googleapis.com/pub-packages/packages/webview_flutter-2.0.6.tar.gz
And then do:
powershell
mkdir extracted_files
cd extracted_files
../flutter\bin\cache\dart-sdk\lib\_internal\pub\asset\7zip\7za.exe x webview_flutter-2.0.6.tar

PS C:\Users\jonasfj\hack> ls .\android\src\main\java\io\flutter\plugins\webviewflutter\

    Directory: C:\Users\jonasfj\hack\android\src\main\java\io\flutter\plugins\webviewflutter

Mode                LastWriteTime         Length Name
----                -------------         ------ ----
-a----        4/26/2021   8:42 PM           6816 DisplayListenerProxy.java
-a----        4/26/2021   8:42 PM           1778 FlutterCookieManager.java
-a----        4/26/2021   8:42 PM          15358 FlutterWebView.java
-a----        4/26/2021   8:42 PM          11425 FlutterWebViewClient.java
-a----        4/26/2021   8:42 PM           9407 InputAwareWebView.java
-a----        4/26/2021   8:42 PM           2130 JavaScriptChannel.java
-a----        4/26/2021   8:42 PM           3581 ThreadedInputConnectionProxyAdapterView.jav
-a----        4/26/2021   8:42 PM           1084 WebViewFactory.java
-a----        4/26/2021   8:42 PM           2700 WebViewFlutterPlugin.java

This is only a problem on windows, and it might be fixed in the next version as we're moving to use a Dart library for decode tar archives... So if the filename isn't so long that it can't be written by dart:io, then it should work fine.

2.0.7 fixes this. It is the same as 2.0.6 other than the version bump, but published from stable to avoid https://github.com/dart-lang/pub/issues/3001


Fix tail -f issue seen on RHEL 8.5.  Add missing _chk functions

Resolves #728

Looks good to me if there is a chance to add the integration test which fails before this PR and works after this PR it would be great - anyway feel free to merge this Pull Request.


CBC: Handle new CyLP statuses

Description
Please include a short summary of the change.
Issue link (if applicable):
Handle new CyLP statuses added in https://github.com/coin-or/CyLP/pull/150
@tkralphs
Type of change

[ ] New feature (backwards compatible)
[ ] New feature (breaking API changes)
[ ] Bug fix
[ ] Other (Documentation, CI, ...)

Contribution checklist

[ ] Add our license to new files.
[ ] Check that your code adheres to our coding style.
[ ] Write unittests.
[ ] Run the unittests and check that they’re passing.
[ ] Run the benchmarks to make sure your change doesn’t introduce a regression.

Propogated to 1.1.20.

Propogated to 1.2.1.


error:device.forward("tcp:10808", "tcp:10808")

output:
AttributeError: 'NoneType' object has no attribute 'forward'

Hi @ztoiax
Could you provide more detail code about the device ?
device is None means that the device cannot be found on adb server.

Hi @ztoiax
Could you provide more detail code about the device ?
device is None means that the device cannot be found on adb server.

Thank you. I have solved it.


Make it easier to subclass MoyaProvider

It uses default values for its initializers that need to be duplicated by subclasses.
public init(endpointClosure: EndpointClosure = MoyaProvider.DefaultEndpointMapping,
    requestClosure: RequestClosure = MoyaProvider.DefaultRequestMapping,
    stubClosure: StubClosure = MoyaProvider.NeverStub,
    networkActivityClosure: Moya.NetworkActivityClosure? = nil,
    credentialClosure: CredentialClosure? = nil,
    manager: Manager = Alamofire.Manager.sharedInstance) {

    self.endpointClosure = endpointClosure
    self.requestClosure = requestClosure
    self.stubClosure = stubClosure
    self.networkActivityClosure = networkActivityClosure
    self.credentialClosure = credentialClosure
    self.manager = manager
}

Dunno how we could do this..

This is really tricky. Basically our providers are containers for data (their configs) and a request method. That's, like, the definition of a class.
I suppose we could move MoyaProvider to be a protocol and put request() in a protocol extension? Or maybe turn Moya into a struct instead of a class. The real hassle is just updating initializers that don't do anything but call super.init(... so structs would remove that pain most of the time.

Alternatively, it seems a bit odd that subclasses must override the initializer.
override public init(endpointClosure: EndpointClosure = MoyaProvider.DefaultEndpointMapping,
    requestClosure: RequestClosure = MoyaProvider.DefaultRequestMapping,
    stubClosure: StubClosure = MoyaProvider.NeverStub,
    networkActivityClosure: Moya.NetworkActivityClosure? = nil,
    credentialClosure: CredentialClosure? = nil,
    manager: Manager = Alamofire.Manager.sharedInstance) {

        super.init(endpointClosure: endpointClosure, requestClosure: requestClosure, stubClosure: stubClosure, networkActivityClosure: networkActivityClosure, credentialClosure: credentialClosure, manager: manager)
}

All the subclasses ever do is call super.init(). How can we abstract this?

Maybe instead of subclassing, we can add extensions to the existing MoyaProvider type?

I like the idea of using protocols to extend the primary type, but I'm concerned about the constraints that would introduce for existing users who are currently subclassing (say, RxSwiftProvider). I'm going to look through Eidolon for how we use Moya, and see if there are any foreseeable problems before starting an implementation.

Fixed in #238.

Was it actually addressed? We are trying to subclass both MoyaProvider and ReactiveCocoaMoyaProvider and Xcode says we should override designated initializer.

Well, it was addressed in the sense that subclassing the provider no longer requires so many initializer parameters and repeating their default values. What you're describing sounds like a new issue. I have subclassed RxMoyaProvider here without issues.

I see. Yes, it is easier to define default parameters now, but it still require overriding designated initializer. Actually situation does not change in compare with what you writing in Oct, 1. Here is current experience of subclassing — https://www.evernote.com/l/AEaV5Z1HlZRGprguAUiszmTarcbrRgFzQA0

Subclassing in Swift usually requires calling a designated initializer in the superclass, I'm not sure of a great way to avoid this in Moya. Do you have suggestions?
--
Ash Furrow
https://ashfurrow.com/
On April 30, 2016 at 12:24:01 PM, nikita leonov (notifications@github.com(mailto:notifications@github.com)) wrote:

I see. Yes, it is easier to define default parameters now, but it still require overriding designated initializer. Actually situation does not change in compare with what you writing in Oct, 1. Here is current experience of subclassing — https://www.evernote.com/l/AEaV5Z1HlZRGprguAUiszmTarcbrRgFzQA0
—
You are receiving this because you modified the open/close state.
Reply to this email directly or view it on GitHub(https://github.com/Moya/Moya/issues/144#issuecomment-215976739)

Swift actually supports inheritance of initializers. For example in a following code Bar will not require initializer, but it will still be available:
class Foo {
  let value: Int
  init(value: Int = 5) {
    self.value = value
  }
}

class Bar: Foo {
}

The problematic situation will be if we make Foo generic. Somehow in this scenario Swift starts to ask designated initializer override. I do not really understand why yet and what could be an option, but I am trying to find an answer now.

Interesting. I suppose what I meant was, a reason to subclass would be to provide custom behaviour, which may need to be given as an initializer parameter Subsequently, you'd want to define all the usual default values and would also need to call the super-initializer. I would love to hear ideas to solve either of those problems – please keep us in the loop about your progress, maybe on a new issue?

While I am going to dig a little bit more, I am not sure that I will be able to handle the whole issue. I suggest to not create a new one, but just reopen current issue. It has whole history of thought, with an actual problem described by you. I think this issue is good enough for tracking everything related to simplifying of subclasses.
Also I would like to highlight why it is important. As for today we have a lot of code duplication in our product of initializers like following:
    override init(endpointClosure: EndpointClosure = ReactiveCocoaMoyaProvider.DefaultEndpointMapping, requestClosure: RequestClosure = ReactiveCocoaMoyaProvider.DefaultRequestMapping, stubClosure: StubClosure = ReactiveCocoaMoyaProvider.NeverStub, manager: Manager = ReactiveCocoaMoyaProvider<IdentificationServiceAPI>.DefaultAlamofireManager(), plugins: [PluginType] = [], stubScheduler: DateSchedulerType? = nil) {
        super.init(endpointClosure: endpointClosure, requestClosure: requestClosure, stubClosure: stubClosure, manager: manager, plugins: plugins, stubScheduler: stubScheduler)
    }

With the only difference of manager`s token. Our static analysis tools complaining about this a lot, and I believe it is right complain, as it eventually unnecessary code duplication that hard to read and that does not actually adds value.

Here is a stack overflow question with a problem explained — http://stackoverflow.com/questions/36957858/why-swift-requires-override-of-designated-initializer-of-generic-superclass lets see if someone in community actually can explain this strange generics behavior.

@ashfurrow As result of my research I found some combinations of associated types and default values that actually removes requirement to override designated initializer. It seems that major reason for override requirement in Moya can be some default values. While it is definitely some buggy behavior of Swift, I think it is possible to find workaround even in a current state of Swift.

@ashfurrow good news, an issue that prevents of removing this huge initializers was recently fixed in master — https://bugs.swift.org/browse/SR-416 so this issue prob not bearably will be fixed in Swift 3.
ps I still suggest to reopen it, as it ongoing and reproducible in current maya with Swift 2.2.


Unable to install apt-key

The get Microsoft signing key install step does not work with the current version of Unbuntu from the Microsoft Store (Ubuntu 18.04.1 LTS).
I get the error that ends with "gpg: keyserver receive failed: No dirmngr".
The following workaround does not fix the issue:
sudo apt-get install dirmngr
I was able to get the Azure CLI installed on the current version of Unbuntu using the following steps:
sudo apt-mark hold ebtables # for the current upgrade bug
sudo apt-get update
sudo apt-get upgrade -y
sudo apt install apt-transport-https dirmngr
sudo apt-get update
sudo apt-get install apt-transport-https lsb-release software-properties-common -y
AZ_REPO=$(lsb_release -cs)
echo "deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ $AZ_REPO main" |
sudo tee /etc/apt/sources.list.d/azure-cli.list
sudo apt-get update
sudo apt-get install azure-cli

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: fe1526a9-7f22-504e-484c-0f3edc11b178
Version Independent ID: c5dec108-efcd-aa77-04b5-803b6b894dba
Content: Install the Azure CLI on Linux with apt
Content Source: docs-ref-conceptual/install-azure-cli-apt.md
Product: azure
GitHub Login: @sptramer
Microsoft Alias: sttramer

Please make sure that you follow the Troubleshooting instructions for WSL. There is a known issue with Linux IPC that affected older versions of WSL, and was fixed in Windows 10 1809.


Change the args order of send_codehilite_style()

I put dest first for the convenience of this test case:
https://github.com/anqurvanillapy/postocol/blob/master/tests/test_basic.py#L173
Proven inconvenient when I re-write the project site generator

Stupid issue here. kwargs of a function can be assigned through specific keys and values, not only based on argument positions.
E.g. foo(bar=baz)

https://github.com/anqurvanillapy/postocol/blob/master/tests/test_basic.py#L173 no need to specify a positional argument in this test case.


Update hardware spec with units and current status

Explicitly state that we do not expect substantial changes in the hardware spec (as agreed on the hacking session some time ago), mention how units will be interpreted.
Resolves #768.

@thrix, @lukaszachy, @FrNecas, @happz, one minute review, please. Just a short update of the hw spec with status and units.

+1, LGTM.


x448_test.json contains 57-byte public keys?

The RFC says the keys must be 56 bytes. Have I missed something?

Thanks,
the test vectors should be invalid (not acceptable). I'll change this.


publish the junit test results in the jenkins UI

do we need to actually pull the results file back from the worker node ?

@kbsingh good question.. :)

-1 to merge.


AST: Rename VarDecl::getType() to VarDecl::getTypeInContext()

This is a futile attempt to discourage future use of getType() by giving it a "scary" name.
We want people to use getInterfaceType() like with the other decl kinds.

https://github.com/apple/llvm-project/pull/7150
@swift-ci Please smoke test

https://github.com/apple/swift/pull/67737
https://github.com/apple/llvm-project/pull/7150
@swift-ci Please smoke test

https://github.com/apple/llvm-project/pull/7150
@swift-ci Please smoke test


[WIP] [PoC] Bail Early in And Filter Operator When Possible

Testing unit tests

Codecov Report
Attention: Patch coverage is 0% with 31 lines in your changes missing coverage. Please review.

Project coverage is 34.44%. Comparing base (59551e4) to head (669e95c).
Report is 1497 commits behind head on master.

Files with missing lines
Patch %
Lines

...che/pinot/core/operator/docidsets/AndDocIdSet.java
0.00%
10 Missing :warning:

...va/org/apache/pinot/core/common/BlockDocIdSet.java
0.00%
5 Missing :warning:

.../pinot/core/operator/docidsets/BitmapDocIdSet.java
0.00%
5 Missing :warning:

.../pinot/core/operator/filter/AndFilterOperator.java
0.00%
4 Missing :warning:

...or/dociditerators/ExpressionScanDocIdIterator.java
0.00%
1 Missing :warning:

...r/dociditerators/RangelessBitmapDocIdIterator.java
0.00%
1 Missing :warning:

...e/pinot/core/operator/docidsets/EmptyDocIdSet.java
0.00%
1 Missing :warning:

...ot/core/operator/docidsets/ExpressionDocIdSet.java
0.00%
1 Missing :warning:

...inot/core/operator/docidsets/MatchAllDocIdSet.java
0.00%
1 Missing :warning:

...re/operator/docidsets/RangelessBitmapDocIdSet.java
0.00%
1 Missing :warning:

... and 1 more

:exclamation:  There is a different number of reports uploaded between BASE (59551e4) and HEAD (669e95c). Click for more details.
HEAD has 53 uploads less than BASE

Flag
BASE (59551e4)
HEAD (669e95c)

integration
7
0

integration2
3
0

temurin
12
1

java-21
7
1

skip-bytebuffers-true
3
0

skip-bytebuffers-false
7
1

unittests
5
1

unittests1
2
0

java-11
5
0

unittests2
3
1

integration1
2
0

custom-integration1
2
0

Additional details and impacted files
@@              Coverage Diff              @@
##             master   #14700       +/-   ##
=============================================
- Coverage     61.75%   34.44%   -27.31%
- Complexity      207      810      +603
=============================================
  Files          2436     2706      +270
  Lines        133233   149241    +16008
  Branches      20636    22878     +2242
=============================================
- Hits          82274    51403    -30871
- Misses        44911    93701    +48790
+ Partials       6048     4137     -1911

Flag
Coverage Δ

custom-integration1
?

integration
?

integration1
?

integration2
?

java-11
?

java-21
34.44% <0.00%> (-27.19%)
:arrow_down:

skip-bytebuffers-false
34.44% <0.00%> (-27.31%)
:arrow_down:

skip-bytebuffers-true
?

temurin
34.44% <0.00%> (-27.31%)
:arrow_down:

unittests
34.44% <0.00%> (-27.31%)
:arrow_down:

unittests1
?

unittests2
34.44% <0.00%> (+6.71%)
:arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Added toggleSize option to L.Control.Legend

This should add a programmatic way of addressing #107 though the toggleSize option, which per default is set to true leaving default behaviour in line with what it currently is.

@joakimkejser This looks good to me.  The only change I might make would be stopping propagation for mouse events in all cases, but it's not a big deal and I can make that change.  Thanks for implementing!


Fetch 10 latest transactions

This PR is about fetching 10 lastest transactions.


require('cutorch') does not work

Hi,
My system is MAC OS 10.10.4
I installed cutorch and cunn using "luarocks install cutorch/cunn". There was no error during this process and at the end it showed that cutorch/cunn is installed in ....
But when I call require('cutorch/cunn'), it gives the error:
/usr/local/share/lua/5.1/trepl/init.lua:363: /usr/local/share/lua/5.1/trepl/init.lua:363: /usr/local/share/lua/5.1/cutorch/init.lua:2: cannot load '/usr/local/lib/lua/5.1/libcutorch.so'
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/trepl/init.lua:363: in function 'require'
[string "_RESULT={require('cunn')}"]:1: in main chunk
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/trepl/init.lua:630: in function 'repl'
/usr/local/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk
[C]: at 0x0107d8a530
require('nn') just works fine, only 'cutorch' and 'cunn'.
I installed CUDA 6.5 driver and samples could be compiled correctly.
Anyone know how to solve this problem? Thanks

You've done a non-standard install (did not follow our instructions on torch.ch ), i.e. you installed torch global to the system and not local to ~/ .
While that is not usually a problem, it's really now up to you to debug. There could be so many things weird going on. First step is to see the install log and see why /usr/local/lib/lua/5.1/libcutorch.so does not exist.

I checked. Both libcutorch.so and libcunn.so is in folder usr/local/lib/lua/5.1. I will reinstall torch again. Thanks.

if you are reinstalling torch, please used https://github.com/torch/ezinstall/blob/master/clean-old.sh to clean up your old installation.

Still the sam problem...
/Users/mingtu/torch/install/share/lua/5.1/trepl/init.lua:363: /Users/mingtu/torch/install/share/lua/5.1/cutorch/init.lua:2: cannot load '/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so'
stack traceback:
[C]: in function 'error'
/Users/mingtu/torch/install/share/lua/5.1/trepl/init.lua:363: in function 'require'
[string "_RESULT={require('cutorch')}"]:1: in main chunk
[C]: in function 'xpcall'
/Users/mingtu/torch/install/share/lua/5.1/trepl/init.lua:630: in function 'repl'
...ngtu/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:185: in main chunk
[C]: at 0x01000431c0
I can still find libcutorch in folder /Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so

what's the output for the command:
luajit -l libcutorch

also for the command:
luajit -l torch -l libcutorch

luajit -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find:
/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #20 length (0) too small in /Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x010fe58dd0
[C]: at 0x010fe583f0
[C]: at 0x010fe2a1c0
luajit -l torch -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find:
/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #20 length (0) too small in /Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x01062dadd0
[C]: at 0x01062da3f0
[C]: at 0x01062ac1c0

I'm trying this:
https://github.com/torch/cutorch/issues/126

great, that might fix it.

Still doesn't work. After updating cmake, do I need to reinstall torch?

after updating cmake, you'll have to reinstall cutorch / cunn:
luarocks install cutorch
luarocks install cunn

Yes. I did that. But same error occurs...

what CUDA version are you running? can you upgrade to CUDA 7.0 (or even 7.5), that fixes these OSX compile issues to a large extent. CUDA on OSX used to be pretty buggy on the compiler chain till 6.5

luajit -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found. Did find:
/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in /Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x010fe58dd0
[C]: at 0x010fe583f0
[C]: at 0x010fe2a1c0
luajit -l torch -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found. Did find:
/Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in /Users/mingtu/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x01062dadd0
[C]: at 0x01062da3f0
[C]: at 0x01062ac1c0
Almost the same but "load command #20" changes to "#19"

I use cuda 6.5. I will try to upgrade to 7.0.

Thanks. It works now :+1:

Hi I have updated to CUDA 7.5 and I am getting same error when do
require 'cunn'
luajit -l torch -l libcutorch
luajit: error loading module 'libcutorch' from file '/usr/local/torch/install/lib/lua/5.1/libcutorch.so':
libcudart.so.7.0: cannot open shared object file: No such file or directory
stack traceback:
[C]: at 0x0047a410
[C]: at 0x0046ab90
[C]: at 0x00406670

I've got the same problem as @jbansal .

Hi nmeln,
Please check your LD_LIBRARY_PATH setting. I had this problem as it was pointing to old lua folder and it is installed in new folder. So, once I set this LD_LIBRARY_PATH, it solved my problem.
Regards,
Jitendra Bansal

@jbansal Thank you for the answer.
I think the reason why there was a problem is that I installed CUDA 7.5 after installing torch.
And it turned out that cmake in my system was outdated (2.x) so I updated it.
Then I cleaned-up (using the official script) and reinstalled torch.
Everything works now!

@nmeln Unfortunately, I install torch after CUDA 7.5, with the cmake version 3.3.2, but I'v also met the exactly same problem.......

And: My env is: OSX10.10.5, Xcode6.1.1, CUDA7.5, cmake 3.3.2
localhost:torch zhoudongbin$ luajit -l torch -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/zhoudongbin/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/zhoudongbin/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find:
/Users/zhoudongbin/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in /Users/zhoudongbin/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x010e2c06d0
[C]: at 0x010e2bfcf0
[C]: at 0x010e291770

Running OSX 10.11.2, CUDA7.5, cmake 3.4.3 and getting:
luajit -l torch -l libcutorch
luajit: error loading module 'libcutorch' from file '/Users/roeeaharoni/torch/install/lib/lua/5.1/libcutorch.so':
dlopen(/Users/roeeaharoni/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find:
/Users/roeeaharoni/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in /Users/roeeaharoni/torch/install/lib/lua/5.1/libcutorch.so
stack traceback:
[C]: at 0x010b437260
[C]: at 0x010b436880
[C]: at 0x010b4081d0

@roeeaharoni have you been able to resolve this issue? I'm running into the same issue.
Environment:

OSX10.11
Xcode 6.2 to be compatible with CUDA 7.5.20
CUDA 7.5.20
cmake 3.5.0

When I run luajit -l torch -l libcutorch - I've removed my username for brevity.
luajit: error loading module 'libcutorch' from file '~/torch/install/lib/lua/5.1/libcutorch.so': 	dlopen(~/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find: 	~/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in ~/torch/install/lib/lua/5.1/libcutorch.so stack traceback: 	[C]: at 0x0104946260 	[C]: at 0x0104945880 	[C]: at 0x01049171d0
When I run $ luajit -l libcutorch:
luajit: error loading module 'libcutorch' from file '/Users/matthewdunn/torch/install/lib/lua/5.1/libcutorch.so': 	dlopen(/Users/matthewdunn/torch/install/lib/lua/5.1/libcutorch.so, 6): no suitable image found.  Did find: 	/Users/matthewdunn/torch/install/lib/lua/5.1/libcutorch.so: malformed mach-o image: load command #19 length (0) too small in /Users/matthewdunn/torch/install/lib/lua/5.1/libcutorch.so stack traceback: 	[C]: at 0x0109aae260 	[C]: at 0x0109aad880 	[C]: at 0x0109a7f1d0
I pretty sure I've done a completely standard install as I did it on a clean install of OSX 10.11
Any help will be greatly appreciated.

Try sudo bash /torch/update.sh

Hi Guys, I am trying to run a .lua code with Torch7, I came across these errors, I would be really appreciative if someone can help me:
/home/angizi/torch/install/bin/luajit: /home/angizi/torch/install/share/lua/5.1/trepl/init.lua:389: module 'cutorch' not found:No LuaRocks module found for cutorch
no field package.preload['cutorch']
no file '/home/angizi/.luarocks/share/lua/5.1/cutorch.lua'
no file '/home/angizi/.luarocks/share/lua/5.1/cutorch/init.lua'
no file '/home/angizi/torch/install/share/lua/5.1/cutorch.lua'
no file '/home/angizi/torch/install/share/lua/5.1/cutorch/init.lua'
no file '/home/angizi/.luarocks/share/lua/5.2/cutorch.lua'
no file '/home/angizi/.luarocks/share/lua/5.2/cutorch/init.lua'
no file '/home/angizi/torch/install/share/lua/5.2/cutorch.lua'
no file '/home/angizi/torch/install/share/lua/5.2/cutorch/init.lua'
no file './cutorch.lua'
no file '/home/angizi/torch/install/share/luajit-2.1.0-beta1/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch.lua'
no file '/usr/local/share/lua/5.1/cutorch/init.lua'
no file '/home/angizi/.luarocks/lib/lua/5.1/cutorch.so'
no file '/home/angizi/torch/install/lib/lua/5.1/cutorch.so'
no file '/home/angizi/torch/install/lib/cutorch.so'
no file '/home/angizi/.luarocks/lib/lua/5.2/cutorch.so'
no file '/home/angizi/torch/install/lib/lua/5.2/cutorch.so'
no file './cutorch.so'
no file '/usr/local/lib/lua/5.1/cutorch.so'
no file '/usr/local/lib/lua/5.1/loadall.so'
stack traceback:
[C]: in function 'error'
/home/angizi/torch/install/share/lua/5.1/trepl/init.lua:389: in function 'require'
main.lua:11: in main chunk
[C]: in function 'dofile'
...gizi/torch/install/lib/luarocks/rocks/trepl/scm-1/bin/th:150: in main chunk
[C]: at 0x00406670
Please help me

I'm getting the same error. The machine in question has an existing global torch installation. I have no root authority so I have to install luarocks packages locally. I find the code to be calling the cutorch.so in the global torch directory, instead of the local directory I installed it too.  I suspect other packages I installed has conflicts with global cutorch. I could have installed the entire torch myself but this system has RHEL 6.0 which does not support "bash install-deps". These get me stuck!

@chaopengshen the install-deps script just install dependencies for torch, if torch is already installed somewhere else, these dependencies are already installed, you can skip this step and just run the ./install.sh script.


The specified language version is too high. The highest supported language version is 3.2

Flutter version => 3.16.5
Dart Version  => 3.2.3
ffi version => ^2.1.0
After this commit, I cannot build the project. I am getting the error I shared in the picture.
If I reference the previous commit in the pubspec.yaml file, I can build a project.

Do you have a valid dependency resolution -- dart pub get?

or flutter pub get (this can be very important after upgrading/downgrading the flutter SDK or changing flutter channel).

If you set your dependency to ffi: ^2.2.0 it should not resolve to 2.2.1 because 2.2.1 has an SDK constraint of sdk: '>=3.3.0-279.1.beta <4.0.0'. What steps did get you this error message?

@dcharkes

flutter clean
flutter pub get
flutter pub upgrade
flutter build apk

in pubspec.lock file, ffi version is showing these

And the contents of your pubspec.yaml?

@jonasfj Does pub upgrade not respect SDK constraints?

@dcharkes

@jonasfj Does pub upgrade not respect SDK constraints?
It does

I found why. This result is obtained due to the ''^" character. If I give 2.1.0 instead of ^2.1.0, such a problem does not occur. The version information appears as 2.1.0 in the pubspec.lock file.
@jonasfj @dcharkes

The image in https://github.com/dart-lang/ffi/issues/231#issuecomment-1893900557 suggests you've overwritten the dependency constraint.
If you use dependency_overrides you're on your own. Packages might not be compatible.
See: https://dart.dev/tools/pub/dependencies#dependency-overrides

In this case ffi 2.1.1 is not compatible with Dart 3.2. If you use pub get (and don't have overrides), you'll never get ffi 2.1.1, because Dart 3.2 doesn't satisfy the SDK constraint in 2.1.1.
You just need to have a dependency on ffi: ^2.1.0, if you try to do ffi: ^2.1.1 you'll get a conflict, if you resolve the conflict using a dependency_override, you've explicitly said you don't care they are not compatible. When you don't care about that, you are liable to get weird bugs.

I found why. This result is obtained due to the ''^" character. If I give 2.1.0 instead of ^2.1.0, such a problem does not occur. The version information appears as 2.1.0 in the pubspec.lock file.

That's probably wrong.
More likely you have a dependency_override.

I found why. This result is obtained due to the ''^" character. If I give 2.1.0 instead of ^2.1.0, such a problem does not occur. The version information appears as 2.1.0 in the pubspec.lock file.

That's probably wrong.
More likely you have a dependency_override.

The reason I use dependency override is the ffi version incompatibility between the other packages I use. I was using override in the same way before.
When I set the ffi version as I said, I can build.
https://dart.dev/tools/pub/dependencies#caret-syntax

if you set it to 2.1.0 then yet it'll build.
Hopefully, you won't need dependency_overrides, if you need it for other packages consider resolving that.
And always report dependency_overrides when filing bugs. If you use dependency_overrides getting weird errors not necessarily a bug :rofl:

To be clear: 2.1.0 just means you're forcing the version. Instead of taking a version constraint.
If using dependency_overrides that makes sense, you're essentially doing version resolution manually.


Teos-client register  timeout

Hi there. I'm running into an issue when I try to register an appointment from the teos-client.
It seems that the API receives the register request, but then the request times out.
Here are the logs from the server:
13/10/2020 18:26:20 [API] Received register request  (from_addr=<IP_ADDRESS>)
[2020-10-13 14:26:50 -0400] [31893] [CRITICAL] WORKER TIMEOUT (pid:31902)
[2020-10-13 14:26:51 -0400] [31902] [INFO] Worker exiting (pid: 31902)
[2020-10-13 14:26:51 -0400] [31930] [INFO] Booting worker with pid: 31930
13/10/2020 18:26:51 [API] Initialized. Serving at localhost:9814

Umm, never seen that one before. Looks like gunicorn is timing out indeed.
Can you add debug log level to https://github.com/talaia-labs/python-teos/blob/master/teos/teosd.py#L269-L277 so hopefully we can have a more detailed trace? Like so:
self.api_proc = subprocess.Popen(
    [
        "gunicorn",
        f"--bind={api_endpoint}",
        f"teos.api:serve(internal_api_endpoint='{self.internal_api_endpoint}', "
        f"endpoint='{api_endpoint}', logging_port='{logging_port}', "
        f"min_to_self_delay='{self.config.get('MIN_TO_SELF_DELAY')}')",
        "--log-level debug",
    ]
)

Then run the tower, try to register and add the logs from the point you start:
13/10/2020 20:16:53 [Daemon] Tower identity found. Loading keys
[...]

sure thing, unfortunately doesn't look like it adds any more info:

14/10/2020 05:33:31 [Daemon] Tower identity found. Loading keys
14/10/2020 05:33:31 [Daemon] tower_id = 0230b267961623a4d82264c5aee3fa3fc77fe093cdcaa9b411aed94dc92b2fb8ed
14/10/2020 05:33:31 [Daemon] Starting TEOS
14/10/2020 05:33:31 [Daemon] Fresh bootstrap
14/10/2020 05:33:31 [Daemon] Internal API initialized. Serving at localhost:50051
[2020-10-14 01:33:31 -0400] [11998] [INFO] Starting gunicorn 20.0.4
[2020-10-14 01:33:31 -0400] [11998] [INFO] Listening at: http://<IP_ADDRESS>:9814 (11998)
[2020-10-14 01:33:31 -0400] [11998] [INFO] Using worker: sync
[2020-10-14 01:33:31 -0400] [12001] [INFO] Booting worker with pid: 12001
14/10/2020 05:33:31 [API] Initialized. Serving at localhost:9814
14/10/2020 05:33:31 [RPC] Initialized. Serving at localhost:8814
14/10/2020 05:34:26 [API] Received register request  (from_addr=<IP_ADDRESS>)
[2020-10-14 01:34:56 -0400] [11998] [CRITICAL] WORKER TIMEOUT (pid:12001)
[2020-10-14 01:34:57 -0400] [12001] [INFO] Worker exiting (pid: 12001)
[2020-10-14 01:34:57 -0400] [12059] [INFO] Booting worker with pid: 12059
14/10/2020 05:34:57 [API] Initialized. Serving at localhost:9814

I've been reading a bit about why this can happen with gunicorn and it seems to be tricky. Normally is either regarding low resources or the requests taking to long to compute, but I'd rule out the latter given the requests is rather trivial.
I'll dig a bit deeper to see if I can reproduce. What are you running it on?

Thanks! I'm running on Ubuntu 18.04
I just sprinkled some print statements throughout and it looks like it reaches line 159 of api.py but never gets inside register of the Internal API? So maybe grpc is taking a long time for some reason and that's leading to the timeout?

Fixed it. Setting the environment variable GRPC_DNS_RESOLVER=native did the trick.
Found in here: https://github.com/grpc/grpc/issues/24018

Interesting. I'll subscribe there to see how it ends up being resolved. Will leave this open until a solution if found then so we can use GRPC_DNS_RESOLVER=native for now if someone faces this issue.


Regex

I'm not sure what this line matches. Would it not match .j files and .js files. Please clarify.

that's exactly right, it will match .j or .js at the end of a string

Oh, okay, thanks for clarifying. I could save my files with a .j extension.


Remove the Numpy Dependency from CMake and Revert Boost Config

This PR reverts a change in the Boost config to go back to the old method. The following section was found in the old config code:
  if (NOT Boost_ADDED)
    # Now add it to the list of packages to install
    rapids_export_package(INSTALL Boost
      ${PROJECT_NAME}-core-exports
      GLOBAL_TARGETS Boost::context Boost::fiber Boost::hana Boost::filesystem Boost::system
    )

    # Overwrite the default package contents
    file(WRITE "${CMAKE_BINARY_DIR}/rapids-cmake/${PROJECT_NAME}-core-exports/install/package_Boost.cmake" "find_dependency(Boost REQUIRED COMPONENTS context fiber filesystem system)")
  endif()

It's not immediately clear what this is doing, and its too risky to remove or blindly add back in at this point. Will need to readdress this after release.
MRC Conda build tested locally and working with this PR

Actually MRC docs now broken. Reverting UCX as well.

/merge


Support of py vers 3.11 and 3.12

Is python<3.11 a hard requirement, or can it be loosened? Consider checking 3.12, too.

python versions from 3.8 until 3.12 are supported now as of commit 701c233b919b4020140574de070e78a4392fa6ec


M1 support

Added

new arm simulator targets: macosArm64, iosSimulatorArm64, watchosSimulatorArm64, tvosSimulatorArm64

Changed

kotlin version to 1.6.20
gradle 7.4.2

Fixed

desktop (arm64, x64, and x86) binaries need to be packed in a fat framworks building XCFramworks (Thanks to @luca992)

@ge-org can we please have this merged and released?
it would unblock a bunch of us who want to start either building KMP for arm64, or simply want debug symbols when debugging an iOS app on a device (instead of of the simulator). I suppose it'd also unblock people who want to debug on the simulator on an M1 mac.

Hello, @dstranz! Any luck on this? My team needs M1 support, so we're deciding if we should just add it ourselves and fork the repo here.

Hello, @dstranz! Any luck on this? My team needs M1 support, so we're deciding if we should just add it ourselves and fork the repo here.

Hello 👋🏻
I'm also waiting for merging M1 support to released version of this Gradle plugin.
Maybe you should ask project owner about future plans for this task?

I managed to get this working by uploading a built jar to our internal maven repo.
But the createXCFramework task now fails with

Both 'ios-arm64-simulator' and 'ios-x86_64-simulator' represent two equivalent library definitions.

I see that this is coming from xcodebuild, and not this plugin. But, does anyone with more xcode experience know if I'm doing anything wrong?

I also noticed that iosArm64 and iosX64 builds in the build folder contain both a debugFramework as well as a releaseFramework. But, iosSimulatorArm64 only has a releaseFramework.
this is how I've enabled ios builds in my gradle file:
kotlin {
  ....
  listOf(
    iosX64(),
    iosArm64(),
    iosSimulatorArm64()
  ).forEach {
    it.binaries.framework {
      ....
    }
  }
  ....
}

How can I get the debugFramework for iosSimulatorArm64?
I assume I need that to be able to see compile and debug any app using this xcframework.

I've just see that there is a new JetBrains plugin for creating XCFramework. That maybe a good replacement for this plugin. It looks like that in new created project:
import org.jetbrains.kotlin.gradle.plugin.mpp.apple.XCFramework

plugins {
    kotlin("multiplatform")
    id("com.android.library")
}

kotlin {
    android()

    val xcf = XCFramework()
    listOf(
        iosX64(),
        iosArm64(),
        //iosSimulatorArm64() sure all ios dependencies support this target
    ).forEach {
        it.binaries.framework {
            baseName = "MyLibrary"
            xcf.add(this)
        }
    }

    sourceSets {
        val commonMain by getting
        val commonTest by getting {
            dependencies {
                implementation(kotlin("test-common"))
                implementation(kotlin("test-annotations-common"))
            }
        }
        val androidMain by getting
        val androidTest by getting {
            dependencies {
                implementation(kotlin("test-junit"))
                implementation("junit:junit:4.13.2")
            }
        }
        val iosX64Main by getting
        val iosArm64Main by getting
        //val iosSimulatorArm64Main by getting
        val iosMain by creating {
            dependsOn(commonMain)
            iosX64Main.dependsOn(this)
            iosArm64Main.dependsOn(this)
            //iosSimulatorArm64Main.dependsOn(this)
        }
        val iosX64Test by getting
        val iosArm64Test by getting
        //val iosSimulatorArm64Test by getting
        val iosTest by creating {
            dependsOn(commonTest)
            iosX64Test.dependsOn(this)
            iosArm64Test.dependsOn(this)
            //iosSimulatorArm64Test.dependsOn(this)
        }
    }
}

android {
    compileSdk = 31
    sourceSets["main"].manifest.srcFile("src/androidMain/AndroidManifest.xml")
    defaultConfig {
        minSdk = 21
        targetSdk = 31
    }
}

Thanks @dstranz. With this new plugin, where is the generated framework after running a ./gradlew build?

@adamwaite Under the build folder you will have fat-framework and XCFrameworks. XCFrameworks/release is exactly what you need.
This is my setup
    val xcf = XCFramework("YourLibName")
    listOf(
        iosX64(),
        iosArm64(),
        iosSimulatorArm64()
    ).forEach { target ->
        target.binaries.framework {
            baseName = "YourLibName"
            xcf.add(this)
        }
    }

    sourceSets {
        val commonMain by getting
        val androidMain by getting
        val androidTest by getting
        val iosX64Main by getting
        val iosArm64Main by getting
        val iosSimulatorArm64Main by getting
        val iosMain by creating {
            dependsOn(commonMain)
            iosX64Main.dependsOn(this)
            iosArm64Main.dependsOn(this)
            iosSimulatorArm64Main.dependsOn(this)
        }
    }

And you can build it using next gradle command:
./gradlew shared:assembleYourLibNameXCFramework

@ge-org What's stopping from merging this?

Has anyone published the fork of this PR they are not maintaining this anymore?

Forked this pr and published it here 👍
    id("io.github.luca992.multiplatform-swiftpackage") version "2.0.3-arm64"

So turns out there's a few issues with this pr.
I'm running into this issue: https://developer.apple.com/forums/thread/666335
Before making an XCFramwork: arm64, x64, and x86 binaries need to be packed in a fat framework 🙃
I'm gonna make a pr for your fork to include the fixes @lyndseypenman

Working build:
pluginManagement {
    repositories {
        maven ("https://s01.oss.sonatype.org/content/repositories/releases/")
    }
}

id("io.github.luca992.multiplatform-swiftpackage") version "2.0.4-arm64"

@luca992 Thanks, I will look at it tomorrow!

Works great here!:

Sorry to poke you again @ge-org

Is it possible these changes doesn't honour multiplatformSwiftPackage.outputDirectory?

Is it possible these changes don't honour multiplatformSwiftPackage.outputDirectory?

how can i use this fork since the original one is abandoned?

Created a new release with the latest changes for this pr:
pluginManagement {
    repositories {
        maven ("https://s01.oss.sonatype.org/content/repositories/releases/")
    }
}

id("io.github.luca992.multiplatform-swiftpackage") version "2.0.5-arm64"

thanks @luca992 . can't seem to use it yet:

Plugin Repositories (could not resolve plugin artifact 'io.github.luca992.multiplatform-swiftpackage:io.github.luca992.multiplatform-swiftpackage.gradle.plugin:2.0.6-arm64')

@markst If you tried immediately it probably was indexed yet. Should be up now I think: https://repo1.maven.org/maven2/io/github/luca992/multiplatform-swiftpackage/io.github.luca992.multiplatform-swiftpackage.gradle.plugin/

its working! thanks

Hi there, any news on this PR?
I do experiment this issue and the fix @luca992 provided is working fine on my side, but it is still a little bit hacky to use a fork for this fix instead of an approved release.

Hi there, any news on this PR?
I do experiment this issue and the fix @luca992 provided is working fine on my side, but it is still a little bit hacky to use a fork for this fix instead of an approved release.

Idk not up to me 🤷♂.
Ps. The macos fat framework workaround can now be removed on kotlin 1.8 dev builds.
https://youtrack.jetbrains.com/issue/KT-47355/Support-macos-target-for-FatFramework-task

@luca992 changes are working also fine on my side. So what is still the issue with integrating the changes?
Does someone need to make the Travis CI job happy?

kotlin 1.8.0-beta is out, that macos fat framework workaround now could probably be removed now to match all the other targets.

They clearly aren't maintaining this. I updated my fork with a new release using kotlin 1.8.0 that removes my hacky macOs fat framework workaround. I don't see the point in submitting more pr updates here until someone responds, and I will just maintain my own fork 🙃.
// settings.gradle.kts
pluginManagement {
  repositories {
    maven ("https://s01.oss.sonatype.org/content/repositories/releases/")
  }
}

// build.gradle.kts
plugins {
  id("io.github.luca992.multiplatform-swiftpackage") version "2.1.0"
}

Hey @luca992 - Just playing around with your fork on a new project. After running gradlew createSwiftPackage and then fetching the package remotely in my xcode project i'm getting this error:
Missing path (/Users/.../Library/Developer/Xcode/DerivedData/project/SourcePackages/checkouts/kmmtest/shared.xcframework/ios-arm64_x86_64-simulator/dSYMs) from XCFramework 'shared.xcframework' as defined by 'DebugSymbolsPath' in its Info.plist file
I'm not sure if this directly relates to your fork.
But here's the project .

@LukeSmith16 yeah idk off hand. I'll take a look.
One thing to note... Sometimes I have to run createSwiftPackage twice, as the first run sometimes doesn't generate all the files. I'm not sure why exactly or even if my forks changes are to blame. I haven't had time to look into it yet. Maybe try that, and see if that helps?

@luca992 Thanks for the reply! Yeah so if i drag the package locally into xcode it works fine. It's just when i fetch it remotely it can't locate the dsyms. I thought this could have been .gitignore not including the dsym files, but it's not 😢 - I will keep trying to figure out why this isn't working for me but maybe i think it's not related to your fork as it's working locally fine.

@LukeSmith16 yeah idk off hand. I'll take a look.
One thing to note... Sometimes I have to run createSwiftPackage twice, as the first run sometimes doesn't generate all the files. I'm not sure why exactly or even if my forks changes are to blame. I haven't had time to look into it yet. Maybe try that, and see if that helps?
@LukeSmith16 you didn't check-in the files in the dsyms folder.

My project for reference:
https://github.com/eqoty-labs/secretk

@luca992 Yeah i'm having to check those dsym files in manually at the moment. I don't know why GIT isn't picking them up 🤔 - But yeah i got it working after manually checking them in, thanks for the help 👍

Hey dear, I still don't understand if this problem is solved or not, I still have a problem (((
please help me @jizoquval @


New package: TekkaGB.FileDaddy version 1.5.6

[ ] Have you signed the Contributor License Agreement?
[ ] Have you checked that there aren't other open pull requests for the same manifest update/change?
[ ] This PR only modifies one (1) manifest
[ ] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[ ] Does your manifest conform to the 1.4 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Microsoft Reviewers: codeflow:open?pullrequest=https://github.com/microsoft/winget-pkgs/pull/111884&drop=dogfoodAlpha

This package installs normally, but doesn't appear to do anything when launched. Is this expected?

This package installs normally, but doesn't appear to do anything when launched. Is this expected?

@stephengillie - if you use start filedaddy it shows this popup. This indicates two things. First, that there is a .NET dependency, and second, because the start was required to launch the program, it depends on DLL's that aren't available by symlink - meaning it is zip-binary.

/AzurePipelines run

[Policy] Blocking-Issue

@upintheairsheep - Support for zipped binaries has now been added and is available in the pipelines. This will require you to update your submission to ManifestVersion: 1.9.0 and set ArchiveBinariesDependOnPath: true in the installer node. To keep things clean, this PR is being closed. Please submit a new PR for the latest version of this package. Thank you for your contributions!


WIP tenant size calculation: refactor, rewrite, and add SVG

Refactor the tenant_size_model code. Segment now contains just the minimum amount of information needed to calculate the size. Other information that is useful for building up the segment tree, and for display purposes, is now kept elsewhere. The code in 'main.rs' has a new ScenarioBuilder struct for that.
Calculating which Segments are "needed" is now the responsibility of the caller of tenant_size_mode, not part of the calculation itself. So it's up to the caller to make all the decisions with retention periods for each branch.
The output of the sizing calculation is now a Vec of SizeResults, rather than a tree. It uses a tree representation internally, when doing the calculation, but it's not exposed to the caller anymore.
I also refactored the way the recursive calculation is performed. With the previous coding, I wasn't quite sure what the complexity was, O(n) or something worse. I'm now pretty convinced it's O(n), where 'n' is the number of Segments.
Rewrite the code in size.rs that builds the Segment model. I got rid of the intermediate representation with Update structs. It now builds the Segments directly, with some local HashMaps and Vecs to track branch points to help with that.
retention_period is now an input to gather_inputs(), rather than an output.
Add 'size_debug' endpoint that displays an SVG file with the branches, as well as all the information needed by the model as JSON.
TODOs:

I broke the unit tests, I presume. I didn't run them. Fix them

I haven't tested the stand-alone tenant_size_model program at all after these changes. So that's likely broken too.

lots of misc cleanup

Rebased and worked some more on this.
In some cases, we are getting different results with this PR, compared to what's in 'main'. This PR makes it easier to reason about the calculation, and check that it's correct, and when I looked at the tests that broke because the new calculation produced different results, I concluded that the new calculation is correct. However, I have not debugged why exactly the old code produced different results. At a high level, the logic should not have changed, so I believe the current code in 'main' has bugs that this fixes. It bothers me a little that I don't know what those bugs are, but not enough to actually spend the time debugging them.

One such case is 'test_single_branch_get_tenant_size_grows'. That's still failing, I didn't change the "expected output" of that. In a nutshell, it does this:

INSERT some rows
INSERT some rows
INSERT some rows
UPDATE some rows
UPDATE some rows
UPDATE some rows
And between each step, it checks that the synthetic size grows. However, I don't think that's correct, and with this PR, the synthetic size stops growing after the first UPDATE. The reason is that the test has a fixed GC horizon, and the UPDATEs merely move forward the amount of WAL that needs to be retained. Graphically:
After first UPDATE:
------============>
    ^   ^   ^   ^
    |   |   |   |
   INS INS INS UPD

After second UPDATE:
----------============>
    ^   ^   ^   ^   ^
    |   |   |   |   |
   INS INS INS UPD UPD

However, the INSERTs are not very large. Each INSERT only inserts 100 rows. If they all fit on a single page, then the INSERT doesn't grow the logical database size at all. In that case, the total synthetic size is exactly the same after the second UPDATE, as it was after the first UPDATE. In both cases, it consists of the logical size at beginning of the GC horizon, plus the WAL in the GC horizon. The GC horizon is a fixed amount of bytes in this tests. So if the logical size didn't change between the INSERTs, the synthetic size doesn't change either.

I think there was an off-by-one kind of bug in the the unit test scenarios. Scenario 1, for example, previously reported 8000, but believe 6000 is correct. Similarly, scenario 2 previously reported 9000, now 7000. I'm not entirely sure if this was a bug in the tests, or in the code.

Scenario 6 in the unit tests now produce a very different result. It was about 333 MB previously, now 136 MB. Looking at the new calculation and the dump of the model and the calculation, I believe the new result is corret. But I have no idea why the old code got a different result.

There are some FIXMEs and a test failure, but I'd like to get some review of this. Do the new StorageModel and SizeResult representations make sense? What about the code that builds the StorageModel in pageserver/src/tenant/size.rs?

One such case is 'test_single_branch_get_tenant_size_grows'. That's still failing, I didn't change the "expected output" of that. In a nutshell, it does this:

I hacked the test to print out the model and the size calculation result after each INSERT and UPDATE batch. See test_output/test_single_branch_get_tenant_size_grows/size_debug.html after running the test.

Quick question before I start review.
Does this PR follow the documentation in PR #3328?

I addressed all review issues.
The only remaining issue is test_single_branch_get_tenant_size_grows

New API proposal:
/size calculates size and returns it a short json
/size?inputs_only doesn't calculate size, returns raw inputs
/size?retention_period calculates size, as if gc_horizon = retention_period
returns size + verbose json with segments & timeline_inputs
/size?svg returns html with SVG and verbose json
This will be removed as soon as we proper visualization.
svg and inputs_only are mutually exclusive
all parameters are debug only and won't be mentioned in openAPI spec.
@hlinnaka , @koivunej , WDYT?

Also since we settled on synthetic_size terminology, may be also change /size to /synthetic_size?

I suggest that we unify HTTP API endpoints.

retention period would probably be useful in the /size or /synthetic_size as well (needs an openapi adjustment).
Requester's Accept header could be inspected if they want an svg or json, would that work? Default on json, and return 406 on something else?

New API proposal:

+1

/size calculates size and returns it a short json
/size?inputs_only doesn't calculate size, returns raw inputs
/size?retention_period calculates size, as if gc_horizon = retention_period returns size + verbose json with segments & timeline_inputs
/size?svg returns html with SVG and verbose json This will be removed as soon as we proper visualization.
svg and inputs_only are mutually exclusive

Hmm, I guess you could print the SVG without calculating the sizes too. It would be just tree of inputs then. We don't really need it, though, so no need to spend much effort on it if it doesn't work naturally.

all parameters are debug only and won't be mentioned in openAPI spec.

There has been discussion on showing the size without history, i.e. with retention_period=0, in the console too.
+1 to @kelvich 's suggest for calling it synthehtic_size. All of the options, svg, retention_period, inputs_only, seem orthogonal. I suggest that we make them all independently settable:

I suggest that we unify HTTP API endpoints.
@duskpoet , what output format will be more convenient for you? plain json, I suppose?

so does /size returns an array of segments now, as json? That should suffice for the start


Incorrect java warning/error location in new Problems API

Current Behavior
Take something like...
public class WarningsCreator {

  private static int idx = 0;

  private void createIndirectAccessWarning() {
    int idx = new WarningsCreator().idx;
  }
}

with compile settings...
tasks.withType(JavaCompile).configureEach {
	options.compilerArgs << '-Xlint:all'
}

Java will throw a warning: static variable should be qualified by type name, WarningsCreator, instead of by an expression
The javax.tools.Diagnostic class will have the following position data for this warning...
    int idx = new WarningsCreator().idx;
              ^                               startPosition (in file)
                                      ^       endPosition (in file)
                                   ^          position (in file)
                                   ^          columnNumber (in line)

This is because Java sets startPosition and endPosition to the whole new WarningsCreator().idx range but it sets columnNumber, position to point to the start of .idx;
The offsetInFileLocation is being reported using startPosition and endPosition - startPosition (so the length is 25).  This is correct.
But the lineInFileLocation is being reported incorrectly because the length is calculated using endPosition - startPosition (i.e. 25) when it should be using endPosition - position (i.e. 4)
Expected Behavior
The length in lineInFileLocation should be correct
Context (optional)
Trying to highlight the errors/warning correctly in an IDE
Steps to Reproduce
Use the simple java snippet above with the xlint settings provided.
Gradle version
8.8-20240323001552+0000
Build scan URL (optional)
No response
Your Environment (optional)
Windows 11

The issue is in the backlog of the relevant team and is prioritized by them.

@hegyibalint Thanks for replying - no worries on timing.
I think the whole Java Diagnostic class is a bit bizarre as it reports a range and a position in the range.
startPosition -> endPosition is highlighting...
    int idx = new WarningsCreator().idx;
              ^^^^^^^^^^^^^^^^^^^^^^^^^

Whereas position is highlighting...
    int idx = new WarningsCreator().idx;
                                   ^

Both of the above are position in the file - nothing to do with line/column numbers.
According to https://docs.oracle.com/javase/8/docs/api/javax/tools/Diagnostic.html, position, lineNumber, columnNumber all relate to the same position and startPosition <= position <= endPosition
I guess you could use position->endPosition in offsetInFileLocation and then the length would have to be 4 but then you could also argue for using startPosition->position and the length would have to be 21.  I think using startPosition and endPosition is correct - so length of 25.
In lineInFileLocation you could just miss out the length, but from an IDE client point of view, a highlighted range is much easier to locate on the screen using length of endPosition - position
It's annoying the the compiler doesn't supply startLine, startColumn, endLine, endColumn as well.

I would need to run this on more warning examples, but when you look specifically at this warning:

static variable should be qualified by type name

I would argue that the .idx part is the emphasized part, as it causes the warning. Now if this is universal (i.e. end - position always marks at the "interesting" part) would need some trials, but I wouldn't be surprised if not. In this case, I think a new location could be introduced: a location which would mark a "point of interest" in the range of start..end.
That being said, I can also see that columnNumber doesn't have a per-line range (so you cannot say that in line X between column A..B there is an interesting point C)
I will think about this myself, but feel free to express what you think a consumer (i.e., a user looking at the editor) should see!

I think I've found a solid case when the length becomes position - start, it's a simple unnecessary cast:
public class UnusedVariableExample {
    public int calculate(int a, int b) {
        return (int)(a + b);
        //     ^  startPosition (in file)
        //                 ^  endPosition (in file)
        //     ^ position (in file)
        //     ^ columnNumber (in line)
    }
}

Meanwhile a bit unhappy realizing that probably we cannot pinpoint always the exact location, I can see that the offset and line+column location types are harmonized, which is much better.
I think I will carry on with the current solution in the PR, which seems to do already a good enough job.


doc: mention users of this project

Mentions which extensions are currently using the language server.

@yaegassy please confirm if you want to be listed here.

@ssbarnea  I've checked! Thank you for listing it!


security/acme-client: SSH remote command automation (#2757)

Draft PR that implements ACME action to trigger remote commands via SSH.
Implements #2757 using the infrastructure already in place for SFTP. Since it is a separate concern to run a command vs upload files it was implemented as separate action to not mix things (e.g. SSH connection vs SFTP connection).
To make this contribution useful, user-defined order of actions (like requested in #2833) should be in place so that one can upload first and trigger commands afterwards.
Current status: Needs more testing, but works in my environment.

@jkellerer, I've noticed a strange behaviour when using this to run a command on a remote FreeBSD server. For this test case I've tried to run the command sudo service cron restart (it's really just an example to demonstrate a service restart).
On FreeBSD restarting a service is pretty verbosely (when compared to systemd, which just prints nothing):
$ sudo service cron restart
Stopping cron.
Waiting for PIDS: 22875.
Starting cron.

Now when running this command as an Acme Client Automation, the cron daemon will be stopped instead of restarted:
$ sudo service cron status
cron is not running.

The OPNsense system log contains the following information:
2022-03-23T13:50:03+01:00 opnsense.example.com opnsense 28014 - [meta sequenceId="6"] AcmeClient: running automation (configd): run command on testhost
2022-03-23T13:50:03+01:00 opnsense.example.com opnsense 28030 - [meta sequenceId="7"] /usr/local/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php: SSH failed with '1': 'ssh' '-p' '22' '-oUser=testuser' '-oUserKnownHostsFile=/var/etc/acme-client/sftp-config/known_hosts' '-i' '/var/etc/acme-client/sftp-config/id.ecdsa' '-oPreferredAuthentications=publickey' '<IP_ADDRESS>' 'sudo' 'service' 'cron' 'restart' ; Cause: {"result":["Stopping cron."],"exit_code":1,"connect_failed":false}
2022-03-23T13:50:03+01:00 opnsense.example.com opnsense 28030 - [meta sequenceId="8"] /usr/local/opnsense/scripts/OPNsense/AcmeClient/run_remote_ssh.php: Command execution failed, exit code 1. Last input was: {"host":"<IP_ADDRESS>","host-key":"","port":"22","identity-type":"ecdsa","user":"testuser","run":"sudo service cron restart","automation-id":"623b1445490309.45057707"}

It looks like the execution of the sudo service crond restart command was interrupted after the first phase where it prints Stopping cron.
(It will also work the other way around: if the cron daemon is not running, then running the previously mentioned restart command will result in a running cron daemon. I'd assume this is the case because it does not run the first phase to stop the servce, but instead only runs the start command.)
However, the restart command can properly be executed if I add a & to the command: sudo service cron restart &.
@jkellerer, do you have an idea how this could be properly fixed?

That’s exactly the thing why I wrote it needs more testing, and thanks a lot for already trying it while it’s still marked as draft 👍. Had no time to perform more than very simple teste with a few commands, yet.
I’d assume the issue is in the loop to read stdout/stderr followed by close when no more data is returned. Did the command run for more than 30 seconds?

Did the command run for more than 30 seconds?

The command ran only for ~1 second. It seems to me that the command execution is aborted when the first newline is received...

Ready for review (the latest update simplified the implementation since SSH always treats the given argument as bash script, no need to tokenise it).

Forgot the most important thing... THANK YOU, @jkellerer! :)


renovate: configure ubuntu base image updates

major as feat with breaking change

refs:

#168
renovatebot/renovate#12509

Unsure what to do here


Optimize fe start logic

ISSUE #2051

@morningman Hi. This PR effect is big, please add more test if possible.

@morningman Hi. This PR effect is big, please add more test if possible.

It's OK, this CL does not change any meta date read/write format and logic, so it won't cause meta data error.
And I am running this branch on our stability test environment. I will not merge this PR until everything is OK.

@morningman Hi. This PR effect is big, please add more test if possible.

It's OK, this CL does not change any meta date read/write format and logic, so it won't cause meta data error.
And I am running this branch on our stability test environment. I will not merge this PR until everything is OK.

I see. OK. Thank you.

@kangkaisen Hi, do you need a further test of  this CL? My test goes well

@kangkaisen Hi, do you need a further test of this CL? My test goes well

I think I needn't, because I don't have special  test case for this CL and I believe you.


Strange behaviors using --aot and --prod

Short description of the problem:
I try to use a component that works perfectly (except for the caseC that is Ionic specific) in an Angular project based on @angular/cli version 1.2.6, using ng serve, ng serve --aot and ng serve --prod. In Ionic, some things work with --aot but not with --prod and the Ionic specific use case doesn't work at all, in a strange way.
What behavior are you expecting?

I would like to have the caseB (not Ionic specific) working as it works in the Angular project.
Of course, I also would like to have the caseC working.

Steps to reproduce:

Start a blank Ionic project

ionic start otf blank
cd otf

Create the following:

src/pages/ and src/pages/page/ directories and remove the src/pages/home/ one.
src/pages/page/page.html file with content:

<ion-header>
	<ion-navbar>
		<ion-title>page</ion-title>
	</ion-navbar>
</ion-header>
<ion-content padding>

</ion-content>

src/pages/page/page.module.ts file with content:

import { NgModule, Compiler } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { Page } from "./page";
import { JitCompilerFactory } from "@angular/compiler";

export function createJitCompiler() {
	return (new JitCompilerFactory([{ useDebug: false, useJit: true }]).createCompiler());
}

@NgModule({
	declarations: [Page],
	imports: [IonicPageModule.forChild(Page)],
	providers: [{ provide: Compiler, useFactory: createJitCompiler }],
	exports: [Page]
})
export class PageModule { }

src/pages/page/page.ts file with content:

import { Component, ViewContainerRef, Compiler, Injector, NgModuleRef, ViewChild, NgModule } from "@angular/core";
import { CommonModule } from "@angular/common";
import { IonicPage, IonicModule } from "ionic-angular";

@IonicPage()
@Component({
	selector: 'page',
	templateUrl: 'page.html',
})
export class Page {
	@ViewChild('viewContainerRef', { read: ViewContainerRef }) viewContainerRef: ViewContainerRef;
	constructor(
		private compiler: Compiler,
		private injector: Injector,
		private ngModuleRef: NgModuleRef<any>
	) { }
	ionViewDidLoad(){
		const caseA = {
			template: '{{name}}',
			getImports: (component) => []
		};
		const caseB = {
			template: '{{name}}',
			getImports: (component) => [CommonModule]
		};
		const caseC = {
			template: '<ion-item *ngIf="true">{{name}}</ion-item>',
			getImports: (component) => [CommonModule, IonicModule.forRoot(component)]
		};
		const { template, getImports } = caseA;
		//const { template, getImports } = caseB;
		//const { template, getImports } = caseC;

		const component = Component({ template })(class { });
		const ngModule = NgModule({ declarations: [component], imports: getImports(component) })(class { });
		this.compiler.compileModuleAndAllComponentsAsync(ngModule).then((factories) => {
			const factory = factories.componentFactories[0];
			const componentRef = factory.create(this.injector, [], null, this.ngModuleRef);
			componentRef.instance.name = 'Hello World!';
			this.viewContainerRef.insert(componentRef.hostView);
		});
	}
}

Update the application module, replacing

src/app/app.component.ts file's content by:

import { Component } from '@angular/core';
import { Platform } from 'ionic-angular';
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen';
import { Page } from "../pages/page/page";

@Component({
	templateUrl: 'app.html'
})
export class MyApp{
	rootPage: any = Page
	constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen){
		platform.ready().then(() => {
			statusBar.styleDefault();
			splashScreen.hide();
		});
	}
}

src/app/app.module.ts file's content by:

import { BrowserModule } from '@angular/platform-browser';
import { ErrorHandler, NgModule } from '@angular/core';
import { IonicApp, IonicErrorHandler, IonicModule } from 'ionic-angular';
import { SplashScreen } from '@ionic-native/splash-screen';
import { StatusBar } from '@ionic-native/status-bar';
import { MyApp } from './app.component';
import { PageModule } from "../pages/page/page.module";

@NgModule({
	declarations: [
		MyApp
	],
	imports: [
		BrowserModule,
		IonicModule.forRoot(MyApp),
		PageModule
	],
	bootstrap: [IonicApp],
	entryComponents: [
		MyApp
	],
	providers: [
		StatusBar,
		SplashScreen,
		{ provide: ErrorHandler, useClass: IonicErrorHandler }
	]
})
export class AppModule { }

Execute the following commands, similar results should be given:

For caseA : HTML templating

ionic cordova run android:

:smiley:: Works as expected.
deviceready event fired after 6145 ms

ionic cordova run android --aot:

:smiley:: Works as expected.
deviceready event fired after 492 ms

ionic cordova run android --prod:

:smiley:: Works as expected.
deviceready event fired after 940 ms

For caseB : Angular common modules integration

Comment the caseA line in src/pages/page/page.ts and uncomment the caseB line.
ionic cordova run android:

:smiley:: Works as expected.
deviceready event fired after 5954 ms

ionic cordova run android --aot:

:smiley:: Works as expected.
deviceready event fired after 571 ms (:heart_eyes:)

ionic cordova run android --prod:

:cry:: Trigger the error detailed in a next section.
deviceready event fired after 802 ms

For caseC : Ionic common modules integration

Comment the caseB line in src/pages/page/page.ts and uncomment the caseC line
ionic cordova run android:

:confused:: No errors but the created component is at least, not visible. If you confirm that what I do is correct but what I am facing is a bug in this case, I will explore deeper this behaviour if needed.
deviceready event fired after 6707 ms

ionic cordova run android --aot:

:confused:: Same behaviour as before : no errors but the created component is at least, not visible. If you confirm that what I do is correct but what I am facing is a bug in this case, I will explore deeper this behaviour if needed.
deviceready event fired after 6025 ms

ionic cordova run android --prod:

:cry:: Trigger the error detailed in a next section.
deviceready event fired after 908 ms

Which @ionic/app-scripts version are you using?
ionic info:
cli packages:

    @ionic/cli-plugin-cordova       : 1.5.0 (/home/hadrien-toma/otf/node_modules/@ionic/cli-plugin-cordova)
    @ionic/cli-plugin-ionic-angular : 1.4.0 (/home/hadrien-toma/otf/node_modules/@ionic/cli-plugin-ionic-angular)
    @ionic/cli-utils                : 1.6.0 (/home/hadrien-toma/otf/node_modules/@ionic/cli-utils)
    ionic (Ionic CLI)               : 3.6.0 (/home/hadrien-toma/otf/node_modules/ionic)

global packages:

    Cordova CLI : 7.0.1

local packages:

    @ionic/app-scripts : 2.1.3
    Cordova Platforms  : android 6.2.3
    Ionic Framework    : ionic-angular 3.6.0

System:

    Android SDK Tools : 26.0.2
    Node              : v6.11.1
    OS                : Linux 3.19
    npm               : 3.10.10

Other information: (e.g. stacktraces, related issues, suggestions how to fix, stackoverflow links, forum links, etc)
Error description
ERROR Error: Unexpected value 'function (){}' imported by the module 'function (){}'. Please add a @NgModule annotation.
    at Error (native)
    at _ (file:///android_asset/www/build/vendor.js:1:459821)
    at file:///android_asset/www/build/vendor.js:1:651225
    at Array.forEach (native)
    at t.getNgModuleMetadata (file:///android_asset/www/build/vendor.js:1:650930)
    at t._loadModules (file:///android_asset/www/build/vendor.js:1:755962)
    at t._compileModuleAndAllComponents (file:///android_asset/www/build/vendor.js:1:755726)
    at t.compileModuleAndAllComponentsAsync (file:///android_asset/www/build/vendor.js:1:755063)
    at t.ionViewDidLoad (file:///android_asset/www/build/main.js:1:520)
    at t._lifecycle

same here

My solution was to switch over Angular + Cordova and to forget Ionic :disappointed: ...

@hadrien-toma, how are you finding working with Angular & Cordova without Ionic?  Are you using ionic-native for the cordova-plugins-wrapped-as-angular-services, and just leaving out ionic-angular?

With Angular + Cordova only the code mentioned just works as it is. Concerning native APIs, you can use whatever Cordova plugins you want or Native Script or other native framework. But keep in mind that with that solution, Ionic is not used (you can try to use Ionic scripts without the rest of the framework but I didn't try that).


Added MauiAppBuilder extension method

Sorry if you already started this, just had some spare time to create a PR. #3
Tested against my project that's already using your NuGet, and all seems ok.
MauiAppBuilder? builder = MauiApp.CreateBuilder();
builder
    .UseMauiApp<App>()
    .UseMauiCommunityToolkit()
    .UsePageResolver()
    .ConfigureFonts(fonts =>
    {
        fonts.AddFont("OpenSans-Regular.ttf", "OpenSansRegular");
        fonts.AddFont("la-solid-900.ttf", "LASolid");
    });

return builder.Build();

Thanks for this, looks great! I will have to update the readme to reflect this usage. How much have you tested it? Any gotchas wrt the order of registering services vs. calling this method?

@matt-goldman Just did some testing.
You do need to make sure you register it after registering your services, otherwise, you get this error -

Everything else seams ok.

Thanks @IeuanWalker !


[Linter] Fix pylint

Description
Pylint released 36 minutes ago and it broke some stuff, again!
Development notes

Checklist

[x] Read the contributing guidelines
[ ] Opened this PR as a 'Draft Pull Request' if it is work-in-progress
[ ] Updated the documentation to reflect the code changes
[ ] Added a description of this change in the RELEASE.md file
[ ] Added tests to cover my changes

I'm folding this into https://github.com/quantumblacklabs/kedro/pull/1093


Add debug and valgrind to LLVM tests and config

This makes use of the --debug flag and adds a new flag --valgrind:

--debug: Use GCC's sanitization and other debugging flags (LLVM only for now)
--valgrind: Run the final executable using valgrind and disable optimizations during compilation. This is enabled by default for LLVM tests.

This will make a lot of LLVM tests fail (intended).

Sadly this means I cannot run tests anymore :(


Include instructions for adding deploy key

This PR is related to this issue.
It might be obvious to some, but it wasn't obvious for me that the deploy key needed to be added to the private repository that is being fetched by GHA as a private dependency.
I thought the deploy key needed to be added to the repository that triggers GHA.

Awesome, thank you!


Add reworked tests for Plan Adoption Leave

Trello
This converts the Plan Adoption Leave tests to use the node based testing
approach introduced in ADR-3.
⚠ This repo is Continuously Deployed: make sure you follow the guidance ⚠

Thanks for the comment and suggestions @kevindew 👍  All fixed up


Update gem at RubyGems

Currently there is just 0.3.2
I don't have rights to update it, which should be done with gem owner mongoid_search --add<EMAIL_ADDRESS>by any owner.
Gem build also fails because it requires file with name "VERSION" which is missing

When that's done, it'd be good to make proper tags and releases at github

I unassigned myself from here, happy to see this gem being maintained!

0.3.3 and 0.3.4 are now at RubyGems! Lets fix current problems and get done test coverage for last added features to release 0.4


Tiler refactor

This fix: #215
Furthermore it includes some new refactoring to avoid code fragment duplication and also uniforms names in the Tiler classes

Coverage remained the same at 100.0% when pulling 7dd2b7b7b2e5d378fcc0f17436a6aaa05837065d on refactor-score-tiler into f1c74aeb61c2f858fe8cbd54cdce1257970bf010 on master.

Coverage remained the same at 100.0% when pulling 7dd2b7b7b2e5d378fcc0f17436a6aaa05837065d on refactor-score-tiler into f1c74aeb61c2f858fe8cbd54cdce1257970bf010 on master.