withHooks HOC to decouple components from hooks

Is your feature request related to a problem? Please describe.
With the introduction of the Hooks API in React 16.8, developers have been shifting away from Higher Order Components and Render Props patterns to handle cross-cutting concerns amongst React components. Prior to Hooks, recompose offered a robust library of HOC's with similar functionalities to the Hooks API.
Since then, the creator of recompose and the React team have been advising developers make the switch from recompose to Hooks as they feel Hooks solve all of the issues recompose aimed to solve, but avoid issues inherent to recompose such as excessive tree nesting.
However, Hooks are not perfect either. And there's been a lot of discussion around one issue in particular. The recommended way to implement Hooks is to couple them with the components that depend on them. By doing this, we complicate things such as render bail-outs and testing because now components bake-in hook logic and explicitly depend on these hooks as their data/logic providers. One of the nice things about recompose HOC's is that they inject similar functionality through props, meaning the components are not explicitly dependent on their data providers. This issue thread on the recompose repo discusses much of the motivation for a withHooks utility function.
Describe the solution you'd like
import React, { useState } from "react";
import ReactDOM from "react-dom";

const pick = (obj, fields) => {
  let picked = {};
  if (obj instanceof Object && fields instanceof Array) {
    fields.forEach(field => {
      picked[field] = obj[field];
    });
  }
  return picked;
};

const withHooks = (mapHooksToProps, { frozenProps = [] } = {}) => {
  return WrappedComponent => {
    return props => {
      let overrideablePropsObj = mapHooksToProps(props);
      let frozenPropsObj = pick(overrideablePropsObj, frozenProps);
      return (
        <WrappedComponent
          {...overrideablePropsObj}
          {...props}
          {...frozenPropsObj}
        />
      );
    };
  };
};

const Counter = props => {
  return (

Counter: {props.count}

      <button onClick={props.increment}>Increment</button>
      <button onClick={props.decrement}>Decrement</button>

  );
};

const mapHooksToProps = props => {
  let [count, setCount] = useState(0);

  return {
    count,
    increment: () => setCount(prev => prev + 1),
    decrement: () => setCount(prev => prev - 1)
  };
};

const EnhancedCounter = withHooks(mapHooksToProps)(Counter);

ReactDOM.render(<EnhancedCounter />, document.getElementById("root"));

See demo
By placing all of our hook logic in a higher order component, we can pull hook logic out of our component and create an interface that will be passed as props to our wrapped component (the Counter in this case). At first glance, mapHooksToProps looks like a functional component, but it is not. It is a custom hook that aggregates other hooks and exposes an API from them. mapHooksToProps is run on each render and returns an object that is provided as props to the wrapped component.
Why do we want to decouple components from hooks?

It decouples components from the things that make them smart. Some examples of things that could make dumb components smart include hooks, redux, and good ol' parent components. By mapping hooks to props, we make it very easy to swap a dumb component's hook-powered 'brain' for a new 'brain', say a redux-powered 'brain'. To make this switch, we wouldn't have to touch the underlying component, we would just have to swap out withHooks with react-redux's connect function and make sure we conformed to the pre-existing interface (that returned by mapHooksToProps).

Because we're deriving an API from hooks and injecting it via props, we can bail out of renders using existing mechanisms (shouldComponentUpdate, React.memo, React.PureComponent). Here's an example showing how we can bail-out of renders using withHooks.

Testing is made easier because we can test components in isolation, without hooks baked in, and we can test our hook logic in isolation of our components. By pulling all stateful logic into mapHooksToProps and then injecting it via props, we have full control of our components via props, which makes testing super simple.

It let's us use hooks with class components. We can wrap class components with hooks and inject hook-powered logic via props.

It makes prop overrides possible. In the case of our EnhancedCounter, we could override the count prop by doing <EnhancedCounter count={10} />. A real world example of hooks making things harder to override includes material-ui's new styling approach via hooks. Because classes are provided via hook and no longer via props, we would need extra code in our component to override classes via props with the new hook-based approach:

export default function StyledButton(props) {
  let classes = useStyles();
  classes = {...classes, ...props.classes};
  return <Button className={classes.root}>Hook</Button>;
}

(In this case useStyles optionally takes in the host's props as the first argument to allow for class overrides, but ignoring that to illustrate a point)

This is a really interesting proposal. I had to do something similar while ago for using some hooks within legacy class components, it's quite useful when you can't refactor your class components but you need to reuse a hook. That said, I don't know if this should be included on this package as it seems outside of its scope and maybe it makes more sense to have it in its own package. Let's see what @streamich thinks about this.

Yes, this seems like an ideal use case, to make class components pseudo-compatible with hooks. I think along the same lines withHooks makes migrating a large class component to a functional component significantly simpler because it can be done incrementally. The component can remain a class component indefinitely, but bits and pieces can be pulled out as hooks.

What about creating a component in between, instead of introducing HOC and "hook-that-aggregates-hooks" concepts?
Modifying last part of OP's example:
const EnhancedCounter = props => {
  let [count, setCount] = useState(0);

  return (
    <Counter
      count={count}
      increment={() => setCount(prev => prev + 1)}
      decrement={() => setCount(prev => prev - 1)}
    />
  );
};

ReactDOM.render(<EnhancedCounter />, document.getElementById("root"));

I would say that creating this intermediate component is almost equivalent, except i see two primary differences.

Though the code you show is functionally equivalent, an HOC takes this separation of concerns from a development standard to a concrete implementation. Trying to get everyone on a large team of engineers to implement components as you've illustrated would be very difficult. Hell, even with an HOC, there will always be engineers who stray from the pattern. But it provides a mental framework as a concrete implementation and mitigates deviance from the standard.
The other thing i see is that EnhancedCounter is bound to Counter whereas withHooks would allow for better composition via partial application.

const withCounterApi = withHooks(() => {
  const [count, setCount] = useState(0);

  return {
    count,
    increment: () => setCount(prev => prev + 1),
    decrement: () => setCount(prev => prev - 1)
  };
});

const EnhancedComp1 = withCounterApi(Comp1)
const EnhancedComp2 = withCounterApi(Comp2)
const EnhancedCompN = withCounterApi(CompN)

As this library deals with hooks, it feels like a generic utility to create a HOC out of a hook is something we should have. We actually already have a function that creates a render prop component out of a hook.
I would name it withHook instead of withHooks, as it creates a HOC out of a single hook.
When the hook returns an object, withHook can merge that object into props, what shall happen if the hook does not return an object? Shall we throw?


setup unattended-upgrades

[x] Install unattended-upgrades
[x] Enable Unattended-upgrades
[ ] Configure unattended-upgrades
[ ] Automatically run unattended-upgrades

Installed and enabled in commit 6081b86f62f8b929b42edf52f35e8ed03a666624


xSQLServerDatabase: Add Collation as a property when defining a Database - fixes #767

Pull Request (PR) description
Setting collation of a database to be different to the server is sometimes necessary. This adds that functionality and also fixes an issue with the Get-TargetResource tests that was incorrectly doing $null | should be $null (#849).
This Pull Request (PR) fixes the following issues:
Fixes #767
Fixes #849
Task list:

[X] Change details added to Unreleased section of CHANGELOG.md?
[X] Added/updated documentation, comment-based help and descriptions in .schema.mof files where appropriate?
[X] Examples appropriately updated?
[X] New/changed code adheres to Style Guidelines?
[X] Unit and (optional) Integration tests created/updated where possible?

This change is

Codecov Report

Merging #850 into dev will decrease coverage by <1%.
The diff coverage is 79%.

@@         Coverage Diff         @@
##            dev   #850   +/-   ##
===================================
- Coverage    96%    96%   -1%
===================================
  Files        31     31
  Lines      3407   3429   +22
===================================
+ Hits       3290   3306   +16
- Misses      117    123    +6

Awesome work! Just minor comments. :smile:

Reviewed 4 of 7 files at r1, 3 of 3 files at r2.
Review status: all files reviewed at latest revision, 12 unresolved discussions.

CHANGELOG.md, line 114 at r2 (raw file):

collation(

Please add a space between collation and parenthesis.

README.md, line 499 at r2 (raw file):

* **`[String]` SQLInstanceName** _(Key)_: The name of the SQL instance to be configured.
* **`[String]` Name** _(Key)_: The name of database to be created or dropped.
* **`[String]` Collation** _(Write)_: Collation to set for the database.

Please align the description with schema.mof and comment-based help (they differ now).

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 150 at r2 (raw file):

        if ($Ensure -eq 'Present')
        {
            if ([string]::IsNullOrWhiteSpace($Collation))

You could use -not $PSBoundParameters.ContainsKey('Collation') here instead. It would align more to other code in this module.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 160 at r2 (raw file):

                    -ErrorCategory InvalidOperation
            }
            $sqlDatabaseObject = $sqlServerObject.Databases[$Name]

Please add a blank row before this one.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 165 at r2 (raw file):

                try
                {
                    Write-Verbose -Message "Updating the database $Name with specified settings"

Add full stop '.'  to the end of the verbose message.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 168 at r2 (raw file):

                    $sqlDatabaseObject.Collation = $Collation
                    $sqlDatabaseObject.Alter()
                    New-VerboseMessage -Message "Updated Database $Name"

Add full stop '.'  to the end of the verbose message.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 281 at r2 (raw file):

    $isDatabaseInDesiredState = $true

    if ([string]::IsNullOrWhiteSpace($Collation))

You could use -not $PSBoundParameters.ContainsKey('Collation') here instead. It would align more to other code in this module.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 306 at r2 (raw file):

            elseif ($getTargetResourceResult.Collation -ne $Collation)
            {
                New-VerboseMessage -Message "Database exists but is incorrect collation."

Please use single quotes

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 306 at r2 (raw file):

"Database exists but is incorrect collation."

Rephrase. Maybe: `'Database exist but has the wrong collation.'

en-US/xSQLServerHelper.strings.psd1, line 145 at r2 (raw file):

Collation specified {3} is not a valid collation for database {2} on {0}\{1}.

Rephrase. Maybe The specified collation '{3}' is not a valid...?

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 205 at r2 (raw file):

but is

but has

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 252 at r2 (raw file):

'...and is correct...'

'...and has the correct...'

Comments from Reviewable

Review status: 2 of 7 files reviewed at latest revision, 12 unresolved discussions.

CHANGELOG.md, line 114 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

collation(

Please add a space between collation and parenthesis.

Done.

README.md, line 499 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Please align the description with schema.mof and comment-based help (they differ now).

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 150 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
You could use -not $PSBoundParameters.ContainsKey('Collation') here instead. It would align more to other code in this module.

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 160 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Please add a blank row before this one.

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 165 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Add full stop '.'  to the end of the verbose message.

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 168 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Add full stop '.'  to the end of the verbose message.

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 281 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
You could use -not $PSBoundParameters.ContainsKey('Collation') here instead. It would align more to other code in this module.

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 306 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Please use single quotes

Done.

DSCResources/MSFT_xSQLServerDatabase/MSFT_xSQLServerDatabase.psm1, line 306 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

"Database exists but is incorrect collation."

Rephrase. Maybe: `'Database exist but has the wrong collation.'

Done.

en-US/xSQLServerHelper.strings.psd1, line 145 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

Collation specified {3} is not a valid collation for database {2} on {0}\{1}.

Rephrase. Maybe The specified collation '{3}' is not a valid...?

Done.

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 205 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

but is

but has

Done.

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 252 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…

'...and is correct...'

'...and has the correct...'

Done.

Comments from Reviewable

Reviewed 5 of 5 files at r3.
Review status: all files reviewed at latest revision, 2 unresolved discussions.

README.md, line 499 at r2 (raw file):
Previously, ChrisLGardner wrote…
Done.

I kind of also liked 'Defaults to the server collation.'. Could you add that back, to README.md, schema.mof and comment-based help?

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 252 at r2 (raw file):
Previously, ChrisLGardner wrote…
Done.

Please add 'the' also; '...and has the correct'. Feels like a more correct grammar.

Comments from Reviewable

Review status: 3 of 7 files reviewed at latest revision, 2 unresolved discussions.

README.md, line 499 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
I kind of also liked 'Defaults to the server collation.'. Could you add that back, to README.md, schema.mof and comment-based help?

Done.

Tests/Unit/MSFT_xSQLServerDatabase.Tests.ps1, line 252 at r2 (raw file):
Previously, johlju (Johan Ljunggren) wrote…
Please add 'the' also; '...and has the correct'. Feels like a more correct grammar.

Done.

Comments from Reviewable

Please rebase this PR, and make sure to move the entries in the CHANGELOG.md back to the Unreleased section after rebase. This is due to the recent release  of the module.

Reviewed 4 of 4 files at r4.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable

Rebased and moved the entries in the changelog to unreleased.

Reviewed 1 of 1 files at r5.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Fix Ember global deprecation

Use a version guard to run consumeCollection in apps that require it instead of checking for the Ember global.
Fixes #80.

We no longer need the hack that consumeCollection uses by entangling and notifying the [] tag in 3.24+, however we do need a different way to notify when the collection has changed. This is going to be done with a collection cell, and it should be a new major version since it'll be a decent size of a refactor, I don't think we should continue supporting older versions of Ember.

however we do need a different way to notify when the collection has changed.

So is COLLECTION_SYMBOL a placeholder or does it actually do something? The tests seem to work, so it should be enough to trigger updates.
https://github.com/pzuraq/tracked-maps-and-sets/blob/6261f88b5ecda5c594197b9bd21528d057d59ad5/src/-private/util.ts#L28-L30
Also, there aren't any Ember versions out there without the Ember global, right? So, all Ember versions now use get [] and notify?
https://github.com/pzuraq/tracked-maps-and-sets/blob/6261f88b5ecda5c594197b9bd21528d057d59ad5/src/-private/util.ts#L38-L43

I don't think we should continue supporting older versions of Ember.

I get that, but, at the same time, these deprecations can be incredibly frustrating.
They’re a problem now, especially for addons that try to be good citizens and test across a wide range of Ember versions.
They’re also not particularly helpful when you don’t even own the code that's triggering them.
It would be nice to get to an error/deprecation-free state before dropping support for older versions. Unless this doesn’t actually work, I don’t see why we can’t get a patch release in the meantime 😃

They’re a problem now, especially for addons that try to be good citizens and test across a wide range of Ember versions. They’re also not particularly helpful when you don’t even own the code that's triggering them. It would be nice to get to an error/deprecation-free state before dropping support for older versions. Unless this doesn’t actually work, I don’t see why we can’t get a patch release in the meantime 😃

Because the way that the two systems work is pretty different, and I think that the burden of supporting both at the same time will be more costly than pushing everyone using these packages to update. There is always a cost to introducing a new major version, but in this case I think the cost is worth it.

and I think that the burden of supporting both at the same time will be more costly than pushing everyone using these packages to update.

I'm not trying to convince you to support both. I'm suggesting releasing a patch to the current version. That way the v2.2 branch at least works with Ember 3.16 <= v < 4.0.0 without clogging our logs, and then we can upgrade to the new major version at our own pace whenever it's ready, taking into account our own compatibility requirements. Seems pretty reasonable to me 🤷.
Hacks or no hacks, the addon does work right now, after all. It's just a matter of not throwing tens/hundreds of errors. #70 could have been merged 2 weeks ago — problem solved.
Anyways, thanks for the quick reply, closing!


Allow Ray.extinction_min_depth to be equal to 1

There is a check in ray.extinction_min_depth.setter that prevents setting it to 1:
https://github.com/raysect/source/blob/3c1f2f2f1cce9c2a2d5ca2952a70af3287d53dbf/raysect/optical/ray.pyx#L276-L279
Because of this, ray.max_depth cannot be set to 1 either:
https://github.com/raysect/source/blob/3c1f2f2f1cce9c2a2d5ca2952a70af3287d53dbf/raysect/optical/ray.pyx#L291-L294
However, setting both values to 1 will be the easiest way to run the simulation without reflections. For now, the only alternative to this is to replace all reflective materials with AbsorbingSurface().
Is there a reason why ray.extinction_min_depth or ray.max_depth cannot be equal to 1?

The extinction_min_depth one looks like a typo as it is inconsistent with the exception and I can't think of any reason why it can't be 1. I'll run an experiment and check.

Fixed in development. Will be in v0.8.1.


Add an "all" installation rule.

Do we also need to add this to the CI somewhere?

Coverage remained the same at 97.017% when pulling e28a47b1fa80d9e29700a46b49df8b7255f39320 on arokem:install_all into 0856ad33e50149aa4c79411d11549b14eb293ce7 on richford:main.

May want to update this line to use the new
python -m pip install .[all] --use-feature=2020-resolver

as well.

I don't understand (or I forget) why we have to pin numpy when using fda. Could you remind me?

skfda depends on numba, which currently doesn't work with numpy > 1.20


Bug: Projected winrt::consume_ methods will nullptr crash if the underlying QueryInterface call fails

Why is this change being made?
The generated projection code for interfaces that the metadata declares as required for a runtimeclass assume that QueryInterface never fails. Assuming the metadata is correct in the first place, this is a valid assumption for inproc calls.
However, for cross-process calls the QI can fail even if the metadata is correct and the class really does implement all of the required interfaces. It can fail with E_ACCESSDENIED and a variety of other RPC error codes.
When this happens there is a nullptr crash in the generated consume method. This can be very painful to debug because the HRESULT is lost by the time it crashes.
Briefly summarize what changed
This set of changes fixes the crash by detecting the QueryInterface error and throwing an exception when that occurs during one of these required casts.  The try_as method was changed to capture COM error context when the QI fails.  The code gen surrounding WINRT_IMPL_STUB was changed to save the result into a temporary variable and then pass it to a new check_cast_result method.
If the cast succeeded then nothing happens.  If the cast failed, returning null, then the stored COM exception is retrieved.  Assuming it is available the HRESULT is pulled out of it and it is thrown using check_result.  This then propagates like any other exception.  Callers are free to try and catch it or let it go uncaught and crash.  Now they have the choice.
I also added a new file of test code that exercises this code path.  The test_component IDL declares a runtimeclass that implements IStringable.  And then the implementation fails to implement IStringable.  When ToString is called on this object it hits the failure path.  The cppwinrt code gen will not allow this to happen so I had to directly use winrt::implements.
How was this change tested?
Besides the new test cases I also wrote a little console app that crashes this way.  I built and ran it using the latest stable cppwinrt as well as my private new one.  As expected the debugger blame is far more useful with these changes.
IDL:
namespace CrashRepro
{
    // This class declares that it implements another interface but under the covers it actually does
    // not.  This allows us to test the behavior when QI's that should not fail, do fail.
    runtimeclass LiesAboutInheritance : Windows.Foundation.IStringable
    {
        void StubMethod();
    }
}

main.cpp:
#include <winrt/CrashRepro.h>

#include <wil/result_originate.h>

namespace
{
    struct LiesAboutInheritance : public winrt::implements<LiesAboutInheritance, winrt::CrashRepro::ILiesAboutInheritance>
    {
        LiesAboutInheritance() = default;
        void StubMethod() {}
    };
}

int main()
{
    winrt::init_apartment();

    auto lies = winrt::make_self<LiesAboutInheritance>().as<winrt::CrashRepro::LiesAboutInheritance>();
    FAIL_FAST_IF_NULL(lies);
    lies.StubMethod();

    try
    {
        lies.ToString();
    }
    CATCH_FAIL_FAST();
}

Before:
FAILURE_BUCKET_ID:  ACCESS_VIOLATION_c0000005_CppwinrtQIFailureCrashRepro.exe!winrt::impl::consume_Windows_Foundation_IStringable_winrt::CrashRepro::LiesAboutInheritance_::ToString
After:
FAILURE_BUCKET_ID:  STOWED_EXCEPTION_80004002_CppwinrtQIFailureCrashRepro.exe!winrt::check_cast_result_winrt::impl::abi_winrt::Windows::Foundation::IStringable,void_::type_*_
Note that the HRESULT ends up in the signature and the blame says that the cast result to IStringable is what failed.
Closes #1441

As a binary size test case I built a private copy of WinUI3.  The binary with cppwinrt usage is Microsoft.UI.Xaml.Controls.dll.  The binary size for that actually went down (not up).  5,775,872 to 5,636,096 (-139,776 bytes aka -2.4%).

As a binary size test case I built a private copy of WinUI3. The binary with cppwinrt usage is Microsoft.UI.Xaml.Controls.dll. The binary size for that actually went down (not up). 5,775,872 to 5,636,096 (-139,776 bytes aka -2.4%).

Compared to what? The previous commit in the cppwinrt repo or some previous release?

As a binary size test case I built a private copy of WinUI3. The binary with cppwinrt usage is Microsoft.UI.Xaml.Controls.dll. The binary size for that actually went down (not up). 5,775,872 to 5,636,096 (-139,776 bytes aka -2.4%).

Compared to what? The previous commit in the cppwinrt repo or some previous release?

Compared to master.  (Actually, not literally master.  I had to deactivate the breaking changes from #1319 before I could compile XAML with a newer cppwinrt.).  The only difference between the two binaries under comparison is the changes in this PR.

Technically the FH4 work that Raymond alluded to is about folding identical catch handlers rather than call sites. A reduction here for Microsoft.UI.Xaml.Controls.dll would seem to imply that code that was previous inlined is no longer.

With the latest iteration (with the fix to keep the lifetime valid on the casted-to object) the binary size difference is close to zero.  With the changes in this PR the XAML controls DLL is 10KB smaller than before (well below 1% diff).

Technically the FH4 work that Raymond alluded to is about folding identical catch handlers rather than call sites. A reduction here for Microsoft.UI.Xaml.Controls.dll would seem to imply that code that was previous inlined is no longer.

In prior investigations, I there are types that have pathological inline behavior. Types like ValueSet, for instance, don't have any methods of their own - it's a flavored IMap<>.  Someone accidentally doing the obvious thing:
ValueSet v{};
v.Insert(L"kittens", winrt::box_value(7u));
v.Insert(L"puppies", winrt::box_value(2.0f));
v.Insert(L"muffins", winrt::box_value(L"blueberry"));

... ended up with three inlined QueryInterface calls from IValueSet -> IMap<String, Object> in order to call IMap<>::Insert.  It's not clear why the optimizer/inliner chose to splat the sequence of "load vtable, load queryinterface, push address of IMap<>, call" instead of leaving that as "invoke consume_ValueSet_IMapInsert" method calls, but it was very noticeable in the sizebench builds (building the same way as our release branch build builds.)
Any way to either merge those three QI sequences (tear off interface caching?) or at least not inline them (so the QI + call Insert is an invocable thing) would produce really great size enhancements. The code's already doing a bunch of "call" anyhow, we aren't saving anything by inlining the QI+Call into the parent frame.

As a binary size test case I built a private copy of WinUI3. The binary with cppwinrt usage is Microsoft.UI.Xaml.Controls.dll. The binary size for that actually went down (not up). 5,775,872 to 5,636,096 (-139,776 bytes aka -2.4%).

Make sure to also run the validation with the "real build line" - things like PGO can be super duper smart and decide to either inline or fold based on "other data."  I tried fixing winrt::hstring to be less inlined only to find that the PGO optimizer was going to already de-inline all the calls on its own.

Before I worked on FH4, I worked with MSVC on an optimization to treat certain calls to QueryInterface as pure functions. This worked well for solving such problems but we could never get the optimizer to hoist these calls reliably. Eventually I started working on the fast abi, which achieved the same effect but sadly was never adopted.
Ultimately, types like ValueSet are very poorly designed and should not be used. In the early days of cppwinrt I had diagnostics that would print out debug warnings at runtime for such pathological cases but it was deemed too judgy. 😉

🤣🤣 vcxproj files are so awful.

With the latest iteration of code Microsoft.UI.Xaml.Controls.dll is 6,634,560 bytes (-141,312bytes, -2.4%, compared to baseline).  That is back to where it was with the failfast approach.


kpt guide doesn't invoke pager

When displaying kpt guide output, a pager (e.g. /usr/bin/less) is not invoked, as done by kpt help.
It'll be nice to have consistent behaviour for both commands.

This command is not longer supported in kpt v1(kpt.dev).


Add Python 3.8.5 and make Python images smaller

Python 3.8.5 is a supported language, and the default for "python"
It's the default for "python", because it leads to smaller images.
Python images are now smaller
This patch changes the file mode of the /python tree as part of the
build image, which avoids duplicating the pip installed libraries in
the final layer. This makes docker push and pull much faster.
"Hello world" with Python 3.8.5:

requirements.txt
image size now
image size before
saving

fdk
136MB
161MB
15%

fdk & oci
202MB
292MB
30%

Minor fixups

Make Python boilerplate meet PEP 8 standard
Remove unused func "dockerBuildError" (dead code)

Your table shows a great improvement, have you tried to verify that with this version of the code, the creation of a python function works as expected? If so I think we are good to go.


single plan with multiple storage options

so as per our clarification that having multiple plans for each storage flavor will allow us to customize variables exposed per storage, i m closing this


⚠ SkipTheTrailers has degraded performance

In d58f90a, SkipTheTrailers ($STT) experienced degraded performance:

HTTP code: 200
Response time: 2254 ms

Resolved: SkipTheTrailers performance has improved in 4e26c84.


refactor(app): update connect via usb screen

Overview
update connect via usb screen to align with the hi-fi design.
This PR is only update the UI part. The functionality of USB connection part will be implemented later.
FYI
For this update, I updated connected screen and not connected screen separately. Actually we can use optional to merge both screens but I think this way can keep readability. And the component itself around 100 lines.

Test Plan

Network setup menu
Tap USB

To see the success case this pr needs to change the line.
line27  const isConnected = false => true

Changelog

update ConnectViaUSB component and test

Review requests

Risk assessment
low

The success screen should have centered text.

The success screen should have centered text.

@ewagoner  thanks.
just fixed


[material-ui][Masonry] layout forms a single column when the first item is hidden

Steps to reproduce
Link to live example: https://react-nxweja.stackblitz.io/
Steps:

Create a Masonry layout using Material UI.
Hide the first item in the Masonry layout using CSS or JavaScript.
Observe the behavior of the remaining items in the layout.

Current behavior
When the first item in the Masonry layout is hidden, all the remaining items are forced into a single column instead of distributing evenly across the available space.
Expected behavior
The remaining items should adjust and distribute evenly across the columns, maintaining the Masonry layout even if the first item is hidden.
Context
I am using the Masonry component to create a visually appealing grid layout for a photo gallery. The layout should remain balanced and distribute items evenly across columns. However, when the first item is hidden, it disrupts the entire layout, forming a single column, which is not the intended behavior and affects the gallery's visual consistency.
Your environment
System:
OS: macOS 14.1.1
Binaries:
Node: 19.8.1 - /usr/local/bin/node
npm: 9.5.1 - /usr/local/bin/npm
pnpm: 9.1.2 - /usr/local/bin/pnpm
Browsers:
Chrome: 125.0.6422.142
Edge: Not Found
Safari: 17.1
npmPackages:
@emotion/react: ^11.11.4 => 11.11.4
@emotion/styled: ^11.11.5 => 11.11.5
@mui/base:  5.0.0-beta.40
@mui/core-downloads-tracker:  5.15.19
@mui/icons-material: ^5.15.19 => 5.15.19
@mui/lab: ^5.0.0-alpha.170 => 5.0.0-alpha.170
@mui/material: ^5.15.19 => 5.15.19
@mui/private-theming:  5.15.14
@mui/styled-engine:  5.15.14
@mui/system:  5.15.15
@mui/types:  7.2.14
@mui/utils:  5.15.14
@types/react: 18.2.8 => 18.2.8
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: 4.8.4 => 4.8.4
Search keywords: Masonry layout, single column, hidden item, layout issue

Hey @Fanzzzd, thanks for the report!
May I ask you to share the code of the live example? If you could share the stackblitz in editor mode, that would be great. This will help us understand the issue better.

Hi @DiegoAndai ,
Here is the editor link to the live example: https://stackblitz.com/edit/react-nxweja?file=Demo.tsx
I observed the same behavior as @mbrookes mentioned. Once the Masonry layout is loaded, setting any element to display: none does not affect the layout.
Issue Analysis:
The issue where the Masonry layout forms a single column when the first item is hidden initially occurs because the layout calculations are based on the first child element. If this element is hidden, its height is zero, which triggers the skip condition. This condition is intended to handle cases where images haven’t loaded yet but also inadvertently causes problems when the first element is simply hidden.
Solution:
I modified the code to identify the first visible child instead of assuming the first child is visible. This ensures that the layout calculations use a visible element, avoiding the height zero issue. Additionally, I added checks to skip any children that are not visible during layout calculations, preventing them from affecting the layout logic.
With these changes, the Masonry layout should initialize correctly even if the initial item is hidden. If you like you can give it a try and plz let me know if it works!

Thanks for the live example @Fanzzzd. Accepted as a bug.


Split Task and Entity Context

Also to considered with Passive/Active tasks.
Some actions don't always need to execute a task. e.g. on().where {} they just want access to the context and the extensions that comes along with.
Moving extensions to separate entity & target context interfaces should solve this issue.
Also would be good to avoid having to create TargetContext and the TargetEvent should just be passed directly. (Probably should be called more abstract than event)

This should also resolve passing the event around event(task). But might require some Task rethinking.


Labels for prev and next buttons added

Two props (prevButtonLabel, nextButtonLabel) are added for display in
each buttons. This label can be html tag in string.

Well, I thought it would be laborious to have to declare a variable that contains the entire element, including events (correct me if I'm wrong). Also, I doubt that need to customize or change anything apart from the button label.

@codexorange Ah, that's a valid point. Note that we can get rid of dangerouslySetInnerHTML doing { this.props.prevButtonLabel ? this.props.prevButtonLabel : 'Prev' } kind of thing too. That would achieve both goals.

I not found the way to avoid use dangerouslySetInnerHTML. E.g.
var prevButtonLabel = '';
var nextButtonLabel = '';

<Paginator
    ...
    prevButtonLabel={prevButtonLabel}
    nextButtonLabel={nextButtonLabel}
    onSelect={this.onSelect} />

The result without using dangerouslySetInnerHTML it would be
 [1] [2] [3] ... [12] [13] [14]

I went with the general idea. You should be able to do
...
prevButton={}
nextButton={}
...

now.


Vogue is incorrect in assuming it's the last script in scripts array

I am getting errors like this:
"NetworkError: 404 NOT FOUND - http://<IP_ADDRESS>:8000/products/undefinedsocket.io/socket.io.js"
The problem lies in getScriptInfo() in vogue-client.js
it assumes the Vogue script will be the last one in the array returned by document.getElementsByTagName("script") but because it appends itself to the <head>... and common practice is now to put all your scripts at the bottom of the <body> (see html5 boilerplate etc)... so it is not selecting the Vogue script, it's grabbing my Google Analytics script block instead.
It really needs to look for vogue-client.js specifically.

No, it wasn't that either!
It was the bookmarklet... has:
url:'http://localhost:{port}/',\
domain:'localhost',\
port:{port}\
};\```

should be (?)
```window.__vogue__ = {\
rootUrl:'http://localhost:{port}/',\
domain:'localhost',\
port:{port}\
};\

Now I see the websocket connect but I get a new error in the console where vogue is running:
Listening for clients: http://localhost:8001/
debug - served static /socket.io.js
debug - client authorized
info  - handshake authorized<PHONE_NUMBER>740757778
debug - setting request GET /socket.io/1/xhr-polling/1361698798740757778?t=13
20521135714
debug - setting poll timeout
debug - client authorized for
debug - clearing poll timeout
debug - xhr-polling writing 1::
debug - set close timeout for client<PHONE_NUMBER>740757778
debug - xhr-polling received data packet 5:::{"name":"watch","args":[{"href":
"/static/css/libs/inuit/inuit.css"}]}
Watching file: D:\My Documents\design\Dresses plus More\dpm\shop\static\css\libs
\inuit\inuit.css
fs.js:696
throw new Error('use fs.watch api instead');
^
Error: use fs.watch api instead
at Object.watchFile (fs.js:696:11)
at Watcher.startWatching (C:\Node.js\bin\node_modules\vogue\Watcher.js:57:8)
at VogueClient.<anonymous> (C:\Node.js\bin\node_modules\vogue\VogueClient.js

:31:18)
at Object.oncomplete (native)

should I use an older version of Node?  I'm on 0.5.10 (...couldn't use 0.6.0 because npm wouldn't even install itself)

Looks like a Windows issue: https://github.com/joyent/node/blob/220e61c1f65bf4db09699fcf6399c0809c0bc446/lib/fs.js#L696

apparently to support the new fs.watch api and make things cross-platform means dropping node 0.4.x support (or coding a work-around)
https://github.com/jashkenas/coffee-script/issues/1803


Add favicon capability

It would be nice if lagrange loaded /favicon.txt and presented it in the page top and bookmarks tab.
There is a specification for it here:
gemini://mozz.us/files/rfc_gemini_favicon.gmi

I won't add an automatic favicon fetch because that goes against the design of Gemini IMO, but I suppose this could be a manual context menu item in the bookmarks list. It would then prevent the default behavior of a random icon being selected for that bookmark.
When adding a bookmark it could also provide a button for fetching the site favicon, if the user wants to check for one.

I understand, and I am myself a bit ambivalent about it. But as the icon is just one unicode character I think it suits gemini. Your suggested approach sounds good.

I won't add an automatic favicon fetch because that goes against the design of Gemini IMO

This is very true. It's simple but it's a second request that's not user initiated. I don't think we have the same level of threat from it as http does with the favicon supercookies, but it is clearly a bolt-on that attempts to expand the spec. It should be aggressively fought against as default behavior.

Let the user decide, no icon, random icon (default and only choice now in Lagrange), or capsule icon.
And why not implement it in a way so no redirects is allowed, only accept capsule:/favicon.txt

A less automatic solution would be fine.
Maybe adding a button in bookmark edit dialog : [ Fetch favicon.txt ]. It will attempt to grab the /favicon.txt from capsule and replace old (or predefined) one.

f79e6735864a16c20d0ed0cc9d79c8c20aeb4816 puts you in full control of the bookmark/site icons.
And by this I mean that you get to manually set the icon to whatever Unicode character you want to use.
In light of recent discussions on the Gemini mailing list, it remains to be seen whether I'll add any further features to fetch server-defined icons. However, for now you will be able to do it manually by opening the gemini://some.site/favicon.txt and copypasting the character from there to the bookmark edit dialog.
IMO it is better to allow the user to choose which icon they want to use for a site, based on what meanings and connotations they ascribe to a particular symbol.

A few more notes about supporting favicons.

Lagrange doesn't have a cache of site-specific data. This would be required so favicons are not re-fetched on every visit. Adding such a cache is a considerable time investment, and it would need more than favicons to make that a sensible undertaking (e.g., adding user's site-specific theming choices).
The top banner needs to display the icon, but what should be done before the favicon request completes? a) Delay displaying the page, or b) swap in the "real" icon once it has been fetched? Neither option is great.

This is a lot of complexity that is not really justified by the value added by server-provided favicons.

As there are objections overall to favicons, a context menu item in the bookmark list should be good enough, like "Fetch favicon". When it is clicked a redraw can be done. Cache seems overkill for gemini.

cache would still be needed as I understand it, as the favicon will be lost next time you reopen bookmarks sidebar or restart browser

cache would still be needed as I understand it, as the favicon will be lost next time you reopen bookmarks sidebar or restart browser
The favicon is stored in bookmarks.txt as a codepoint value.

To clarify my previous comment, it was about implementing favcions the "web" way, where they would appear seamlessly without the user bookmarking anything. One can argue this is what a capsule owner expects to happen when they put up a favicon.txt.
Treating them as a suggested/default bookmark icon is quite a bit simpler to implement because a) Lagrange already supports customized bookmark icons (no additional caching needed), and b) the fetching can be done when requested or when the bookmark is created.
So my first comment pretty much still applies.

but... ¿what is the risk of see the favicon in the address bar?

@jazei-AR: The risk should be no more than the gmi-request in the first place, as the URI would be hardcoded from the client. The reasoning against it seems to be more about that the gemini protocol is more or less "set in stone", and no fundamental altering should be done, and I think I agree to that.

Hello,
I have a question about this: When I go to the page gemini://spartan.mozz.us/. Does the icon, which is in the favicon.txt, also appear with the page. What is the reason for this?

@marek22k Yes indeed, those are hardcoded icons for the sites that host a protocol specification. Lagrange does not check favicon.txt.

f79e673 puts you in full control of the bookmark/site icons.

This seems to apply to bookmarks but how do sites like skyjake.fi/lagrange/ or gemini://gemini.circumlunar.space/capcom/ select the icon displayed in the title bar?

The icon is chosen based on a hash of the domain name, so it is random but deterministic. Bookmark icons set by the user override the default icon.

Cool. That makes sense.
I assume the color scheme is also chosen in a similar way?

That is correct. The various color schemes seed their random palette elements from the domain name (with a possible ~user path included), same as with the icon.

The icon is chosen based on a hash of the domain name, so it is random but deterministic. Bookmark icons set by the user override the default icon. The official Gemini capsule has a hardcoded icon.

That is correct. The various color schemes seed their random palette elements from the domain name (with a possible ~user path included), same as with the icon.

Can you please share how this icon hash and color pallete is generated?

@vg Well, you can find the code for doing that in gmdocument.c. The palette generation is not that straightforward because there are multiple theme variants. When it comes to the icon, the app computes a (slightly broken) CRC-32 of the domain name (possibly including a tilde username, like "domain.org/~username/") and picks the icon from a hardcoded set of Unicode characters. Various bits of the computed checksum are directly used when choosing theme colors.

My suggestion is, for one thing, allow an option to disable icons entirely, and allow the user to set icons (and colours) manually.
Many people (including myself) dislike the use of the /favicon.txt because it needs an extra request, which violates the principle of Gemini.
So, I have made up a way to use a X.509 certificate to define the favicon. Its working is: The ID of the extension is 2.25.327847519394146920218914781995694576662.3. The data type is a sequence. If the sequence contains a UTF-8 string then it is interpreted as specified in the specification of the favicon.txt. The implementation MUST allow the user to disable this feature, if it is implemented.
I personally don't like favicons and don't use it (and to me, I would be OK even if favicons are not implemented at all), but I made up such a specification only because of disliking the other method.
I think that #237 would also be acceptable (although only with the option that is disabled by default, as suggested by skyjake; or possibly with a button that will do so only if you explicitly select "download favicon"; or a combination of the two).


goenv install simply do nothing

I'm trying to install an old Go version using goenv. I'm used to using this tool but nothing happens when I try to install a version.
❯ goenv --version
goenv 2.0.0beta11
❯ goenv install 1.14.15
❯ echo $?
0
❯ pwd
/Users/qlemaire/.goenv/versions
❯ ls -lah
total 0
drwxr-xr-x  2 qlemaire  staff    64B Sep  6 15:59 .
drwxr-xr-x  4 qlemaire  staff   128B Sep  6 15:59 ..

Weird; try using the latest stable version and see if that changes anything?
What OS are you using? It's odd that it's quietly exiting with no message and a 0 status

Sorry I should have checked earlier. It doesn't seem to work for this specific version:
❯ goenv install 1.19.2
Downloading go1.19.2.darwin-arm64.tar.gz...
-> go1.19.2.darwin-arm64.tar.gz
####################################################################################################################################### 100.0%
Installing Go Darwin arm 1.19.2...
Installed Go Darwin arm 1.19.2 to /Users/qlemaire/.goenv/versions/1.19.2

❯ goenv versions
* system (set by /Users/qlemaire/.goenv/version)
  1.19.2
❯ goenv install 1.14.15
❯ echo $?
0
❯ goenv versions
* system (set by /Users/qlemaire/.goenv/version)
  1.19.2

No worries! Got it; yeah, somewhere in 1.16.9 or 10 they added ARM support for Macs. I'd like to propose a change where one of the two things occur:
Short term:
Only list versions available to a user's Arch and OS and show an error if you select a version that isn't supported.
Long term:
Add gccgo as a sub dependency and prompt the user whether or not they want to compile from source, as that is the only long term solution currently available. Would need some time to tinker with automation and get the source compile cookbook just right.
@syndbg thoughts?

Sorry for disturbing, just miss click on the wrong button in a GitHub TUI...

dupe of #106


[WIP] Backfill models tests.

Make sure you have checked all steps below.
Jira

[ ] My PR addresses the following Airflow Jira issues and references them in the PR title. For example, "[AIRFLOW-XXX] My Airflow PR"

https://issues.apache.org/jira/browse/AIRFLOW-XXX
In case you are fixing a typo in the documentation you can prepend your commit with [AIRFLOW-XXX], code changes always need a Jira issue.

Description

[ ] Here are some details about my PR, including screenshots of any UI changes:

Tests

[ ] My PR adds the following unit tests OR does not need testing for this extremely good reason:

Commits

[ ] My commits all reference Jira issues in their subject lines, and I have squashed multiple commits if they address the same issue. In addition, my commits follow the guidelines from "How to write a good git commit message":

Subject is separated from body by a blank line
Subject is limited to 50 characters (not including Jira issue reference)
Subject does not end with a period
Subject uses the imperative mood ("add", not "adding")
Body wraps at 72 characters
Body explains "what" and "why", not "how"

Documentation

[ ] In case of new functionality, my PR adds documentation that describes how to use it.

When adding new operators/hooks/sensors, the autoclass documentation generation needs to be added.

Code Quality

[ ] Passes git diff upstream/master -u -- "*.py" | flake8 --diff

Codecov Report

Merging #3982 into master will increase coverage by 0.1%.
The diff coverage is n/a.

@@            Coverage Diff            @@
##           master    #3982     +/-   ##
=========================================
+ Coverage   75.07%   75.17%   +0.1%
=========================================
  Files         199      199
  Lines       15965    15965
=========================================
+ Hits        11986    12002     +16
+ Misses       3979     3963     -16

Impacted Files
Coverage Δ

airflow/models.py
89.39% <0%> (+0.65%)
: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 d03cc17...923c0b1. Read the comment docs.

Nice!


test: Use templates for Yaml files

Currently, each Yaml file is fully specified, which includes name, replicas and nodeSelector location.
Such files can be turned into templates with Robot keywords to supply values tor those fields. That will result in more test flexibility with less Yaml templates.

cri install done,
code in https://github.com/vrpolakatcisco/vpp/tree/unify14


Total file size of multiple files

I know it should be easy, however I looked through the code but couldn't find a good way of doing it.
Thanks

You could bind a callback to the "add" event (see Options and API docs) and add the filesizes up:
var total = 0;
$('#fileupload').bind('fileuploadadd', function (e, data) {
    $.each(data.files, function (index, file) {
        total += file.size;
    });
})

Or bind to the "drop" and "change" events to add up the sum of the dropped/selected files.

Thanks!


Support batch operations

Batch operations are absolutely crucial with REST, where transactions are only available within a single request.
Would be great to have an API for that.
I can approximately see how to use it.
Instead of:
nodes = (1..1000).map { |n| Neography::Node.create("age" => n % 30 + 20, "name" => "Max #{n}") }
# all nodes are avilable, it executes 1000 requests

We would write something among:
nodes = Neography::Batch.start do
  (1..1000).map { |n| Neography::Node.create("age" => n % 30 + 20, "name" => "Max #{n}") }
end
# all nodes are created and available here. Only 1 batch operation request is executed.

So when we are within a batch operation, all the requests would be accumulated instead of actually sent.
Then dispatch at the end.

I agree it needs to be done, the question is how do we implement this cleanly.  Everything needs to go back to the one http request...   Thyphoeus is an alternative way of batching (minus the transaction of course), but doesn't work on JRuby and I want to keep neography platform agnostic if possible.  It might be easier to implement at the lower level (the straight REST wrapper) first...

I don't think Parallel requests are "real" alternative. It's kind of a workaround.
I look at them as "fire and forget" in case you don't care about the result (That's probably whole new feature :) )
Anyway, my thought about the implementation was to:

Always return proxy objects.
Do not execute HTTP requests when we're in a batch mode.
Do not block, unless absolutely necessary

Using the pseudo-code for implementing create_node this way
def create_node *args
  request_data = {:method => 'POST', :data => {...}}
  response = process_request(request_data) unless batching?
  response = batch_request(request_data) if batching?
  wrap_result_with_node response
end

class Node
  def member_missing(name, *whatever)
    return wait_until_ready!(name, *whatever)
  end
end

# Then:
n = db.create_node "name" => "me" # This posts but returns straight away without waiting
n.name # We still can use the object as we have the data locally

n.load 123 # Does the GET, but doesn't block
n.name # The data is not available locally, so we'll block here and wait until it comes in

# But:
n, n1 = nil, nil
db.batch do
  n = db.create_node "name" => "me" # This just adds the request to the current batch without posting
  n.name # We have this locally, so no problem

  n1.load 123
  n1.name # Here we probably need to throw as the value will never be available and would block forever

  # But we can easily reference the nodes/rels within the batch:
  db.create_relationship 'cant_think', n, n # This will use the batch number - {jobId} syntax of the API
  # And of course it won't send any requests, it'll just a add new data to the batch
end

# Here it will execute the batch, but won't block
n.1.name # And now, if the batch hasn't completed yet, it blocks and waits for the result

All this is somewhat idealistic and just came from top of my head.
But at the very minimum something like this would work:
db.batch [n1 = Node.new, n2 = Node.new, Relationship.new("kung-fu", n1, n2), existing_node_would_update, existing_node.batch_delete]

Sorry for the long comment. Just thought it may be useful if I'll put my thoughts down on "paper".

Probably doing everything through the batch would be another option. Not sure about the drawbacks though.

FYI,
It seems there's nothing wrong to always use batching http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3550568.html

Jake kind of put a downer on this idea... http://neo4j-community-discussions.438527.n3.nabble.com/Neo4j-REST-API-always-batch-tp3550568p3551368.html

There are limits to how large the results can be from a batch API call.
The batch API supports streaming deserialization of it's input, but output
is still created as a giant string in memory. It is reasonably easy to hit
the limits of how large the batch API results can be when you start
batching requests.

We don't want it to be the primary API. We have lots of ideas for how we
can improve the current REST API (add full transactional support, massively
improve throughput and latency), and so we would rather go down that road.
The batch API is a pragmatic solution to a big problem, but I don't think
it is a good long-term path to take.

Why don't we go simpler.
Figure out the most likely used batch operations, and just implement those.

CRUD +Index a node
CRUD +Index a relationship
???

Maybe at this moment just the basic was of batching will do the job. And later update as more use-cases will come in?
Maybe just something like:
db.batch [
  :relationship = {:id => 1, :body => {same params as for relationship} },
  :node => { :id => 1, :body => { same params as for node},
  :index => {:id => 2, :body => {same params as for index}
]

Hi guys, I'm very interested in this. Any updates on batch operations with neography? Do either of you have it working (with any of the methods mentioned in this thread)? Thanks!

I can whip something up this week.  Do you just need inserts or what do you want it to do?

That would be fantastic. The main thing I'm using it for is creating nodes and relationships. Here's how it works:

User submits a post that mentions a few topics (posts and topics are nodes).
Create the node for the post
Add the node to an index
Create 'created' relationship between user and the post
Add this relationship to an index
Create relationships between the post and every topic it mentions (each topic is already a node)
Add these new relationships to an index
Update (read and then update) a weight property on relationships between the user and the mentioned topics (indicates that the user is more 'interested' in the topics they are mentioning).

So basically creating and reading nodes, relationships, and node/relationship indexes (deleting would be nice also but is not necessary for this particular function).
Let me know if you have any questions or if I can help! Thanks again.

Ok... I'm going to implement this very naively and then we can talk about it and refactor it.

Ok it's in version 0.0.19  Take a look at the specs => https://github.com/maxdemarzi/neography/blob/master/spec/integration/rest_batch_spec.rb and the implementation starting at line 355 of https://github.com/maxdemarzi/neography/blob/master/lib/neography/rest.rb

Great thanks a lot! I'll check it out over the next few days.

Ah ok that's too bad. Ok I'll continue giving this a go and submit a pull request for a couple of additions shortly. Thanks.

@maxdemarzi do you know how to get the node id of a node retrieved through an index? I can't seem to figure out how to do it from the docs, and it's not immediately apparent in the response data. I'm trying to get the two nodes via an index and then pass the node ids of those two nodes in to the create relationship call.

You should get an array with a hash:
[{"extensions"=>{}, "paged_traverse"=>"http://localhost:7474/db/data/node/1153/paged/traverse/{returnType}{?pageSize,leaseTime}", "self"=>"http://localhost:7474/db/data/node/1153", "property"=>"http://localhost:7474/db/data/node/1153/properties/{key}", "data"=>{}, "incoming_typed_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/in/{-list|&|types}", "indexed"=>"http://localhost:7474/db/data/index/node/test_node_index/jpapfx/yvmvnwpa/1153", "outgoing_typed_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/out/{-list|&|types}", "incoming_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/in", "all_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/all", "create_relationship"=>"http://localhost:7474/db/data/node/1153/relationships", "traverse"=>"http://localhost:7474/db/data/node/1153/traverse/{returnType}", "properties"=>"http://localhost:7474/db/data/node/1153/properties", "all_typed_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/all/{-list|&|types}", "outgoing_relationships"=>"http://localhost:7474/db/data/node/1153/relationships/out"}]
Then you can just grab the id form the self url.
result.first.["self"].split('/').last

Marc,
Any update on those additions you wanted?
Thanks,
Max


Selenium support (Making Contact)

Hey! Thanks a lot for your service, this is amazing, really.
I am here to ask if there is a way to put a Selenium Webdriver Window inside TKinter Frame, my GUI will need this, I found a lot of ways to start and interact with selenium using TKinter but found nothing about how to display it inside a Widget... Thanks. If opening a Issue for this bothers you I can remove, whatever will be the best for you. Again, thanks a lot and good job

I cant use CEFPython because my project uses libs that needs my current python version

Hi! No worries, happy to help. Selenium doesn't include a GUI. You can interact with a webpage via code with Selenium but you can't display the webpage and allow the user to interact with it graphically. The closest thing you can do is get the html source code from Selenium and display that in Tkinterweb as a static page.

I'm having so many issues trying to use CEFPython (even with Py3.9) that I'm really considering this solution.
I can add buttons that makes the actions and refresh the static html. Thanks Andereoo

No worries! It is also possible to replace HTML elements with Tkinter widgets, so you could also inject your own buttons into the webpage itself (i.e. replace one of the webpage's buttons with your own, which would then interact with Selenium, etc.). See Geometry Management with TkinterWeb . Whether this is reasonable or not depends on your app's needs, but it is nonetheless another potential solution. I'd be happy to answer any questions you might have with that!

You're the best, really
Thanks Andereoo


Feature: Chaotic Vote Multiplier

A new take on Wiki Voting Feature Request 1 - Multiplies all users votes by a random number in the (0.5, 1.5] interval. Also adds some simple docstrings.

:-1: the random value changes each time the vote is tallied (which happens a lot)

:-1: This would be evaluated every time the votes are calculated, which is every 30 seconds/twice a minute, so this really just makes the threshold lower. This would work if the multiplier was stored somewhere, such as the MySQL database.

Lol, we asked for chaos right?


brand new users will be unable to use the init commands

In part of my simulating onboarding a brand new first-time user (related to https://github.com/breadboard-ai/breadboard/issues/633 and https://github.com/breadboard-ai/breadboard/pull/667 ), I discovered that if a user hasn't already installed the namespaced @google-labs packages, npm init breadboard and npm init breadboard-kit won't function.
When npm init X is called it maps to npm exec create-X.
So for a first-time user:

npm init breadboard -> npm exec create-breadboard
npm init breadboard-kit -> npm exec create-breadboard-kit
see: https://docs.npmjs.com/cli/commands/npm-init

I have published empty packages for create-breadboard and create-breadboard-kit to reserve them for the project:

https://www.npmjs.com/package/create-breadboard
https://www.npmjs.com/package/create-breadboard-kit

As a solution. I propose mirroring the @google-labs/create-breadboard and @google-labs/create-breadboard-kit.
For npm exec breadboard unfortunately, there is an apparently long-dead project at https://www.npmjs.com/package/breadboard so npx breadboard will resolve to that, however as an alternative, I have reserved breadboard-cli

Isn't it npm init @google-labs/breadboard?

and to get breadboard command working, then you should just be able to npm -g -i @google-labs/breadboard-cli and it will alias breadboard so you don't have to think about npx breadboard...
npx breadboard is really just for our local repo


Fix "editor/editor_help" shortcut overwriting when restarting editor

When restarting the editor, the shortcut is constantly reset to Shift+F1. I looked at the sources, I think the error is obvious:
https://github.com/godotengine/godot/blob/7e14a276da1ab8e7dda4f4f5041056edc1910c25/editor/editor_node.cpp#L6268-L6271
https://github.com/godotengine/godot/blob/7e14a276da1ab8e7dda4f4f5041056edc1910c25/editor/editor_node.cpp#L6840-L6842
The problem is reproduced in 3.2.

Thanks!

Cherry-picked for 3.2.4.


Missing texture / material on glTF (glb) import.

Godot version:
3.2.2 Standard (GDScript) 64 bit
OS/device including version:
Windows 10 - GLES3
Issue description:
Some glb-files work great, some don't.
I tested a default glb-file from Windows 10 build-in 3D-Viewer. The bee.
Steps to reproduce:
Create a new project and import the glb-file. See that there is no material / texture imported. Only the mesh and animations, etc.
I expected a full support of all material features and textures like albedo, normal, emission, etc.
(No errors on console.)
Demo / Files:
Windows 10 3D-Viewer:

Godot after import:

Source model file (glb):
Download Bee.zip

cc @fire

A working example in the glTF sample models repo Or this duck:
Download Duck.zip

Uses a non core gltf extension:
"extensions": {
        "KHR_materials_pbrSpecularGlossiness": {
          "diffuseTexture": {
            "index": 0
          },
          "specularGlossinessTexture": {
            "index": 1
          }
        }
      }

There's already a pr for it. https://github.com/godotengine/godot/pull/38438
I'll post a converted scene in a bit.

Something is wrong. Not sure what it is yet.

You can see it clearly in the blender view.

Thanks for investigating. It's looks better. This means that only "Principled BSDF (GGX, Burley)" is supported.
Your commit to Godot will convert this in the future, right? I tried to convert it in Blender. But export in Blender is a gamble. ... It seems there is an issue with wrong scales. Anyway... thanks.

I close this issue, because the glb-file material (SpecularGlossiness) is not supported in Godot which only supports MetallicRoughness. It's ok. But Godot should display a message about it and / or convert it.


[incubator-kie-issues#1206] DMN - Remove code path duplication for code gen execution

Fixes https://github.com/apache/incubator-kie-issues/issues/1206
This PR

add BaseNode constructors to be instantiated with values from original ones
refactor DMN code-gen so thatn newly instantiadet BaseNOdes would be used instead of custom code
features some singleton pattern in generated code to avoid re-instantiation of same object

Side-note: still WIP - lot of cleanup and verification needed, but wanted to start discussing the approach

How to replicate CI configuration locally?

Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.

How to retest this PR or trigger a specific build:

for pull request and downstream checks

Push a new commit to the PR. An empty commit would be enough.

for a full downstream build

for github actions job: add the label run_fdb

for Jenkins PR check only

If you are an ASF committer for KIE podling, login to Jenkins (https://ci-builds.apache.org/job/KIE/job/drools/), go to the specific PR job, and click on Build Now button.

"Benchmark","Mode","Threads","Samples","Score","Score Error (99,9%)","Unit","Param: expression"
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression","avgt",1,100,"0,042272","0,001634","us/op","if 2 > 1 then ""yey"" else ""nay"""
org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression,"avgt",1,100,"0,040522","0,000181","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression","avgt",1,100,"0,681583","0,006947","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,041961","0,001515","us/op","if 2 > 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,040979","0,000645","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,665966","0,009778","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"10,106472","0,177177","us/op","if 2 > 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"10,900692","0,680559","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"18,890975","0,305276","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""
,,,
compared commit
"Benchmark","Mode","Threads","Samples","Score","Score Error (99,9%)","Unit","Param: expression"
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression","avgt",1,100,"0,043069","0,001292","us/op","if 2 > 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression","avgt",1,100,"0,039671","0,000350","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledButInterpretedExpression","avgt",1,100,"0,671387","0,006671","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,041239","0,000543","us/op","if 2 > 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,047702","0,001352","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateCompiledJavaExpressionBenchmark","avgt",1,100,"0,672820","0,004684","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"10,056198","0,116080","us/op","if 2 > 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"10,045815","0,126247","us/op","if 2 < 1 then ""yey"" else ""nay"""
"org.drools.benchmarks.dmn.feel.FEELConditionAndLoopBenchmark.evaluateExpressionBenchmark","avgt",1,100,"19,195948","0,676614","us/op","for x in [ 10, 20, 30 ], y in [ 1, 2, 3 ] return ""foobar"""

Preliminary benchmark comparison of  org.drools.benchmarks.dmn.codegen.CodegenBenchmark.evaluateModelBenchmark
main branch
"Benchmark","Mode","Threads","Samples","Score","Score Error (99,9%)","Unit"
"org.drools.benchmarks.dmn.codegen.CodegenBenchmark.evaluateModelBenchmark","avgt",1,100,"57,187899","1,216691","us/op"

comparison commit
"Benchmark","Mode","Threads","Samples","Score","Score Error (99,9%)","Unit"
"org.drools.benchmarks.dmn.codegen.CodegenBenchmark.evaluateModelBenchmark","avgt",1,100,"57,924387","0,779834","us/op"


Add a note in the README that shows how to save files to the filesystem?

The example code for this library is described as Parse an incoming file upload but a file upload usually ends with that file on a disk, and there does not appear to be anything in the example that shows that file step: could one or two lines be added to the example to how to use something like fs.writeFile to write the files in files to the file system?

By default the library will do the fs.writeFile. Does that answer your question ?

I'm far more interested in making sure that answer is in the docs, so that it benefits everyone, not as a comment that only I will read before this issue gets closed, so: it might? If it does, that should probably go in the README.md

I don't understand what note you want. There's a bullet that says that it automatically write files to disk?
PR.

No, it doesn't. https://github.com/node-formidable/formidable#with-nodejs-http-module does not mention anywhere where the file ends up. Neither does https://github.com/node-formidable/formidable#with-expressjs. Neither does https://github.com/node-formidable/formidable#with-koa-and-formidable
Adding code comments or even explicit code to the examples that explain where the file goes, and better yet, showing how to control that by showing how to explicitly do the exact same thing as the default behaviour but with code that lets people go "oh, so that's how I control ..." would be a meaningful improvement.
Also if "PR." is supposed to mean "Please file a PR with your improvements": I am not qualified to write that PR because I don't know how your code works. You are.

There's ton of documentation. There's options docs and there we have uploadDir, which says clearly that by default it writes to os.tmp
Anyone who is interested can search for "upload" or "uploaddir" and will find.
First thing always is "what're the defaults" and everyone looking for them supposedly should end up in the options section anyway
But ok, maybe a mention in the first example is good.

You're making a huge assumption about how people read README files, as well as how fluent they are in not-their-native-language. Over-documenting when the audience is of all ages, and of all countries, especially when someone who's also been a dev for a long time, and is fluent in English points out it seems some critical documentation is missing, is certainly worth it.

True. I'm not against that anyway.
Have couple of ideas for docs updates.

Added a note https://github.com/node-formidable/formidable#parserequest-callback

Added a note https://github.com/node-formidable/formidable#parserequest-callback


Initial version

Dashboard should be updated, because the HTTP-related stats are N/A.  Got an NLB up so we can poke around in CloudWatch to see what stats are available?

Good catch.

Maybe just delete the dashboard?


Autocomplete full name based on family and given name for DOI cretors and contributors

Description

follow-up of #455
We want to autofill the name field with given and family name
example

DoD (Definition of Done)

name field is disabled and filled as in the example
Testing

Unit or integration tests

Could we have from the datacite schema's properties or title either familyName or lastName ? They are kind of mixing at the moment.

Could we have from the datacite schema's properties or title either familyName or lastName ? They are kind of mixing at the moment.

Not sure i follow, because in datacite there is no title if i remember correctly ... we need for e.g. creator these 2 https://github.com/CSCfi/metadata-submitter/blob/develop/metadata_backend/helpers/schemas/datacite.json#L17-L24 to be entered into field https://github.com/CSCfi/metadata-submitter/blob/develop/metadata_backend/helpers/schemas/datacite.json#L25-L28

Sorry I didn't make it clear enough, what I meant is quite simple. Is it possible if we only use either Last name or Family name so it is easier for user to follow.

issue with last name and family name should be fixed with: https://github.com/CSCfi/metadata-submitter/pull/279


SCRIPT7002 executing POST request

Hello.What about this error executing a whilst jquery post :
SCRIPT7002: XMLHttpRequest: Network Error 0x2eff, Could not complete the operation due to error 00002eff.
Why is it happening? Only windows 10 users within the company are facing this issue. Thanks.

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

ID: 80e413c6-445b-30c6-b2f8-7959c9c4a759
Version Independent ID: 57c3967d-f4b1-7ede-11fc-56772cf616ae
Content: DevTools - Console error and status codes - Microsoft Edge Development
Content Source: microsoft-edge/devtools-guide/console/error-and-status-codes.md
Product: microsoft-edge
GitHub Login: @MSEdgeTeam
Microsoft Alias: msedgedevrel

Was there any resolution found for this issue?

Hello @capecape! Have you updated the latest version of Edge (https://www.microsoft.com/en-us/edge?form=MY01BL&OCID=MY01BL)? If that doesn't help, let me know.

I'll go ahead and close this issue for now. If the above solution does not solve the issue, I can reopen it. Thank you.

@erdraud @Reezaali Is any workaround to resolve this error? Our customer are using old version IE 11 just only.
Is there any information about this 0x2eff error. Thanks!

@erdraud @Reezaali Is any workaround to resolve this error? Our customer are using old version IE 11 just only.
Is there any information about this 0x2eff error. Thanks!


.rt-reset causes trouble for TextArea components

Seems like using unset: all disables both regular spaces and line-breaks on <TextArea />s.

Released 3.0.2 with the fix

Thanks! Fyi: seemed to happen in chromium and chrome as well

Not seeing it in Chrome and Safari myself, what version and OS do you have?

Tried chrome macOS Sonoma 14.4.1 and Chromium in Arch Linux

My main is Firefox though and tried it there first

Chrome in Mac: 123.0.6312.105


more Momentum options, mostly related to hFac

What changes does this PR introduce?
Alternative discretization related to hFac for few momentum tendency terms that greatly improve Angular-Momentum (AM) conservation in one weakly-forced, deep NH model set-up with zonally uniform geometry.
Some choices are certainly useful to have (first in the list) whereas some other might not add much.
These new choices are, starting from the most useful and/or with larger impact on AM-budget:

Flux-Form coriolis, selectCoriScheme=4 (mom_u,v_coriolis.F) :
use averaged transport so that the column integrated Coriolis tendency (gU,gV) match the Coriolis parameter times the integrated transport ( +f.V, -f.U )
Vect-Inv vorticity-advection,  selectVortScheme=4 (mom_vi_u,v_coriolis.F) :
by-pass division by hFacZ and instead apply recip_hFacW/S on final tendency.
Note: this fixes AM-conservation but breaks vorticity tendency matching advection of vorticity
pkg/mom_common, 3-d Coriolis, select3dCoriScheme= 2,3  (mom_u,v,w_coriolis_nh.F)  :
Alternative discretization using averaged transport ; distinction betewenn 2 and 3 only for vertical momentum tendency gW (but unclear which one is better/more consistent).
deep-model, gU,gV NH-metric terms inside vertical advection :
This exactly conserves AM and also simplify (+ speeds up) the code by skipping completely the NH metric-terms calculation for horizontal momentum tendency.
No run-time switch but a CPP option "MOM_USE_OLD_DEEP_VERT_ADV" (in MOM_COMMON_OPTIONS.h) allows to recover the explicit NH metric-term calculation.
<-- this affects many routines in the 3 momentum pkgs, including   mom_init_fixed.F,  MOM_VISC.h in pkg/mom_common + new argument to vertical advection S/R (in mom_fluxform & mom_vecinv pkgs).
Flux-Form, spherical Metric-terms, selectMetricTerms = 2,3   (mom_fluxform.F, mom_u,v_metric_sphere.F, mom_u_adv_vu.F) :
More accurate discretization, involves similar averaving as the ones described in manual eq. 2.102 & 2.103 but instead centered at grid-cell corner.
Also offer the option (selectMetricTerms=3) to skip the gU spherical metric term by advecting uVel*dxC (simpler, faster, and exactly conserve AM).
Add diagnostics for Metric-terms.

What is the current behaviour?
What is the new behaviour
Does this PR introduce a breaking change?
Other information:
Suggested addition to tag-index
to be filled later

I think this PR is ready for review: I updated config_summary.F with the new choices and added a secondary test in exp. deep_anelastic to test vector-inv. in deeep-model. This exp. is not the best test since bottom and top are flat and will work on adding a non-flat bottom/top new deep test but will be in verification_other (so not part of this PR).

@jm-c to be clear, the needed doc update here covers both #809 and #808

@jrscott Yes, because #808 was just adding new parameters without any new real option, we decided to postpone the doc addition until #809 when the new params will really offer new options.

this also brings up the issue of the diagnostics lists in the manual; we never worked out a way to auto-generate into the doc so they remain hard-coded. Maybe time for an update with new ones here?

Not really sure if it is more helpful for variables in the ch 3 table descriptions to use notation following ch 2, or to use mitgcm variable names (which I can :varlink:). I think it might depend on the specific comment. Here I'm wondering about hFac (= hFacW,hFacS) and gU gV.

@jrscott I looked at your additions to the doc, and it's all good. Thanks.
One detail: may be could permute the order, in the momentum equation parameter table, of select3dCoriScheme and selectCoriScheme to have this latest one first (generally the NH-params come alfter the Hydrostatic one) ?
I could easily do that if you prefer, just let me know.

@jm-c sure, makes sense, go ahead (or let me know if you have any issues)


Fixes Issue-10849: Fix Irregular Whitespace in pt-br.json

Describe your changes:
Fixes Issue 10849

Discovered this issue when trying to open a PR from a branch to fix an unrelated issue. There seems to be an error in the way the pt-br.json file is created, specifically at line 1178:72, indicating an irregular whitespace. The error was fixed using a VS Code Extension, as described here: https://stackoverflow.com/questions/34186283/eslint-fast-way-to-solve-irregular-whitespace-not-allowed. Due to the way the extension acts, the whole file seems to have changed and been readded (large diff). As far as I understand it, migration scripts do not need to be updated, as this is a json that only acts as a translate file (defines the strings that are to be displayed in the application). The issue does not appear when trying to merge anymore, and all merge checklists pass.

Type of change:

[X] Bug fix

Checklist:

[x] I have read the CONTRIBUTING document.
[X] My PR title is Fixes <issue-number>: <short explanation>
[ ] I have commented on my code, particularly in hard-to-understand areas.
[ ] For JSON Schema changes: I updated the migration scripts or explained why it is not needed.

[ ] I have added a test that covers the exact scenario we are fixing. For complex issues, comment the issue number in the test for future reference.

Hi @TeodorLungu,
We have fixed this already in latest main sorry for the delay in response. Just respond here in case you are still facing this


test(music): add test case for circleOfFifths

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

2 of 2 (100.0%)  changed or added relevant lines in 1 file are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+1.6%) to 89.902%

Totals

Change from base Build<PHONE_NUMBER>:
1.6%

Covered Lines:
276

Relevant Lines:
307

💛  - Coveralls


Consistently logged out of one Slack service

Describe the bug
I am logged out of a specific Slack service every 4-6 hours. Also worth noting, once I log in, the icon on the Franz bar does not update to the Slack's custom icon (it remains the default Slack icon). I have multiple other Slack services that work fine. Hibernation is not turned on.
To Reproduce
Steps to reproduce the behavior:

Add Slack instance
Log in
Wait 4-6 hours
Attempt to access the Slack instance, I am logged out.

Expected behavior
I expect that the Slack instance will persist my logged in session as the other Slack instances do.
Screenshots
It is the Slack login page
Desktop (please complete the following information):

OS: OSX 10.15.4
Browser: Firefox 75, Chrome 81.0.4044.122

Ugh, immediately found to be a Slack issue (experiencing it on the client as well). Sorry Franz, you're great.


Local builds for windows

Do you understand that any feature requests opened in this repository will be closed?
Yes

As a workaround, if you want to run --local builds on Windows, you can try using [WSL](https://learn.microsoft.com/en-us/windows/wsl/install. Note that WSL technically is not officially supported(we do not test it), but it seems to work well.
What is your use case? If you would like to just build the app with the Expo framework and not use the Expo Application Services (this is a separate thing) you can use npx expo:run command instead of eas build --local.

@szdziedzic my use case is just debbug my app after build or using development build without using EAS, unfortunally can't native build locally on windows, I'll try using WSL


bpf-linker: 0.9.5 -> 0.9.10, and add an option to use Rust LLVM instead of system LLVM

Update to 0.9.10. The system-llvm feature is removed, and no-default-features is sufficient for using system-llvm.
However, even with this update, bpf-linker won't work with latest nightly rustc, because rustc is already on LLVM 18, and LLVM 16 is too old to consume the output. The upstream bpf-linker have a feature to use Rust LLVM (enabled by default), so I also added an overridable option to do the same, although I am not sure if it should be on or off by default.
Description of changes

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
24.05 Release Notes (or backporting 23.05 and 23.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Result of nixpkgs-review pr 292566 run on x86_64-linux 1

1 package built:

bpf-linker

ping @NickCao @figsoda

Shall we wait for a new release? They've updated to llvm 18 on master: https://github.com/aya-rs/bpf-linker/blob/1e70f60759e97a10dbcc1158ddf9b08bc8b603be/Cargo.toml#L31

It seems that both 0.9.11 and 0.9.12 are tagged but they don't appear in GitHub releases.

I've been using the build from my pull request which builds bpf-compiler 0.9.10 against llvm 18 with rust nightly-2024-07-02 and it's been working well.

Superseded by https://github.com/NixOS/nixpkgs/pull/328224


Evaluate function cannot run function that is received by parameter

await this.browser.evaluate(function(fn){
    fn();
}, function() { alert('Hello World'); });

Try execute snipet above throws error:

(node:8052) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: > TypeError: fn is not a function
at :4:4
at :5:5
at :11:7

I tried to console.log(fn) and it appears as undefined on chrome console.

@ricardovsilva Did you manage to resolve this issue? I'm facing the same problem...

@herooutoftime unfortunately no =/

Hey!
Sadly this is a shortcoming of how things get evaluated into the Chrome runtime. Deep deep down, chromeless stringifies arguments and calls evaluate with the stringified arguments. It's highly likely that your alert function is being transported properly.
Is there a particular reason you're passing a function into the evaluate call? Reason I ask is so that I can either help point you in the right direction or think of a better solution. https://github.com/graphcool/chromeless/blob/master/src/util.ts#L188 is where this all happens, FYI

@joelgriffith , now I don't remember anymore why I needed that feature. Only thing that I can remember is that I was writing some integration tests with mocha and chai. I tried that to apply some DRY, but I really really don't remember now the details =/.

@joelgriffith I just had this issue. I was trying to change the value of a select DOM element but I don't know how to do that with Chromeless. A hacky way I tried is dispatching an event in the evaluate function like so.
await browser
  .evaluate((selector, selectFn) => {
    selectFn(document, selector, 'newValue')
  }, selector, selectOption)

...
const selectOption = (document, selector, value) => {
  const element = document.querySelector(selector)
  const event = document.createEvent('HTMLEvents')
  element.value = value
  event.initEvent('change', true, true)
  element.dispatchEvent(event)
}

I am changing select DOM element values multiple times so I thought I could save some typing by making it a function.
Maybe there is a better way to do this?

I'm running into this too. I need access to a SVGElement on the DOM so I can pass it to a chart generator library.
a. Passing functions to .evaluate() expresses them as null.
b. Passing DOM nodes out of .evaluate() expresses those as {}.
This basically means the only way I can get a DOM element to my chart code is by wrapping all my chart code in a UMD and somehow getting it on page as a global, which feels super yucky.


Patient characteristics: extension or Observation

There are several zibs that could be considered characteristics of the patient, like language proficiency, eduction level, life stance, nationality, marital status, etc. These zibs could potentially by modeled in two ways:

As a characteristic of the patient (or contact person, practitioner), directly in the relevant resource
As a distinct Observation

Looking at the FHIR core spec and different IG's, there doesn't seem to be a clear preference for one of these two ways, both methods are used. Some things to note:

For some of these concepts, a native FHIR element or core extension exists.
For some of these concepts, additional information is or could be relevant (like duration) and so an Observation is more logical.
For some of these Observations, one could make the case that there's a use case to query them independently. However, it's quite hard to reason about this in advance.

For reason number 2, our preference is to use Observations for this kind of information, unless a specific core element or extension is available (or unless there's a good reason to do things in another way). This preference needs to be written down in the profiling guidelines.

This has been added to the profiling guidelines through https://bits.nictiz.nl/browse/MM-4835


Upgrade to k8s API v0.24.0

Signed-off-by: Waleed Malik<EMAIL_ADDRESS>

/assign @nckturner

/ok-to-test

So the tests are failing but I can't even run them locally?

any updates on this? Thanks.


Update to Net-standard 2.1 and update test project NuGet packages

Prerequisites

[x] I have written a descriptive pull-request title
[x] I have verified that there are no overlapping pull-requests open
[x] I have verified that I am following the Nancy code style guidelines
[x] I have provided test coverage for my change (where applicable)

Description
The projects are targeted to .NET Standard 2.1, 2.0 and .NET 4.5.2. Due to this change minimum version of the SDK project changed to 3.0.100 -> rollForward minor.
The AsyncUsageAnalyzers  is not supported in .NET Standard 2.1 and it's outdated. I replaced it with Microsoft.VisualStudio.Threading.Analyzers package.
FakeItEasy, XUnit and Microsoft Test Framework SDK are updated to the latest version.
This PR will resolve #3007

Builds are failing on Travis and AppVeyor because of the .NET SDK and Mono version. I need to see how to fix them.

Travis-ci: Distro has changed to Ubuntu bionic, Mono changed to 6.8.0 and dotnet SDK to 3.1.102
Appveyor: image changed to VS2019
PowerShell script: CakeVersion updated to 0.37.0
Bash script: DOTNET_INSTALL_URL updated
For both PowerShell and bash, there was a bug in regex that couldn't detect versions like x.x.x00.
Cake: The project is using dotnet test command. xunit command replaced with test command and arguments changed to match dotnet test command.
xunit.runner.visualstudio (2.4.1) will run the jobs for dotnet test command. Microsoft.NET.Test.Sdk version changed to 15.5.0 from 16.5.0. The 16.5.0 version didn't copy testhost.dll to the output.

AppVeyor pipeline is passing now, there is a problem with Travis in OSXand Linux. I need to investigate more.

There is something interesting, Travis CI now supports .NET SDK 3.x.x by default. Why do we need to install it again?

By replacing AsyncUsageAnalyzers with Microsoft.VisualStudio.Threading.Analyzers  there are +500 warnings about async usages. They are mostly in test projects.

The pipelines now compile fine. The tests are running fine Linux, OSX and on a local-machine. BrowserFixture.Should_return_JSON_serialized_form is failing on AppVeyor.

I don't know why. I have a parallel test on my own AppVeyor account. The tests are passing fine there!

By rerunning the build, everything works fine.

Why target .NET Standard 2.1? Nancy's not using any APIs from the standard. I'm failing to see what value it brings.

@khellang you are right about the APIs. It's not a must but shouldn't keep the project updated to be able to use the latest APIs? like support for Span<T> in case of refactoring for memory, CPU performance?


Android: HTTP request not sent in release build

Is this a bug report?
Yes... well maybe. This might be intended behavior.
Have you read the Contributing Guidelines?
Yes.
Environment
Environment:
OS:  macOS Sierra 10.12.6
Node:  8.4.0
Yarn:  1.0.1
npm:  4.6.1
Watchman:  4.9.0
Xcode:  Xcode 9.0 Build version 9A235
Android Studio:  2.3 AI-162.4069837
Packages: (wanted => installed)
react: ^16.0.0-beta.5 => 16.0.0-beta.5
react-native: 0.49.3 => 0.49.3
Steps to Reproduce

Create an app that includes an http request to a local server.
Build for release.
Run app and observe that the request never makes it to the server.

Expected Behavior
I didn't really know what to expect and now I suppose Android will prevent insecure requests from being sent. Is there a way to allow insecure requests in a release build?
Actual Behavior
Failed http request.
Reproducible Demo
NA

I had the same problem with RN 0.49, when i run this command gradlew assembleRelease then i had this error:
:app:bundleReleaseJsAndAssets
Scanning folders for symlinks in C:\Users\Khurram\HelloWorld\node_modules (47ms)
Sc
anning folders for symlinks in C:\Users\Khurram\HelloWorld\node_modules (53ms)
Loading dependency graph, done.
warning: the transform cache was reset.
bundle: start
bundle: finish
bundle: Writing bundle output to: C:\Users\Khurram\HelloWorld\android\app\build\int
ermediates\assets\release\index.android.bundle
bundle: Done writing bundle output
bundle: Copying 7 asset files
bundle: Done copying assets
FAILURE: Build failed with an exception.
What went wrong:
Unable to process incoming event 'ProgressComplete ' (ProgressCompleteEvent)
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

Are you making the request against localhost or <IP_ADDRESS>?

@khurramwaqar I am not experiencing a build failure.
@cdlewis I am making requests against my local ip, 192....


ARM v4T does not understand undocumented, partially supported blx lr instruction.

Describe the bug
The ARM v4T ISA had a deficiency that made cross-ISA function calls to a far address difficult to perform. There were a number of workarounds, but one of them was clever and relied on processor-specific behaviour:

Load the target address into the lr register.
Execute the second half (only) of a blx #0x0 instruction pair. (See page A7-26 of https://documentation-service.arm.com/static/5f8dacc8f86e16515cdb865a?token=)

Per the spec, this results in UNPREDICTABLE behaviour if the second half of the instruction pair is executed on its own, but given that I have seen it in real-world code, it appears that some implementations of v4T, if not all, produced reliable behaviour here with the instruction acting as a blx lr.
Ghidra does not disassemble this undocumented instruction correctly.
To Reproduce

Load a program containing 0xf800 at a halfword-aligned boundary, using the ARM v4T ISA.
Attempt to disassemble the code, as that Thumb, starting at that byte sequence or before it.

Expected behavior
The instruction is disassembled as blx lr and Ghidra correctly understands this to be a function call to the address manually loaded into lr.
Actual behavior
The instruction is disassembled as bl #0x0, and disassembly stops at that instruction rather than continuing past it.
Workaround
This can be worked around by manually overriding the instruction flow to CALL, and then continuing disassembly starting from the next instruction.
Screenshots
Actual:

After applying workaround:

Attachments
I cannot provide a copy of the program I am working on, unfortunately. My apologies.
Environment (please complete the following information):

OS: Debian Testing
Java Version: OpenJDK <IP_ADDRESS>
Ghidra Version: e.g. 10.1.6
Ghidra Origin: Ghidra website

Additional context
I can provide more detail about why someone might have used this instruction if needed, but it doesn't seem relevant.

I'm still trying to process exactly what's going on with the ARM v4t. That bl instruction should almost certainly be a call, but we have it as a goto. It's probable that it's used in some ARM code for switch statements.
For your example here, is r11 loaded with a constant or an offset from the current position?

The bl instruction in armv4t is actually a macro for two instructions. They are not usually used individually, but for the spec (and also implementing hardware) this is totally fine.
The arm reference https://developer.arm.com/documentation/ddi0308/d/Thumb-Instructions/Alphabetical-list-of-Thumb-instructions/BL--BLX--immediate-?lang=en explains that in more detail:
The instructions could be executed as two separate 16-bit instructions, with the first instruction instr1 setting LR to PC + SignExtend(instr1<10:0>:'000000000000', 32) and the second instruction completing the operation. This is no longer possible in Thumb-2.

Not one that I can share, unfortunately.
On Thu, Jan 19, 2023, 10:16 GhidorahRex @.***> wrote:

@alercah https://github.com/alercah Do you have a binary we could test
a fix with? I want to make sure we're emulating the two pseudoinstructions
correctly now.
—
Reply to this email directly, view it on GitHub
https://github.com/NationalSecurityAgency/ghidra/issues/4320#issuecomment-1397134319,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AE7AOVINYJ3ZDOKECIOBUXDWTFLFBANCNFSM5YDYVADQ
.
You are receiving this because you were mentioned.Message ID:
@.***>