Add test for process KSP Json subtypes. See #768

See https://github.com/micronaut-projects/micronaut-serialization/issues/768

@dstepanov Are you planned to fix it? I still have some tests disabled in micronaut openapi for KSP because of this bug :-(

@altro3 It works correctly, you need to have visible = false because the bird class doesn't have the class property

@dstepanov Then I have a question: why does this code work correctly with KAPT and java, but not only with KSP?

@dstepanov Tets should pass exactly with the configuration as I wrote. I think that KSP does not see the property class, because it is in the parent class

I just want to say: if a property is not in the constructor, it does not mean that the parent does not have the property. Yes, you will not be able to set values for these properties in the constructor, but you will be able to specify them additionally. In our case, like this:

Needs @field:JsonProperty(JSON_PROPERTY_PROPERTY_CLASS)

@dstepanov As you see, in case withou prefix @filed:,  @JsonProperty annotation was processed and DeserBean class found right information about discriminator property:

But why does the processing continue incorrectly?

I think I understand what the problem is and it is clearly in the lkotlin introspection, that is, in the core module.
In this case, the annotations specified in the superclass construct - Animal are ignored, but these annotations are also valid for fields. This was, among other things, the point of the KSP, to get rid of these stupid "field:" prefixes.

In short, it is necessary that the annotations specified in the superconstructor are added to the annotations of the fields. Otherwise, you get a hodgepodge - in one case you can omit the "field" prefix, and in others - not.

Good question, I think the annotation in the default variant is only added to the constructor and we only take field, getter and setter annotations to the final annotation metadata. You can debug and see. Kapt probably is putting in everywere in the stub

Yes, I understand what the problem is. Question for you: can this be fixed, or should we just give in and shut up? :-)

@dstepanov I decided to test another case: if we do not redefine class attributes, but simply pass arguments of parent constructors in all child constructors. This way we are guaranteed to always use a constructor, and not setters for individual attributes.
Look at the test structure:
@Serdeable
@JsonIgnoreProperties(
    value = ["myType"], // ignore manually set type, it will be automatically generated by Jackson during serialization
    allowSetters = true, // allows the type to be set during deserialization
)
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "myType", visible = true)
@JsonSubTypes(
    JsonSubTypes.Type(value = BasicBookInfo::class, name = "BASIC"),
    JsonSubTypes.Type(value = DetailedBookInfo::class, name = "DETAILED"),
)
open class BookInfo(

    var name: String,

    @JsonProperty("myType")
    var type: BookInfoType? = null,
)

@Serdeable
open class BasicBookInfo(

    @NotNull
    @Size(min = 3)
    var author: String,

    name: String,
    type: BookInfoType? = null,

) : BookInfo(name, type)

@Serdeable
class DetailedBookInfo(

    @Pattern(regexp = "[0-9]{13}")
    var isbn: String,

    author: String,
    name: String,
    type: BookInfoType? = null,

) : BasicBookInfo(author, name, type)

As you can see, the type attribute has the @JsonProperty annotation, but it is only specified in the constructor argument of the main parent.
So, why is this annotation ignored when introspection occurs?
Yes, of course, I can specify the field prefix and everything will work, but the idea is that constructor annotations are taken into account throughout the class hierarchy.
I believe this is a bug

Well, JsonProperty is not inherited, so it should not appear on the inherited parameter.
Looking at AbstractKotlinPropertyElement and PropertyElementAnnotationMetadata I think we need to merge the annotations added to the property. The concept that doesn't exist in Java so that's why it's happening.

What do the bean's definitions look like?

Look, the problem is NOT in the HTTP client, but in the controller!!!
It looks like there is a serialization and deserialization error somewhere, and the real class name is automatically substituted into the discriminator value field!
I really don't understand where the "substitution" of the discriminator value for the class name occurs... In the test in the current PR, I specifically made a similar model, as in my test - but in this PR everything works correctly... It turns out that the problem is in micronaut http
Get sources fro mthis branch: https://github.com/altro3/micronaut-openapi/tree/reactive-tests
Run test in module test-suite-kotlin-ksp-server-generator run test RequestBodyControllerTest.testSendModelWithDiscriminatorChild1

look to the request model:

propertyClass field is null, and we have Bird object

In controller we see this:

As you see in propertyClass field we have value Bird, but must be ave

Here you will see all generated controller interfaces and data models

With java and KAPT this test works fine

@dstepanov I started debugging the process of sending a request in the test. This is what I see

The problem really occurs when serializing the request in the client.

The screenshot shows that the injected value is incorrect and corresponds to the class name, and not the value from the annotations

It is also clear that in the object itself this field is empty, that is, it is injected by micronaut-serde .
I suspect that everything is connected with the name of the field - class and if this field is called something else, for example, type, then everything will work. But this is only an assumption. which I have not yet checked
So, look at the screenshot with KSP:

The same checkpoint with KAPT:

Look, the injected value is correct - ave . So now I'm 100% sure that the bug is in micronaut-serialization introspection

@dstepanov I think, found it. Looks to $Bird$Introspection.class (left - KAPT, right - KSP):

@dstepanov Added correct test to reproduce this problem: example.RequestBodyControllerTest
Please, help to fix it!

The main problem is that KSP doesn't allow fetching the annotation model from a string and reading the annotations. We need to get the repeatable container.
There is a trick to get the class if it's on the classpath, but it looks like KSP has some classloading mishmash.
https://github.com/micronaut-projects/micronaut-core/pull/11408
I can make the build pass if I add:
        Thread.currentThread().setContextClassLoader(visitorContext.getClass().getClassLoader());

in JsonSubTypesMapper


fix: ethers-etherscan solc feature

Motivation
ethers-etherscan/ethers-solc can't get enabled from ethers
https://t.me/ethers_rs/23359

Solution

PR Checklist

[ ] Added Tests
[ ] Added Documentation
[ ] Updated the changelog
[ ] Breaking changes

I think we don't reexport it either, easy follow up


Reading map tiles for Probability Depth

What do the cells with RGBA  values: 148-224-235-255 and 148-224-235-0 represent in terms of flood depth?
When I import map tiles in ArcGIS Pro and specify an RGB Alpha Band as Band 4 in Raster Symbology (to make the background transparent), I get 2 types of cells with R (Red) value = 148. These cells have the following RGBA  values: 148-224-235-255 and 148-224-235-0. What is the difference in terms of the flood depth for these cells?
The map documentation on the website do not cover the Alpha values. Also, when I import the map tiles the R=148 cells are white/ transparent in color not Blue #94E0EB as mentioned in documentation on your website https://docs.firststreet.dev/docs/tiles-introduction . Below are some screenshots for your reference.

@seripap this looks like an API export issue.  Do you have any idea how to answer this question above?

Could you provide the lat/lng of the area above and scenario for us to debug?

I think that the problem occurs when I import the downloaded tile image in ArcGIS Pro. Following  is a description of my process with tile coordinates:
I am doing an analysis for Washington state. Currently, I am testing my method for Snohomish County WA. My process involves downloading multiple map tiles, pasting them together to form one big image, importing the image as raster layer in ArcGIS Pro, and then georeferencing the raster.
To make things simple, for this issue, I downloaded one map tile in Snohomish County WA with google tile coordinates  (2633,5694) at zoom 14. Following is a snapshot from maptiler.com

Below is the saved tile image. In this image there are 5 colors of flood depth visible as per your website documentation https://docs.firststreet.dev/docs/tiles-introduction.

But, when I import this image in ArcGIS Pro to run my analysis, there are only 4 colors visible, and the white portion has RGB values = 148,224,235. Below is the snapshot.

The areas where #94E0EB color appears in the downloaded tile (previous image) has Alpha value = 255. The rest of the white portion (background in the downloaded image) has Alpha value = 0. Below is a snapshot for your reference:

Is there a way to fix this issue?

Hey Pranj,
I've been taking a look into this issue, let me know if this solves your issue.
--
Downloading the same tile coordinate as you have here (with slightly different year and rp):
fs.tile.get_probability_depth(year=2050, return_period=500, coordinate=[(14, 2633, 5694)], image=True)

I imported the image to ArcMap Desktop (Version 10.8).
Next:
Under the Layer Properties -> Stretch, I set Type to None
Under the Layer Properties -> Stretch, I unchecked Apply Gamma Stretch
Ref Images below. You'll see that the missing colour re-appears after I set those two properties.
Please try adjusting those two properties for the image layer, and see if that resolves your issue.

Thanks Kelvin,
The color did appear after applying the settings you mentioned. Following is a screenshot

However, I need the background to have a different R value than the <0.5 ft flood depth color for area and population analysis. For now both the background and #94E0EB color cells have R value = 148. I will look for some options to reclassify in ArcGIS. Let me know if you know any method to achieve that.
Thanks again!


Flutter skeleton project does not generate code coverage report

When using the skeleton project template, the test tool is unable to generate a coverage report. The default (app?) made by flutter create does generate an lcov.info. I don't know the cause, as it seems that 'app' doesn't have anything that 'skeleton' doesn't have.
Steps to Reproduce

Ensure that coverage is enabled $ flutter pub global activate coverage
Create a new project using the 'skeleton' template
Attempt to generate coverage report by running tests

flutter create -t skeleton new_project
cd ./new_project
flutter pub activate global coverage
flutter test --coverage

The generated file, ./coverage/lcov.info exists, but is empty.
Logs

Logs

$ flutter --verbose create new_project -t skeleton
[  +44 ms] executing: uname -m
[  +24 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +5 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +4 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[        ] executing: [/home/USER_NAME/.local/bin/flutter/] git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[   +7 ms] Exit code 0 from: git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[        ] 2.8.1
[   +5 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/home/USER_NAME/.local/bin/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +54 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git rev-parse --abbrev-ref HEAD
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +41 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +42 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +23 ms] Creating project new_project...
[  +45 ms]   new_project/lib/src/sample_feature/sample_item_list_view.dart (created)
[   +9 ms]   new_project/lib/src/sample_feature/sample_item_details_view.dart (created)
[        ]   new_project/lib/src/sample_feature/sample_item.dart (created)
[        ]   new_project/lib/src/settings/settings_controller.dart (created)
[        ]   new_project/lib/src/settings/settings_service.dart (created)
[        ]   new_project/lib/src/settings/settings_view.dart (created)
[        ]   new_project/lib/src/localization/app_en.arb (created)
[   +2 ms]   new_project/lib/src/app.dart (created)
[        ]   new_project/lib/main.dart (created)
[        ]   new_project/assets/images/3.0x/flutter_logo.png (created)
[   +1 ms]   new_project/assets/images/flutter_logo.png (created)
[        ]   new_project/assets/images/2.0x/flutter_logo.png (created)
[        ]   new_project/test/widget_test.dart (created)
[        ]   new_project/test/unit_test.dart (created)
[        ]   new_project/pubspec.yaml (created)
[        ]   new_project/README.md (created)
[        ]   new_project/l10n.yaml (created)
[        ]   new_project/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (created)
[        ]   new_project/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
[        ]   new_project/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
[        ]   new_project/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata (created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]   new_project/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json (created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]<EMAIL_ADDRESS>(created)
[        ]   new_project/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png (created)
[        ]   new_project/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json (created)
[        ]   new_project/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md (created)
[        ]<EMAIL_ADDRESS>(created)
[        ]   new_project/ios/Runner/Base.lproj/LaunchScreen.storyboard (created)
[        ]   new_project/ios/Runner/Base.lproj/Main.storyboard (created)
[        ]   new_project/ios/Runner/Info.plist (created)
[        ]   new_project/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist (created)
[        ]   new_project/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings (created)
[        ]   new_project/ios/Runner.xcworkspace/contents.xcworkspacedata (created)
[        ]   new_project/ios/Flutter/Release.xcconfig (created)
[        ]   new_project/ios/Flutter/AppFrameworkInfo.plist (created)
[        ]   new_project/ios/Flutter/Debug.xcconfig (created)
[        ]   new_project/ios/.gitignore (created)
[        ]   new_project/.metadata (created)
[        ]   new_project/analysis_options.yaml (created)
[        ]   new_project/.idea/runConfigurations/main_dart.xml (created)
[        ]   new_project/.idea/modules.xml (created)
[        ]   new_project/.idea/workspace.xml (created)
[        ]   new_project/.idea/libraries/KotlinJavaRuntime.xml (created)
[        ]   new_project/.idea/libraries/Dart_SDK.xml (created)
[        ]   new_project/android/settings.gradle (created)
[        ]   new_project/android/gradle/wrapper/gradle-wrapper.properties (created)
[        ]   new_project/android/gradle.properties (created)
[        ]   new_project/android/app/src/main/res/values/styles.xml (created)
[        ]   new_project/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png (created)
[        ]   new_project/android/app/src/main/res/drawable/launch_background.xml (created)
[        ]   new_project/android/app/src/main/res/mipmap-hdpi/ic_launcher.png (created)
[        ]   new_project/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png (created)
[        ]   new_project/android/app/src/main/res/values-night/styles.xml (created)
[        ]   new_project/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png (created)
[        ]   new_project/android/app/src/main/res/mipmap-mdpi/ic_launcher.png (created)
[        ]   new_project/android/app/src/main/res/drawable-v21/launch_background.xml (created)
[        ]   new_project/android/app/src/main/AndroidManifest.xml (created)
[        ]   new_project/android/app/src/profile/AndroidManifest.xml (created)
[        ]   new_project/android/app/src/debug/AndroidManifest.xml (created)
[        ]   new_project/android/.gitignore (created)
[        ]   new_project/new_project.iml (created)
[        ]   new_project/android/new_project_android.iml (created)
[        ]   new_project/android/build.gradle (created)
[        ]   new_project/android/app/src/main/kotlin/com/example/new_project/MainActivity.kt (created)
[        ]   new_project/android/app/build.gradle (created)
[        ]   new_project/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme (existing - skipped)
[        ]   new_project/ios/Runner.xcodeproj/project.pbxproj (created)
[   +6 ms]   new_project/ios/Runner/Runner-Bridging-Header.h (created)
[        ]   new_project/ios/Runner/AppDelegate.swift (created)
[        ]   new_project/.gitignore (created)
[        ]   new_project/web/manifest.json (created)
[        ]   new_project/web/favicon.png (created)
[        ]   new_project/web/index.html (created)
[        ]   new_project/web/icons/Icon-maskable-192.png (created)
[        ]   new_project/web/icons/Icon-512.png (created)
[        ]   new_project/web/icons/Icon-maskable-512.png (created)
[        ]   new_project/web/icons/Icon-192.png (created)
[  +33 ms] Running "flutter pub get" in new_project...
[   +2 ms] Using /home/USER_NAME/.local/bin/flutter/.pub-cache for the pub cache.
[        ] executing: [/home/USER_NAME/new_project/] /home/joe/.local/bin/flutter/bin/cache/dart-sdk/bin/dart __deprecated_pub --verbose get --no-precompile
[  +35 ms] MSG : Resolving dependencies...
[   +4 ms] MSG : + async 2.8.2
[        ]     | + boolean_selector 2.1.0
[        ]     | + characters 1.2.0
[        ]     | + charcode 1.3.1
[        ]     | + clock 1.1.0
[        ]     | + collection 1.15.0
[        ]     | + fake_async 1.2.0
[        ]     | + flutter 0.0.0 from sdk flutter
[        ]     | + flutter_lints 1.0.4
[        ]     | + flutter_localizations 0.0.0 from sdk flutter
[        ]     | + flutter_test 0.0.0 from sdk flutter
[        ]     | + intl 0.17.0
[        ]     | + lints 1.0.1
[        ]     | + matcher 0.12.11
[        ]     | + meta 1.7.0
[        ]     | + path 1.8.0 (1.8.1 available)
[        ]     | + sky_engine 0.0.99 from sdk flutter
[        ]     | + source_span 1.8.1
[        ]     | + stack_trace 1.10.0
[        ]     | + stream_channel 2.1.0
[        ]     | + string_scanner 1.1.0
[        ]     | + term_glyph 1.2.0
[        ]     | + test_api 0.4.3 (0.4.9 available)
[        ]     | + typed_data 1.3.0
[        ]     | + vector_math 2.1.1
[        ] MSG : Changed 25 dependencies!
[  +40 ms] Running "flutter pub get" in new_project... (completed in 11.9s)
[ +100 ms] Generating /home/USER_NAME/new_project/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[   +2 ms] Wrote 94 files.
[        ]
           All done!
[   +1 ms] In order to run your application, type:

             $ cd new_project
             $ flutter run

           Your application code is in new_project/lib/main.dart.

[   +1 ms] "flutter create" took 12,282ms.
[   +2 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0
$ cd ./new_project
$ flutter --verbose test --coverage
[  +41 ms] executing: uname -m
[  +20 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +4 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git -c log.showSignature=false log -n 1 --pretty=format:%H
[   +3 ms] Exit code 0 from: git -c log.showSignature=false log -n 1 --pretty=format:%H
[        ] 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[        ] executing: [/home/USER_NAME/.local/bin/flutter/] git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[   +7 ms] Exit code 0 from: git tag --points-at 77d935af4db863f6abd0b9c31c7e6df2a13de57b
[        ] 2.8.1
[   +5 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git rev-parse --abbrev-ref --symbolic @{u}
[   +2 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u}
[        ] origin/stable
[        ] executing: [/home/USER_NAME/.local/bin/flutter/] git ls-remote --get-url origin
[   +2 ms] Exit code 0 from: git ls-remote --get-url origin
[        ] https://github.com/flutter/flutter.git
[  +55 ms] executing: [/home/USER_NAME/.local/bin/flutter/] git rev-parse --abbrev-ref HEAD
[   +4 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD
[        ] stable
[  +33 ms] Found 2 files which will be executed as Widget Tests.
[   +4 ms] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[   +2 ms] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[  +33 ms] Artifact Instance of 'MaterialFonts' is not required, skipping update.
[        ] Artifact Instance of 'GradleWrapper' is not required, skipping update.
[        ] Artifact Instance of 'AndroidGenSnapshotArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'AndroidInternalBuildArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterWebSdk' is not required, skipping update.
[        ] Artifact Instance of 'FlutterSdk' is not required, skipping update.
[        ] Artifact Instance of 'WindowsEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'WindowsUwpEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxEngineArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'LinuxFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'MacOSFuchsiaSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerSDKArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FlutterRunnerDebugSymbols' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'IosUsbArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'FontSubsetArtifacts' is not required, skipping update.
[        ] Artifact Instance of 'PubDependencies' is not required, skipping update.
[  +27 ms] Initializing file store
[   +5 ms] gen_localizations: Starting due to {}
[  +69 ms] gen_localizations: Complete
[   +7 ms] Persisting file store
[   +2 ms] Done persisting file store
[   +3 ms] Skipping pub get: version match.
[  +74 ms] Generating /home/USER_NAME/new_project/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java
[  +63 ms] Manifest contained wildcard assets. Inserting missing file into build graph to force rerun. for more information see #56466.
[  +29 ms] running test package with arguments: [--no-color, -r, compact, --timeout, 30s, --concurrency=14, --chain-stack-traces, --, /home/USER_NAME/new_project/test/unit_test.dart, /home/joe/new_project/test/widget_test.dart]

00:00 +0: loading /home/USER_NAME/new_project/test/unit_test.dart                                                                                [ +115 ms] test 0: starting test /home/joe/new_project/test/unit_test.dart
[   +3 ms] Stopping scan for flutter_test_config.dart; found project root at /home/USER_NAME/new_project
[   +1 ms] Compiler will use the following file as its incremental dill file: /tmp/flutter_tools.CDKCWH/flutter_test_compiler.ALPZIB/output.dill
[        ] Listening to compiler controller...
[   +7 ms] Compiling file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.NJMVBU/listener.dart
[  +21 ms] /home/USER_NAME/.local/bin/flutter/bin/cache/dart-sdk/bin/dart --disable-dart-dev /home/joe/.local/bin/flutter/bin/cache/artifacts/engine/linux-x64/frontend_server.dart.snapshot --sdk-root /home/joe/.local/bin/flutter/bin/cache/artifacts/engine/common/flutter_patched_sdk/ --incremental --no-print-incremental-dependencies --target=flutter --debugger-module-names --experimental-emit-debug-metadata -DFLUTTER_WEB_AUTO_DETECT=true --output-dill /tmp/flutter_tools.CDKCWH/flutter_test_compiler.ALPZIB/output.dill --packages /home/joe/new_project/.dart_tool/package_config.json -Ddart.vm.profile=false -Ddart.vm.product=false --enable-asserts --track-widget-creation --initialize-from-dill /home/joe/new_project/build/test_cache/build/c075001b96339384a97db4862b8ab8db.cache.dill.track.dill
[        ] test 1: starting test /home/USER_NAME/new_project/test/widget_test.dart
[        ] Stopping scan for flutter_test_config.dart; found project root at /home/USER_NAME/new_project
[  +10 ms] <- compile file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.NJMVBU/listener.dart

00:01 +0: loading /home/USER_NAME/new_project/test/unit_test.dart
00:02 +0: loading /home/joe/new_project/test/unit_test.dart
00:03 +0: loading /home/joe/new_project/test/unit_test.dart
00:04 +0: loading /home/joe/new_project/test/unit_test.dart
00:05 +0: loading /home/joe/new_project/test/unit_test.dart                                                                                [+5863 ms] <- accept
[        ] <- reset
[        ] Compiling file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.NJMVBU/listener.dart took 5897ms
[        ] Compiling file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.LFCVRF/listener.dart
[        ] test 0: starting test device
[   +3 ms] test 0: awaiting connection to test device
[  +18 ms] test 0: test harness socket server is running at port:36767
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] x86_64
[   +1 ms] Using this directory for fonts configuration: /tmp/flutter_tools.CDKCWH/flutter_test_fonts.RVAJGY
[        ] test 0: Starting flutter_tester process with command=[/home/USER_NAME/.local/bin/flutter/bin/cache/artifacts/engine/linux-x64/flutter_tester, --observatory-port=0, --enable-checked-mode, --verify-entry-points, --enable-software-rendering, --skia-deterministic-rendering, --enable-dart-profiling, --non-interactive, --use-test-fonts, --packages=/home/joe/new_project/.dart_tool/package_config.json, /tmp/flutter_tools.CDKCWH/flutter_test_listener.NJMVBU/listener.dart.dill], environment={FLUTTER_TEST: true, FONTCONFIG_FILE: /tmp/flutter_tools.CDKCWH/flutter_test_fonts.RVAJGY/fonts.conf, SERVER_PORT: 36767, APP_NAME: new_project, UNIT_TEST_ASSETS: /home/joe/new_project/build/unit_test_assets}
[   +1 ms] <- recompile file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.LFCVRF/listener.dart 17ff63a1-e99c-44a8-a77f-ed284c458f47
[        ] file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.LFCVRF/listener.dart
[        ] file:///home/USER_NAME/new_project/.dart_tool/flutter_build/generated_main.dart
[        ] <- 17ff63a1-e99c-44a8-a77f-ed284c458f47
[   +2 ms] test 0: Started flutter_tester process at pid 220565

00:06 +0: loading /home/USER_NAME/new_project/test/unit_test.dart                                                                                [  +59 ms] test 0: Shell: Observatory listening on http://<IP_ADDRESS>:32921/iv3L56Temyo=/
[   +1 ms] test 0: Starting Dart Development Service
[  +77 ms] <- accept
[        ] <- reset
[        ] Compiling file:///tmp/flutter_tools.CDKCWH/flutter_test_listener.LFCVRF/listener.dart took 170ms
[        ] test 1: starting test device
[        ] test 1: awaiting connection to test device
[        ] test 1: test harness socket server is running at port:32821
[        ] executing: uname -m
[   +3 ms] Exit code 0 from: uname -m
[        ] x86_64
[        ] test 1: Starting flutter_tester process with command=[/home/USER_NAME/.local/bin/flutter/bin/cache/artifacts/engine/linux-x64/flutter_tester, --observatory-port=0, --enable-checked-mode, --verify-entry-points, --enable-software-rendering, --skia-deterministic-rendering, --enable-dart-profiling, --non-interactive, --use-test-fonts, --packages=/home/joe/new_project/.dart_tool/package_config.json, /tmp/flutter_tools.CDKCWH/flutter_test_listener.LFCVRF/listener.dart.dill], environment={FLUTTER_TEST: true, FONTCONFIG_FILE: /tmp/flutter_tools.CDKCWH/flutter_test_fonts.RVAJGY/fonts.conf, SERVER_PORT: 32821, APP_NAME: new_project, UNIT_TEST_ASSETS: /home/joe/new_project/build/unit_test_assets}
[  +23 ms] test 1: Started flutter_tester process at pid 220590
[  +66 ms] test 1: Shell: Observatory listening on http://<IP_ADDRESS>:41341/KNo_GC4cv9Y=/
[        ] test 1: Starting Dart Development Service
[   +2 ms] test 0: Dart Development Service started at http://<IP_ADDRESS>:37347/L4eaX1d8ooo=/, forwarding to VM service at http://<IP_ADDRESS>:32921/iv3L56Temyo=/.
[        ] Connecting to service protocol: http://<IP_ADDRESS>:37347/L4eaX1d8ooo=/
[   +3 ms] test 0: Observatory uri is available at http://<IP_ADDRESS>:37347/L4eaX1d8ooo=/
[  +42 ms] test 0: Successfully connected to service protocol: http://<IP_ADDRESS>:37347/L4eaX1d8ooo=/
[  +27 ms] test 1: Dart Development Service started at http://<IP_ADDRESS>:38751/1F8qBm7n5P8=/, forwarding to VM service at http://<IP_ADDRESS>:41341/KNo_GC4cv9Y=/.
[        ] Connecting to service protocol: http://<IP_ADDRESS>:38751/1F8qBm7n5P8=/
[        ] test 1: Observatory uri is available at http://<IP_ADDRESS>:38751/1F8qBm7n5P8=/
[   +5 ms] test 1: Successfully connected to service protocol: http://<IP_ADDRESS>:38751/1F8qBm7n5P8=/
[  +17 ms] test 0: connected to test device, now awaiting test result
[        ] test 0: Waiting for test harness or tests to finish

00:06 +0: loading /home/USER_NAME/new_project/test/widget_test.dart
00:06 +0: /home/joe/new_project/test/unit_test.dart: Plus Operator should add two numbers together
00:06 +1: loading /home/joe/new_project/test/widget_test.dart                                                                                [  +80 ms] test 0: Test harness is no longer needed by test process
[        ] test 0: finished
[        ] Starting coverage collection
[   +1 ms] collecting coverage data from Flutter Tester (pid: 220565, running) for test 0 at http://<IP_ADDRESS>:37347/L4eaX1d8ooo=/...
[        ] test 0: Test process is no longer needed by test harness
[  +61 ms] test 1: connected to test device, now awaiting test result
[        ] test 1: Waiting for test harness or tests to finish
[  +13 ms] Collected coverage data.
[        ] Merging coverage data...
[   +9 ms] Done merging coverage data into global coverage map.
[        ] test 0: cleaning up...
[        ] test 0: ensuring test device is terminated.
[        ] test 0: Terminating flutter_tester process
[        ] test 0: Shutting down test harness socket server
[   +6 ms] test 0: flutter_tester process at pid 220565 exited with code=-9
[        ] test 0: deleting temporary directory
[   +3 ms] test 0: finished

00:06 +1: /home/USER_NAME/new_project/test/widget_test.dart: MyWidget should display a string of text
00:06 +2: /home/joe/new_project/test/widget_test.dart: MyWidget should display a string of text                                                                                [ +401 ms] test 1: Test harness is no longer needed by test process
[        ] test 1: finished
[        ] Starting coverage collection
[        ] collecting coverage data from Flutter Tester (pid: 220590, running) for test 1 at http://<IP_ADDRESS>:38751/1F8qBm7n5P8=/...
[        ] test 1: Test process is no longer needed by test harness
[  +65 ms] Collected coverage data.
[        ] Merging coverage data...
[   +2 ms] Done merging coverage data into global coverage map.
[        ] test 1: cleaning up...
[        ] test 1: ensuring test device is terminated.
[        ] test 1: Terminating flutter_tester process
[        ] test 1: Shutting down test harness socket server
[   +5 ms] test 1: flutter_tester process at pid 220590 exited with code=-9
[        ] test 1: deleting temporary directory
[   +4 ms] test 1: finished

00:06 +2: All tests passed!
[   +7 ms] Deleting /tmp/flutter_tools.CDKCWH/flutter_test_compiler.ALPZIB...
[   +4 ms] killing pid 220549
[  +53 ms] Deleting /tmp/flutter_tools.CDKCWH/flutter_test_fonts.RVAJGY...
[   +1 ms] test package returned with exit code 0
[   +3 ms] coverage information collection complete
[   +4 ms] wrote coverage data to coverage/lcov.info (size=0)
[   +5 ms] "flutter test" took 7,466ms.
[   +2 ms] Running shutdown hooks
[        ] Shutdown hooks complete
[        ] exiting with code 0

[✓] Flutter (Channel stable, 2.8.1, on Pop!_OS 21.04 5.15.8-76051508-generic, locale en_GB.UTF-8)
    • Flutter version 2.8.1 at /home/USER_NAME/.local/bin/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 77d935af4d (3 weeks ago), 2021-12-16 08:37:33 -0800
    • Engine revision 890a5fca2e
    • Dart version 2.15.1

[!] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
    • Android SDK at /home/USER_NAME/Android/Sdk
    • Platform android-32, build-tools 32.0.0
    • Java binary at: /home/USER_NAME/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses

[✗] Chrome - develop for the web (Cannot find Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting CHROME_EXECUTABLE to a Chrome executable.

[✓] Android Studio (version 4.2)
    • Android Studio at /home/USER_NAME/.local/share/JetBrains/Toolbox/apps/AndroidStudio/ch-0/202.7486908
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 11.0.8+0-b944-P17168821)

[✓] VS Code (version 1.62.0)
    • VS Code at /usr/share/code
    • Flutter extension version 3.29.0

[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

Hi @ettmetal, this is to be expected of the skeleton app template.
Coverage checks which lines of your code are covered by your tests, however, the tests that are written for the skeleton app do not reference any of the code that is written in the skeleton app, which is why the generated coverage report is empty.
On the other hand, the default template references the MyApp widget as well as some of the text and icons in there, which is why we see some coverage.
Does that make sense?

I get the explaination, but I'd expect a coverage report that said nothing is covered in that case, rather than an empty one. If that's how the tool works though there's not much you can do about it I suppose. Have a good one ☺

I believe for that an issue should be filed on the coverage repo, probably as a feature request.
Closing this issue for now.
You may file an issue on the coverage repo and reference this issue. If it is stated to be a flutter issue, kindly comment below and I will reopen.
Thank you


[Sprint 47] XD-2855 [master + backport] Update config to enable basic auth role

Add config to enable roles for basic authentication
Update the documentation

Updated the PR to fix the doc issue.

LGTM; merged.


fixed migration mess

Coverage increased (+0.2%) to 97.194% when pulling 83f1f7c7370375abd2a7f0a9ca3a8a0ec810f604 on ninech:bugfix-audit-log into 5ca4e4920cba03c13e7462b68927f65331249a50 on rbCAS:master.

Hey @pencil
I actually messed up with the migrations and the schema. In the end the specs were using a different schema, than the migrations produce, which leads to exceptions when creating a login attempt.
This change will fix the schema correctly.
Sorry for the troubles.

Thanks!


Updating belongsToMany references in embedded document doesn't save both ways

I've been struggling with this for a few days now. I've posted this on stack overflow as well, but no reaction so far. This might or might not be an actual issue with the package.
I'm using Laravel 5 with MongoDB with this package. I'm using embedded documents for a certain database structure. For example, I have a Product model which embedsMany objects of a ProductVariant model. This would look like this in the database:
[
  {
    "_id": "MongoID",
    "product_name": "T-shirt",
    "description": "Short description",
    "brand": "nike",
    "series": "whatever",
    "is_published": false,
    "slug": "t-shirt",
    "category_ids": [
        "MongoID"
    ],
    "variants": [
    {
      "product_sku": "1289938",
      "description": "Short description",
      "price": "430",
      "slug": "xn1289938-t-shirt",
      "discountPrice": "0",
      "is_published": false
      "_id": {
         "$id": "MongoID"
       }
    }
   ]
 }
]

The 'variants' in this document are objects of ProductVariant. In my code of the Product model I'm using:
public function variants () {

    return $this->embedsMany('\ProductVariant');

}

This works fine. Now I have a different model called Facet, which would add an array of attributes to a ProductVariant. So in my ProductVariant I have:
public function facets(){

     return $this->belongsToMany('\Facet');

}

Facets are reusable across multiple ProductVariants so that is why I'm trying to save them as a referenced document. However, when I call a sync method for updating the reference with a list of ids...
 $productVariant->facets()->sync(Request::json('facets'));

...nothing happens to the ProductVariant in the database. However the Facet model gets a correct update in the database:
 "_id": "blue_color",
"description": "Blue color",
"type": "color",
"value": "blue",
"product_variant_ids": [
     "MongoID"
 ]

In other situations (without the embedded document) I get an updated reference with 'related_ids' on both sides. Also when I don't embed these same models, but save them as a flat document the sync works without any changes to my code. The sync simply doesn't update embedded documents, but only updates the other side of the relationship which is a simple document. Am I doing it wrong or is this operation not supported?

I've been struggling with this issue as well, and unfortunately it seems that it is not supported.  I think that it requires some thought, since "product_variant_ids" in the Facet document is completely meaningless, since it doesn't convey which Product they are in, and those IDs could theoretically be duplicated across products.
This could be done by storing embedded documents that are essentially a reverse of the dependency tree:
product_variant_ids: [
  {
    _id: MongoID,
    product_id: MongoID
  }
], ...etc.

It could keep burying down for multiple levels until it got to the parent object.
My problem with this is, it seems like overkill, and I can't even imagine how nasty the Mongo query would have to be to do anything useful with this data.  The problem seems to be that laravel-mongodb refuses to return a related object unless the ID is present in both tables.  A single table should be sufficient.  Yes, you won't be able to get a list of Products from a Facet document, but I can live with that.  I can manually add Facet::hasMany(Products) if I need that information.
This limitation almost makes me think that using a pivot table is actually an easier approach, even though this isn't very no-sql-like  It would also allow storing extra data on the pivot table, which would be extremely useful for a project I'm working on now.  So basically I think some kind of a flag would be nice, that allowed you to toggle the "embedded pivot table" behaviour on a per-collection basis.
Would appreciate any thoughts or alternative approaches.

Well, it's been over a month since I've asked this question and so far the author hasn't responded, so I guess this is working as he intended it. But I still had to solve my issue. So I created my own BelongsToMany relation that extends the original one and applied it to the embedded model. I created a sync method for that like this:
public function sync($ids, $detaching = true)
{
    $current = $this->parent{$this->otherKey} ?: array();

    if($current instanceof Collection) $current = $current->modelKeys();

    $detach = array_diff($current, $ids);

    foreach ( $detach as $id ) {
        $this->related
             ->where('_id', $id)
             ->pull($this->foreignKey, $this->parent->_id);
    }

    $attach = array_diff($ids, $current);

    foreach ( $attach as $id ){

        $this->related
            ->where('_id', $id)
            ->push($this->foreignKey, $this->parent->_id);
    }

    $this->parent->{$this->otherKey} = $ids;

    return;
}

It's probably not the right way. I suspect this increases the number of database transactions needed on write, but it's the only way I got it to work. I simply used the push and pull methods to update arrays. The original sync method didn't seem capable of updating the embedded document. I still don't know why.
Personally, I wouldn't like the approach of having something like a pivot document. I would like to retrieve as much information that I need in one place with a single read. Also, it doesn't hurt to have product_ids on a facet, because when you delete that facet you also need to remove it from the products it is attached to. In this case I would call the sync with an empty array before deleting the facet.
I don't know if I'm doing this right, so feel free to correct me, but for now it saved my case.

I also this problem on 5.2


Difference between different configuration

What exactly is the difference between different configuration? It seems that the final potential energy after optimization is different ? Any idea how we start with the initial idea position ?

Yeah the diff is the binding energy per ion pairs. I am also not sure on how to start.

@pratibha77118 Hope now you got the idea.

Along with binding energy per ion there is difference in orientations of ions after optimization for different configurations.


mcr.microsoft.com/azure-cli image not ship with curl anymore.

Today I followed this tutorial https://learn.microsoft.com/en-us/azure/container-instances/container-instances-managed-identity#use-user-assigned-identity-to-get-secret-from-key-vault
On the step when we need execute curl command it return errors and says curl not installed.

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

ID: f4bb823e-1c72-5777-bdd6-e89942c4f470
Version Independent ID: eb046e79-f39c-dcca-fbd4-519c0a320201
Content: Enable managed identity in container group - Azure Container Instances
Content Source: articles/container-instances/container-instances-managed-identity.md
Service: container-instances
GitHub Login: @tomvcassidy
Microsoft Alias: tomcassidy

@sakitA
Thanks for your feedback! We will investigate and update as appropriate.

@sakitA
I'd recommend posting your question in https://azure.microsoft.com/en-us/support/community/. We'll follow up there. We will now proceed to close this thread here.

Thanks @AjayBathini-MSFT , I posted my question there also: https://learn.microsoft.com/en-us/answers/questions/1632594/mcr-microsoft-com-azure-cli-does-not-have-installe


Target net5.0.

Given that .NET 5.0 is stable now and contains many performance improvements, we will probably want the eventual release to target it.
Also adds a Windows CI build.

Thanks! I agree this makes sense to target .net 5.
I was just working on getting a Windows installer going for the GTK3 build so I'll merge my changes in with these.

Nice!  Just tried out the Windows installer and it works on my machine!


fix: readme name

Replaced by https://github.com/Informasjonsforvaltning/fdk-mqa-assmentator/pull/15


Generating documentation overwrites changes in index.md file

After running command php artisan api:generate --routePrefix="api/v1/*"
all changes in index.md disappears.
P.S. Laravel 5.4.15,   "mpociot/laravel-apidoc-generator": "^2.0"

The documentator first generates a markdown file and then pareses it into html files. A merge process like the from git would be nice to solve this problem, but the documentator has no gui

Happened the same, after editing everything, logo etc... run generate and lose everything, any change to have some basic configurations?

@ruidiasbraga agreed!  I would prefer also to have the source in resources instead of the public folder :)

I think it's now possible to edit the generated files and have it preserved using the update command.


Fix return types of match()-, objectContaining()- and strictEqual()-m…

…atchers
Those matchers have the return type "Matcher" at the moment, but in order to use them in a verfify()-call,
they need "any" or something else that matches the method parameter

I  am currently using as any in the call to "verify", but that's not optimal.
     verify(mockImageThumbnailer.createThumbnail(
        fixtureImages.path.still.jpg,
        deepEqual({ height: 300, width: 300 }),
        match(/thumbnailer\/c[\w\d]+/) as any
      )).called();

Codecov Report

Merging #106 into master will increase coverage by 0.01%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #106      +/-   ##
=========================================
+ Coverage   94.89%   94.9%   +0.01%
=========================================
  Files          34      34
  Lines         607     609       +2
  Branches       69      70       +1
=========================================
+ Hits          576     578       +2
  Misses         22      22
  Partials        9       9

Impacted Files
Coverage Δ

src/ts-mockito.ts
96.72% <100%> (ø)
:arrow_up:

src/MethodStubSetter.ts
100% <0%> (ø)
:arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 93d6625...e5be377. Read the comment docs.

Thanks for catching this. Merging.


GitLab service doesn't work on 19.09 if deployed by NixOps

Describe the bug
After upgrading to the NixOS 19.09 channel the GitLab I deploy using NixOps doesn't work anymore. It seems to me, that a closure is missing.
The gitlab-sidekiq service logs the following and restarts continuously:
Sep 15 13:31:12 nahe.amessage.eu systemd[1]: Started gitlab-sidekiq.service.
Sep 15 13:31:14 nahe.amessage.eu sidekiq[4025]: WARNING: PID file creation will be removed in Sidekiq 6.0, see #4045. Please use a proper process supervisor to start and manage your services
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: Cannot load database configuration:
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: File "/nix/store/3rdc6hl3sx7g47pqims4m7cqdxc3vd8a-gitlab-12.1.6/share/gitlab/config/database.yml" is a symlink that does not point to a valid file
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/paths.rb:214:in `block in existent'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/paths.rb:210:in `select'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/paths.rb:210:in `existent'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application/configuration.rb:166:in `database_configuration'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/dz7a5mac68g6g5szc2cnncdhylfpx1vd-ruby2.6.4-activerecord-5.2.3/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/railtie.rb:133:in `block (2 levels) in <class:Rail>
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `instance_eval'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:71:in `block in execute_hook'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:62:in `with_execution_contro>
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:67:in `execute_hook'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:43:in `block in on_load'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:42:in `each'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hszh2lxqcd7k6krbbh3cvg90k5ric8ci-ruby2.6.4-activesupport-5.2.3/lib/ruby/gems/2.6.0/gems/activesupport-5.2.3/lib/active_support/lazy_load_hooks.rb:42:in `on_load'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/dz7a5mac68g6g5szc2cnncdhylfpx1vd-ruby2.6.4-activerecord-5.2.3/lib/ruby/gems/2.6.0/gems/activerecord-5.2.3/lib/active_record/railtie.rb:132:in `block in <class:Railtie>'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `instance_exec'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:32:in `run'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:61:in `block in run_initializers'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:228:in `block in tsort_each'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:350:in `block (2 levels) in each_strongly_connected_component'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:431:in `each_strongly_connected_component_from'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:349:in `block in each_strongly_connected_component'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `each'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `call'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:347:in `each_strongly_connected_component'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:226:in `tsort_each'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/hav12kpvy0c6n4vhc45wzxgqr7ci1nqv-ruby-2.6.4/lib/ruby/2.6.0/tsort.rb:205:in `tsort_each'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/initializable.rb:60:in `run_initializers'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/j1pxixg6vwv54hsh2dc194420lh1yx4d-ruby2.6.4-railties-5.2.3/lib/ruby/gems/2.6.0/gems/railties-5.2.3/lib/rails/application.rb:361:in `initialize!'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/3rdc6hl3sx7g47pqims4m7cqdxc3vd8a-gitlab-12.1.6/share/gitlab/config/environment.rb:6:in `<top (required)>'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/k9ic3qn24bcnjy63mva5xn2d4wrsjxy5-ruby2.6.4-sidekiq-5.2.7/lib/ruby/gems/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:288:in `require'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/k9ic3qn24bcnjy63mva5xn2d4wrsjxy5-ruby2.6.4-sidekiq-5.2.7/lib/ruby/gems/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:288:in `boot_system'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/k9ic3qn24bcnjy63mva5xn2d4wrsjxy5-ruby2.6.4-sidekiq-5.2.7/lib/ruby/gems/2.6.0/gems/sidekiq-5.2.7/lib/sidekiq/cli.rb:46:in `run'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/a273arinrgy5mcjdi4v4pw27d2sij78z-gitlab-env-12.1.6/lib/ruby/gems/2.6.0/gems/sidekiq-5.2.7/bin/sidekiq:12:in `<top (required)>'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/a273arinrgy5mcjdi4v4pw27d2sij78z-gitlab-env-12.1.6/bin/sidekiq:18:in `load'
Sep 15 13:31:18 nahe.amessage.eu sidekiq[4025]: /nix/store/a273arinrgy5mcjdi4v4pw27d2sij78z-gitlab-env-12.1.6/bin/sidekiq:18:in `<main>'
Sep 15 13:31:18 nahe.amessage.eu systemd[1]: gitlab-sidekiq.service: Main process exited, code=exited, status=1/FAILURE
Sep 15 13:31:18 nahe.amessage.eu systemd[1]: gitlab-sidekiq.service: Failed with result 'exit-code'.
Sep 15 13:31:18 nahe.amessage.eu systemd[1]: gitlab-sidekiq.service: Consumed 6.088s CPU time, no IP traffic.

/nix/store/3rdc6hl3sx7g47pqims4m7cqdxc3vd8a-gitlab-12.1.6/share/gitlab/config/database.yml links to /nix/store/c8cpnz5zyg0n5nbq3yfl3p9bagyqwak5-database.yml which doesn't exist on the server, that gets deployed with NixOps. On the computer that runs NixOps the closure gets built and is present.
Expected behavior
The file /nix/store/c8cpnz5zyg0n5nbq3yfl3p9bagyqwak5-database.yml should get copied to the server by nixops deploy. The GitLab service should be working.
Additional context
This is the configuration I use for GitLab:
{
      services.gitlab = {
        enable = true;
        databasePasswordFile = "/etc/passwords/gitlabDatabase";
        initialRootPasswordFile = "/etc/passwords/gitlabInitialRoot";
        https = true;
        host = "git.amessage.eu";
        port = 443;
        user = "git";
        group = "git";
        databaseUsername = "git";
        smtp = {
          enable = true;
          port = 25;
          domain = "git.amessage.eu";
        };
        secrets = {
          dbFile = "/etc/passwords/gitlabSecretsDb";
          secretFile = "/etc/passwords/gitlabSecretsSecret";
          otpFile = "/etc/passwords/gitlabSecretsOtp";
          jwsFile = "/etc/passwords/gitlabSecretsJws";
        };
        extraConfig = {
          email_from = "XXXXXXXXX";
          email_display_name = "amessage Gitlab";
          email_reply_to = "XXXXXXXX";
          default_project_features = { builds = false; };
        };
      };
}

Metadata
On the system running nixops:

system: "x86_64-linux"
host os: Linux 5.2.13, NixOS, 19.09beta181.64e38f246ae (Loris)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3
channels(root): "nixos-19.09beta181.64e38f246ae, unstable-19.09pre192418.e19054ab3cd"
channels(matthias): "home-manager-19.03"
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

On the server being deployed by nixops:

system: "x86_64-linux"
host os: Linux 4.19.71, NixOS, 19.09beta181.64e38f246ae (Loris)
multi-user?: yes
sandbox: yes
version: nix-env (Nix) 2.3
nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Maintainer information:
attribute:
- gitlab
module:
- services.gitlab

It seem the closure that were missing is from the old configuration. I also found some other closures that were missing. But I think all of them shouldn't be there. It's the content of /var/gitlab/state/config that still points to these.
So at the moment it seems to me the problem is, that the gitlab service has problems migrating from a 19.03 configuration to a 19.09 configuration.

cc @talyz

I'm further investigating. It seem the pre-start script of gitlab.service is failing:
Sep 15 17:53:56 nahe.amessage.eu systemd[1]: Starting gitlab.service...
Sep 15 17:53:56 nahe.amessage.eu gvn7ks3r22v3hi101svwhlwx6vsivgbd-unit-script-gitlab-pre-start[30105]: mkdir -p /var/gitlab/state/home/.ssh: OK
Sep 15 17:53:56 nahe.amessage.eu gvn7ks3r22v3hi101svwhlwx6vsivgbd-unit-script-gitlab-pre-start[30105]: chmod 700 /var/gitlab/state/home/.ssh: OK
Sep 15 17:53:56 nahe.amessage.eu gvn7ks3r22v3hi101svwhlwx6vsivgbd-unit-script-gitlab-pre-start[30105]: /nix/store/gvn7ks3r22v3hi101svwhlwx6vsivgbd-unit-script-gitlab-pre-start: line 18: /etc/passwords/gitlabDatabase: Permission denied
Sep 15 17:53:56 nahe.amessage.eu gvn7ks3r22v3hi101svwhlwx6vsivgbd-unit-script-gitlab-pre-start[30105]: Database password was an empty string!
Sep 15 17:53:56 nahe.amessage.eu systemd[1]: gitlab.service: Control process exited, code=exited, status=1/FAILURE
Sep 15 17:53:56 nahe.amessage.eu systemd[1]: gitlab.service: Failed with result 'exit-code'.
Sep 15 17:53:56 nahe.amessage.eu systemd[1]: Failed to start gitlab.service.

So somehow the script cannot access the file that should contain my database password. Initially I had the file 0640 for git:git – but even after I made the file /etc/passwords/gitlabDatabase 0644` (i.e. world readable) I get the “Permission denied”.

Okay, it is working now again and I will close this issue. For reference I will document below what I had to do to get it working again.
I had to tweak some configuration settings. The following changes where quite clear because the existing configuration keys didn't exist anymore and I noticed fast, that I have to add a File to the end of the keys:

services.gitlab.databasePassword(File)
services.gitlab.initialRootPassword(File)
services.gitlab.secrets.*(File)

I'm deploying these files now with NixOps deployment.keys feature. I had to take care, that it's not sufficient that these files are accessible by the user running gitlab (git in my case), but this user also needs to have access to the folder I deploy the keys to. In case of NixOps I had to add the git user to the keys group: users.extraUsers.git.extraGroups = [ "keys" ];
Problems harder to find (for me):

The default setting of services.gitlab.databaseHost changed from <IP_ADDRESS> to empty. I think for postgres this means connection over a Unix socket. This didn't work for me as I only allow the user postgres to access the database over a Unix socket. So I needed to configure services.gitlab.databaseHost explicitly to <IP_ADDRESS> now.
My database user was gitlab while the system user was git which worked quite well in NixOS 19.03, but actually I didn't know that the database was accessed by gitlab. When deploying the configuration I got an error by the gitlab service expression, that services.gitlab.user and services.gitlab.databaseUsername must be the same. I did notice that the default for databaseUsername is gitlab so I changed it to git which I was expecting to be the database user I was using. Actually this user was also the owner of gitlab database on my PostgreSQL server, but git had a different password than gitlab had. So gitlab couldn't connect to the database. After changing the database password of the git user in PostgreSQL I finally git gitlab running again.

Thanks for reporting this!
The migration issues should hopefully be fixed by #68721.
The secret options are indeed changed and brakes upgrades by design. This, and some other changes, should probably be documented in the release notes, however.
The requirement that services.gitlab.user and services.gitlab.databaseUsername be identical is only valid if peer authentication is used and thus shouldn't apply to you. You get this error because you have services.gitlab.databaseCreateLocally enabled, which also provisions a database for you automatically. However, it feels like this shouldn't be possible, since there's no reason to deploy a local database that we won't connect to.
I'll address these issues in PRs I'm currently working on. :)

Indeed it could be that I had the message of having different user and databaseUsernameat the beginning and addressed that first. Changing the database back to <IP_ADDRESS> probably was at a later step and I just kept the changed username at that later stage.
Thanks for the feedback.


Add a generic Spawn trait

This commit adds a new trait to the future module, Spawn. This trait has
only one method:
trait Spawn<F: Future<Item = (), Error = ()>> {
    fn spawn(&self, f: F) -> Result<(), SpawnError<F>>;
}

The purpose of this trait is to unify the various executors found throughout the
ecosystem. Crates which require the ability to spawn futures will now have the
option ot operate generically over all Spawn instances instead of a particular
executor.
A Future::background method was also added to ergonomically pass a future to
an executor and run it in the background. The two oneshot modules (sync and
unsync) also grew spawn and spawn_fn functions which will spawn a future
onto an executor, returning a handle to the resulting future. This can be used
to spawn work onto a specific executor and still get notified when the work
itself is completed.
Finally, an implementation of the Spawn trait was added to CpuPool. Due to
the differences in unwinding/panic semantics, though, the CpuPool::spawn
method which previously existed was not deprecated.
Closes #313

I was pretty happy with everything until I ended up hitting CpuPool and the differences in panicking semantics. Overall though I'm pretty happy with how this turned out. I'd still like to play around with this in tokio-core though before landing.
r? @carllerche

Originally experimentation: https://github.com/carllerche/futures-spawn, though the latest is on a branch https://github.com/carllerche/futures-spawn/tree/restructure.
Once this PR is merged, I need to remember to deprecate that crate (leaving this comment to remind me!)

I saw this PR, and wanted to see if I understand the goal correctly (I hope you don't mind).
Consider a Hyper tokio server for example. Currently, hyper depends on tokio-core and tokio-proto -> tokio-core. If I understand this trait correctly it can help with removing this dependency -- instead of taking Core/Handle, it will take this trait. Then it should be possible to run a Hyper server with e.g.

A tokio-core/mio event loop
A cached thread pool (CpuPool)
Any other Spawn implementation

by just changing a few lines in the application code (the library is agnostic).
To test this assumption and check if it's viable, I tried to do the following. First in Hyper:

Removed all client/ code (irrelevant for this discussion)
Removed the helper Server trait, leaving only Http to use directly (Server uses tokio-core so I'm just removing it from consideration for now).
Replaced all uses of Handle with an appropriate Spawn bound

and then in tokio-proto:

Removed tcp_client/tcp_server - not used by hyper so ignoring that for now.
Removed all of mentions of old_io (backward compatibility support for tokio_core::io, replaced by tokio_io).
Replaced all uses of Handle with an appropriate Spawn bound

In the last bullet it got messy and I ran out of time to play with it, so I didn't reach a conclusion. But I think that it can be done - am I correct?
If it would be possible to statically parametrize a Hyper server (as an example) over a Spawn trait, and it would all work flawlessly when they are switched, I think it would really show the strength of the abstractions here - it would be quite a feat :)

@bluetech you are indeed spot on! That's the intended use case, decoupling crates like Hyper from tokio-core specifically and allowing them to interoprate more gracefully with other crates like futures-glib. The Spawn trait isn't sufficient for everything tokio-proto and hyper use, but everything minus the conveniences are sufficient to use Spawn (or at least that's the intention).

Name conflict with the Spawn struct seems bad. Executor seems like the right name here, we should steal that name from the current Executor trait and rename that (to Dispatch perhaps?). It is an unfortunate name anyway since when the docs say executor they mean something that spawns futures rather than something that actually implements the current Executor trait.
Going maybe out of scope from this PR, the current Executor starts looking like an odd duck since it is an executor but doesn't implement Spawn. Maybe we should make the current Executor into a struct that implements Spawn trait, and deprecate the execute method from the Spawn struct. It dosen't fit well anyways since task.execute(executor) reads backwards.
The renames would go like:
Executor trait -> Dispatch trait
Spawn trait -> Executor trait
Refactoring Dispatch:
Create a Dispatcher struct that wraps Arc<Dispatch>.
Dispatcher implements new Executor trait (the trait proposed here as Spawn).
Deprecate Spawn::execute from the Spawn struct.

@leodasvacas that sounds pretty reasonable to me! I definitely think the current Executor trait is basically deprecated and should likely be replaced by this.
@carllerche what do you think about the naming here?

Renaming seems fine. I would rename the trait fn to match the trait name.
Executor is deprecated, so reusing the name seems fine.
Other names:

Schedule
Run.

I don't have a huge preference when it comes to the actual name. I do think avoiding the Spawn conflict seems good.

Ok I've updated to Executor. r? @carllerche?

Nice! The fate of "OldExecutor" will be decided later? background is ergonomic and I'm not against it, but there are some points to be discussed:

It's offering both a panicking and non-panicking version of the same API, std generally avoids this with a preference towards non-panicking.
Naming: I think we should just call it execute_on for consistency and neutrality (the executor may block for all we know).

Ok I've updated to just delete background for now.
@leodasvacas I'd like to deprecate the old Executor trait as part of this. I meant to investigate your suggestion a bit more but I'll go do that now.

Ok I've commented that we're likely to deprecate executor::Executor and Spawn::execute but I haven't done so just yet. I don't think we have tons of users of that trait so I don't want to agonize too much over names just yet. in that case I'm going to merge!


Implement variable expansion

Currently cargo-make is using following to define a variable depending on it's set state (empty/non-empty) in the environment:
[env]
PREFER_EXISTING = { value = "new", condition = { env_not_set = ["PREFER_EXISTING"] } }

Whereas C-based Makefile is using:
PREFER_EXISTING ?= new

Which is more readable.

Suggesting to implement variable expansion on top of current functionality.

Resolved in https://github.com/sagiegurari/cargo-make/issues/460#issuecomment-701887605


Update to version 0.9.0

Checklist

[x] Used a personal fork of the feedstock to propose changes
Bumped the build number (if the version is unchanged)
[x] Reset the build number to 0 (if the version changed)
[x] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[x] Ensured the license file is being packaged.

Closes #6

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

Thanks @awvwgk! I suggest we wait with merging this until v0.9.1 is out, so we can merge that straight after. 0.9.0 fixes a whole bunch of things, but has one unfortunate regression on macOS 10.X so it'd be nice to merge the two releases at the same time.

Alright, then let's not package 0.9.0 for conda-forge

Is this a known failure?
_____________________________ test_executable_bit ______________________________

sdist_executable_bit = PosixPath('/tmp/pytest-of-conda/pytest-0/test0/mesonpy-test-e_t6fig5/executable_bit-1.0.0.tar.gz')

    @pytest.mark.skipif(os.name == 'nt', reason='Executable bit does not exist on Windows')
    def test_executable_bit(sdist_executable_bit):
        sdist = tarfile.open(sdist_executable_bit, 'r:gz')

>       assert set((tar.name, tar.mode) for tar in sdist.getmembers()) == {
            ('executable_bit-1.0.0/PKG-INFO', 420),
            # We match the executable bit on everything
            # but PKG-INFO(we create this ourselves)
            # Note: File perms are in octal, but Python returns it in int
            ('executable_bit-1.0.0/example-script.py', int('755', 8)),
            ('executable_bit-1.0.0/example.c', int('644', 8)),
            ('executable_bit-1.0.0/executable_module.py', int('755', 8)),
            ('executable_bit-1.0.0/meson.build', int('644', 8)),
            ('executable_bit-1.0.0/pyproject.toml', int('644', 8)),
        }
E       AssertionError: assert {('executable_bit-1.0.0/PKG-INFO', 420),\n ('executable_bit-1.0.0/example-script.py', 509),\n ('executable_bit-1.0.0/example.c', 436),\n ('executable_bit-1.0.0/executable_module.py', 509),\n ('executable_bit-1.0.0/meson.build', 436),\n ('executable_bit-1.0.0/pyproject.toml', 436)} == {('executable_bit-1.0.0/PKG-INFO', 420),\n ('executable_bit-1.0.0/example-script.py', 493),\n ('executable_bit-1.0.0/example.c', 420),\n ('executable_bit-1.0.0/executable_module.py', 493),\n ('executable_bit-1.0.0/meson.build', 420),\n ('executable_bit-1.0.0/pyproject.toml', 420)}
E         Extra items in the left set:
E         ('executable_bit-1.0.0/pyproject.toml', 436)
E         ('executable_bit-1.0.0/example.c', 436)
E         ('executable_bit-1.0.0/executable_module.py', 509)
E         ('executable_bit-1.0.0/example-script.py', 509)
E         ('executable_bit-1.0.0/meson.build', 436)
E         Extra items in the right set:
E         ('executable_bit-1.0.0/example-script.py', 493)
E         ('executable_bit-1.0.0/example.c', 420)
E         ('executable_bit-1.0.0/executable_module.py', 493)
E         ('executable_bit-1.0.0/meson.build', 420)
E         ('executable_bit-1.0.0/pyproject.toml', 420)
E         Full diff:
E           {
E            ('executable_bit-1.0.0/PKG-INFO', 420),
E         -  ('executable_bit-1.0.0/example-script.py', 493),
E         ?                                             ^ -
E         +  ('executable_bit-1.0.0/example-script.py', 509),
E         ?                                             ^^
E         -  ('executable_bit-1.0.0/example.c', 420),
E         ?                                      ^^
E         +  ('executable_bit-1.0.0/example.c', 436),
E         ?                                      ^^
E         -  ('executable_bit-1.0.0/executable_module.py', 493),
E         ?                                                ^ -
E         +  ('executable_bit-1.0.0/executable_module.py', 509),
E         ?                                                ^^
E         -  ('executable_bit-1.0.0/meson.build', 420),
E         ?                                        ^^
E         +  ('executable_bit-1.0.0/meson.build', 436),
E         ?                                        ^^
E         -  ('executable_bit-1.0.0/pyproject.toml', 420),
E         ?                                           ^^
E         +  ('executable_bit-1.0.0/pyproject.toml', 436),
E         ?                                           ^^
E           }

tests/test_sdist.py:77: AssertionError
---------------------------- Captured stdout setup -----------------------------
! Using Meson to generate the project metadata (no `project` section in pyproject.toml)
+ meson setup --native-file=$SRC_DIR/tests/packages/executable-bit/.mesonpy-native-file.ini -Ddebug=false -Doptimization=2 --prefix=$PREFIX $SRC_DIR/tests/packages/executable-bit $SRC_DIR/tests/packages/executable-bit/.mesonpy-vvtcczsb/build
The Meson build system
Version: 0.63.2
Source dir: $SRC_DIR/tests/packages/executable-bit
Build dir: $SRC_DIR/tests/packages/executable-bit/.mesonpy-vvtcczsb/build
Build type: native build
Project name: executable-bit
Project version: 1.0.0
C compiler for the host machine: $PREFIX/bin/x86_64-conda-linux-gnu-cc (gcc 10.4.0 "x86_64-conda-linux-gnu-cc (conda-forge gcc 10.4.0-16) 10.4.0")
C linker for the host machine: $PREFIX/bin/x86_64-conda-linux-gnu-cc ld.bfd 2.36.1
Host machine cpu family: x86_64
Host machine cpu: x86_64
Program python found: YES ($PREFIX/bin/python)
Build targets in project: 1

executable-bit 1.0.0

  User defined options
    Native files: $SRC_DIR/tests/packages/executable-bit/.mesonpy-native-file.ini
    debug       : false
    optimization: 2
    prefix      : $PREFIX

Found ninja-1.11.0 at $PREFIX/bin/ninja
+ meson dist --allow-dirty --no-tests --formats gztar
Created $SRC_DIR/tests/packages/executable-bit/.mesonpy-vvtcczsb/build/meson-dist/executable-bit-1.0.0.tar.gz
=========================== short test summary info ============================
FAILED tests/test_sdist.py::test_executable_bit - AssertionError: assert {('e...
=================== 1 failed, 50 passed, 2 xpassed in 37.37s ===================

Ugh, this test is very fragile. It works in meson-python's CI now though, and it works for me locally too. It's probably because of Docker: https://blog.gougousis.net/file-permissions-the-painful-side-of-docker/.
We can safely skip the test here.
The differences here are:
>>> int('644', 8)
420
>>> int('664', 8)
436

Meaning that the test expects -rw-r--r-- and with Docker it sees -rw-rw-r--. Similar for the file with the executable bit actually set:
>>> int('755', 8)
493
>>> int('775', 8)
509

Which translates to the test wanting -rwxr-xr-x and it seeing -rwxrwxr-x.

Ah nice, that fix worked plus the other failure of the scipy-like test is very welcome - that means meson 0.63.3 (released yesterday) contains the fix for install_subdir we need. Let me open a couple of PRs on the meson-python repo for these things.

With this fix the test suite should pass: https://github.com/FFY00/meson-python/pull/165


Make operator X=(byte&, ...) compatible with C++11 constexpr rules

See M-GSL PR # 369.
E.g., change
template<...>
gsl_api inline gsl_constexpr14 byte & operator>>=( byte & b,... ) gsl_noexcept
{
    ...
    b.v = to_uchar( b ) >> shift; return b;
}

to
template<...>
gsl_api inline gsl_constexpr byte & operator>>=( byte & b,... ) gsl_noexcept
{
    ...
    return b.v = to_uchar( b ) >> shift, b;
}

To my knowledge, the assignment b.v = ... cannot be constexpr in C++11.

@martinmoene: I think you are right. I should have mentioned that in the MS-GSL PR. I initially chose that somewhat weird syntax, to satisfy the c++11 requirement to only have a single statement in the body, but when I remembered that the MS-GSL doesn't support c++11 anyway I didn't actually pursue c++11 constexpr compatibility any further.


[DOC] Update the Kyuubi supported components version

Why are the changes needed?

Kyuubi 1.8 added the support for JDK 17 and Flink 1.18.
How was this patch tested?

[ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible

[x] Add screenshots for manual tests if appropriate

[x] Run test locally before make a pull request

Was this patch authored or co-authored using generative AI tooling?

No

docs building CI is passed, merging to master/1.8


Fix #93 - null reference exception

Addition to #93
Fix #96
Forgot this part in the PR, sorry
Also restored previous project.json layout

Thanks!


No type hint for react.component and ReactDOMStyle in the pre-release vscode editor plugin.

Environment
rescript version: 9.1.4
editor plugin version: pre-release after 1.30
system: windows10 x64

The type hint for make is wrong.

I think the logic of type hint may be not correct.

We've most likely found the cause for this. Will ping you again when there's a fix you can test. Thanks for reporting!

@Mng12345 this should be fixed if you download the latest vsix from CI.


Include a directory with Flutter assets

The flutter_assets directory is meant to eventually replace app.flx.
This PR also changes the way an asset is retrieved. On asset channel queries, engine now returns the path to the asset instead of returning the asset as byte data.
Before merging this I will have another PR ready which can upgrade the project.pbxproj file of existing projects to include flutter_assets.
Engine PR https://github.com/flutter/engine/pull/4343

cc @tvolkert

Before merging this I will have another PR ready which can upgrade
the project.pbxproj file of existing projects to include flutter_assets.

FYI @xster who's been working on a "flutter project upgrade" mechanism.

I'm probably still at least a week away from a functioning flutter project upgrade mechanism. How does this PR work with flutter projects created in the past?

Old flutter projects will need to get their project.pbxproj updated for this to work.  The PR for it is here #13011 .

@szakarias What is the status of this PR?

I am waiting for review of the corresponding engine PR flutter/engine#4343. cc @chinmaygarde.

I have added a few more comments to the engine PR. I am still a bit unclear about how we are going to address the following issues:

How are the *.pbxproj template upgrades going to be applied to existing users of Flutter? I see no indication about providing upgrade guidance or warning in either the engine or framework patches.

My hacky attempt to copy the resources manually in the xcode_backend.sh build invocation to the directory specified in ${TARGET_BUILD_DIR}/${WRAPPER_NAME}/flutter_assets seemed to work. I grabbed those variables from the Xcode build log by clicking the "Show environement variables in build log." checkbox. Maybe we dont need the templates to change.

Hardcoding a single directory named flutter_assets means we can't have multiple Flutter applications in the same application bundle.

Reverted the change in asset retrieval. We still return assets as byte data instead of the asset paths. I am postponing this to a later change.
With respect to upgrading existing projects, there is this PR #13011.
With respect to having multiple Flutter applications in the same application bundle, I am not sure how hardcoding flutter_assets is worse than the already hardcoded app.flx?

BTW, this was checked in when the tree was red. Please avoid checking anything in when the tree is red except for attempts to fix the tree, because it makes it much harder to detect, and later identify, additional failures introduced while the previous failure was ongoing. Thanks!

@Hixie Tree was red because of a test we had identified, but not marked, as flaky. It was so marked a little later (https://github.com/flutter/flutter/pull/13542).

Ah, excellent. It's good to leave a message on the PR when that happens so that everyone knows it was intentional. Thanks for the update!


Mobile version do not work for horizontal screen

Info:

OS: ipad os

Logseq ver: 0.8.18

Plugin ver: automatically load by css link

Theme name: Awesome Content

[ ] ⚠ Do i have issue with DISABLED my custom.css?

Description:
A clear and concise description of what the bug is......
To Reproduce:
...
Expected behavior:
...
Screenshots
If applicable, add screenshots to help explain your problem.

Attach files
Add (via drag-n-drop) .zip with .md files (if it needs) to help with bugfixind

what are your device sizes?
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/awesomeContent-cdn.css") only screen and (max-width: 1024px); <--- try to set bigger max-width

My device sizes are 2360 x 1640.
I set it to 2400 and 3000. It doesn’t work.

btw, custom.css can be cached, so maybe also need to reindex

other custom css works well

oh! i've found )
awesomeContent-cdn.css is a collection of modules imports. WITH max-width

i've pushed update, but file still chached in cloud
so you can use for now:
`@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/admonition/admonition.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/calculator/calculator.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/columns/columns.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/flashcards/flashcardAwesome.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/headersLabels/headersLabels.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/mermaid/mermaid.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/quotes/quotes.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/tasks/tasks.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/code/code.css");
@import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/modules/other/other.css");`

cdn updated, @import url("https://raw.githack.com/yoyurec/logseq-awesome-content/main/src/awesomeContent-cdn.css"); should work


cleanup: Split class sinsp_with_test_input into hdr + src

What type of PR is this?
/kind cleanup
Any specific area of the project related to this PR?
/area libsinsp
/area tests
Does this PR require a change in the driver versions?
No
What this PR does / why we need it:
The test fixture class sinsp_test_with_input is included in many test source files. It is quite large and was all defined in a single header file. Hoping to improve a bit the build time and for better maintainability it has been split into a header/source pair.
Some cleanup of the class has also been performed, for instance the two functions Setup()/TearDown() have been removed in favor of constructor and destructor as GoogleTest's documentation advises.
https://github.com/google/googletest/blob/main/docs/faq.md#should-i-use-the-constructordestructor-of-the-test-fixture-or-setupteardown-ctorvssetup
Also, the gcc-specific __attribute__((unused) has been replaced with the standard C++ attribute [[maybe_unused]] as the project is now at C++17.
Which issue(s) this PR fixes:
Fixes #
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by: federico-sysdig
Once this PR has been reviewed and has the lgtm label, please assign molter73 for approval. For more information see the Kubernetes Code Review Process.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

/milestone 0.15.0

LGTM label has been added.  Git tree hash: 6a8e264ee555c1fe2fbba9f05d07a1d09cdc930a

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, federico-sysdig
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: FedeDP, federico-sysdig, LucaGuerra
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [FedeDP,LucaGuerra]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

Thanks!


A potential fix for the regex triggers

I was thinking that a potential fix for the snippets with regexes as trigger  (that most of the time misbehave)  and I came up with an idea that can potentially fix it.
If the regex is capable of matching the current input, then the current input should be the item in the list.
If it does not then the input in the list could be a string derived from the pattern (I mean derive in the academic sense).
For instance:
A snippet with the regex
lorem(%d*)
For a text  lorem should return lorem  as item for the list (because the pattern matches the text).
For a text  lor should return lorem0 as item for the list (because lorem0 is  a minimal string derived from the pattern).
The derivations from regexes to strings can be hard to implement, but fortunately in this case lua patterns are very simple so they should be easily derivable.

I can try implementing this over the weekend. will let you know the progress

I think a good solution to this would be to use the snippets docTrig if it has one. That's basically the "default" text for regTrig snippets. It would be much easier than trying to generate a minimal matching string for the trigger pattern.

Just for the record, I reported this at luasnip some time ago
Related issue on LuaSnip repo: L3MON4D3/LuaSnip/issues/563


How can I use my IoU to get ap?Such as AP30,AP10

Do you solve it? I need to compute AP30 , too. Could you share your solution?


Instructions not clear

First thanks for making this, it is impossible to get anything working on AWS without an example the documentation is horrendous...
So I tried following your steps in the readme but gut stuck on step 11.
In the last part of step 10 you say unzip the downloaded apigwsdk.zip
Now I have done this but there is no /src folder or package.json file in there for me to copy.
I tried downloading this repo and installing it but that didn't work
I also tried to copy the /src and package.json from this repo to the CLI generated directory but that didn't work either.
So what do you actually mean by step 11, where are these items coming from?

I also ran into this issue.  Here is how I think it should be clarified:
Step 0) Clone the repo and make any edits to files in further steps (i.e. 1,2 and 4) in there (i.e. edit sam.yaml and aws.service.ts).
When you get to step 10, you now have two repos that are very similar, but obviously not identical.
Copy the /src directory and package.json that you edited from the git repo clone (Step 0) into the directory created in step 10, overwriting the newly created files.
Then run the npm install and npm start and it should run.
Note to the owner of the README - please update the documentation to clarify where the /src and package.json should come from.
Something like:
11. Copy the folder "/src" and the file "package.json" from steps 1-4 to the newly created folder "aws-cognito-apigw-angular" from the last step, overwriting the existing files.
Also, add a step directing users to clone the repo and make edits there (seems obvious, but not always for those of us trying to explore something new and unfamiliar).

Thank you for the suggestions to improve the instructions, it will indeed make more clear.
You need to clone this repository, made some changes to specific files, then create a new blank Angular CLI project, copy the modified files to it then run npm install/start.
I added the suggestions to the README.MD file.


Remove error for empty reply in sniper feed

When starting up the bot, if the sniper feed has 0 items in it, it disables sniping for the rest of the session. This might make sense on the surface for something like a RocketMap feed, where there should always be at least something, but when using a custom feed with only amazing spawns, it's often empty. This isn't a problem - the sniper loops through all items in the feed, which in this case is zero, then moves on. Actual problems with the feed (404, invalid JSON, etc) will trigger a separate error.
I've tested this with a valid feed with items, a valid feed with zero items, and invalid feeds - all work as expected.
Please Note - You may remove this section before opening your PR
We receive lots of PRs and it is hard to give proper review to PRs. Please make it easy on us by following these guidelines:

We do not accept changes to master. Please make sure your pull request is aimed at dev.
If you changed a bunch of files (that aren't config files) or multiple workers to implement your feature, it probably won't get proper attention. Please split it up into multiple, smaller, more focused, and iterative PRs if you can.
If you are adding a config value to something, make sure you update the appropriate config.json example files.
If your pull request is fixing / resolving / or closing any of the issues, please ensure the correct syntax is used eg: Closes #X, Fixes#Y

Short Description:
Fixes/Resolves/Closes (please use correct syntax):

Your logic seems solid :smile: Lets try it
ping; @pogarek

👍

merged #6022


Provide public access to underlying monitoring data?

As I noted in #13, it seems like this site/page/essay/whatever could/should also be a place for public access to the monitoring data. That could be links to files on S3 or all kinds of other things:

CSV/JSON dumps of checks/events/report data
RSS/ATOM feeds
JSON API of data

We could do all of this as a pass-through to Pingometer for “report” data (avg. uptime, response time per day) because @pingometer support tells me the full history of that data is included in their API, but for checks or events, we’d have to do live aggregating into our own database (totally do-able, but another thing).

This still seems compelling—and responsible—to me. I think we should consider it more deliberately as part of the scope of future work we want to pursue.

:+1: agree.


Build a Micro App for SAP Mobile Cards tile is not visible after clicking on the boosters in navigation bar

Hi Colleagues,
We are testing Get Started with SAP Mobile Cards Starter Scenario for the March month cycle and we are facing an issue & it is blocker for us.
Tutorial Link : https://developers.sap.com/mission.mobile-cards-get-started.html
Trail Cockpit : https://cockpit.hanatrial.ondemand.com/trial/#/home/trial
Region : US & AP region
Steps to reproduce the issue:

In your web browser, open the above mentioned trail cockpit.
Provide the login details and click Log On.
Navigate to the trial global account by clicking Go To Your Trial Account.
In the side navigation bar, click on Boosters
Click on Build a Micro App for SAP Mobile Cards tile

Here Build a Micro App for SAP Mobile Cards tile tile is not visible.
Please find the Screen recording attahed to the ticket for your reference.
Thanks & regards,
Akash
https://github.com/sap-tutorials/Tutorials/assets/160128160/4e9d85a9-2778-4753-8add-250d04d51941

This tutorial has been deprecated.


Docs rearrangement

This PR brings some refreshment to the documentation:

Sphinx schema changed for Alabaster
The long and boring ASN.1 tutorial ditched away
Docs layout changed along the modern conventions
The ASN.1 schema object term is used more widely instead of ASN.1 type object where applicable

Codecov Report

Merging #88 into devel-0.4.1 will decrease coverage by 0.02%.
The diff coverage is 100%.

@@               Coverage Diff               @@
##           devel-0.4.1      #88      +/-   ##
===============================================
- Coverage        85.39%   85.37%   -0.03%
===============================================
  Files               29       29
  Lines             3986     3986
===============================================
- Hits              3404     3403       -1
- Misses             582      583       +1

Impacted Files
Coverage Δ

pyasn1/type/char.py
92% <ø> (ø)
:arrow_up:

pyasn1/type/univ.py
82.98% <ø> (ø)
:arrow_up:

pyasn1/codec/cer/encoder.py
83.46% <ø> (ø)
:arrow_up:

pyasn1/codec/der/encoder.py
80.76% <ø> (ø)
:arrow_up:

pyasn1/type/base.py
86.25% <100%> (ø)
:arrow_up:

pyasn1/compat/integer.py
92.64% <0%> (-1.48%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 368d2ef...2db8411. Read the comment docs.


Optimum for Jetson Orin Nano

System Info
optimum version: 1.17.1
platform: Jetson Orin Nano, Jetpack 6.0
Python: 3.10.13
CUDA: 12.2

Who can help?
No response
Information

[X] The official example scripts
[ ] My own modified scripts

Tasks

[ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
[X] My own task or dataset (give details below)

Reproduction (minimal, reproducible, runnable)
Here is how I installed.

install Pytorch 2.2.0 following https://elinux.org/Jetson_Zoo
install onnxruntime-gpu 1.17.0 following following https://elinux.org/Jetson_Zoo
install Optimum by using pip install optimum[onnxruntime-gpu]

Expected behavior
The Optimum installed on my Jetson Orin Nano not support GPU for Jetpack 6.0 and Python 3.10.13.
Can anybody let me know how to install it?

Hi @JunyiYe thank you, could you share which behavior you expect, and which behavior you are getting?