[ENH] Add ParallelReductionFactorOutOfPlane to MRI metadata

This pull request adds the attribute "ParallelReductionFactorOutOfPlane" (corresponding to the DICOM tag (0018,9155) "Parallel Reduction Factor out-of-plane") to the MRI schema to allow proper specification of parallel imaging in the out of plane direction.
This is necessary because 3D MRI sequences are often acquired with parallel imaging applied in both the in plane and out of plane directions, for example in this open dataset: https://doi.org/10.1016/j.dib.2019.104132, where an acceleration factor of 2 was used in plane and also out of plane (2 x 2 GRAPPA). This cannot be captured with the current schema, where only "ParallelReductionFactorInPlane" is defined.
Please note that "ParallelReductionFactorOutOfPlane" is distinct from and independent of the "MultibandAccelerationFactor", which defines acceleration by acquiring multiple non-adjacent slices in 2D sequences.

This makes sense to me. I think it might make sense to change the heading for the table to just "Spatial encoding" and include the OutOfPlane parameter in the same table as InPlane. WDYT?
And what do you think about making the requirement level RECOMMENDED if `MRAcquisitionType` is `"3D"` , as I think it doesn't really have an interpretation for 2D sequences?

@effigies I would be fine with combining the tables into one table under the heading "Spatial encoding". I was just trying to be minimally invasive as to what was there before.
Regarding making the requirement level conditional, how about OPTIONAL, but RECOMMENDED if `MRAcquisitionType` is `"3D"`? In general 2D sequences will always fully sample the excited slice (as collecting just k = 0 is sufficient to "spatially encode" one slice), but there are cases (e.g. multislab acquisitions, super-resolution imaging, gSlider) where one might impose different spatial encodings on the slices (slabs) in a 2D acquisition for later combination.
Let me know what you think, and I will have a go at implementing these changes.

My concern here is that if we take RECOMMENDED and OPTIONAL seriously, they have the following definitions:

3. SHOULD   This word, or the adjective "RECOMMENDED", mean that there may exist valid reasons in particular circumstances to ignore a particular item, but the full implications must be understood and carefully weighed before choosing a different course.

5. MAY   This word, or the adjective "OPTIONAL", mean that an item is truly optional.  One vendor may choose to include the item because a particular marketplace requires it or because the vendor feels that it enhances the product while another vendor may omit the same item. An implementation which does not include a particular option MUST be prepared to interoperate with another implementation which does include the option, though perhaps with reduced functionality. In the same vein an implementation which does include a particular option MUST be prepared to interoperate with another implementation which does not include the option (except, of course, for the feature the option provides.)

Consequently, the validator is beginning to warn on more missing RECOMMENDED values and we should be careful about adding to the list of fields that will alert the user.
Looking at the DICOM standard, the out-of-plane metadata is REQUIRED/OPTIONAL in the same conditions that In-plane is, so I think it's reasonable for them to have the same requirement level, which would be RECOMMENDED. I suppose my remaining question is if you know if this tag is ubiquitous in practice?
cc @neurolabusc for thoughts

I suppose my remaining question is if you know if this tag is ubiquitous in practice?
According to @neurolabusc's dcm2niix documentation, it corresponds to AccelFact3D in Siemens DICOMs and is the second element of the Asset R Factors in GE DICOMs.

@bids-standard/maintainers Anybody up for a second review?


jqGrid search issue

I have a problem with search on jqGrid.
The same result also in easygrid demo page: http://<IP_ADDRESS>:8080/easygrid/author/jqgrid
But in this page it works well:
http://<IP_ADDRESS>:8080/petclinic/overview
What can be a problem? Is this a bug?

Hi Adil,
Thanks for spotting this.
Yes, this is a bug.
For some reason , when migrating to the asset-pipeline plugin , I also added the jqgrid addons library.
With that removed, it works again.
The petclinic example is still running on the resources plugin, and doesn't have this problem.
This will be fixed in the next version.

Hello,
Thank you very much for the hint. Now it works for me.


Update the slack invite link in the Readme Todos section

Applies the link at the top of the Readme to the todos section as well. #90
Replaces #93, while attempting to follow the contribution guidelines

Awesome. Thanks!


Fix circuits method to return correct type

Summary
fixes #412
Details and comments

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

0 of 4 (0.0%)  changed or added relevant lines in 1 file are covered.
1 unchanged line in 1 file lost coverage.
Overall coverage increased (+0.2%) to 35.178%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

qiskit_ibm_provider/job/ibm_circuit_job.py
0
4
0.0%

Files with Coverage Reduction
New Missed Lines
%

qiskit_ibm_provider/job/ibm_circuit_job.py
1
50.0%

Totals

Change from base Build<PHONE_NUMBER>:
0.2%

Covered Lines:
2689

Relevant Lines:
7644

💛  - Coveralls


"SA0102: A syntax error has been discovered" warning for tuples containing fully qualified type names

StyleCop version: <IP_ADDRESS>
Visual Studio version: 2019 (16.2.2)
Project's .NET Framework version: 4.6.2
StyleCop is reporting syntax error when there is a fully qualified type names used in a tuple declaration. Aliased namespaces don't work as well.
This is global issue, i.e. it is reproducible when tuple with fully qualified type name appears as a variable, method argument or method return type.
Code snippet to reproduce an issue:
using System;
using MySystemAlias = System;

namespace StyleCopTupleIssueRepro
{
    public class Foo
    {
        public (String, int) Case1()
        {
            (System.String a, int b) = ("Hello", 42);
            throw new NotImplementedException();
        }

        public (MySystemAlias.String, int) Case2((System.String, int) args)
        {
            throw new NotImplementedException();
        }
    }
}

The workaround is to create an alias for type:
using System;
using MySystemStringAlias = System.String;

namespace StyleCopTupleIssueRepro
{
    public class Foo
    {
        public (MySystemStringAlias, int) Case1()
        {
            throw new NotImplementedException();
        }
    }
}

I have encountered a similar thing.
For me it was on this line of code:
 (DateTime?, DateTime?) lastPeriod = DownloadLastPeriod(id);
And the method DownloadLastPeriod returns either data from an object:
return (temp.StartDate, temp.EndDate)
or
return (new DateTime(1900, 1, 1), new DateTime(1900, 1, 1))


Fix rounding of portfolio final value

Previously the final value was rounded to an integer, this change rounds to two decimal places.
Fixes #18

Whilst testing, I have noticed that there are many other places in the code where things are rounded to the nearest integer. I suggest this gets expanded to fix all of these issues.


New CL Thesis

New CL Thesis here:

Open Set Classification for Deep Learning in Large-Scale and Continual Learning Models Continual Learning Models: https://scholarworks.rit.edu/cgi/viewcontent.cgi?article=11740&context=theses

Will be automatically added soon on next release


persistent nav menu

this but a solid bar across the width of the page matching bg color behind the menu text (see pic 2)
https://user-images.githubusercontent.com/114276319/192081358-ab8824b9-c071-4c88-a5b0-fae28d4f59fb.mp4

"here" refers to bottom of the logo

sticky bar on scroll


Cloud Metadata Discovery fails when using dmidecode

VMs running on Azure will report Microsoft Corporation in case they are running on Hyper-V virtualization, what might not be the case all the time.
Some users reports the following output on the dmidecode of their VMs that makes the Cloud Discover fail:
American Megatrends Inc.

With that, the safest way would be to use the Azure INstance Metada web service to confirm that the machine is really running on an Azure environment.
https://docs.microsoft.com/en-us/azure/virtual-machines/linux/instance-metadata-service?tabs=linux
As this is always a local call inside the VM (even that REST API), it should respond very fast not affecting the discovery time.
That said, it is important to make sure the discovery will not hang waiting for a long timeout in case the machine is not running on Azure, where the metadata API is not available.

MSFT provided us the command already to find out if its Azure or not for saptune last year.
To figure out whether it Is Azure VM, you can use below command:
dmidecode -s chassis-asset-tag
7783-7084-3265-9085-8269-3286-77
The result is ASCII encoded. When convert to a string, the following string shows up: MSFT AZURE VM


Docs: Clean up gemini, industry errors and fix ruff problems

This fixes missing imports and adds a setup script to the gemini example in docs/examples

[!IMPORTANT]
Fixes missing imports and adds setup script to gemini example, resolving ruff linter issues across documentation.

Docs:

Fix missing imports in bulk_classification.md, classification.md, and entity_resolution.md.
Add setup script to multi_modal_gemini.md for audio processing.
Correct model usage in extract_slides.md and extracting_receipts.md.

Linting:

Resolve ruff linter issues across multiple documentation files.

Testing:

Update test_examples.py to exclude certain markdown files from tests.

This description was created by  for<PHONE_NUMBER>53753feafd6ccbe97a2784416a08bf. It will automatically update as commits are pushed.

All tests passing locally when I run the command
 pytest ./tests/llm/test_openai/docs/test_examples.py --update-examples

tests/llm/test_openai/docs/test_examples.py ..........................................................................                                 [100%]
====================================================================== warnings summary =


Update to 4.1-13.

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.

@conda-forge-admin, please rerender


Remove object-assign.

It was still listed as a dependency after https://github.com/evcohen/jsx-ast-utils/commit/93fdce184b3b8778c424986ca54d0284ec02f6ef.

Coverage remained the same at 98.78% when pulling e898efb60c4fa95448a42bcf81855bb8b72ee2dc on wtgtybhertgeghgtwtg:drop-object-assign into 93fdce184b3b8778c424986ca54d0284ec02f6ef on evcohen:master.

ah, thanks. yarn remove didn't remove it from package.json. LGTM

Thank you for merging.


DropdownMenu isDense decoration doesn't work as expected

Is there an existing issue for this?

[X] I have searched the existing issues
[X] I have read the guide to filing a bug

Steps to reproduce
Run the attached sample code
Expected results
See the comments in the Screenshots section.
Thank you
Actual results
The DropdownMenu on the right is the same size as the one on the left.  No "dense" effect at all.
Code sample
Code sample
import 'package:flutter/material.dart';

/// Flutter code sample for [DropdownMenu]s. The first dropdown menu has an outlined border.

void main() => runApp(const DropdownMenuExample());

class DropdownMenuExample extends StatefulWidget {
  const DropdownMenuExample({super.key});

  @override
  State<DropdownMenuExample> createState() => _DropdownMenuExampleState();
}

class _DropdownMenuExampleState extends State<DropdownMenuExample> {
  final TextEditingController colorController = TextEditingController();
  final TextEditingController iconController = TextEditingController();
  ColorLabel? selectedColor;
  IconLabel? selectedIcon;

  @override
  Widget build(BuildContext context) {
    final List<DropdownMenuEntry<ColorLabel>> colorEntries =
    <DropdownMenuEntry<ColorLabel>>[];
    for (final ColorLabel color in ColorLabel.values) {
      colorEntries.add(
        DropdownMenuEntry<ColorLabel>(
            value: color, label: color.label, enabled: color.label != 'Grey'),
      );
    }

    final List<DropdownMenuEntry<IconLabel>> iconEntries =
    <DropdownMenuEntry<IconLabel>>[];
    for (final IconLabel icon in IconLabel.values) {
      iconEntries
          .add(DropdownMenuEntry<IconLabel>(value: icon, label: icon.label));
    }

    return MaterialApp(
      theme: ThemeData(
        useMaterial3: true,
        colorSchemeSeed: Colors.green,
      ),
      home: Scaffold(
        body: SafeArea(
          child: Column(
            children: <Widget>[
              Padding(
                padding: const EdgeInsets.symmetric(vertical: 20),
                child: Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    DropdownMenu<ColorLabel>(
                      initialSelection: ColorLabel.green,
                      controller: colorController,
                      label: const Text('Color'),
                      dropdownMenuEntries: colorEntries,
                      onSelected: (ColorLabel? color) {
                        setState(() {
                          selectedColor = color;
                        });
                      },
                    ),
                    const SizedBox(width: 20),
                    DropdownMenu<IconLabel>(
                      controller: iconController,
                      enableFilter: true,
                      leadingIcon: const Icon(Icons.search),
                      label: const Text('Icon'),
                      dropdownMenuEntries: iconEntries,
                      inputDecorationTheme: const InputDecorationTheme(
                        filled: true,
                        contentPadding: EdgeInsets.symmetric(vertical: 5.0),
                      ),
                      onSelected: (IconLabel? icon) {
                        setState(() {
                          selectedIcon = icon;
                        });
                      },
                    ),
                    const SizedBox(width: 12,),
                    DropdownMenu<IconLabel>(
                      controller: iconController,
                      enableFilter: true,
                      leadingIcon: const Icon(Icons.search),
                      label: const Text('Icon'),
                      dropdownMenuEntries: iconEntries,
                      inputDecorationTheme: const InputDecorationTheme(
                        isDense: true,   // doesn't do much!
                        filled: true,
                        contentPadding: EdgeInsets.symmetric(vertical: 5.0),
                      ),
                      onSelected: (IconLabel? icon) {
                        setState(() {
                          selectedIcon = icon;
                        });
                      },
                    ),

                  ],
                ),
              ),
              if (selectedColor != null && selectedIcon != null)
                Row(
                  mainAxisAlignment: MainAxisAlignment.center,
                  children: <Widget>[
                    Text(
                        'You selected a ${selectedColor?.label} ${selectedIcon?.label}'),
                    Padding(
                      padding: const EdgeInsets.symmetric(horizontal: 5),
                      child: Icon(
                        selectedIcon?.icon,
                        color: selectedColor?.color,
                      ),
                    )
                  ],
                )
              else
                const Text('Please select a color and an icon.')
            ],
          ),
        ),
      ),
    );
  }
}

enum ColorLabel {
  blue('Blue', Colors.blue),
  pink('Pink', Colors.pink),
  green('Green', Colors.green),
  yellow('Yellow', Colors.yellow),
  grey('Grey', Colors.grey);

  const ColorLabel(this.label, this.color);
  final String label;
  final Color color;
}

enum IconLabel {
  smile('Smile', Icons.sentiment_satisfied_outlined),
  cloud(
    'Cloud',
    Icons.cloud_outlined,
  ),
  brush('Brush', Icons.brush_outlined),
  heart('Heart', Icons.favorite);

  const IconLabel(this.label, this.icon);
  final String label;
  final IconData icon;
}

Screenshots or Video

Screenshots / Video demonstration
[Upload media here]

The DropDownMenu on the right is with isDense: true.  I would have expected the padding to be smaller and the widget to have a smaller height.  It only seems to affect the sizes of the two icons.

Logs
Logs
[Paste your logs here]

Flutter Doctor output
Doctor output
[Paste your output here]

I'm observing this on the web.  Thanks

Hi @thumbert. Thanks for filing this issue. This seems to work as expected, kindly check out the use case for the isDense property in DropdownMenu here: https://api.flutter.dev/flutter/material/DropdownButton/isDense.html

This can be useful when the button is embedded in a container that adds its own decorations, like InputDecorator.

Closing this as this seems to work as expected, if you disagree, please comment and I'll reopen this.
Thank you!


-DosgiConsole option is not working with the analytics.sh script in the <Iot_Home>/bin

This works fine if we start the analytics server from <iot_Home>/wso2/analytics/bin

Verified now with the latest IoT 3.1.1-SNAPSHOT pack as per 28 Aug 2017, and this issue is no longer there. I was able to start the analytics.sh with additional params such as  -DosgiConsole.

The automation test for passing with params can be verified when adding the automation test for -Dsetup with different databases. And hence we don't need a separate automation test to address specifically this issue.


No error message if the repo entity name already exists

When adding a new repo from the mashup "GitBackup.Main.Mashup" there was no error message efter completing the form and no repo was created. Looking in the ThingWorx log after some tries I found this message: "Execution error in service script [AddNewRepo] :: Thing [xxxxx] already exists". Please add an error message if this is the case and keep the form open.

Hello, I would like to clarify the issue. Do you mean that a Git Backup Thing was previously created and if you try to create the same thing again (with the same name), from the Mashup you don't get any error message that the Thing already exists? If this is the case, I don't think there is any verification for the Thing name you provide to your Git Backup Thing in the Mashup. An additional service would need to be added to the Mashup to verify if the thing name is unique, prior to moving to the next screen. Of course, you can create your GitBackup thing in the Composer, and in this situation, you can avoid duplicate names.

Enhancement released as part of Extension version 5.0.0 #


GH2872: Bump eol target frameworks

Fixes #2872.

@gitfool Thanks for the contribution 👍
Changing TFM is a breaking change since it bumps requirements for running Cake. This is something which we don't want to do in the 1.x release cycle. I therefore assigned the issues to the 2.x milestone and we will hold this PR back until 1.0 is released.


Issue with Injector

Hi,
I tried to inject your module into my script
But i keep on getting this error:
Module 'vsGoogleAutocomplete' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.
I've loaded it on my module:
var app = angular.module('myApp',['ngRoute','ngFileUpload', 'vsGoogleAutocomplete']);
included your file after angular file and declare
     $scope.address = {
    name: '',
    place: '',
    components: {
      placeId: '',
      streetNumber: '',
      street: '',
      city: '',
      state: '',
      countryCode: '',
      country: '',
      postCode: '',
      district: '',
      location: {
        lat: '',
        long: ''
      }
    }
  };

on the related controller.
But its still throwing that error, is there anyway to rectify it?
Thanks,

Hi,
I solved the issue, I think there's an issue with your minified file.

@sallyiee How did you do it ? I'm having the same problem

Me too. How did you resolve it?

instead of using the minified JS, I've linked un-minified version. Seems to work on my app

I have to swap the order of the js in script tag
to use minified JS, you need to add a main section in bower.json


Ability to customise model retrieval from database.

Is your feature request related to a problem? Please describe.
You may want to keep one model persistently being retrieved, lets say your best model rather than the most recent one always. Although this can be overcome by simply putting that one model in its own collection that feels wrong.
Describe the solution you'd like
Another config file similar to pipeline, but this time one that using pymongo.find() to get one document only. Should not force user to do so however and should default to most recent if none provided.
Describe alternatives you've considered
Just using an alternate collection for production models.
Additional context
None

Pull request: https://github.com/DreamingRaven/Nemesyst/pull/21


How to get last element from an array of objects using GET?

I have an array stored in db.json, which contains the following elements:
"Names": [{       "firstName": "Fred",       "lastName": "Flintstone",       "id": 1     },     {       "firstName": "Tom",       "lastName": "Hardy",       "id": 2     },     {       "firstName": "Christian",       "lastName": "Bale",       "id": 3     }]
From this array, how can I get the last element which I'm using to update another array object which will be used in another application? In case more elements are added to Names, I would need the one with the greatest id

let arr = { your_array };
let last_element = arr.Names[arr.Names.length - 1];


MediaInfo Maximum bit rate float value

Hi , I have a question about mediainfo Maximum bitrate .
If the XML Spec for the mediainfo field Maximum Bit Rate is a float64.
How do parsers usually handle fields with values like this and trying to understand where the bug in on encoder setting or how did mediainfo allow generating this value  because parsing it as float will fail.
I have an input source on which the Audio track has
Maximum bit rate                         : 130723 / 130723

From https://mediaarea.net/mediainfo/mediainfo_2_0.xsd
<xsd:element name="BitRate_Maximum" minOccurs="0" maxOccurs="1" type="xsd:float"/>

Twice the value is a bug, please provide a sample file creating this output (after having checked with latest version of MediaInfo).

thanks @JeromeMartinez . Yeah I did check with the latest version of mediaInfo. can I send you the sample file via email or something ? it's a big file.. or I can clip a 10 sec from that and send that over. Let me know and I'll get that over to you.

If the 10 sec version has the issue, it is enough for me. file or link here or at<EMAIL_ADDRESS>if not shareable in public.

thanks @JeromeMartinez  forwarded sample on email.
Would it be possible for you to check if some older mediainfo version didn't have this bug ?

Would it be possible for you to check if some older mediainfo version didn't have this bug ?

Our old versions are there.

thanks @JeromeMartinez  for the fix. ⭐

In next release or in dev snapshots.


fixed vcpus-to-memory ratio calc to use ceiling

Issue #, if available:
N/A
Description of changes:
The vcpus-to-memory-ratio was computed to 2 decimal places, but this isn't lenient enough for old instance types that have odd ratios. This change uses the ceiling so that old instance types are returned for ratios that are close enough.
This change also fixes some copy and paste errors in the test failure output.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Codecov Report

Merging #18 into master will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master      #18      +/-   ##
==========================================
+ Coverage   89.46%   89.48%   +0.01%
==========================================
  Files           7        7
  Lines         826      827       +1
==========================================
+ Hits          739      740       +1
  Misses         57       57
  Partials       30       30

Impacted Files
Coverage Δ

pkg/selector/comparators.go
91.02% <100.00%> (+0.11%)
: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 eabf2f5...7e9bf55. Read the comment docs.


How to highlight words like TODO?

I use this snippet in my .vimrc to highlight these words:
augroup HiglightTODO
    autocmd!
    autocmd WinEnter,VimEnter * :silent! call matchadd('Error', 'TODO\|STARTED\|DONE\|FIXME\|FIXED', -1)
augroup END

At first, I assumed this didn't work in VS Code. By accident, I found out that it does work if you enable spell check :set spell. But because spell check is enabled, every word not in the dictionary gets an ugly squiggly underline. Strangely enough, this underline is only visible in Visual mode.

How can I highlight words like TODO, without enabling spell check?

That may be sufficient for you: https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments

You would have needed to look up what highlight groups TODO uses and set them manually (I assume they were linked to nonexistent spell hl groups).


Class feature issues

https://app.roll20.net/forum/post/3212109/5e-shaped-2-dot-3-2-plus/?pageforid=3232766#post-3232766

3 digits in uses is a bit too pushed together, should only really appear on near level 20 characters. A level 20 paladin lay on hands for example when its 100/100
Some features and traits don't have saves on them (Cleric Turn Undead, barbs relentless is no longer there may have been removed earlier or for a reason but I noticed that)
Damage fields are incorrect at times, for example the rogue sneak attack is adding dex to the sneak attack damage, improved divine smite is adding damage mods (old issue but its another one). Monk's deflect missiles just being dex are the ones I notice after a quick look.

Could not verify any of these issues any more


Running tests fails - possible config issue

Hi, I'm trying to use mimir to better understand the guide you wrote for flutter_rust_bridge.
I am facing an issue which I can replicate with mimir:
atom@Dell-Desktop:~$ git clone https://github.com/GregoryConrad/mimir && cd mimir && melos clean && melos bootstrap && melos run test
Cloning into 'mimir'...
remote: Enumerating objects: 2609, done.
remote: Counting objects: 100% (576/576), done.
remote: Compressing objects: 100% (318/318), done.
remote: Total 2609 (delta 350), reused 322 (delta 257), pack-reused 2033
Receiving objects: 100% (2609/2609), 3.42 MiB | 10.97 MiB/s, done.
Resolving deltas: 100% (1364/1364), done.
Cleaning workspace...

Workspace cleaned. You will need to run the bootstrap command again to use this workspace.
melos bootstrap
  └> /home/atom/mimir

Running "flutter pub get" in workspace packages...
  ✓ mimir
    └> packages/mimir
  ✓ example
    └> packages/mimir/example
  ✓ flutter_mimir
    └> packages/flutter_mimir
  ✓ flutter_example
    └> packages/flutter_mimir/example
  > SUCCESS

Generating IntelliJ IDE files...
  > SUCCESS

 -> 4 packages bootstrapped
melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> RUNNING

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> RUNNING

$ melos exec
  └> dart test test
     └> RUNNING (in 2 packages)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
example:
00:01 +0 -1: test/example_test.dart: Main function runs correctly [E]
  Invalid argument(s): Failed to load dynamic library '../../../target/release/libembedded_milli.so': ../../../target/release/libembedded_milli.so: cannot open shared object file: No such file or directory
  dart:ffi                             new DynamicLibrary.open
  package:example/example.dart 136:25  getLibrary
  package:example/example.dart 16:28   main

To run this test again: /home/atom/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart test test/example_test.dart -p vm --plain-name 'Main function runs correctly'
00:01 +0 -1: Some tests failed.

Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

$ melos exec
  └> dart test test
     └> FAILED (in 1 packages)
        └> example (with exit code 1)

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> FAILED
ScriptException: The script test:dart failed to execute

melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> FAILED
ScriptException: The script test failed to execute

As you can see, this test fails because the shared library cannot be found.
According to the guide you wrote, the shared library binaries are distributed through GitHub Releases, so I did not build them before running the tests. If I do build the shared library however, the result is similar:

Click to expand
atom@Dell-Desktop:~$ git clone https://github.com/GregoryConrad/mimir && cd mimir && melos clean && melos bootstrap && bash scripts/build-other.sh && melos run test
Cloning into 'mimir'...
remote: Enumerating objects: 2609, done.
remote: Counting objects: 100% (542/542), done.
remote: Compressing objects: 100% (311/311), done.
remote: Total 2609 (delta 315), reused 295 (delta 230), pack-reused 2067
Receiving objects: 100% (2609/2609), 3.42 MiB | 11.60 MiB/s, done.
Resolving deltas: 100% (1358/1358), done.
Cleaning workspace...

Workspace cleaned. You will need to run the bootstrap command again to use this workspace.
melos bootstrap
  └> /home/atom/mimir

Running "flutter pub get" in workspace packages...
  ✓ example
    └> packages/mimir/example
  ✓ mimir
    └> packages/mimir
  ✓ flutter_mimir
    └> packages/flutter_mimir
  ✓ flutter_example
    └> packages/flutter_mimir/example
  > SUCCESS

Generating IntelliJ IDE files...
  > SUCCESS

 -> 4 packages bootstrapped
    Updating crates.io index
     Ignored package `cargo-zigbuild v0.14.2` is already installed, use --force to override
    Updating crates.io index
     Ignored package `cargo-xwin v0.13.3` is already installed, use --force to override
info: component 'rust-std' for target 'aarch64-unknown-linux-gnu' is up to date
    Updating crates.io index
    Updating git repository `https://github.com/GregoryConrad/milli`
    Updating git repository `https://github.com/meilisearch/heed`
    Updating git repository `https://github.com/meilisearch/lmdb-rs`
   Compiling proc-macro2 v1.0.49
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
...
SNIP
...
   Compiling lindera v0.14.0
   Compiling charabia v0.6.0
   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)
    Finished release [optimized] target(s) in 2m 11s
info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date
   Compiling libc v0.2.139
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.151
...
SNIP
...
   Compiling lindera v0.14.0
   Compiling charabia v0.6.0
   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)
    Finished release [optimized] target(s) in 1m 22s
info: component 'rust-std' for target 'aarch64-pc-windows-msvc' is up to date
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.151
   Compiling winapi v0.3.9
...
SNIP
...
   Compiling lindera v0.14.0
   Compiling charabia v0.6.0
   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)
    Finished release [optimized] target(s) in 1m 27s
info: component 'rust-std' for target 'x86_64-pc-windows-msvc' is up to date
   Compiling cfg-if v1.0.0
   Compiling serde v1.0.151
   Compiling winapi v0.3.9
...
SNIP
...
   Compiling lindera v0.14.0
   Compiling charabia v0.6.0
   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)
    Finished release [optimized] target(s) in 1m 27s
linux-arm64/
linux-arm64/libembedded_milli.so
linux-x64/
linux-x64/libembedded_milli.so
windows-arm64/
windows-arm64/embedded_milli.dll
windows-x64/
windows-x64/embedded_milli.dll
melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> RUNNING

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> RUNNING

$ melos exec
  └> dart test test
     └> RUNNING (in 2 packages)

---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
example:
00:01 +0 -1: test/example_test.dart: Main function runs correctly [E]
  Invalid argument(s): Failed to load dynamic library '../../../target/release/libembedded_milli.so': ../../../target/release/libembedded_milli.so: cannot open shared object file: No such file or directory
  dart:ffi                             new DynamicLibrary.open
  package:example/example.dart 136:25  getLibrary
  package:example/example.dart 16:28   main

To run this test again: /home/atom/snap/flutter/common/flutter/bin/cache/dart-sdk/bin/dart test test/example_test.dart -p vm --plain-name 'Main function runs correctly'
00:02 +0 -1: Some tests failed.

Consider enabling the flag chain-stack-traces to receive more detailed exceptions.
For example, 'dart test --chain-stack-traces'.
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

$ melos exec
  └> dart test test
     └> FAILED (in 1 packages)
        └> example (with exit code 1)

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> FAILED
ScriptException: The script test:dart failed to execute

melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> FAILED
ScriptException: The script test failed to execute

I would appreciate it if you could give any advice on any debugging steps I could take to set up my system to run passing tests from this repository.
System information

Click to expand
I am running Ubuntu Linux via WSL.
Windows
C:\Users\Atom>ver

Microsoft Windows [Version 10.0.19045.2364]

WSL
C:\Users\Atom>wsl --version
WSL version: <IP_ADDRESS>
Kernel version: <IP_ADDRESS>
WSLg version: 1.0.47
MSRDC version: 1.2.3575
Direct3D version: 1.606.4
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.19045.2364

Linux Kernel
atom@Dell-Desktop:~$ uname -a
Linux Dell-Desktop <IP_ADDRESS>-microsoft-standard-WSL2 #1 SMP Wed Nov 23 01:01:46 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Flutter
atom@Dell-Desktop:~$ flutter doctor -v
[✓] Flutter (Channel stable, 3.3.10, on Ubuntu 22.04.1 LTS <IP_ADDRESS>-microsoft-standard-WSL2, locale C.UTF-8)
    • Flutter version 3.3.10 on channel stable at /home/atom/snap/flutter/common/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 135454af32 (9 days ago), 2022-12-15 07:36:55 -0800
    • Engine revision 3316dd8728
    • Dart version 2.18.6
    • DevTools version 2.15.0

[✗] Android toolchain - develop for Android devices
    ✗ Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

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

[✓] Linux toolchain - develop for Linux desktop
    • clang version 10.0.0-4ubuntu1
    • cmake version 3.16.3
    • ninja version 1.10.0
    • pkg-config version 0.29.1

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/linux#android-setup for detailed instructions).

[✓] Connected device (1 available)
    • Linux (desktop) • linux • linux-x64 • Ubuntu 22.04.1 LTS <IP_ADDRESS>-microsoft-standard-WSL2

[✓] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.

Flutter Snap
(this is how Flutter and Dart are installed on my system)
atom@Dell-Desktop:~$ snap info flutter
name:      flutter
summary:   Flutter SDK
publisher: Flutter Team✓
store-url: https://snapcraft.io/flutter
contact:   https://github.com/flutter/flutter/issues
license:   unset
description: |
  Flutter is Google’s UI toolkit for building beautiful, natively compiled
  applications for mobile, web, and desktop from a single codebase.
commands:
  - flutter.dart
  - flutter
  - flutter.openurl
snap-id:      YO0Adf4fqgxL7i3SaCn00oxEfd5CNQ63
tracking:     latest/stable
refresh-date: yesterday at 17:27 GMT
channels:
  latest/stable:    0+git.ccbc698 2022-10-20 (130) 215MB classic
  latest/candidate: ↑
  latest/beta:      ↑
  latest/edge:      0+git.74565fa 2022-11-29 (133) 216MB classic
installed:          0+git.ccbc698            (130) 215MB classic

Rust
atom@Dell-Desktop:~$ rustup --version
rustup 1.25.1 (bb60b1e89 2022-07-12)
info: This is the version for the rustup toolchain manager, not the rustc compiler.
info: The currently active `rustc` version is `rustc 1.66.0 (69f9c33d7 2022-12-12)`

Hi! Thanks for brining this up. I probably should've clarified that part in the guide. There are two things to note here:
To run Dart-only tests, always run cargo build -r beforehand. This is your issue here; you are missing the binaries locally. If you look in my Dart unit test source code, you will see that it references the binaries in the /target/release folder (or something like that), which doesn't exist (or might be out of date) unless you run cargo build -r right before running the Dart tests.
To run Flutter-specific tests, you will need to create the platform specific binaries, which is what you are mentioning. That can be done through melos run build (for all of them, only possible on macOS) or melos run build:other (windows/linux) or melos run build:android (android). Please note that after you run that build command, you will need to copy the binaries over to the correct part of your /packages/flutter_library_name directory. That is detailed here.

I will admit the current build system is somewhat of a pain right now, but unfortunately you can't do too much better until Dart supports Native Assets.

To run Dart-only tests, always run cargo build -r beforehand. This is your issue here; you are missing the binaries locally. If you look in my Dart unit test source code, you will see that it references the binaries in the /target/release folder (or something like that), which doesn't exist (or might be out of date) unless you run cargo build -r right before running the Dart tests.

Perfect, this works for me!

Please note that after you run that build command, you will need to copy the binaries over to the correct part of your /packages/flutter_library_name directory.

Could you explain why builds need to be run locally in this case? In the guide, you write:

When the Dart tooling builds our library (such as when an application consuming our library is built), it invokes the platform specific build process. We hijack this build process by downloading a copy of the binaries for the needed platform, if not already present on the filesystem. This last part is the key; it allows us to run integration tests locally and in CI by providing our own copy of the binaries instead of forcing our build process to always fetch the binaries from GitHub releases.

So only projects which depend on the Flutter library can take advantage of this? For example, if I wrote an example which depends on package:flutter_mimir and then wrote some tests for that example, would I not have to worry about platform-specific code or compiling these binaries at all?

Could you explain why builds need to be run locally in this case?

Sure. That is because you want any consumers of the library to automatically fetch the corresponding release binaries from online (GitHub releases). However, if you are developing locally and make changes on the Rust side, that behavior is incorrect; you would instead want to use the binaries you built locally instead of fetching them from online. The CMake & podspec modifications detailed in the guide only download binaries if not already present, which takes care of this behavior.

So only projects which depend on the Flutter library can take advantage of this? For example, if I wrote an example which depends on package:flutter_mimir and then wrote some tests for that example, would I not have to worry about platform-specific code or compiling these binaries at all?

Correct, by having the CMake/podspec scripts auto-download the binaries if they don't find them on the filesystem in the correct places, users of the library don't have to worry at all about it.

Great - thanks for clarifying!
It looks like the tests run fine after I run cargo build -r and melos run build:other, and then copy the generated archive to the relevant folder.
By the way, it looks like that build script has a little hiccup towards the end - I think mkdir runs on an existing directory
https://github.com/GregoryConrad/mimir/blob/597d3b0cf56037f4833dca7ce5d6c7fbe82aba5c/scripts/build-other.sh#L18-L19
which leads to the warnings towards the end of the following log:

Click to expand
atom@Dell-Desktop:~$ git clone https://github.com/GregoryConrad/mimir && cd mimir && melos clean && melos bootstrap && melos run build:other
Cloning into 'mimir'...
remote: Enumerating objects: 2609, done.
remote: Counting objects: 100% (542/542), done.
remote: Compressing objects: 100% (311/311), done.
remote: Total 2609 (delta 315), reused 295 (delta 230), pack-reused 2067
Receiving objects: 100% (2609/2609), 3.42 MiB | 781.00 KiB/s, done.
Resolving deltas: 100% (1358/1358), done.
Cleaning workspace...

Workspace cleaned. You will need to run the bootstrap command again to use this workspace.
melos bootstrap
  └> /home/atom/mimir

Running "flutter pub get" in workspace packages...
  ✓ mimir
    └> packages/mimir
  ✓ example
    └> packages/mimir/example
[flutter_mimir]: Running "flutter pub get" in flutter_mimir...
[flutter_mimir]: Running "flutter pub get" in flutter_mimir...                       3.5s
[flutter_mimir]: Running "flutter pub get" in example...
[flutter_mimir]: Running "flutter pub get" in example...                             3.4s
  ✓ flutter_mimir
    └> packages/flutter_mimir
  ✓ flutter_example
    └> packages/flutter_mimir/example
  > SUCCESS

Generating IntelliJ IDE files...
  > SUCCESS

 -> 4 packages bootstrapped
melos run build:other
  └> bash scripts/build-other.sh
     └> RUNNING

    Updating crates.io index

     Ignored package `cargo-zigbuild v0.14.2` is already installed, use --force to override

    Updating crates.io index

     Ignored package `cargo-xwin v0.13.3` is already installed, use --force to override

info: component 'rust-std' for target 'aarch64-unknown-linux-gnu' is up to date

    Updating crates.io index

    Updating git repository `https://github.com/GregoryConrad/milli`

    Updating git repository `https://github.com/meilisearch/heed`

    Updating git repository `https://github.com/meilisearch/lmdb-rs`

   Compiling proc-macro2 v1.0.49
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6

...

SNIP

...

   Compiling lindera v0.14.0

   Compiling charabia v0.6.0

   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)

    Finished release [optimized] target(s) in 4m 11s

info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date

   Compiling libc v0.2.139
   Compiling cfg-if v1.0.0

   Compiling serde v1.0.151

...

SNIP

...

   Compiling lindera v0.14.0

   Compiling charabia v0.6.0

   Compiling milli v0.37.0 (https://github.com/GregoryConrad/milli?branch=filter-parser-convenience#50954d31)

    Finished release [optimized] target(s) in 2m 49s

info: component 'rust-std' for target 'aarch64-pc-windows-msvc' is up to date

Error: File exists (os error 17)

cp: cannot stat '../target/aarch64-pc-windows-msvc/release/embedded_milli.dll': No such file or directory

info: component 'rust-std' for target 'x86_64-pc-windows-msvc' is up to date

Error: File exists (os error 17)

cp: cannot stat '../target/x86_64-pc-windows-msvc/release/embedded_milli.dll': No such file or directory

linux-arm64/
linux-arm64/libembedded_milli.so
linux-x64/
linux-x64/libembedded_milli.so
windows-arm64/
windows-x64/

melos run build:other
  └> bash scripts/build-other.sh
     └> SUCCESS

If memory serves, that mkdir failing shouldn't be an issue. If the directory is already created, it doesn't need to be created again (and can just fail). However, the:

cp: cannot stat '../target/x86_64-pc-windows-msvc/release/embedded_milli.dll': No such file or directory

Does look like an issue. For some reason the .dll is not being created; would you mind pasting the entire output here? Not sure what is going on there.

Or perhaps the .dll is in a different location that I expected. Maybe it is created in a different spot when running on WSL?

would you mind pasting the entire output here? Not sure what is going on there.

The snipped text is just repeated "Compiling" logs:

Click to expand
atom@Dell-Desktop:~$ git clone https://github.com/GregoryConrad/mimir && cd mimir && melos clean && melos bootstrap && melos run build:other
Cloning into 'mimir'...
remote: Enumerating objects: 2617, done.
remote: Counting objects: 100% (580/580), done.
remote: Compressing objects: 100% (324/324), done.
remote: Total 2617 (delta 350), reused 322 (delta 255), pack-reused 2037
Receiving objects: 100% (2617/2617), 3.42 MiB | 12.66 MiB/s, done.
Resolving deltas: 100% (1367/1367), done.
Cleaning workspace...

Workspace cleaned.  Not sure what's going on here:
atom@Dell-Desktop:~/mimir$ rustup target add aarch64-pc-windows-msvc
info: component 'rust-std' for target 'aarch64-pc-windows-msvc' is up to date
atom@Dell-Desktop:~/mimir$ cargo xwin build --target aarch64-pc-windows-msvc -r
Error: File exists (os error 17)
atom@Dell-Desktop:~/mimir$ cargo xwin --version
cargo-xwin-xwin 0.13.3

Ahh! Thanks for looking into that. Assuming you have LLVM installed, probably an issue with cargo-xwin then. Seeing as everything needed by mimir builds in CI I probably won't look into it any further but if that is blocking for you, you may want to file an issue over at that project. But, seeing as you are developing on Windows, you could also just probably build the binaries locally and not have to interface thru cargo-xwin.

Yeah, I agree.

@CicadaCinema I just realized an issue when running in iOS/macOS in release mode. Binaries were getting stripped as-is.
Going to file a PR to fix the docs I made in FRB but since you have already gone thru the guide, switch out your EnforceBundling.swift files with the following:
public func dummyMethodToEnforceBundling() -> Int64 {
  return dummy_method_to_enforce_bundling()
}
let dummyVar = dummyMethodToEnforceBundling();

Annoying that the previous version didn't work so you will need to change to that.

@CicadaCinema I just realized an issue when running in iOS/macOS in release mode. Binaries were getting stripped as-is. Going to file a PR to fix the docs I made in FRB but since you have already gone thru the guide, switch out your EnforceBundling.swift files with the following:
public func dummyMethodToEnforceBundling() -> Int64 {
  return dummy_method_to_enforce_bundling()
}
let dummyVar = dummyMethodToEnforceBundling();

Annoying that the previous version didn't work so you will need to change to that.

This is unrelated to the issue with cargo-xwin, right?
Thanks for the heads-up! For now I think I'll stick with targeting Linux and Windows though - at least until Native Assets releases.

This is unrelated to the issue with cargo-xwin, right?

correct; just figured I’d let you know since it seemed as though you got through a substantial part of the guide already.

For now I think I'll stick with targeting Linux and Windows though - at least until Native Assets releases.

and that’s a good decision! It’s really a pain to deal with all the platform specific setup as-is.

@GregoryConrad
Hi, sorry about bothering you again - I've attempted to write a simple template following your guide, and I'm running into similar issues again.
The corresponding repository is https://github.com/CicadaCinema/flutter_dart_rust_template and I've decided to use a slightly different naming convention to yours, to be able to more easily identify what's what and to be able to replace these strings when using this template in a real project: bbb_project_bbb is the pure-Dart project and ccc_project_ccc is the Flutter project which wraps it; these can both be found in packages/. aaa_project_aaa is the name of the native Rust library which can be found in packages/bbb_project_bbb/native/.
In this commit I have created a simple adder function and exported it through bbb_project_bbb and ccc_project_ccc. I have also added some Dart tests for these wrappers in the same commit. After building the native library (and moving/renaming the resulting archive to the relevant folder - see logs), the Dart test passes, but the Flutter test (in packages/ccc_project_ccc/) fails!
Do you think you could take a look?
Logs

Click to expand
atom@Dell-Desktop:~$ git clone https://github.com/CicadaCinema/flutter_dart_rust_template && cd flutter_dart_rust_template && melos clean && melos bootstrap
Cloning into 'flutter_dart_rust_template'...
remote: Enumerating objects: 141, done.
remote: Counting objects: 100% (141/141), done.
remote: Compressing objects: 100% (98/98), done.
remote: Total 141 (delta 39), reused 136 (delta 37), pack-reused 0
Receiving objects: 100% (141/141), 55.22 KiB | 2.76 MiB/s, done.
Resolving deltas: 100% (39/39), done.
Cleaning workspace...

Workspace cleaned. You will need to run the bootstrap command again to use this workspace.
melos bootstrap
  └> /home/atom/flutter_dart_rust_template

Running "flutter pub get" in workspace packages...
  ✓ bbb_project_bbb
    └> packages/bbb_project_bbb
  ✓ ccc_project_ccc
    └> packages/ccc_project_ccc
  ✓ ccc_project_ccc_example
    └> packages/ccc_project_ccc/example

Linking workspace packages...
  > SUCCESS

Generating IntelliJ IDE files...
  > SUCCESS

 -> 3 packages bootstrapped
atom@Dell-Desktop:~/flutter_dart_rust_template$ melos run build:other
melos run build:other
  └> bash scripts/build-other.sh
     └> RUNNING

    Updating crates.io index

     Ignored package `cargo-zigbuild v0.14.2` is already installed, use --force to override

    Updating crates.io index

     Ignored package `cargo-xwin v0.13.3` is already installed, use --force to override

info: component 'rust-std' for target 'aarch64-unknown-linux-gnu' is up to date

    Updating crates.io index

   Compiling proc-macro2 v1.0.49
   Compiling quote v1.0.23
   Compiling unicode-ident v1.0.6
   Compiling autocfg v1.1.0

   Compiling syn v1.0.107
   Compiling libc v0.2.139

   Compiling serde_derive v1.0.151

   Compiling version_check v0.9.4

   Compiling serde v1.0.151

   Compiling proc-macro-error-attr v1.0.4

   Compiling log v0.4.17

   Compiling proc-macro-error v1.0.4

   Compiling anyhow v1.0.68

   Compiling indexmap v1.9.2

   Compiling memchr v2.5.0

   Compiling serde_json v1.0.91

   Compiling ryu v1.0.12

   Compiling hashbrown v0.12.3

   Compiling cfg-if v1.0.0

   Compiling atty v0.2.14

   Compiling num-traits v0.2.15

   Compiling os_str_bytes v6.4.1

   Compiling itoa v1.0.5
   Compiling camino v1.1.1

   Compiling termcolor v1.1.3

   Compiling once_cell v1.16.0

   Compiling heck v0.4.0

   Compiling semver v1.0.16

   Compiling aho-corasick v0.7.20

   Compiling clap_lex v0.2.4

   Compiling num-integer v0.1.45

   Compiling fastrand v1.8.0

   Compiling remove_dir_all v0.5.3

   Compiling thiserror v1.0.38

   Compiling cbindgen v0.24.3

   Compiling bitflags v1.3.2

   Compiling linked-hash-map v0.5.6

   Compiling textwrap v0.16.0

   Compiling regex-syntax v0.6.28

   Compiling strsim v0.10.0

   Compiling yaml-rust v0.4.5

   Compiling tempfile v3.3.0

   Compiling lock_api v0.4.9

   Compiling atomic v0.5.1

   Compiling humantime v2.1.0

   Compiling either v1.8.0

   Compiling parking_lot_core v0.9.5

   Compiling regex v1.7.0

   Compiling itertools v0.10.5

   Compiling env_logger v0.9.3

   Compiling time v0.1.45

   Compiling cc v1.0.78

   Compiling pathdiff v0.2.1

   Compiling build-target v0.4.0

   Compiling clap_derive v3.2.18

   Compiling thiserror-impl v1.0.38

   Compiling delegate v0.8.0

   Compiling extend v1.1.2

   Compiling enum_dispatch v0.3.8

   Compiling convert_case v0.5.0

   Compiling scopeguard v1.1.0

   Compiling smallvec v1.10.0

   Compiling iana-time-zone v0.1.53

   Compiling lazy_static v1.4.0

   Compiling chrono v0.4.23

   Compiling flutter_rust_bridge v1.57.0

   Compiling num_cpus v1.15.0

   Compiling clap v3.2.23

   Compiling allo-isolate v0.1.14-beta.4

   Compiling threadpool v1.8.1

   Compiling parking_lot v0.12.1

   Compiling flutter_rust_bridge_macros v1.57.0

   Compiling bytemuck v1.12.3

   Compiling cargo-platform v0.1.2
   Compiling toml v0.5.10

   Compiling serde_yaml v0.8.26

   Compiling cargo_metadata v0.14.2

   Compiling flutter_rust_bridge_codegen v1.57.0

   Compiling aaa_project_aaa v0.0.0 (/home/atom/flutter_dart_rust_template/packages/bbb_project_bbb/native)

    Finished release [optimized] target(s) in 35.72s

info: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is up to date

   Compiling libc v0.2.139

   Compiling num-traits v0.2.15

   Compiling num-integer v0.1.45

   Compiling cfg-if v1.0.0

 Compiling parking_lot_core v0.9.5
   Compiling lock_api v0.4.9

   Compiling atomic v0.5.1

   Compiling anyhow v1.0.68

   Compiling scopeguard v1.1.0

   Compiling smallvec v1.10.0

   Compiling iana-time-zone v0.1.53

   Compiling log v0.4.17

   Compiling flutter_rust_bridge v1.57.0

   Compiling lazy_static v1.4.0

   Compiling time v0.1.45

   Compiling num_cpus v1.15.0

   Compiling parking_lot v0.12.1

   Compiling threadpool v1.8.1

   Compiling chrono v0.4.23

   Compiling bytemuck v1.12.3

   Compiling aaa_project_aaa v0.0.0 (/home/atom/flutter_dart_rust_template/packages/bbb_project_bbb/native)

   Compiling allo-isolate v0.1.14-beta.4

    Finished release [optimized] target(s) in 6.90s

info: component 'rust-std' for target 'aarch64-pc-windows-msvc' is up to date

Error: File exists (os error 17)

cp: cannot stat '../target/aarch64-pc-windows-msvc/release/aaa_project_aaa.dll': No such file or directory

info: component 'rust-std' for target 'x86_64-pc-windows-msvc' is up to date

Error: File exists (os error 17)

cp: cannot stat '../target/x86_64-pc-windows-msvc/release/aaa_project_aaa.dll': No such file or directory

linux-arm64/
linux-arm64/libaaa_project_aaa.so
linux-x64/
linux-x64/libaaa_project_aaa.so
windows-arm64/
windows-x64/

melos run build:other
  └> bash scripts/build-other.sh
     └> SUCCESS
atom@Dell-Desktop:~/flutter_dart_rust_template$ cargo build -r
   Compiling libc v0.2.139
   Compiling num-traits v0.2.15
   Compiling num-integer v0.1.45
   Compiling cfg-if v1.0.0
   Compiling parking_lot_core v0.9.5
   Compiling atomic v0.5.1
   Compiling lock_api v0.4.9
   Compiling anyhow v1.0.68
   Compiling iana-time-zone v0.1.53
   Compiling smallvec v1.10.0
   Compiling scopeguard v1.1.0
   Compiling log v0.4.17
   Compiling flutter_rust_bridge v1.57.0
   Compiling bytemuck v1.12.3
   Compiling time v0.1.45
   Compiling num_cpus v1.15.0
   Compiling lazy_static v1.4.0
   Compiling threadpool v1.8.1
   Compiling parking_lot v0.12.1
   Compiling aaa_project_aaa v0.0.0 (/home/atom/flutter_dart_rust_template/packages/bbb_project_bbb/native)
   Compiling chrono v0.4.23
   Compiling allo-isolate v0.1.14-beta.4
    Finished release [optimized] target(s) in 8.59s
atom@Dell-Desktop:~/flutter_dart_rust_template$ mv platform-build/other.tar.gz packages/ccc_project_ccc/linux/aaa_project_aaa-v0.0.0.tar.gz
atom@Dell-Desktop:~/flutter_dart_rust_template$ ls -lah packages/ccc_project_ccc/linux
total 2.3M
drwxr-xr-x  2 atom atom 4.0K Dec 25 17:22 .
drwxr-xr-x 11 atom atom 4.0K Dec 25 17:21 ..
-rw-r--r--  1 atom atom 1.3K Dec 25 17:21 CMakeLists.txt
-rw-r--r--  1 atom atom 2.3M Dec 25 17:22 aaa_project_aaa-v0.0.0.tar.gz
atom@Dell-Desktop:~/flutter_dart_rust_template$ melos run test
melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> RUNNING

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> RUNNING

$ melos exec
  └> dart test test
     └> RUNNING (in 1 packages)

------------------------------------------------------------------------------------------------------------------------
bbb_project_bbb:
00:00 +0: loading test/bbb_project_bbb_test.dart                                                                        00:01 +0: loading test/bbb_project_bbb_test.dart                                                                        00:01 +0: test/bbb_project_bbb_test.dart: A group of tests First Test                                                   00:01 +1: test/bbb_project_bbb_test.dart: A group of tests First Test                                                   00:01 +1: test/bbb_project_bbb_test.dart: Tesing bbbAdd from package:bbb_project_bbb                                    00:01 +2: test/bbb_project_bbb_test.dart: Tesing bbbAdd from package:bbb_project_bbb                                    00:01 +2: All tests passed!
bbb_project_bbb: SUCCESS
------------------------------------------------------------------------------------------------------------------------

$ melos exec
  └> dart test test
     └> SUCCESS

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> SUCCESS
melos run test:flutter
  └> melos exec -c 1 --fail-fast -- "flutter test test"
     └> RUNNING

$ melos exec
  └> flutter test test
     └> RUNNING (in 2 packages)

------------------------------------------------------------------------------------------------------------------------
ccc_project_ccc:
00:00 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:01 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:02 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:03 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:04 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:05 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:06 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:07 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:08 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart         00:08 +0: Tesing cccAdd from package:ccc_project_ccc                                                                    00:08 +0 -1: Tesing cccAdd from package:ccc_project_ccc [E]
  Invalid argument(s): Failed to load dynamic library 'libaaa_project_aaa.so': libaaa_project_aaa.so: cannot open shared object file: No such file or directory
  dart:ffi                                            new DynamicLibrary.open
  package:ccc_project_ccc/src/ffi/io.dart 12:27       createLibraryImpl
  package:ccc_project_ccc/src/ffi.dart 8:19           createLib
  package:ccc_project_ccc/ccc_project_ccc.dart 11:24  cccAdd
  test/ccc_project_ccc_test.dart 6:18                 main.<fn>

To run this test again: /home/atom/flutter/bin/cache/dart-sdk/bin/dart test /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/test/ccc_project_ccc_test.dart -p vm --plain-name 'Tesing cccAdd from package:ccc_project_ccc'
00:08 +0 -1: Some tests failed.
------------------------------------------------------------------------------------------------------------------------

$ melos exec
  └> flutter test test
     └> FAILED (in 1 packages)
        └> ccc_project_ccc (with exit code 1)

melos run test:flutter
  └> melos exec -c 1 --fail-fast -- "flutter test test"
     └> FAILED
ScriptException: The script test:flutter failed to execute

melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> FAILED
ScriptException: The script test failed to execute

  Invalid argument(s): Failed to load dynamic library 'libaaa_project_aaa.so': libaaa_project_aaa.so: cannot open shared object file: No such file or directory

Looks like your tests can't find the .so. Did you copy the .tag.gz archive to the correct place (/packages/bbb_project_bbb/linux/)?

I haven't tried running Flutter unit tests like that. It may be worth trying to run/use Flutter integration tests, assuming you have copied over the .tar.gz with the correct name based on your pubspec.yaml.

Did you copy the .tag.gz archive to the correct place (/packages/bbb_project_bbb/linux/)?

Yep! Excerpt from the logs:
atom@Dell-Desktop:~/flutter_dart_rust_template$ mv platform-build/other.tar.gz packages/ccc_project_ccc/linux/aaa_project_aaa-v0.0.0.tar.gz
atom@Dell-Desktop:~/flutter_dart_rust_template$ ls -lah packages/ccc_project_ccc/linux
total 2.3M
drwxr-xr-x  2 atom atom 4.0K Dec 25 17:22 .
drwxr-xr-x 11 atom atom 4.0K Dec 25 17:21 ..
-rw-r--r--  1 atom atom 1.3K Dec 25 17:21 CMakeLists.txt
-rw-r--r--  1 atom atom 2.3M Dec 25 17:22 aaa_project_aaa-v0.0.0.tar.gz

Based on your linux/CMakeLists.txt, looks like that should be working. I never tried doing Flutter unit tests, which is why I didn't write much on it in the guide. Looks like you probably won't be able to use Rust in Flutter unit tests, but integration tests should work.

Oh! You could also do something similar to the Dart-only unit tests for the Flutter unit tests, by referencing /target/release/...so! Forgot about that for a second.

E.g. you will need to get your Dynamic Library instance manually by using DynamicLibrary.open() and point it to your /target/release/... built file. You won't be able to rely upon the FFI convenience I made (createLib())

Looks like you probably won't be able to use Rust in Flutter unit tests, but integration tests should work.

Is this true even for packages depending on ccc_project_ccc? I removed the unit tests in ccc_project_ccc, leaving the unit tests in ccc_project_ccc_example. These fail too:

Click to expand
atom@Dell-Desktop:~/flutter_dart_rust_template$ melos run test
melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> RUNNING

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> RUNNING

$ melos exec
  └> dart test test
     └> RUNNING (in 1 packages)

------------------------------------------------------------------------------------------------------------------------bbb_project_bbb:
00:00 +0: loading test/bbb_project_bbb_test.dart
00:01 +0: loading test/bbb_project_bbb_test.dart
00:01 +0: test/bbb_project_bbb_test.dart: A group of tests First Test
00:01 +1: test/bbb_project_bbb_test.dart: A group of tests First Test
00:01 +1: test/bbb_project_bbb_test.dart: Tesing bbbAdd from package:bbb_project_bbb
00:01 +2: test/bbb_project_bbb_test.dart: Tesing bbbAdd from package:bbb_project_bbb
00:01 +2: All tests passed!

bbb_project_bbb: SUCCESS
------------------------------------------------------------------------------------------------------------------------
$ melos exec
  └> dart test test
     └> SUCCESS

melos run test:dart
  └> melos exec -c 1 --fail-fast -- "dart test test"
     └> SUCCESS
melos run test:flutter
  └> melos exec -c 1 --fail-fast -- "flutter test test"
     └> RUNNING

$ melos exec
  └> flutter test test
     └> RUNNING (in 1 packages)

------------------------------------------------------------------------------------------------------------------------ccc_project_ccc_example:
00:00 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:01 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:02 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:03 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:04 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:05 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:06 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:07 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:08 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:09 +0: loading /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_te00:09 +0: Tesing cccAdd from package:ccc_project_ccc_example
00:09 +0 -1: Tesing cccAdd from package:ccc_project_ccc_example [E]

  Invalid argument(s): Failed to load dynamic library 'libaaa_project_aaa.so': libaaa_project_aaa.so: cannot open shared object file: No such file or directory
  dart:ffi                                            new DynamicLibrary.open
  package:ccc_project_ccc/src/ffi/io.dart 12:27       createLibraryImpl
  package:ccc_project_ccc/src/ffi.dart 8:19           createLib
  package:ccc_project_ccc/ccc_project_ccc.dart 11:24  cccAdd
  test/ccc_project_ccc_example_test.dart 6:18         main.<fn>

To run this test again: /home/atom/flutter/bin/cache/dart-sdk/bin/dart test /home/atom/flutter_dart_rust_template/packages/ccc_project_ccc/example/test/ccc_project_ccc_example_test.dart -p vm --plain-name 'Tesing cccAdd from package:ccc_project_ccc_example'
00:09 +0 -1: Some tests failed.

------------------------------------------------------------------------------------------------------------------------
$ melos exec
  └> flutter test test
     └> FAILED (in 1 packages)
        └> ccc_project_ccc_example (with exit code 1)

melos run test:flutter
  └> melos exec -c 1 --fail-fast -- "flutter test test"
     └> FAILED
ScriptException: The script test:flutter failed to execute

melos run test
  └> melos run test:dart --no-select && melos run test:flutter --no-select
     └> FAILED

Does this mean that it is fundamentally impossible to write passing unit tests which rely on the Rust native library, even if the library is bundled with a dependency of the project being tested?

Is this true even for packages depending on ccc_project_ccc? I removed the unit tests in ccc_project_ccc, leaving the unit tests in ccc_project_ccc_example. These fail too:

Correct, any unit tests depending on ccc will fail unless they use the binary or mock the implementation.

Does this mean that it is fundamentally impossible to write passing unit tests which rely on the Rust native library, even if the library is bundled with a dependency of the project being tested?

Not necessarily impossible; you have a few options:

Users of ccc can use the binary for their platform to run their unit tests (although I wouldn't necessarily recommend this approach unless the user of ccc is another package in your mono repo).
ccc can provide a stub implementation for testing that does not actually call/use FRB, but I would suggest only allowing this internally in the mono repo, and it could be risky.
Users of ccc mock the ccc functions. IMHO, any unit testing relying on ccc should be doing this anyways, as they are unit tests. Any functionality actually interacting with the outside environment should be an integration test anyways.

All that being said, integration tests should all pass as expected, based on what I see in your repo. I have a feeling you are really looking for integration tests here, not unit tests.

Thank you for clarifying! I've added an integration test and it does pass, as expected!


dropping source while associated fragments still exist

Describe the bug
When running certain e2e test, the below warning is triggered from SourceManager:
        if core.source_fragments.contains_key(&source_id) {
            log::warn!(
                "dropping source {}, but associated fragments still exists",
                source_id
            );
        }

To Reproduce

./risedev d
./risedev slt -p 4566 -d dev -u root e2e_test/streaming/datagen.slt
Check meta node's log

Expected behavior
No warning.
Additional context
Add any other context about the problem here.

let me figure it out


Typescript for Gazelle

Typescript for Gazelle

I think I have to make a folder a module or shit's going to be broken.

Close to working. Just needs importer for MDX.


Updated gateway

Signed-off-by: hritikgupta<EMAIL_ADDRESS>
Returns an existing network with the same name as passed network name
A method to clear the gateway connection

hfc/fabric_network/gateway.py:78:1: W293 blank line contains whitespace


IRelationalConnection depends on internal types

IBufferable is internal:
void RegisterBufferable(IBufferable bufferable);
Task RegisterBufferableAsync(IBufferable bufferable, CancellationToken cancellationToken);

Also consider the internal RelationalConnection when looking at this issue. Specifically, does it need to be public for providers?

Closing in favor of #15695


Bug: 移动端示例-查询表单展开/收起功能失效

Version
Vben Admin V5
Describe the bug?
在手机上浏览 https://www.vben.pro/#/examples/form/query 查看示例（查询表单）
其中展开/收起功能有问题
在PC端则不影响

Reproduction
无
System Info
6.7英寸手机

Relevant log output
null

Validations

[X] Read the docs
[X] Ensure the code is up to date. (Some issues have been fixed in the latest version)
[X] I have searched the existing issues and checked that my issue does not duplicate any existing issues.
[X] Check that this is a concrete bug. For Q&A open a GitHub Discussion or join our Discord Chat Server.
[X] The provided reproduction is a minimal reproducible example of the bug.

这个提交已经修复了 76a879d4d8e86325a933adc00d776070272fe462


Experiment with mutation testing

cargo mutants --in-place

--in-place is necessary because the tests operate on Herostratus itself as a Git repository, and use paths relative to the test CWD to do so.
$ cat mutants.out/missed.txt
herostratus/src/rules/h004_non_unicode.rs:22:9: replace <impl Rule for NonUnicode>::process -> Option<Achievement> with None
herostratus/src/git/clone.rs:45:5: replace get_clone_path -> eyre::Result<PathBuf> with Ok(Default::default())
herostratus/src/git/clone.rs:85:48: replace || with && in clone_credentials
herostratus/src/rules/mod.rs:37:37: replace == with != in builtin_rules
herostratus-tests/src/cmd.rs:28:5: replace capture_output with ()
herostratus/src/commands/add.rs:9:5: replace args_to_config -> eyre::Result<RepositoryConfig> with Ok(Default::default())
herostratus/src/rules/mod.rs:38:36: replace == with != in builtin_rules
herostratus/src/commands/check.rs:23:5: replace check_all -> eyre::Result<()> with Ok(())
herostratus/src/rules/h004_non_unicode.rs:15:9: replace <impl Rule for NonUnicode>::name -> &'static str with "xyzzy"
herostratus/src/rules/h002_shortest_subject_line.rs:44:9: replace <impl Rule for ShortestSubjectLine>::human_id -> &'static str with "xyzzy"
herostratus/src/rules/h001_fixup.rs:30:9: replace <impl Rule for Fixup>::description -> &'static str with "xyzzy"
herostratus/src/rules/h001_fixup.rs:24:9: replace <impl Rule for Fixup>::human_id -> &'static str with "xyzzy"
herostratus/src/commands/check.rs:11:5: replace check -> eyre::Result<()> with Ok(())
herostratus/src/rules/h002_shortest_subject_line.rs:57:31: replace < with == in <impl Rule for ShortestSubjectLine>::process
herostratus-tests/src/fixtures/repository.rs:22:38: delete - in add_empty_commit
herostratus/src/commands/fetch_all.rs:9:5: replace fetch_all -> eyre::Result<()> with Ok(())
herostratus/src/commands/add.rs:44:8: delete ! in add
herostratus/src/achievement/process_rules.rs:94:45: replace += with *= in <impl Iterator for Achievements<'repo, Oids>>::next
herostratus/src/commands/remove.rs:7:5: replace remove -> eyre::Result<()> with Ok(())
herostratus/src/commands/add.rs:29:5: replace add -> eyre::Result<()> with Ok(())
herostratus/src/commands/fetch_all.rs:29:12: delete ! in fetch_all
herostratus/src/git/clone.rs:102:5: replace fetch_options -> git2::FetchOptions with Default::default()
herostratus/src/commands/check.rs:23:8: delete ! in check_all
herostratus/src/main.rs:8:5: replace main -> eyre::Result<()> with Ok(())
herostratus/src/git/clone.rs:159:25: replace += with -= in fetch_remote
herostratus/src/commands/check.rs:52:5: replace process_achievements -> eyre::Result<()> with Ok(())
herostratus/src/rules/h002_shortest_subject_line.rs:47:9: replace <impl Rule for ShortestSubjectLine>::name -> &'static str with "xyzzy"
herostratus/src/git/clone.rs:51:5: replace remove_dir_contents -> std::io::Result<()> with Ok(())
herostratus/src/config/config.rs:97:8: delete ! in write_config
herostratus-tests/src/lib.rs:10:5: replace setup_test_logging with ()
herostratus/src/achievement/process_rules.rs:152:5: replace grant -> eyre::Result<impl Iterator<Item = Achievement>+'repo> with Ok(::std::iter::empty())
herostratus/src/git/rev.rs:21:36: replace | with ^ in walk
herostratus/src/git/clone.rs:155:31: replace == with != in fetch_remote
herostratus/src/git/clone.rs:127:50: replace != with == in fetch_remote
herostratus/src/git/clone.rs:122:5: replace fetch_remote -> eyre::Result<()> with Ok(())
herostratus/src/rules/mod.rs:36:27: replace == with != in builtin_rules
herostratus/src/rules/h004_non_unicode.rs:18:9: replace <impl Rule for NonUnicode>::description -> &'static str with "xyzzy"
herostratus/src/achievement/achievement.rs:120:9: replace LoggedRule::log_achievement with ()
herostratus/src/rules/h003_longest_subject_line.rs:48:9: replace <impl Rule for LongestSubjectLine>::description -> &'static str with "xyzzy"
herostratus/src/achievement/achievement.rs:141:12: delete ! in LoggedRule::finalize_log
herostratus/src/achievement/achievement.rs:113:9: replace Rule::finalize -> Vec<Achievement> with vec![]
herostratus/src/achievement/process_rules.rs:51:44: replace += with *= in Achievements<'repo, Oids>::get_next_achievement_online
herostratus/src/git/clone.rs:148:25: replace && with || in fetch_remote
herostratus/src/rules/h001_fixup.rs:33:9: replace <impl Rule for Fixup>::process -> Option<Achievement> with None
herostratus/src/rules/h002_shortest_subject_line.rs:50:9: replace <impl Rule for ShortestSubjectLine>::description -> &'static str with "xyzzy"
herostratus/src/rules/h003_longest_subject_line.rs:45:9: replace <impl Rule for LongestSubjectLine>::name -> &'static str with "xyzzy"
herostratus/src/git/clone.rs:159:25: replace += with *= in fetch_remote
herostratus/src/rules/h001_fixup.rs:27:9: replace <impl Rule for Fixup>::name -> &'static str with "xyzzy"
herostratus/src/rules/mod.rs:39:31: replace == with != in builtin_rules
herostratus/src/git/clone.rs:148:58: replace == with != in fetch_remote
herostratus/src/git/rev.rs:21:36: replace | with & in walk
herostratus/src/git/clone.rs:192:29: replace == with != in clone_repository
herostratus/src/achievement/process_rules.rs:103:45: replace += with *= in <impl Iterator for Achievements<'repo, Oids>>::next

cargo-mutants seems to not let you run --ignored tests, so there's a bunch of hits that should be excluded
rg -l '#\[ignore' | xargs sed -Ei 's|#\[ignore|// #[ignore|'

diff --git a/herostratus-tests/src/cmd.rs b/herostratus-tests/src/cmd.rs
index d96ce29..1a822e0 100644
--- a/herostratus-tests/src/cmd.rs
+++ b/herostratus-tests/src/cmd.rs
@@ -18,6 +18,14 @@ pub fn herostratus(data_dir: Option<&Path>) -> (Command, Option<TempDir>) {
         (Some(temp), data_dir)
     };

+    // This will slow down the integration tests
+    Command::new("cargo")
+        .arg("build")
+        .arg("-p")
+        .arg("herostratus")
+        .output()
+        .expect("Failed to build Herostratus");
+
     let mut cmd = Command::new(&*HEROSTRATUS);
     cmd.arg("--log-level=DEBUG").arg("--data-dir").arg(path);

Without integration tests

160 mutants
53 missed
69 caught
37 unviable
2:04 execution time

With integration tests
cargo mutants --in-place --package herostratus --test-workspace true

150 mutants
30 missed
88 caught
31 unviable
3:45 execution time

So it appears that the integration tests do indeed improve test coverage! (expected result ...)


[$250] Use local Onyx key to throttle location permission prompts

If you haven’t already, check out our contributing guidelines for onboarding and email<EMAIL_ADDRESS>to request to join our Slack channel!

Version Number: N/A
Reproducible in staging?: N/A
Reproducible in production?: N/A
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL: https://github.com/Expensify/Expensify/issues/378927
Issue reported by: @Julesssss
Slack conversation:
Prerequisite - make sure location services is disabled for New Expensify
Action Performed:

Sign up with a new account
Big + > Submit expense
Scan receipt
Select a recipient
Submit expense
See the location services request > tap Not Now
When the system request comes up, tap 'Don't Allow'
Big + > Submit expense
Scan receipt
Select a recipient

Current Result:
Every time the user creates a money request, we prompt them to enable the location permission.
Requested Result:
Instead of waiting for a backend solution, we can use a local Onyx key/timestamp to prevent the modal from showing. Let's implement logic that adds a one-week delay between each prompt of the location permission.
Workaround:
N/A
Platforms:

Which of our officially supported platforms is this issue occurring on?

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[ ] MacOS: Chrome / Safari
[ ] MacOS: Desktop

Screenshots/Videos

View all open jobs on GitHub
Upwork Automation - Do Not Edit

Upwork Job URL: https://www.upwork.com/jobs/~016f65004bf221326c
Upwork Job ID:<PHONE_NUMBER>188173965
Last Price Increase: 2024-08-21
Automatic offers:

shubham1206agra | Reviewer | 103692549
Krishna2323 | Contributor | 103692550

Issue OwnerCurrent Issue Owner: @shubham1206agra

Updated the steps to include submitting the receipt which needs to be done before the location services request populates.

@shubham1206agra what do you think about these proposals?

I agree the timestamp is enough here. Lets figure out the rest of the minor details in the PR review.

Reassigning Tim as I didn't see his 'ssigned Krishna2323 13 hours ago' action

Disable the location check for iOS users on the quick flow action (this would include users who did grant permission)

This sounds non-ideal, because the quick action is likely to be used repeatedly as the preferred method to submit expenses to your company over and over again. If I'm understanding you, disabling it would mean the added accuracy upside of location checking would not apply to this core flow.

iOS users who approve our modal, but select 'Allow Once' on the native iOS prompt will continue to be prompted when using the quick action flow.

Won't they also be prompted on every Submit expense attempt as well? That's kinda' the nature of choosing "Allow once" isn't it, or am I missing something on why this only applies to the quick action flow?

disabling it would mean the added accuracy upside of location checking would not apply to this core flow.

Yeah, exactly. My thinking is that this is slightly preferrable to the frustrating native location prompt on every single request.

Won't they also be prompted on every Submit expense attempt as well?

In the submit expense flow our 7-day throttling will prevent them from seeing the prompt every time. Additionally we are able to show our custom prompt ahead of the native-iOS prompt -- which is slightly less annoying as they at least are given context for the prompt.

Why aren't we applying the same logic to the QAB as we are Submit expense?

My thinking is that this is slightly preferrable to the frustrating native location prompt on every single request.

That's your own doing though, isn't it. You selected Only once, not Always. If it's annoying you, change it to Always.

Fair point 😄
It makes the whole 'provide context around this contextless location permission' feature redundant. If users didn't select 'always' after going through our context flow I would suggest they are more likely to select 'never' when given the no context apple prompt. Though as it just occurs for iOS quick action IF users selected not now I suppose this is the better option.

not deployed yet

PR has had comments addressed and oday I requested an additional test for the prompt to reshow.

Merged!

So that I can process these payment - @shubham1206agra  Please propose regression test steps to ensure the new feature will work correctly on production in further releases.

Waiting on regression test

@shubham1206agra looks like the original offer is expired - please accept the new offer I sent here

@Krishna2323Paid  ✅

@shubham1206agra Paid ✅


[Mobile] "TypeError: undefined is not an object" when ins

I added the OpenWeatherPlugin to my mobile Obsidian Fault and when i tried to insert weather format 1 i got this error message

Failed to fetch weather data
TypeError: undefined is not an object
(evaluating 'json.weater[0]')

City is "Oberhausen, DE" and language is "german"
Weather format 2,3,4 are working but not fully translated and with some   strings in it.
### Format2
Oberhausen: September 07 - 2:07 PM
Current Temp: 30°C • Feels Like: 30°C
Wind: 13 km/h from the Southeast with gusts up to 18 km/h
Sunrise: 06:54:15 • Sunset: 20:07:43

### Format3
 September 07 2023 • 2:07 PM • Mäßig
Bewölkt
 Recorded Temp: 30 • Felt like: 30
 Wind: 13 km/h from the Southeast with gusts up to 18
km/h
 Sunrise: 06:54:15 • Sunset: 20:07:43

### Format4
 September 07 2023 • 2:07 PM • Mäßig
Bewölkt
 Current Temp: 30 • Feels like: 30
 Wind: 13 km/h from the Southeast with gusts up to 18
km/h
 Sunrise: 06:54:15 • Sunset: 20:07:43

Sorry for the late reply, I have been without a pc for quite some time but finally managed to complete a new build recently. Not sure why format 1 is not working on mobile? It works fine on my pc but will test it on my phone and see if I can find the problem. Formats 3 and 4 have the   as they are meant to be inserted as html. You can see how this works in the example.md file. If you want to use them as plain text you can edit them in the settings and remove the html tags. It has been a long time since I have worked on this but I plan to make some updates to it this week and will add this to my todo list. The translation is actually provided from the Open Weather API for some internally used keywords returned by the API. The format templates however are in English and you would have to edit the text for them directly in the settings. I will update the readme with this information.
Thank you for the bug report, William.

Thanks for coming back. in the meantime i figured it out. Would be nice if the templates change as well, when you select a different language.


Bump Microsoft.AspNetCore.Authentication.JwtBearer from 5.0.5 to 5.0.9

Bump Microsoft.AspNetCore.Authentication.JwtBearer from 5.0.5 to 5.0.9

Looks good. Thanks.


Add ability to add icons to header buttons

What is the context of this PR?
Add ability to add icons to header buttons and introduce two new icons

 Add ability to change icon on header button

Do we think this icon makes sense to users?

Do we think this icon makes sense to users?

Performing well in user testing so far.

Can we update 'Customised page template' example with exit icon?
I think we probably need update Ghost example to state it can be used in header or footer, and show a footer example too, and state it's display in mobile. Unless we can make the current example show a footer when width reduced?

Is it enough that the [current example] (http://localhost:3030/styles/page-template/examples/custom) shows a footer button when the width is reduced? or do you want a specific footer example?

Can we update 'Customised page template' example with exit icon?
I think we probably need update Ghost example to state it can be used in header or footer, and show a footer example too, and state it's display in mobile. Unless we can make the current example show a footer when width reduced?

Is it enough that the current example shows a footer button when the width is reduced? or do you want a specific footer example?

I think we need an example of it's appearance in the header and footer under components/button 'Ghost'.
I would also add a line in https://ons-design-system.netlify.app/components/header/#external-with-language-and-save-button to state what happens to this button at the breakpoint, and link it to footer component (where we'll need to show it in an example when we revise the footer).

 Hover colour green on ghost buttons in footer

 Issue #859: Hover colour green on ghost buttons in footer


[model] added support for google Gemma model

thanks for adding new model. let me know once your code is ready to review.

You can review the code.  If there are any issues during the review process, please kindly inform me. thank you！


rust-analyzer says panic!() needs two arguments

panic!() should be able to take only one argument, but rust-analyzer says it needs two.

Saw this issue: https://github.com/rust-analyzer/rust-analyzer/issues/5959
I was also using rust v1.42. Updating rust and rust-analyzer fixed it.


Component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope when upgrading to Alloy

It feels like I've missed something obvious with my Flow config when upgrading from grafana-agent to alloy - can somebody help me?
I'm using the k8s-monitoring chart and just upgraded to 1.0.12 which replaces grafana-agent with grafana-alloy. I updated my values.yaml according to the breaking changes but alloy doesn't start, throwing an error:
component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope
Do I need to remove any prometheus CRDs and let the helm chart resinstall them? I'm fairly confident that prometheus.relabel.metrics_service.receiver should exist as it's listed in the custom flow example in the docs.
Alloy version:
❯ kubectl -n grafana-alloy-k8s-monitoring describe po grafana-alloy-k8s-monitoring-0 | grep Image
    Image:         docker.io/grafana/alloy:v1.1.0

Alloy logs:
❯ kubectl -n grafana-alloy-k8s-monitoring logs grafana-alloy-k8s-monitoring-0

Error: /etc/alloy/config.alloy:83:21: component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope

82 |     honor_labels = true
83 |     forward_to   = [prometheus.relabel.metrics_service.receiver]
   |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
84 | }

Error: /etc/alloy/config.alloy:141:17: component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope

140 | prometheus.relabel "metrics_default_integrations_rabbitmq" {
141 |   forward_to = [prometheus.relabel.metrics_service.receiver]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142 |

Error: /etc/alloy/config.alloy:173:17: component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope

172 | prometheus.relabel "integrations_redis_exporter" {
173 |   forward_to = [prometheus.relabel.metrics_service.receiver]
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174 |

Error: /etc/alloy/config.alloy:111:21: component "prometheus.relabel.metrics_service.receiver" does not exist or is out of scope

110 |     honor_labels = true
111 |     forward_to   = [prometheus.relabel.metrics_service.receiver]
    |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112 | }
Error: could not perform the initial load successfully

My values.yaml / extraConfig:
k8s-monitoring:
  extraConfig: |-
    discovery.relabel "metrics_clickhouse" {
        targets = discovery.kubernetes.endpoints.targets
        rule {
            source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_name"]
            regex = "altinity-clickhouse-operator"
            action = "keep"
        }
        rule {
            source_labels = ["__meta_kubernetes_pod_annotation_prometheus_io_port"]
            regex = "8888"
            action = "keep"
        }

        rule {
            source_labels = ["__meta_kubernetes_pod_label_clickhouse_altinity_com_namespace"]
            target_label = "clickhouse_cluster"
        }
        rule {
            source_labels = ["__meta_kubernetes_pod_name"]
            target_label = "instance"
        }

        rule {
            source_labels = ["__meta_kubernetes_pod_label_clickhouse_altinity_com_namespace"]
            target_label = "exported_namespace"
        }
        rule {
            source_labels = ["__meta_kubernetes_pod_label_clickhouse_altinity_com_chi"]
            target_label = "chi"
        }
        rule {
            source_labels = ["__meta_kubernetes_pod_label_clickhouse_altinity_com_namespace"]
            target_label = "hostname"
        }
    }

    prometheus.scrape "metrics_clickhouse" {
        job_name     = "integrations/clickhouse"
        targets      = discovery.relabel.metrics_clickhouse.output
        honor_labels = true
        forward_to   = [prometheus.relabel.metrics_service.receiver]
    }

    discovery.relabel "metrics_trivy" {
        targets = discovery.kubernetes.endpoints.targets
        rule {
            source_labels = ["__meta_kubernetes_pod_label_app_kubernetes_io_name"]
            regex = "trivy-operator"
            action = "keep"
        }
        rule {
            source_labels = ["__meta_kubernetes_pod_container_port_number"]
            regex = "8080"
            action = "keep"
        }
    }

    prometheus.scrape "metrics_trivy" {
        job_name     = "integrations/trivy"
        targets      = discovery.relabel.metrics_trivy.output
        honor_labels = true
        forward_to   = [prometheus.relabel.metrics_service.receiver]
    }

My values.yaml - I basically copied the settings from the guide in my grafana cloud account / infrastructure / Kubernetes and updated it according to the list of breaking changes:
cluster:
  name: my-cluster
externalServices:
  prometheus:
    host: xyz
    basicAuth:
      username: "xyz"
      password: REPLACE_WITH_ACCESS_POLICY_TOKEN
  loki:
    host: xyz
    basicAuth:
      username: "xyz"
      password: REPLACE_WITH_ACCESS_POLICY_TOKEN
metrics:
  enabled: true
  cost:
    enabled: true
  node-exporter:
    enabled: true
logs:
  enabled: true
  pod_logs:
    enabled: true
  cluster_events:
    enabled: true
traces:
  enabled: false
receivers:
  grpc:
    enabled: false
  http:
    enabled: false
  zipkin:
    enabled: false
opencost:
  enabled: true
  opencost:
    exporter:
      defaultClusterId: my-cluster
    prometheus:
      external:
        url: xyz
kube-state-metrics:
  enabled: true
prometheus-node-exporter:
  enabled: true
prometheus-operator-crds:
  enabled: true
alloy: {}
alloy-events: {}
alloy-logs: {}
EOF

I noticed that your first values file shows
k8s-monitoring:
  extraConfig: |-

How are you deploying this chart? with helm install grafana/k8s-monitoring or through some other means?

Thanks @petewall looking at the configmap helped me solve it.
kubectl -n grafana-alloy-k8s-monitoring get cm grafana-alloy-k8s-monitoring -o yaml

I was setting metrics.enabled = false for our QA cluster and still passing the extraConfig and looking at the k8s-monitoring code I noticed you've added some checks a couple of months ago that I guess doesn't generate prometheus.relabel.metrics_service.receiver etc when metrics are disabled.
Removing my extraConfig when settings metrics.enabled = false got alloy working.

Glad to hear you figured it out!


E2E Testing: Editing Previous Encounter

In Scope
The E2E test should run on the CI Pipeline in any relevant environment (DEV, UAT) without keeping secrets.
Setup:

[x] Add an Encounter and Habitat into Firestore for the previous month.

Test:

[ ] Login Try logging in with cached credentials
[x] Load previous months Encounters
[x] Edit an already existing Encounter
[x] Edit a Habitat already on the Encounter
[x] Hit the Refresh Button
[x] Save

Tests must assert the collections have been edited in Firestore, and pass consistently.
Teardown:

[x] Clear Encounters and Habitats created in Test run

Arrange and TearDown should be done so the Test requires no state from a previous test.
Reporting:

[ ] In the event of a failure, artifacts should be made available to help diagnose the failure

PR:
https://github.com/BMMRO-tech/BMMRO/pull/277


Fix login page minor errors

Related Issue
#1165
Description
I fixed the minor issues in login page which were making the UI look unattractive.

Type of PR

[x] Bug fix
[ ] Feature enhancement
[ ] Documentation update
[ ] Other (specify): _______________

Screenshots / videos (if applicable)
[Attach any relevant screenshots or videos demonstrating the changes]

Checklist:

[x] I have performed a self-review of my code
[x] I have read and followed the Contribution Guidelines.
[x] I have tested the changes thoroughly before submitting this pull request.
[x] I have provided relevant issue numbers, screenshots, and videos after making the changes.
[x] I have commented my code, particularly in hard-to-understand areas.

Additional context:
[Include any additional information or context that might be helpful for reviewers.]

attach images of the sections after the changes are made

already attached in screenshot/videos section

There is a gap between footer and carousel try to remove that.

sure i'll fix that!


Update goto integration tests to new interfaces

+refacto to use args in the test files like:
https://github.com/pollen-robotics/gstreamer_webrtc/blob/develop/src/gstreamer/main.py


Refreshing gutter failed!

[I'm supposed to describe steps to replicate my issue here and if I don't do that, I understand that my issue will be probably ignored.]

File -> Open Folder a folder which contains git repo
Remove the folder
Following error is occured

Brackets 1.1.0-15558 (linux), Git 2.1.0 & Brackets-Git 0.14.9
Refreshing gutter failed!
Error: Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)

call: git status -u --porcelain -- test/sequelize/option.js
Error: Error: spawn ENOENT
    at errnoException (child_process.js:980:11)
    at Process.ChildProcess._handle.onexit (child_process.js:771:34)
    at Object.exports.toError (file:///home/phanect/.config/Brackets/extensions/user/zaggino.brackets-git/src/ErrorHandler.js:162:19)
    at NodeConnection.<anonymous> (file:///home/phanect/.config/Brackets/extensions/user/zaggino.brackets-git/src/Cli.js:176:44)
    at j (file:///opt/brackets/www/thirdparty/thirdparty.min.js:559:26860)
    at Object.k.fireWith (file:///opt/brackets/www/thirdparty/thirdparty.min.js:559:27673)
    at NodeConnection._receive (/utils/NodeConnection.js:492:34)

Why would you open a folder and then delete it?
What would you expect to happen, if not an error?

Sorry for too late reply... I may missed your reply.

Why would you open a folder and then delete it?
Because I found the repo currently opening is no longer required while I was editing.

What would you expect to happen, if not an error?
I thought no error should happen, or more appropriate error message (e.g. "Repo is not found") because current error message shows raw error stack trace.

However, now I'm not sure if those solutions are appropriate.
I close this issue for now. Please reopen if you think you need to change this.