rustcBeta: Fix build

Motivation for this change
This PR updates rustcBeta.rustc and rustcBeta.cargo to their newest versions. It also fixes the builds which are broken since the update to rustc-1.10.0.
This is a partial fix for #17097 as it updates rustUnstable which now fails its own test suite.
Things done

[x] Tested using sandboxing
(nix.useChroot on NixOS,
or option build-use-chroot in nix.conf
on non-NixOS)
Built on platform(s)

[x] NixOS
[ ] OS X
[ ] Linux

[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
[x] Tested execution of all binary files (usually in ./result/bin/)
[x] Fits CONTRIBUTING.md.

@the-kenny should we wait until you find time for that broken test for rustUnstable or is this already an improvement over existing state?

"rustc-bootstrap" depends on patchelf which is unavailable on Darwin. Can we disable that platform?

@garbas it's definitely an improvement as beta now works. We need to check the darwin issue @matthewbauer mentioned and then I'd say :+1: for merge.

@matthewbauer Can we just skip the patchelf calls on darwin? Could you try commenting them out and see if everything builds for you?

Regarding unstable: I reported the tcp-stress-test.rs failure to upstream - let's see what comes out of it: https://github.com/rust-lang/rust/issues/35107

Testing it on darwin now.

Stable on darwin fails massively in the test suite :( No idea where that comes from:
failures:
    sys::ext::net::test::basic
    sys::ext::net::test::iter
    sys::ext::net::test::test_connect_unix_datagram
    sys::ext::net::test::test_read_timeout
    sys::ext::net::test::test_read_with_timeout
    sys::ext::net::test::test_unix_datagram
    sys::ext::net::test::test_unix_datagram_recv
    sys::ext::net::test::test_unnamed_unix_datagram
    sys::ext::net::test::timeouts
    sys::ext::net::test::try_clone

test result: FAILED. 739 passed; 10 failed; 2 ignored; 0 measured

This might be related to the very horribly broken and misconfigured system I'm using for building here - I don't have access to a clean machine.
Anyway - the bootstrap code now works fine. Fixing the build itself should be a different issue (and this PR is about unstable and beta anyway)

/me gives a try on a clean osx box

^ Above builds fine on my NixOS instance. Please test the triage (rustc, rustBeta.rustc, rustUnstable.rustc) on your machines and especially on Darwin.
@garbas: Any results?

On our build machine:
failures:
    sys::ext::net::test::basic
    sys::ext::net::test::iter
    sys::ext::net::test::test_connect_unix_datagram
    sys::ext::net::test::test_read_timeout
    sys::ext::net::test::test_read_with_timeout
    sys::ext::net::test::test_unix_datagram
    sys::ext::net::test::test_unix_datagram_recv
    sys::ext::net::test::test_unnamed_unix_datagram
    sys::ext::net::test::timeouts
    sys::ext::net::test::try_clone

test result: FAILED. 739 passed; 10 failed; 2 ignored; 0 measured

make: *** [/private/var/folders/d4/0bw6hrcd1s5962bw7k_k7mjc0000gn/T/nix-build-rustc-1.10.0.drv-0/rust-cfcb716/mk/tests.mk:423: tmp/check-stage2-T-x86_64-apple-darwin-H-x86_64-apple-darwin-std.ok] Error 101
builder for ‘/nix/store/sabz2266nj3gkmm63zksbnjwi4qnsn5v-rustc-1.10.0.drv’ failed with exit code 2
error: build of ‘/nix/store/sabz2266nj3gkmm63zksbnjwi4qnsn5v-rustc-1.10.0.drv’ failed

Okay, can doCheck be set to !stdenv.isDarwin? I'm thinking it's just an upstream issue.

Ok, please retry :)

@the-kenny for some reason tmux session is started hanged, i'm rerunning with you latest changes

Fails on rustBeta.rustc:
make[1]: *** No rule to make target 'clang_rt.builtins_x86_64_osx'.  Stop.
make[1]: Leaving directory '/private/var/folders/d4/0bw6hrcd1s5962bw7k_k7mjc0000gn/T/nix-build-rustc-beta-1.11.0-g9333c42.drv-0/rust-9333c42/x86_64-apple-darwin/rt/compiler-rt'
make: *** [/private/var/folders/d4/0bw6hrcd1s5962bw7k_k7mjc0000gn/T/nix-build-rustc-beta-1.11.0-g9333c42.drv-0/rust-9333c42/mk/rt.mk:469: x86_64-apple-darwin/rt/libcompiler-rt.a] Error 2
builder for ‘/nix/store/lrayrdvb6nr43spwpf45i115dia5lcy5-rustc-beta-1.11.0-g9333c42.drv’ failed with exit code 2
error: build of ‘/nix/store/lrayrdvb6nr43spwpf45i115dia5lcy5-rustc-beta-1.11.0-g9333c42.drv’ failed

darwin: nix-build -A rustStable worked for me
darwin: nix-build -A rustBeta failed with error that @globin repoted
building rustUnstable right now.
@the-kenny why does it try to build rust-beta when i trigger nix-build -A rustUnstable? didn't check the expressions, just asking if this is expected.

@garbas Expected - rustUnstable is bootstrapped from rustBeta, and rustBeta is bootstrapped from          rustStable. That's how rust bootstraps itself from now on.
rustStable works on my OS X box now - but cargo with segmentation fault when fetching the registry. Can someone please try it?

@the-kenny i can confirm that
<EMAIL_ADDRESS>tmptmp]$ ./../tmp/bin/cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
Segmentation fault: 11

@the-kenny it would be nice to have some doInstallCheck tests to check if basic stuff works with rust.

@garbas Incoming.
I wonder what's the issue with cargo is though :/ Quite sure that's out of my league to fix.

@garbas On second thought: What is there to check in doInstallCheck? Just testing if rustc and cargo are callable?

Pulled a backtrace for that segmentation fault 11 out of gdb. Maybe someone can make sense out of it:
#0  0x000000010076aac8 in CFRelease () from /nix/store/7akpgkhmbmdc9nj69wv0wr01pp9z92x6-CF-osx-10.9.5/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#1  0x000000010038e31b in stransport_connect ()
#2  0x00000001003979de in http_connect ()
#3  0x0000000100396f46 in http_action ()
#4  0x000000010039a184 in git_smart.connect ()
#5  0x0000000100383833 in git_remote_connect ()
#6  0x0000000100384002 in git_remote_fetch ()
#7  0x0000000100329504 in git2::remote::Remote::fetch::hf22a703e28682659 ()
#8  0x000000010021bda7 in cargo::sources::git::utils::fetch::_$u7b$$u7b$closure$u7d$$u7d$::h4505ef50fa16b942 ()
#9  0x0000000100214bab in cargo::sources::git::utils::fetch::h969cb9309bcaae70 ()
#10 0x0000000100237a2c in cargo::sources::registry::RegistrySource::do_update::hf310bfc89b20f31c ()
#11 0x000000010008ee5b in _$LT$sources..registry..RegistrySource$LT$$u27$cfg$GT$$u20$as$u20$core..source..Source$GT$::update::h2ca6fb87f187829e ()
#12 0x00000001000de130 in cargo::core::registry::PackageRegistry::ensure_loaded::h756a0c74cb30f33c ()
#13 0x00000001000e4d6b in _$LT$core..registry..PackageRegistry$LT$$u27$cfg$GT$$u20$as$u20$core..registry..Registry$GT$::query::h2b3b59a668f8397b ()
#14 0x00000001000cd272 in _$LT$$RF$$u27$a$u20$mut$u20$I$u20$as$u20$std..iter..Iterator$GT$::next::h2ee138e44a29d8c2 ()
#15 0x00000001000c6811 in cargo::core::resolver::Context::build_deps::h5d514997c1c12bc9 ()
#16 0x00000001000bedc4 in cargo::core::resolver::activate::h84824bf29ba071ae ()
#17 0x00000001000b8b02 in cargo::core::resolver::activate_deps_loop::he29eb0ad00974f9d ()
#18 0x00000001000b7004 in cargo::core::resolver::resolve::h8a35d33c5144340a ()
#19 0x00000001000f98fe in cargo::ops::resolve::resolve_with_previous::h4a25e46674f9dd8c ()
#20 0x00000001000f6cca in cargo::ops::resolve::resolve_pkg::h02c4f36849c2231c ()
#21 0x00000001000f50f9 in cargo::ops::cargo_compile::resolve_dependencies::hcb3c885ff9b99a6f ()
#22 0x00000001000f1c94 in cargo::ops::cargo_compile::compile_pkg::hb5fc06c82c8470e8 ()
#23 0x00000001000f0a8e in cargo::ops::cargo_compile::compile::h8a73cb42c0d5b921 ()
#24 0x00000001000176a6 in cargo::call_main_without_stdin::h47b6c412d41ff219 ()
#25 0x00000001000087e1 in cargo::execute::h8bbdddbb8cbc7a98 ()
#26 0x0000000100004ea4 in cargo::call_main_without_stdin::h25a1baa5cba46258 ()
#27 0x0000000100001db1 in cargo::main::h2b219a79f378c1ef ()
#28 0x0000000100422963 in std::sys_common::unwind::try::try_fn::h09ba69fd13531e58 ()
#29 0x000000010041a09c in __rust_try ()
#30 0x00000001004227a5 in std::rt::lang_start::h5b0863080165c75e ()
#31 0x00000001000018c4 in start ()

@garbas I'm not sure if installChecks would help - cargo and rustc work fine, cargo only fails when fetching the registry.

the backtrace stems somewhere from libgit2 and is very strange :/ I'm still trying to track down the original issue.
As a workaround I'm trying to disable Security.framework in libgit2 on Darwin right now. If that works, I'd like to add this to the PR and merge it to prevent bit-rot.

Ok! These latest changes (before the rebase against master) finally contain a workaround for that dreadful segmentation fault on Darwin.
I wasn't able to track down the issue completely yet, and the workaround isn't the nicest, but at least it's working fine.
Can you all please test on NixOS and Darwin? I tested rustStable and rustBeta on NixOS and rustStable on Darwin. rustUnstable is building on my machine right now.

Okay, evaluation doesn't work on Darwin as http-parser is marked on darwin as of ea14f5c86dd1e28e4cf367c311353efb713e1a9e
Any ideas? http-parser is a dependency of libgit2

Created https://github.com/NixOS/nixpkgs/pull/17609 to gather feedback on reverting the change that disables evaluation of rust and node on darwin.

@the-kenny should we just go ahead and merge this PR as it is improvement over current state and we focus on rust+darwin in future PRs. just so this work doesn't get stale.

@garbas :+1: I think in general this PR still improves the status quo

@the-kenny did you test this on a linux platform? https://gist.github.com/LnL7/0777081c6373fd7e2cd27b77f291023f

@LnL7 No :/ I don't have access to a linux platform at the moment. Need to spin up a VM or so.

@LnL7 I suppose we can just disable the test for now. This non-utf8-linker-output test looks like a strange corner case to me ;)

I agree, this might even work depending on what filesystem you use. Just disable it and we can merge this in.

@LnL7 Above patch disables the utf8 test. Can you please try again on your linux machine?

Rebasing against master now.

@the-kenny There's no easier way to disable a test? Seems like a pretty big patch

It just deletes the files. Let me check if there's an easier way (that also works on all three compilers)

We could just rm -r the directory. That may be cleaner.

@LnL7 Force-pushed a nicer way of disabling the test :)


Add specs: Blast Sepolia

Where are you in the process of adding the spec?
I’ve completed drafting the spec, but I’m looking forward to adding more integrated functionalities to enhance its capabilities further.
Why did you choose to add this spec to Lava?
I’m planning to integrate this spec into my create-blast-dapp project, especially if I win in the ongoing competition. I aim for it to support the basic operational features of the Blast chain, ensuring smooth functionality.
What help do you need?
So far, the documentation has been incredibly clear and helpful, so I haven’t encountered any confusion. Everything seems straightforward.
Provide some links to the Blast (Docs or whitepaper) for reference
Blast Website: https://blast.io/
Documentation: About Blast - Blast Developer Documentation

@omerlavanet can you please look at it, brother!

please attach the result of scripts/test_spec_full.sh with the spec file to the PR

have you tested it?

have you tested it?

Could you please test it for me, I'm having some problems in my dev environment!

@omerlavanet please test the following, if your environment is ready for testing, I'm having some issues!


Updates to use travis and new publishing

Nebula » nebula-plugin-plugin-pull-requests #12 SUCCESS
This pull request looks good


Ceiling not set equal zero, it should mean unlimited

In the API we mention that no ceiling means unlimited, which is currently not true and the ceiling must be explicitly set.
We need to change the type to a pointer to distinguish between not set and 0.

/assign


Add Identity Map design pattern

I noticed that recently the UnitOfWork registerDirty method got an additional parameter 'dirtyFields'. That is a very good improvement, but what if you are not so fortunate to know the exact list of changed fields then the Identity map design pattern that I implemented might be helpful.
With the added registerClean method the UnitOfWork can recognise the dirty fields automatically.
When you like this change I can also add an extra option to the Selector functionality to automatically store queried records as clean records in the UnitOfWork. Then we really can make use of the full potential of the Identity map design pattern, because then we have enabled a type of caching. A record queried for the second time would then be fetched from the Identity map, instead of queried in the database.
Please let me know your thoughts about his change

@wimvelzeboer i am curious... what use cases are you seeing being of improved by this type change?

@wimvelzeboer so i just later noticed this was a PR! Nice work. So i looked at this test and learnt a little more on the use cases at a detailed level. It kinda looks cool, but... tell me more about the motivations and general code use cases and challenges that lead you to this approach?

@afawcett When application grow it could happen that two methods query the same record. Once from the original service class method and then later on by a domain class as part of its trigger logic.
To avoid that the same records need to be queried multiple times I wanted to introduce the Identity Map design pattern. That is using the UnitOfWork to store the clean map.
This pull-request is only for the UnitOfWork part. Where we can have two methods querying and changing a record independently from each other, registering them as dirty with the UnitOfWork and do not overwrite each other work. Particular useful on dynamic method that do not really know which fields are dirty.
Scenario 1
Given a single account record:
myAccount = new Account( Name = 'Test', AccountNumber = '123', BillingCountry = 'Holland');
Method A
This method is called from just a random Service class

queries myAccount
register myAccount as Clean in the UnitOfWork
updates the AccountNumber
register myAccount as Dirty in the UnitOfWork
UnitOfWork.commitWork()

Method B
Called from inside a Contact trigger, because the Account trigger created a default contact record that is required by the business for all Accounts.

queries myAccount
register myAccount as Clean in the UnitOfWork
updates the BillingCountry
register myAccount as Dirty in the UnitOfWork
UnitOfWork.commitWork()

In this scenario the myAccount record is queried twice during one execution context. If the selector method would use the clean version list in the UnitOfWork then it doesn't require a second query to the Database. I did not add this logic for the selector class yet, because it is dependent on having the cleanMap in the UnitOfWork.
Scenario 2
Is similar to scenario 1, but both methods are called from the same Service class logic. The service class is calling two other methods passing a instance of the UnitOfWork as a parameter to the methods.
Ideally you would want to pass a List to both methods so that they do not have to do a query. But as applications grow this is hard to avoid.
To not overwrite the changed fields, the UnitOfWork can look to the clean version to find out which field is different and only register those fields as dirty, and not overwriting the first dirty registered version.
Scenario 3
This scenario has the same justification as the reason why the new method was added with a list of dirty fields by Jonny Power in its commit on Sept 14th, 2017.
public void registerDirty(SObject record, List dirtyFields)
That method is very handy if you know exactly which fields are dirty. But when writing scripts that dynamically update records, you do not know which fields are dirty, until you compare them with the original queried record. That is a job that the UnitOfWork can do for you.
Dynamically updating records are usually done when there is a separate configuration (editable by admins) that define which fields should be updated/cloned/etc.
I'll hope this explains a bit further, but am happy to answer any other questions if you have them.

@wimvelzeboer thanks for this write-up and sorry for the delay.
I actually did work with the identity map pattern on force.com in the early years. There are sime hidden challanges and mindset side effects with it when used in a bulkified world. The challenge is that we are encouraged to do bulk reads to the database and thus if criteria are used, the query still needs to be made (so really this only then applies to id queries). Once the result set is returned it is correct the identity map can be used to return the execution context copy of the record not that from the database. However, this starts to get its own side effects (what if we wanted new formula field values from the db). Furthermore, we found that it was getting hard to manage heap when a request scope variable held the references and it also nullified any approaches the calling code could take to scope the references and manage heap (sobject list for loops).
I feel providing a framework that hides the need for optimizing e.g. in Scenario 2 is borderline useful vs dangerous. I say this having written frameworks in the past that attempt to optimize and it's not ended well in terms of developers not really thinking about the implications of the code they write or learning the platform properly. I appreciate this is quite a subjective opinion this one though.
All this said I think it "might" be worth still having a go at this pattern but in a more explicit way that sits on top of the default usage and is very clear when it's being used. Where an IdentityMap is created by the calling code and thus the behavior is clear rather than indirect.
fflib_IdentityMap idMap = new fflib_IdentityMap();
fflib_UnitOfWork uow = new fflib_UnitOfWork();
AccountsSelector acctSelector = new AccountsSelector();
List<Account> accounts = acctSelector.selectById(accountIds, idMap);
Account account = accounts[0];
account.Name = 'Fred';
uow.registerDirty(account, idMap);
List<Account> accounts2 = acctSelector.selectById(accountIds, idMap);
Account account2 = accounts2[0];
account2.Website = 'http://fred.com';
uow.registerDirty(account2, idMap);

Having written the above up, I do also wonder if the complexity of the merge on the second registerDIrty will get confusing, though I guess the code could use the SObject method to only the dirty fields?
Thoughts?

@ImJohnMDaniel  thoughts?

Throwing this out to the community for further discussion. 👍 https://twitter.com/andyinthecloud/status/1066021111010213890

@afawcett -- in your example code above, why would you not include the IdentityMap directly in the UOW?  Why a separate class?
@wimvelzeboer you mentioned that you would add some functionality to the selectors to automatically load clean records to the UOW.  Can you provide a basically example of how that would be implemented?

Hi @ImJohnMDaniel,
In my latest commit I updated the fflib_SObjectUnitOfWork a little bit and added functionality in the fflib_SObjectSelector to automatically return the clean records if they were previously registered.
You can use the identity pattern in the following manner. Let's assume we already have an AccountsSelector class which is extended from the fflib_SObjectSelector class, and a list of accountIds;
AccountsSelector mySelector = new AccountsSelector(); List<Accounts> myRecords = mySelector.selectById(idSet); fflib_ISObjectUnitOfWork uow =      new fflib_SObjectUnitOfWork(new List<Schema.SObjectType>{Account.SObjectType}); mySelector.addUnitOfWork(uow); List<Accounts> myRecordsFromClean = mySelector.selectById(idSet);
The second call to the selectById method will now query return the same results but without a SOQL query to the database. I check the performance with 200 records and it showed 20 milliseconds for the fist execution and 6 for the second.
The performance isn't the only reason for doing this. My primary concern is that there can be two service methods accepting the same set of Ids, each doing the same query separately.
AccountsService.cls public void someServiceMethod(Set<Id> accountIds) {     firstServiceMethod(accountIds);     secondServiceMethod(accountIds); }
We might want to have a closer look on how you can enable the pattern to a selector class, so that it can be enabled directly when doing something like:
List<Accounts> myAccounts = (List<Account>) Application.Selector.selectById(idSet);
What are your thoughts on this one? We could just pass in the UnitOfWork as an extra parameter.

@ImJohnMDaniel I have my previous commit some thought and looked at the comments from @afawcett again, and changes the way of invoking the selectById with the UnitOfWork. Now it represents more the idea of @afawcett.
Now you can also call the selector via:
List<Accounts> myAccounts = (List<Account>) Application.Selector.selectById(idSet, unitOfWork);
For now the identity pattern is limited for just only fetching a list of records via a set of record Ids. I am also thinking of including other IDs fields (master-detail/lookup). I don't think we should extend it to all other custom queries for now, because of the other challenges that @afawcett also mentioned.
Please let me know what you think of this.

@ImJohnMDaniel  my motivation for not embedding into UOW is to keep IDMAP as a separate "caching" concern to the default operation of the UOW and Selectors. Its been my experience having implemented this as an embedded concern of these patterns on Force.com that it adds to much-hidden behavior that results in to many corner cases that are hard to debug. I really like the idea of having it as a kind of opt-in augmenting service/facility to uow and selectors that is visible to the developer and the scope of the IDMAP is clearly owned by the controlling code.
@wimvelzeboer as you can imagine, I like your latest iteration, are you also passing in the IDMAP into the UOW methods? I must admit I am wondering if its a UOW scope association thing, so should be a contructor arg.... That said... I have seen a couple of cases now where UOW is being configured via the constructor so we may want to start a fluent style UnitOfWork factory pattern here.... this would also avoid having to keep adding overloads to the Application.UnitOfWork factory....
Thoughts on Fluent Style UOW Config Syntax
So have the UOW fluent class in fflib_SObjectUnitOfWork as an inner class, e.g. Config with a static final instance called Factory. For classic (non-Application factory uses) folks can move to using...
fflib_SObjectUnitOfwork uow =
    fflib_SObjectUnitOfwork.Factory
       .forObjects(mySobjects)
       .overrideDML(myCustomDML)
       .withIdentityMap(idMap)
       .newInstance();

For those using Application factory pattern we could add Factory a instance final member to the existing Application.UnitOfWorkFactory inner class. Thus the constructor of Application.UnitOfWorkFactory would call forObjects with those given as part of thre factory initialization. Developers could continue to call Application.UnitOfWork.newInstance or use Application.UnitOfWork.Factory as above just without having to worry about using forObjects.
fflib_ISObjectUnitOfwork uow =
   Application.UnitOfWork.Factory
       .overrideDML(myCustomDML)
       .withIdentityMap(idMap)
       .newInstance();

NOTE: Those that want to default this sort of config can extend the Application.UnitOfWorkFactory contructor to add default application scope configres.
I appreciate this is a bit of scope creep to this PR btw so apologies. @ImJohnMDaniel  what do you think about this you know Application pattern quite well.... Meanwhile i am going to cc a few others from the other PR where we are talking about features being added to UOW that require opt-in config.

@ImJohnMDaniel this is an old thread, any more recent thoughts?
@wimvelzeboer Does relatively new advent of SObject. getPopulatedFieldsAsMap help in anyway here?
In general I do like the way the PR is taking to a more visible opt-in behavior here. That said it really only effects the standard select by id base class method and needs a retro fit into custom selectors (which may not be at first apparent). Also i think overloading the UOW class for the cache is perhaps not the best place for it, hence why i suggested fflib_IdentityMap in my prior post.


Error compiling ITK examples due to incorrect #include

Description
Error compiling the 2DGaussianMixtureModelExpectMax from the ITKExamples because of incorrect include statement.
Line 21 of Modules/Numerics/Statistics/include/itkExpectationMaximizationMixtureModelEstimator.hxx seems to have an erroneous path to the header file,
#include "../include/itkExpectationMaximizationMixtureModelEstimator.h"

which should be
#include "itkExpectationMaximizationMixtureModelEstimator.h"

After making the modification to my installed ITK-5.1.0, the compilation succeeded.
Steps to Reproduce
I compiled and installed ITK-5.1.0, then fetched the ITK Examples.  The error should occur when compiling the 2DGaussianMixtureModelExpectMax example.
Expected behavior
Compilation and linking would succeed.
Actual behavior
When compiling ITKExamples, I got
Scanning dependencies of target 2DGaussianMixtureModelExpectMax
[ 97%] Building CXX object src/Numerics/Statistics/2DGaussianMixtureModelExpectMax/CMakeFiles/2DGaussianMixtureModelExpectMax.dir/Code.cxx.o
In file included from /tmp/local/include/ITK-5.1/itkExpectationMaximizationMixtureModelEstimator.h:246,
                 from /tmp/bennetsw/build/ITK/BuildIt/ITKExamples/src/Numerics/Statistics/2DGaussianMixtureModelExpectMax/Code.cxx:21:
/tmp/local/include/ITK-5.1/itkExpectationMaximizationMixtureModelEstimator.hxx:21:10: fatal error: ../include/itkExpectationMaximizationMixtureModelEstimator.h: No such file or directory
 #include "../include/itkExpectationMaximizationMixtureModelEstimator.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.

Reproducibility
For me, it was every time.
Versions
Downloaded from
https://github.com/InsightSoftwareConsortium/ITK/releases/download/v5.1.0/InsightToolkit-5.1.0.tar.gz
573ddc3aade8117c5aea7ded135f2ca6  /sw/src/arcts/ITK/InsightToolkit-5.1.0.tar.gz
Environment
CentOS 7.7.1908
$ cmake --version
cmake version 3.13.2
$ gcc --version
gcc (GCC) 8.2.0

I can submit a PR if you agree that it is a problem.

Please make a PR. This was almost certainly done by IDE's auto-correct or something similar.

I submitted https://github.com/InsightSoftwareConsortium/ITK/pull/1908 for this.

Sorry, I didn't see the initial Descriptions tag convention for Ghostflow.  I edited it to start with BUG: after the fact, but that might need to be rerun.  Mea culpa.


[TOB] TOB-ACCOUNT-2: Error messaging is obscure due to use of unwrap

Error messaging is obscure due to use of unwrap
Severity: Informational
Difficulty: High
Type: Error Reporting
Target: src/account/utils.cairo
Description
After the transaction has been validated, the Starknet OS will call the __execute__ function. This function allows the account contract to make multiple calls to other contracts, reverting if one of the calls is unsuccessful. To do so, the execute_calls function will call execute_single_call in a loop. The latter function then calls a contract with the call_contract_syscall. However, instead of unwrapping the result with unwrap_syscall, which provides the reason for the revert, unwrap is used, which does not provide a meaningful error message.
https://github.com/OpenZeppelin/cairo-contracts/blob/ef4128c61c6104852a1172e0e43e22fce1d33075/src/account/utils.cairo#L29-L32
Recommendations
Short term, use unwrap_syscall instead of unwrap.
Long term, ensure that any state reversions provide adequate error messaging in order to help end users understand the underlying problem.

Resolved with #897


upgrade compileSdkVersion and fix #46, #52, #53

升级到Android X后，compileSdkVersion的最低为28，否则无法构建出apk。

I'm already using compileSdkVersion 28 as from the picture

@MuhammedKasujja You should modify the build.gradle file of agora_rtc_engine , not your own project. Like this pah : %FLUTTER_HOME%/.pub-cache/hosted/pub.flutter-io.cn/agora_rtc_engine-1.0.1/android

this works thanks so much


[26] Add container build versioning

Rebuilding containers at every execution can lead to extremely long and unnecessary build times (especially in regard to R containing containers). To solve this issue a version field should be added to the pipeline definition JSONs (either to the pipeline itself or to the individual steps). On successful building of a container the respective pipeline version is recorded in a container build database. On re-execution of the step the pipeline is checked first and if it contains a matching entry for the respective pipeline / step version number, the existence of the Docker image is verified. If the image is indeed present, no build step is executed.

Checking if the image exists can be achieved as follows: https://docs.docker.com/reference/cli/docker/image/inspect/


Apparently Reels Media Feed has no pagination

Form
Requirements

[x] I've searched the Issues
[x] I've read the basic concepts
[x] I'm using the latest version
[x] I've debugged my code using the DEBUG variable.

Platform

[x] I'm using Node.js version 14.16.1
[ ] I'm using electron

Description
I'm trying to fetch Story Highlights but with pagination for better performance. The thing is that when I try to fetch them, I obtain the full story list and isMoreAvailable is always false. This don't happen when I use User Feed (posts).

I obtain the full story list and isMoreAvailable is always false. This don't happen when I use User Feed (posts).

That's to be expected. The reels media feed isn't supposed to have pagination. Do you think it should have? Does it not return every item?

That's to be expected. The reels media feed isn't supposed to have pagination. Do you think it should have?

Oh, I didn't know it because other feeds have pagination and I supposed that reels media feed had it. In my case have sense since I'm displaying stories like I display posts.

Does it not return every item?

Yes, it does.

@davigon, sorry, not related to your pagination issue at all, but I just posted an issue: https://github.com/dilame/instagram-private-api/issues/1728 (my issue is ig.feed.reelsMedia fetches stories, not reels)
Then I saw your issue. If you have a reels pagination issue I assume you successfully fetch reels. Do you spot the error in my code? Why am I getting stories?


Dual Audio

Exist some way to put dual audio in the streaming movies o streama??

Not currently, no. Should be possible to implement, so a future enhancement.

hi!
would it be acceptable to have to add 1 video per language / Audio? extracting the audio and using mp3s is going to be a hassle to sync up correctly

I really would love to see that!
If the player would be as easy as the Netflix player it would be awsome!
For example i use h.264 with multiple audio-tracks just the same way as itunes or handbrake does it!

These are the steps:

Enable #enable-experimental-web-platform-features in chrome://flags/ and restart Chrome.
Open Streama and start a MP4 video with two audio tracks (it might work with other file formats and more tracks, but I haven't tested). Chrome automatically chooses the first track.
Pause the video.
Run the following Javascript commands in the developer tools console:
a. document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false (Track 0 is by default enabled and all other tracks are disabled, hence this command effectively mutes the audio, because no track is enabled.
b. document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true This activates the second audio track.
c. Un-pause the video. The audio output has indeed switched to the second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang. I could however resolve this by clicking the "rewind 10 seconds" button.
I don't know how to circumvent the hanging, but it is not a Streama issue. The same thing happened when running the above commands on a local file that I directly opened without Streama (i.e. using file:///path/to/video.mp4).
I haven't looked into how to integrate this functionality in Streama, but I wanted to share the info in case someone wants to pick this up. As I understood, the buttons are currently enabled/disabled server-side. Since the server can't know if the client supports the audioTracks property (or can it?), this means that the functionality for selecting audio tracks probably has to be implemented in client-side Javascript.

#i have just tried this on Chrome (Version 83.0.4103.106 (Official Build)
(64-bit)) and received an error:
document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
false
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
VM356:1 Uncaught TypeError: Cannot set property 'enabled' of undefined
at :1:70
On Tue, Jun 16, 2020 at 4:58 PM Frank Oltmanns<EMAIL_ADDRESS>wrote:

Motivated by the information in the above comment
https://github.com/streamaserver/streama/issues/454#issuecomment-454085214
by @f1reflyyyylmao https://github.com/f1reflyyyylmao I checked the
functionality in Chrome (Version 83.0.4103.97 (Official Build) (64-bit))
and in principle it worked.
These are the steps:

Enable #enable-experimental-web-platform-features in
chrome://flags/ and restart Chrome.
Open Streama and start a MP4 video with two audio tracks (it might
work with other file formats and more tracks, but I haven't tested). Chrome
automatically chooses the first track.
Pause the video.
Run the following Javascript commands in the developer tools
console:
a.
document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
(Track 0 is by default enabled and all other tracks are disabled, hence
this command effectively mutes the audio, because no track is enabled.
b.
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
This activates the second audio track.
c. Un-pause the video. The audio output has indeed switched to the
second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang. I
could however resolve this by clicking the "rewind 10 seconds" button.
I don't know how to circumvent the hanging, but it is not a Streama
issue. The same thing happened when running the above commands on a local
file that I directly opened without Streama (i.e. using
file:///path/to/video.mp4).
I haven't looked into how to integrate this functionality in Streama, but
I wanted to share the info in case someone wants to pick this up. As I
understood, the buttons are currently enabled/disabled server-side. Since
the server can't know if the client supports the audioTracks property (or
can it?), this means that the functionality for selecting audio tracks
probably has to be implemented in client-side Javascript.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/streamaserver/streama/issues/454#issuecomment-644854473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOCBR55ZEO3I4TI4TOLMWATRW6JAZANCNFSM4EAEBK3A
.

Sorry, ignore that... Used wrong test clip... Apologies.
On Tue, Jun 16, 2020 at 11:46 PM Shane Tucker<EMAIL_ADDRESS>wrote:

#i have just tried this on Chrome (Version 83.0.4103.106 (Official Build)
(64-bit)) and received an error:
document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
false
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
VM356:1 Uncaught TypeError: Cannot set property 'enabled' of undefined
at :1:70
On Tue, Jun 16, 2020 at 4:58 PM Frank Oltmanns<EMAIL_ADDRESS>wrote:

Motivated by the information in the above comment
https://github.com/streamaserver/streama/issues/454#issuecomment-454085214
by @f1reflyyyylmao https://github.com/f1reflyyyylmao I checked the
functionality in Chrome (Version 83.0.4103.97 (Official Build) (64-bit))
and in principle it worked.
These are the steps:

Enable #enable-experimental-web-platform-features in
chrome://flags/ and restart Chrome.
Open Streama and start a MP4 video with two audio tracks (it might
work with other file formats and more tracks, but I haven't tested). Chrome
automatically chooses the first track.
Pause the video.
Run the following Javascript commands in the developer tools
console:
a.
document.body.getElementsByTagName("video")[0].audioTracks[0].enabled=false
(Track 0 is by default enabled and all other tracks are disabled, hence
this command effectively mutes the audio, because no track is enabled.
b.
document.body.getElementsByTagName("video")[0].audioTracks[1].enabled=true
This activates the second audio track.
c. Un-pause the video. The audio output has indeed switched to the
second track (in my case from language A to language B).

I observed that when un-pausing the video playback would sometimes hang.
I could however resolve this by clicking the "rewind 10 seconds" button.
I don't know how to circumvent the hanging, but it is not a Streama
issue. The same thing happened when running the above commands on a local
file that I directly opened without Streama (i.e. using
file:///path/to/video.mp4).
I haven't looked into how to integrate this functionality in Streama, but
I wanted to share the info in case someone wants to pick this up. As I
understood, the buttons are currently enabled/disabled server-side. Since
the server can't know if the client supports the audioTracks property
(or can it?), this means that the functionality for selecting audio tracks
probably has to be implemented in client-side Javascript.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/streamaserver/streama/issues/454#issuecomment-644854473,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AOCBR55ZEO3I4TI4TOLMWATRW6JAZANCNFSM4EAEBK3A
.


Nuxt page deployed only updating with hard reload or clearing cache

Version
v2.9.0
Reproduction link
https://www.nolink.com/NA
Steps to reproduce
Create a project with the nuxt CLI, create some code, use this nuxt documentation to deploy the project in AWS S3 and Cloudfront for Static Site Hosting:
https://nuxtjs.org/faq/deployment-aws-s3-cloudfront/
Run the ./deploy.sh script for uploading.
What is expected ?
The script finishes successfully as shown in the documentation and the site updates completely between 3 - 10 minutes while the Cloudfront invalidation is processed.
What is actually happening?
The script finishes successfully as shown in the documentation and the site does not updates completely. CSS, HTML or Javascript changes does not update and the user has to hard reload the page or clear its browser cache to get the changes.
Additional comments?
It seems that only when new files/folders are created or modified a lot, the project updates with no problem. But for small changes like hot fixes the page does not update.
I've used another Nuxt documentation for running the commands for the Single Page Application Deployment (SPA):
https://nuxtjs.org/guide/commands/
The value of mode: 'spa' in the nuxt.config.js has been made.
Also the AWS and Cloudfront values where checked and there is no problem with them. Even the TTL values where decreased to 0  but the issue persists.

This is still happening....
We used the "2.15.8" nuxt version and before each build we change the version into package.json file.
Will these config fixing up the error???
build: {
watch: ['~/package.json']
}


implement cbgetnodelp

Hello
I've been trying to use the function getcallbacknodelp described in the CPLEX manual. I managed to generate a solvecallback which the manual says that allows more control over the returned pointer. This code gave a segfault. I don't know how to construct the object the function will return the result.
function cbgetnodelp(d::CplexCallbackData)
    lpmodel = Model(d.cbdata.model.env)
    stat = @cpx_ccall(getcallbacknodelp, Cint, (Ptr{Void},Ptr{Void},Cint,Ptr{Void}),
                      d.cbdata.model.env.ptr, d.cbdata.cbdata, d.where, lpmodel.lp)
    if stat != 0
        error(CplexError(d.cbdata.model.env, stat).msg)
    end
    return lpmodel
end

IN SOLVE CALLBACK
Where = 105
Caught exception
julia: ../nptl/pthread_mutex_lock.c:79: __pthread_mutex_lock: Assertion `mutex->__data.__owner == 0' failed.

signal (6): Aborted
while loading no file, in expression starting on line 0
Segmentation fault (core dumped)

Thanks!

Is this related to https://github.com/JuliaOpt/CPLEX.jl/issues/98

@odow Do you see anything wrong in the implementation that might explain the error?.

Do you have a reproducible example?
By the way,

error(CplexError(d.cbdata.model.env, stat).msg)

Should just be throw(CplexError(d.cbdata.model.env, stat))

Just to make sure, did you try disabling threads when using the callback?
i.e. CPX_PARAM_THREADS=1
https://www.ibm.com/support/knowledgecenter/en/SSSA5P_12.6.3/ilog.odms.cplex.help/CPLEX/Parameters/topics/Threads.html

Hi!. Setting the threads to 1 made the segfault go away. However, now I have another problem, I get an error saying that the problem doesn't exist when I try to write it down, for example.
function mycallback(cb)
    println("IN SOLVE CALLBACK")
    println("Where = $(cb.where)")
    env = cb.cbdata.model.env
    lpmodel = CPLEX.Model(env)
    stat = CPLEX.@cpx_ccall(getcallbacknodelp,Cint,(Ptr{Void},Ptr{Void},Cint,Ptr{Void},),env.ptr,cb.cbdata.cbdata,cb.where,lpmodel.lp)
    println("SUCCESS, stat = $stat")
    CPLEX.@cpx_ccall(writeprob, Cint, (Ptr{Void}, Ptr{Void}, Ptr{Cchar}, Ptr{Cchar},), env.ptr, lpmodel.lp, "firstry.lp", "LP")
end

IN SOLVE CALLBACK
Where = 105
SUCCESS, stat = 0
CPLEX Error  1009: No problem exists.

To quote CPLEX

Generally, this pointer may be used only in CPLEX Callable Library query routines, such as CPXXsolution/CPXsolution or CPXXgetrows/CPXgetrows

I don't think this is a Julia issue. I would try reaching out to the CPLEX folks for support.

I agree. On the other hand, I'm asking for a feature for CPLEX.jl. The thing is that when I do this in C code, it works, so CPLEX people will tell that they don't support Julia. The idea is to have an enhancement to support a very powerful callback function.

If you want the getcalbacknodelp feature added to CPLEX.jl, make a PR :)
If you want to be able to write the LP, ask CPLEX to add that to their C API. If it already is (I'm not sure it that is what you are referring to), I'm not sure what the problem is. Have you tried solving the lpmodel then writing?


Minimum Python Client Example

Prior to version 1.0, for a python flask client, I was using,
from flask_jsonrpc.proxy import ServiceProxy

based on the example here and here
but ServiceProxy no longer imports, and I can't find any documentation on how to jsonrpc from python.

Hi,
The ServiceProxy was removed from the code base, you can copy from here and use it.
Or, you can use the requests for this. Follow the example with consume the method App.index from this:
$ python
>>> import requests
>>> r = requests.post('http://localhost:5000/api', json={'id': '1', 'jsonrpc': '2.0', 'method': 'App.index'})
>>> r.json()
{'id': '1', 'jsonrpc': '2.0', 'result': 'Welcome to Flask JSON-RPC'}

Thank you.


Array api

Some updates to match the array api and remove deprecated constants.
These updates allow mx.array to be used with einops:
import mlx.core as mx
from einops.array_api import rearrange, reduce, repeat, pack, unpack

# rearrange elements according to the pattern
input_tensor = mx.zeros((2,3,4))
output_tensor = rearrange(input_tensor, 't b c -> b c t')
print(output_tensor.shape)

# combine rearrangement and reduction
input_tensor = mx.zeros((2, 3, 2*3, 2*4))
output_tensor = reduce(input_tensor, 'b c (h h2) (w w2) -> b h w c', 'mean', h2=2, w2=2)
print(output_tensor.shape)

# copy along a new axis
input_tensor = mx.zeros((2, 3))
output_tensor = repeat(input_tensor, 'h w -> h w c', c=3)
print(output_tensor.shape)

# pack and unpack allow reversibly 'packing' multiple tensors into one.
# Packed tensors may be of different dimensionality:
h, w = 100, 200
image_rgb = mx.zeros([h, w, 3])
image_depth = mx.zeros([h, w])
# but we can stack them
image_rgbd, ps = pack([image_rgb, image_depth], 'h w *')
print(image_rgbd.shape)
print(ps)

unpacked_rgb, unpacked_depth = unpack(image_rgbd, ps, 'h w *')
print(unpacked_rgb.shape, unpacked_depth.shape)

great to see progress towards gh-48! FYI, there has been interest in adding a fully-compliant wrapper to array-api-compat in https://github.com/data-apis/array-api-compat/issues/162.

FYI, there has been interest in adding a fully-compliant wrapper to array-api-compat in data-apis/array-api-compat#162

Cool, thanks for sharing! If there's anything we can do to help on the MLX side let us know.

The main thing that would help is if you could let us know what your plans are for MLX and the array API. If you're planning to have full compliance in MLX itself, then there's not much that we need to do in array-api-compat, other than documentation and possibly adding helper functions. This is similar to how JAX and sparse work.
On the other hand, if there are some functionalities that you won't be able to support for backwards compatibility, we should add wrappers to array-api-compat. (if there are functions that you can't support because they simply aren't supported by the hardware, then there's no way to wrap that and we just have to document it)

Looking through the array API I think for 95+% of it we already have an implementation or would like to have one.
There are a few exceptions that I noticed:

Attributes and methods related to devices, like device and to_device. Arrays in MLX live in unified memory and don't belong to a specific device and can't be moved to a device
The empty creation function. There are no true "in-place" ops in MLX. We manage memory buffer sharing under the hood. So something like an empty doesn't really make sense.
Operations with output shapes which depend on input data (e.g. boolean indexing and similar ops). Those are hard to do in MLX and we may not be able to support them at least in their typical form.

Let me know what you think about that.

I believe there are also float64 and complex128 dtypes which don't exist in MLX.

Good point I missed that. And we don’t plan to add them as they are not natively supported for Apple GPUs.

The lack of float64 shouldn't be a problem. For example PyTorch with the MPS backend (their way of using the GPU in modern Apple laptops) also doesn't support float64 but PyTorch is still considered compatible.
I think how to deal with the fact that mlx is designed with a "native" unified memory experience (I don't know a better short way to describe it :D) will be interesting to figure out. On the face of it I think mlx could do what Numpy does, have a device attribute that is always the same. In Numpy's case it is always the string "cpu". More interesting might be how to deal with the fact that in mlx operations can be placed on a device. This is an idea that doesn't exist in any(?) other array library and also doesn't exist in the array API standard.
Maybe at the level of array API standard compatibility it isn't such a big deal, but as a "array consumer" in scikit-learn I am currently still scratching my head how we'd write code that works with mlx and (say) PyTorch inputs. Without a bunch of if statements to conditionally add stream=mx.gpu as argument to operations that I'd like to have executed on the GPU.

Without a bunch of if statements to conditionally add stream=mx.gpu as argument to operations that I'd like to have executed on the GPU.

The default device is the GPU so you wouldn't need to place any operations explicitly unless you wanted to change the default.
To avoid needing a bunch of if statements, one possibility is to use a stream context manager e.g.
with mx.stream(mx.cpu):
   # call the function / do the work

For the most part though running everything on the GPU works pretty well. I'm not sure how you feel about using that as the default though..

You might want to use the test suite to see what is missing in more detail

Indeed I wasn't aware of it. Good idea.

Are you saying that things like += don't work at all?

No they work as expected. They just don't give any guarantees about the underlying memory buffer being unchanged.

If you don't have a real "empty" function you could always alias empty = zeros

Seems reasonable!

It also sounds like an is_mlx_array helper in array-api-compat would be useful since MLX has some features that are specific to it (like the per-device computation features) that consuming code might want to take advantage of.

👍

I was trying to use MLX with scikit learn through the array api back-end. It failed because MLX doesn't have float64 dtype.
It would be super cool if we could get MLX to work with Scikit-learn.. but I'm not sure if there is a workaround for the float64 issue. What do you all think about that?
Here's the example I tried for reference:
from sklearn.datasets import make_classification
from sklearn import config_context
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis
import mlx.core as mx

X_np, y_np = make_classification(random_state=0)
X_mx = mx.array(X_np)
y_mx = mx.array(y_np)

with config_context(array_api_dispatch=True):
    lda = LinearDiscriminantAnalysis()
    X_trans = lda.fit_transform(X_mx, y_mx)

print(type(X_trans))

Do you just get an error message like "mx has no attribute float64"?
If so, and I'm not saying this is a good solution, things should run if you wrap MLX such that xp.float64 is actually the float32 dtype, but 'pretends' it is float64? (I may be missing something though)

Yea exactly.  And yes that's a good suggestion for a patch.. though long term it might be worth thinking about how to deal with that in the array API / compatibility layer.

The functionality exists to query which dtypes a library supports: https://data-apis.org/array-api/latest/API_specification/generated/array_api.info.array_namespace_info.html
Indeed, based on https://github.com/data-apis/array-api/issues/640#issuecomment-1713475644, it sounds like the spec will be relaxed at some point to accommodate for missing dtypes. Consumers being able to tell which dtypes it can use and act accordingly can be done via this introspection method, but we're going to want a helper where we can say:

If it exists, use {this dtype}
If not, fallback to {one of these dtypes}
Else, raise an exception

Probably something that should belong in array-api-compat, however I can't immediately see how we would want this to work. Most dtype selections happen through xp.asarray and xp.astype, but it's not clear to me whether we would want to:

wrap these functions themselves
wrap the input dtypes to these functions
or something else

It could get quite complex if there are varying policies for different parts of a library, like if we are perfectly happy to fallback from float64 to float32 in some places, but not others. I suppose this case in itself is not too bad, but it would be pretty complex to generalize for weirder (based on the standards of today...) sets of implemented dtypes.
There is also the case of testing. It doesn't seem ideal to have to add a line to skip based on whether the dtype is supported in every test which is parameterized by standard dtypes, but I suppose that would work.

could you open an issue on the scikit-learn repository with your code snippet and a few words of context (for those who haven't followed this thread)

Yes, done!


Add RPD Token

Rapids (RPD) token is currently ERC20 token, meant to provide fast and secure payments across social media using blockchain technology

We added it already, try it again. imToken support all ERC20 tokens, even if the token is not shown on the list, you will be able to receive and send also.
As for the token logos, we have only added tokens which are more popular among the community. If you would like to change the contract address of a specific token, please show us some official announcement.

Sorry but, when was it added?


BLE Lights having issues sticking to their toggle

Description
When pressing the turn on buttons for the BLE lights, they immediately try to switch back to off and vice versa. Sometimes the light turns off / on other times they don't. I remember we've ran into this issue before but not sure if we ever found the fix.
HA logs stating:
Failed to fetch device status
Check device key or version
Network Error: Unable to Connect
These are connected fine on my network though, fully functional in the app, semi functional in HA. They've always required 3.4 to connect so I don't believe it's an error with the device key or version otherwise they wouldn't work at all.
Steps to reproduce
Pair the BLE lights to a Hub then to home assistant
Try turning them off and on
Expected behaviour
Turn on and stay on and vice versa with off
Additional context
home-assistant_tuya_local_2024-12-05T03-21-09.252Z.log
Confirmation

[X] I am sure this is a bug or improvement, that is well enough described that it can be implemented.

[X] If this is for a specific device, the device config is mentioned above, or diagnostics are included.

[X] Log messages or diagnostics relevant to the issue are included.

[X] This is not requesting addition of a new device.

I'm fairly certain this is just a duplicate of #1323 and other hub connection limitation issues. The lights are not properly connected.


Unable to withdraw MYX to windows wallet

I have installed, backed up and synced windows MYX wallet ready to receice coins, the platform will not send coins. Please enable withdraws.

@CryotpEnterprises what do you mean the platform doesn't send coins? Do you get a withdrawal confirmation email?
What's your username?


Json deconing throws nil dereference

Hi,
I am seeing and error from this lib at this line
github.com/ericlagergren/decimal@v0.0.0-20190912144844-2c3e3e1ef942/scan.go:43 +0x9e
The error occurred when using json decoder on a model generated by sqlboiler.

Could you post a code same that I could use to reproduce this? The panic on line 43 is ostensibly because the recover is nil, which is likely due to the generated code. I’m not familiar with sqlboiler.

I am sorry for not providing the code.
type Option struct { 	ID           int               boil:"id" json:"id" toml:"id" yaml:"id"	OptionlistID null.Int         boil:"optionlist_id" json:"optionlist_id,omitempty" toml:"optionlist_id" yaml:"optionlist_id,omitempty"	Description  null.String      boil:"description" json:"description,omitempty" toml:"description" yaml:"description,omitempty"	Price        types.NullDecimalboil:"price" json:"price,omitempty" toml:"price" yaml:"price,omitempty"`
R *optionR `boil:"-" json:"-" toml:"-" yaml:"-"`
L optionL  `boil:"-" json:"-" toml:"-" yaml:"-"`

}
`
If I invoke scan before decoding I do not get the error.
The problem is that I need this to decode an array

Hm. Sounds similar to https://github.com/volatiletech/sqlboiler/issues/404. Perhaps I should revisit that issue.

I've corrected this as ericlagergren suggested in his PR to sqlboiler. Will be in the dev branch for now and included in a later release.

Hi @aarondl , do we have an update about this issue? If this is already fixed, do we know already when it will be merged?

@jbactad Hi,
Currently I am using dev branch for this problem.

@jbactad As far as I'm concerned this is fixed already in master v3.6.0


Deploying Azure Delta Lake does not work - Function Error

Hi when trying to deploy the Azure Delta Lake, I get a conflict with the function
{     "status": "Failed",     "error": {         "code": "DeploymentFailed",         "message": "At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/DeployOperations for usage details.",         "details": [             {                 "code": "Conflict",                 "message": "{\r\n  \"status\": \"failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource operation completed with terminal provisioning state 'failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"Failed\",\r\n        \"message\": \"Failed to download package.\\r\\nARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (409) Conflict.\\r\\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\\r\\n   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\\r\\n   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)\\r\\n   --- End of inner exception stack trace ---\\r\\n   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\\r\\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\\r\\n   at System.Threading.Tasks.Task.Wait(TimeSpan timeout)\\r\\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__17.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__15.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__27.MoveNext()\\r\\n--- End of stack trace from previous location where exception was thrown ---\\r\\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\\r\\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\\r\\n   at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()\\r\\n---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (409) Conflict.\\r\\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\\r\\n   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\\r\\n   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---\\r\\n'\"\r\n      }\r\n    ]\r\n  }\r\n}"             }         ]     } }

Confirming the same issue : {"code":"Failed","message":"Failed to download package.\r\nARM-MSDeploy Deploy Failed: 'System.AggregateException: One or more errors occurred. ---> System.Net.WebException: The remote server returned an error: (409) Conflict.\r\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)\r\n   --- End of inner exception stack trace ---\r\n   at System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions)\r\n   at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\r\n   at System.Threading.Tasks.Task.Wait(TimeSpan timeout)\r\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__17.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Deployment.WebApi.AppGalleryPackage.<Download>d__15.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadPackageAndSettings>d__27.MoveNext()\r\n--- End of stack trace from previous location where exception was thrown ---\r\n   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n   at Microsoft.Web.Deployment.WebApi.DeploymentController.<DownloadAndDeployPackage>d__25.MoveNext()\r\n---> (Inner Exception #0) System.Net.WebException: The remote server returned an error: (409) Conflict.\r\n   at System.Net.HttpWebRequest.EndGetResponse(IAsyncResult asyncResult)\r\n   at System.Net.WebClient.GetWebResponse(WebRequest request, IAsyncResult result)\r\n   at System.Net.WebClient.DownloadBitsResponseCallback(IAsyncResult result)<---\r\n'"}
Which then bubbles up the error :
 {"code":"DeploymentFailed","target":"/subscriptions/3f2e4d32-8e8d-46d6-82bc-5bb8d962328b/resourceGroups/brn-fhir-sample-testing/providers/Microsoft.Resources/deployments/Microsoft.Template-20230529195322","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"ResourceDeploymentFailure","target":"/subscriptions/3f2e4d32-8e8d-46d6-82bc-5bb8d962328b/resourceGroups/brn-fhir-sample-testing/providers/Microsoft.Web/sites/fhirdlinbaaw56g23h2-fa/extensions/MSDeploy","message":"The resource write operation failed to complete successfully, because it reached terminal provisioning state 'failed'."}]}

I received the same error.  However, I noticed that [load-synthea-fhirdl5bwfqwiel6a2a0ahds] had a status of Created but didn't have a checkmark.

I modified the code on line 165 from MSDeploy to ZipDeploy extension and the function was created.
Can someone make the necessary changes to it?
{
"type": "Microsoft.Web/sites/extensions",
"apiVersion": "2022-03-01",
"name": "[format('{0}/{1}', variables('functionAppName'), 'ZipDeploy')]",
"dependsOn": [
"[resourceId('Microsoft.Web/sites', variables('functionAppName'))]",
"[resourceId('Microsoft.Web/sites/config', variables('functionAppName'), 'appsettings')]"
],
"properties": {
"packageUri": "[parameters('packageUrl')]"
},
"metadata": {
"description": "Deploy the FHIR to Analytics function app code to the function app"
}
},

[

]

Thank you for your interest in our repository. As of April 10, 2024, this repository is no longer being developed or maintained. We recommend that you use the new Azure Health Data and AI Samples Repo.


[Feature] An explicitly specified prerelease package should install without requiring install-prerelease

Is there an existing feature request for this?

[X] I have searched the existing issues

Describe the Feature
I opened #4224 because I tried to install a prerelease version of dbt utils without the install-prerelease: True setting:
packages:
  - package: dbt-labs/dbt_utils
    version: 0.7.4-b1

Requesting a prerelease package by name should be enough to trigger its installation.
Describe alternatives you've considered
No response
Who will this benefit?
Test drivers of beta packages
Are you interested in contributing this feature?
Only if no one else beats me to it
Anything else?
A potential extra for experts detailed here is to also add a --pre subcommand to dbt deps which behaves like pip install x --pre and installs prerelease versions of all first-order packages (i.e. not if you're getting dbt-utils by dependency instead of a direct reference).

Yes, we should absolutely do this!
I was afraid the logic here would be pretty gnarly, but after a quick dive in, it's much simpler than I thought:
        # if any prelease version is explicitly specified in any way,
        # assume we're good to use prereleases for this package
        prerelease_version_specified = any(
            bool(version.prerelease) for version in self.versions
        )
        installable = semver.filter_installable(
            available,
            self.install_prerelease or prerelease_version_specified
        )

This would have the effect of supporting both of the following:
packages:
  - package: dbt-labs/dbt_utils
    version: 0.7.4-b1

packages:
  - package: dbt-labs/dbt_utils
    version: [">=0.7.4-b1", "<0.7.5"]

$ dbt deps
20:07:06 | [ info  ] | Running with dbt=1.0.0-rc1
20:07:06 | [ info  ] | Installing<EMAIL_ADDRESS>20:07:06 | [ info  ] |   Installed from version 0.7.4
20:07:06 | [ info  ] |   Up to date!

I'd welcome a PR for this!

A larger question: to what extent should we try to follow PEP 404 to the letter? (I stumbled across some interesting related conversation here: https://github.com/pypa/pip/issues/5503).
Namely:

If a user explicitly specifies a prerelease version for a package, are they opting into that prerelease version? YES
If a user includes any prerelease marker in their version specification for a package, are they opting into prereleases for that package? I say YES
If a prerelease version is the only valid and available version, should dbt install it? This feels a bit more controversial; I think yes, but it's worth discussing more. It would require a modification to the logic in filter_installable, to prepare both installable and installable_with_prereleases, and hand back the latter if the former is unavailable.

If a prerelease version is the only valid and available version, should dbt install it? This feels a bit more controversial; I think yes, but it's worth discussing more. It would require a modification to the logic in filter_installable, to prepare both installable and installable_with_prereleases, and hand back the latter if the former is unavailable.

I don't have strong feelings on this. Two options:

silently succeed - install it because they asked for joels-cool-package and the prerelease version is the only option
audibly fail - "joels-cool-package only has prerelease versions available. To install, set install_prerelease to true"


Merge tag 'swift-DEVELOPMENT-SNAPSHOT-2019-08-05-a' into tensorflow

@swift-ci please clean test tensorflow

@pschuh I had to disable ClangImporter/cxx_interop.swift and ClangImporter/cxx_interop_ir.swift to make tests pass. Please let me know if this needs to be fixed right away, or we can turn this into a ticket.

@swift-ci please clean test tensorflow

@swift-ci please clean test tensorflow


SAP Web IDE Full-Stack: tutorial needs product name update

@jonathanbaker7
The tutorial: Open SAP Web IDE in SAP Cloud Platform needs to be updated with the new product name of Web IDE, including screen shots.
SAP Web IDE Full-Stack

I will make the update today. I'll notify here when the changes are implemented.

You can just close the issue :-)


txn: try to fix the deadlock caused by scan lock(#16342)

What is changed and how it works?

Issue Number: Ref #16340

What's Changed:
Cherry-pick https://github.com/tikv/tikv/pull/16342 to the release-7.6 branch.
Try to fix the possible deadlock caused by scan lock.

Related changes
Check List
Tests

See the original PR.

Side effects
Release note

None

/merge


[Distributed] rename _Distributed to module

WIP still need to remove the flag, working on it

@swift-ci please smoke test

@swift-ci please smoke test

Flag removal in https://github.com/apple/swift/pull/41780
The module rename has to wait for a while.

@swift-ci please smoke test

@swift-ci please smoke test

Rebased and ready to go when CI stops being broken by unrelated tests.

Unblocked by https://github.com/apple/swift-syntax/pull/371/files

@swift-ci please clean test and merge

@swift-ci please smoke test and merge

Sigh... a new file appeared on main so this PR made that break, rebased again.

@swift-ci please smoke test and merge

This broke the Windows build because you didn't update all the references: https://ci-external.swift.org/job/oss-swift-windows-toolchain-x86_64-vs2019/1154/


change default of slow_callback_duration in asyncio debugging

Proposed changes:

make slow_callback_duration a parameter of enable_async_loop_debugging and set its default value to something more reasonable than 1ms
For now the default value has been changed to 100ms, this was just a though, so it's very open to revision. Ideally the value would be set appropriately wherever the function is called.

Status (please check what you already did):

[ ] made PR ready for code review
[ ] added some tests for the functionality
[ ] updated the documentation
[ ] updated the changelog
[ ] reformat files using black (please check Readme for instructions)

closing this to delete branch and reopen a PR based on 1.3.x


Bibliography issues

I think books should have title case titles, but I'm not sure if this needs to be handled at the .bib ({A} {T}itle etc) or .cls level (I never remember how this works sorry). Depending on how we put together the "final" version we need to address this.

I just checked the PeerJ formatting requirements (https://peerj.com/about/author-instructions/) and it looks like they want sentence case rather than title case, even for books. However, they don't require exact matching of their formatting guidelines prior to submission.
I'm just going through the bibliography now just to make sure all the citations are up to date though.

Isn't this like, 80% of the appeal of PeerJ?

We want authors spending their time doing science, not formatting.
We include reference formatting as a guide to make it easier for editors, reviewers, and preprint readers, but will not strictly enforce the specific formatting rules as long as the full citation is clear.
Styles will be normalized by us if your manuscript is accepted.


Linux install fails because of `set'

In installer.sh, the bash built-in "set" will cause the script to exit any time a command in a sub-process exits with error. This is caused by setting the 'e' flag in set:
set -ex
This is fixed by removing the 'e' flag. Then the script worked.

Fixed in 31371e9075674568b76465169ba4de357daf1637. Thanks Don!


field "name" not allowed in closed struct in the deploy-cloud-resurce step

Describe the bug
Error status:
steps:
    - firstExecuteTime: "2022-05-16T09:29:18Z"
      id: 7nid8gspnw
      lastExecuteTime: "2022-05-16T09:30:11Z"
      message: 'step app: step deploy: step mysql-rds: step update: run step(provider=kube,do=apply):
        cue: marshal error: app.deploy."mysql-rds".update.value.metadata: field "name"
        not allowed in closed struct'
      name: default-cloud-resource
      phase: failed
      reason: Execute
      type: deploy-cloud-resource

workflow:
workflow:
    steps:
    - name: default-cloud-resource
      properties:
        env: default
        policy: env-bindings-default
      type: deploy-cloud-resource
    - name: default
      properties:
        policies:
        - default
      type: deploy

This application has two components(alibab-rds, webservice).
To Reproduce

create and deploy an application with both cloud service component and webservice component.
use the deploy-cloud-resource workflow step.

KubeVela Version
master

Can not reproduce.


Refactor MutatorAgent to ModifierAgent

Also added Mutators and Crossover functions - these are convenience classes that make it easier to make standard mutator and crossover functions. They don't need a different agent because they can be converted to functions with the same signature as a standard Modifier.
Includes some misc cleanup of TODOs
Closes #90

I didn't add all the changes I had made, so the tests were failing due to compiler errors. The force-push fixes that.


Build failed

When I build this project, an exception occurred:
(venv) wangqh@ubuntu:~/IdeaProjects/datahub$ ./gradlew build
To honour the JVM settings for this build a new JVM will be forked. Please consider using the daemon: https://docs.gradle.org/5.6.4/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing
Configuration on demand is an incubating feature.

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':metadata-service:restli-client:compileJava'.
> Could not resolve all task dependencies for configuration ':metadata-service:restli-client:compileClasspath'.
   > Could not resolve project :metadata-service:restli-impl.
     Required by:
         project :metadata-service:restli-client
      > Unable to find a matching variant of project :metadata-service:restli-impl:
          - Variant 'apiElements' capability datahub.metadata-service:restli-impl:unspecified:
              - Incompatible attribute:
                  - Required org.gradle.jvm.version '8' and found incompatible value '11'.
              - Other attributes:
                  - Found org.gradle.category 'library' but wasn't required.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'classes' and found compatible value 'jar'.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-api'.
          - Variant 'runtimeElements' capability datahub.metadata-service:restli-impl:unspecified:
              - Incompatible attribute:
                  - Required org.gradle.jvm.version '8' and found incompatible value '11'.
              - Other attributes:
                  - Found org.gradle.category 'library' but wasn't required.
                  - Required org.gradle.dependency.bundling 'external' and found compatible value 'external'.
                  - Required org.gradle.libraryelements 'classes' and found compatible value 'jar'.
                  - Required org.gradle.usage 'java-api' and found compatible value 'java-runtime'.

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

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

Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
Use '--warning-mode all' to show the individual deprecation warnings.
See https://docs.gradle.org/5.6.4/userguide/command_line_interface.html#sec:command_line_warnings

BUILD FAILED in 5s

Required org.gradle.jvm.version '8' and found incompatible value '11'.


This is a new file to allow practice edits

This is the space to explain in more detail why you are proposing the change

This is a test comment


quest tracker outline

This is just a suggestions :P but i really want outline to quest tracker  all of the text

Something I do wanna do. We will see.

Have not forgot this!

Done and complete with latest release on Curse and Wago


fix: broken links in readme

how-to's were moved to tutorials folder. I've updated these in the readme, and changed how-to folder to be WIP because nothing further exists there.

🚀 Thank you for your contribution! 🚀


Updated the '.equals()' summary

added new summary  for easier and better understanding of comparing two string values.

[x] I have read freeCodeCamp's contribution guidelines.
[x] My pull request has a descriptive title (not a vague title like Update index.md)
[x] My pull request targets the master branch of freeCodeCamp.
[x] None of my changes are plagiarized from another source without proper attribution.
[x] My article does not contain shortened URLs or affiliate links.

If your pull request closes a GitHub issue, replace the XXXXX below with the issue number.
Closes #XXXXX

Thank you for opening this pull request.
This is a standard message notifying you that we’ve reviewed your pull request and have decided not to merge it. We would welcome future pull requests from you.
Thank you and happy coding. ✈


Implementation GET domestic standing order payment status details (NOT IMPLEMENTED YET)

Description
Currently the no-mandatory API GET /domestic-standing-orders/{DomesticStandingOrderId}/payment-details isn't implemented yet.
Ref: https://openbankinguk.github.io/read-write-api-site3/v3.1.8/resources-and-data-models/pisp/domestic-standing-orders.html
Task

[ ] Implement Get domestic standing orders payment details Here - RS
[ ] Add functional tests coverage
[ ] Add postman request tests coverage

Acceptance criteria

Get domestic standing orders payment details has been implemented
All functional tests coverage pass
All postman tests coverage pass

Hey team! Please add your planning poker estimate with ZenHub @andra-racovita @mariantiris


Icon suggestion > astro-icon

I have been using this icon pack for some time now. It contains Font Awesome, Material, and many others
https://github.com/natemoo-re/astro-icon
https://icones.js.org/
👍

This looks cool. Sure makes it easy instead of having to hand optimise fontawesome for each new icon. How does the sizing work? I think it might not work the same as icon fonts? Eg. inheriting tailwind text-xl font-size from parent element and auto-scaling the icon size.

For sizing I just use tailwind - super simple.
Matt from LearnVue explains it better than I could. https://www.youtube.com/watch?v=a6XI8XAuORM
I've never really done much more to the <Icon ... syntax /> than just to resize them. Sometimes I download the full SVG from https://icones.js.org/ and edit further in Inkscape (thinker stroke, colors, etc.)


VirtualService setup

Hi there,
I'm trying to do canary with flagger for a publicly exposed service through an istio gateway but I do not find a setup that is working.
Here is the virtualService without canary :
apiVersion: networking.istio.io/v1alpha3
kind: VirtualService
metadata:
  name: redirector
spec:
  gateways:
  - istio-system/istio-ingressgateway
  hosts:
  - '*'
  http:
  - headers:
      request:
        set:
          x-forwarded-port: "443"
          x-forwarded-proto: https
    route:
    - destination:
        host: redirector
        port:
          number: 8080

When I add flagger, the virtual service is replaced with a flagger version with mesh as gateway and primary/canary as destination and so the service is not accessible anymore from outside.
I also tried with another virtualService but it seems istio cannot chain calls from VS to VS.
Do you know a setup that can work or does it needs some changes to flagger to support additional VS setup ?

Delete your VS and set the gateway and host in the canary: https://docs.flagger.app/faq#istio-ingress-gateway

Thx, I don't know how I missed that.
It's still not fully working due to appendHeaders not taken into account if already set on request and I cannot set http.headers.request.set with flagger but it should be probably more fixed by istio than implemented in flagger.


mb_convert_encoding returns unwanted characters

The HTML cleaner converts the input to a specified encoding before any other operations:
https://github.com/paquettg/php-html-parser/blob/4e01a438ad5961cc2d7427eb9798d213c8a12629/src/PHPHtmlParser/Dom/Cleaner.php#L128
The problem I see here is that according to the documentation it uses the internal default encoding if the third parameter is omitted:

If from_encoding is not specified, the internal encoding will be used.

I actually ran into this issue because the encoding on my server is set to ISO 8859-1 (Latin-1) while I tried to load a document encoded in UTF-8:
Input (encoded in UTF-8):

große Wohnung in der Nähe der Innenstadt

After running mb_convert_encoding():

groÃe Wohnung in der NÃ¤he der Innenstadt

What happened is that mb_convert_encoding() thought that the input is not encoded in UTF-8 (as it actually is) but instead in ISO 8859-1 (Latin-1) as this is the value supplied by the server which caused some ugly "mojibake" after running that function.
I'm not sure if it should be the responsibility of this library to ensure that the right encoding of the input is used (maybe by using an additional option) or whether it's the developers obligation to specify it...

have you tried
$dom->setOptions(
(new PHPHtmlParser\Options())
->setEnforceEncoding('UTF-8')
);
?

Yes, I'm aware of this option, but the problem is actually a different one:
The default internal encoding of my server is set to ISO 8859-1 (Latin-1), I now want to load a new document which is encoded in UTF-8. As this library does not pass the third parameter of mb_convert_encoding(), the encoding of the input is automatically set to the default value of the server (ISO 8859-1 (Latin-1) in this case), while it actually should be UTF-8.
But, as I said above,

I'm not sure if it should be the responsibility of this library to ensure that the right encoding of the input is used (maybe by using an additional option) or whether it's the developers obligation to specify it...


How to I emit Blur and Focus events?

Hi,
Is there any way to emit the Medium Editor's blur and focus events from Vue Medium Editor instances?

Hey!
In the latest version, VueMediumEditor emits the api of MediumEditor within the event object.
I think you can look into #37, which this ticket duplicates and #51 which this tickets relates to.

Thank you @FranzSkuffka

@FranzSkuffka I had a look at #37 and that ticket (if I understand it correctly) is a request to trigger the blur event on Medium Editor. What I'm looking to do emit blur events from Vue Medium Editor when Medium Editor emits a blur event.
In Vue Medium Editor, this block of code: https://github.com/FranzSkuffka/vue-medium-editor/blob/d362718e40ece7466fca65dc39218f6bd6bcf2d7/dist/vueMediumEditor.js#L7974-L7979
…emits "edit" events in Vue as expected.
I tried adding:
this.emit = event => this.$emit('blur', {event, api: this.api})
this.api.subscribe('blur', this.emitBlur)

…but no blur events fire.
I'm able to subscribe to most or all of the other Medium Editor events successfully. Only blur and focus do not work.
When I use editor.subscribe('focus', emitFocus) with a vanilla version of Medium Editor, it works perfectly.
Do you have any idea what the issue might be?

@jonathanheron I can successfully listen to the events from within the integration - I did not check if the re-emission works. Can you take a look at my demo and tell me where exactly in the chain the events are swallowed / stuck?
https://github.com/FranzSkuffka/vue-medium-editor/tree/52-blur-focus-event-emission

I'm sorry. There's no issue at all with Vue Medium Editor. I tried your demo and it worked perfectly.
Then I tried again with what I was testing previously and noticed this

I was rendering the body tag weirdly in my own test. And because the body tag was the same size as the editor, there was no way to properly register the blur.
Sorry for wasting your time 😐

A quick follow up. There is a problem with emit events that I don't know how to resolve…
If there are two editors active, events are emitted in duplicated:

@okneloper we are binding a single component to a single instance, right? Maybe MediumEditor is emitting in all of it's instances and each of our components then re-emits...
@jonathanheron Do you do the binding inside the vue2-medium-editor source code or inside the app that is the editor?

Hi All,
Looking at the code at current master, each instance of the component should have it's own MediumEditor. Earlier versions have one root instance that all editors are added to.
The former should produce instance-specific events, the latter would have common events. @jonathanheron what version are you using?
I am also pretty sure I saw an option along the lines of reuseEditorInstance that controlled this behaviour, but I can find it now anymore ¯_(ツ)_/¯

We removed the reuseEditorInstance feature to simplify the structure and clean handling of options changing during runtime.

@jonathanheron - are you blocked or did you do any further analysis?

Adding :reuse-medium-editor-instance="false" solved my double event problems. Thanks.

@jonathanheron Great! - I assume you are using 1.0.x?

@FranzSkuffka yes. Thanks for all your help?


add babel plugin fancy-console

Sometimes the logging enhancements done in src/logger.js breaks some error logging.  This happen in react error logging where the console.error() string substitution characters are used in react code.  To step around this problem, src/logger.js is paired back to just enable turning console logging on and off and babel is used to add fancy output to the various logging functions.  The babel plugin will enhance every console.(log|info|warn|error) encountered in the code it processes.  Dependency code won't be touched, or will be properly enhanced and retain original logging functionality.
The fancy logging is only applied in development (using the default enhanced console css features for a browser runtime) and test (using chalk strings for a nodejs runtime) builds.

Same thing in ovirt-engine-ui-extensions in patch https://gerrit.ovirt.org/c/ovirt-engine-ui-extensions/+/115975.

NOTE: Babel output is cached, so for existing/developer environments, the cache may need to be cleared before the change from dynamic/logger.js logging enhancements to static/babel logging enhancements take effect:
  rm -rf node_modules/.cache

ci test

I think CI may be failing because nodejs is version 10 (via ovirt-engine-nodejs-modules) and my local env on centos 8 is nodejs 12 and on fedora 33 is nodejs 14.  I'll see about bumping the nodejs version there so this works.
Running yarn test on f33 or centos8 works just fine.
Running with mock_runner fails just like CI.


Create expressionMapping only once in RelationBoundary

The expressionMapping was created once in the builder and once in the
constructor.
And due to tryCollapse it could've been created a third time (again in
the constructor).
This moves all mapping logic into the Builder so that the work is only
done once.

Codecov Report

Merging #6421 into master will increase coverage by 0.02%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #6421      +/-   ##
============================================
+ Coverage     82.73%   82.75%   +0.02%
- Complexity    12888    12893       +5
============================================
  Files          1481     1481
  Lines         48062    48060       -2
  Branches       5837     5836       -1
============================================
+ Hits          39762    39774      +12
+ Misses         5550     5540      -10
+ Partials       2750     2746       -4

Impacted Files
Coverage Δ
Complexity Δ

...a/io/crate/planner/operators/RelationBoundary.java
97.67% <100%> (-0.11%)
15 <3> (-1)

...exceptions/GroupByOnArrayUnsupportedException.java
66.66% <0%> (-33.34%)
1% <0%> (-1%)

...o/crate/analyze/SafeExpressionToStringVisitor.java
83.33% <0%> (-16.67%)
7% <0%> (-1%)

.../java/io/crate/exceptions/ValidationException.java
57.14% <0%> (-14.29%)
2% <0%> (-1%)

.../distributed/TransportDistributedResultAction.java
70.76% <0%> (-7.7%)
8% <0%> (-1%)

...rc/main/java/io/crate/analyze/UnboundAnalyzer.java
77.27% <0%> (-4.55%)
2% <0%> (ø)

.../operation/udf/DropUserDefinedFunctionRequest.java
91.42% <0%> (-2.86%)
10% <0%> (-1%)

...in/java/io/crate/operation/fetch/FetchContext.java
85.22% <0%> (-2.28%)
27% <0%> (-1%)

...or/transport/distributed/DistributingConsumer.java
73.78% <0%> (-1.95%)
21% <0%> (ø)

.../operation/collect/sources/ShardCollectSource.java
83.91% <0%> (-1.51%)
30% <0%> (-1%)

... and 16 more

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 c4a43c8...e0790dc. Read the comment docs.


pipe binary data (default encoding)

I have a library that pipes binary data (actually xlsx format). I can use it with express by piping the data to a file, then from there to express:
const ws = fs.createWriteStream('test-foo.xlsx')
report.pipe(ws)
...
const content = fs.readFileSync('test-foo.xlsx').toString('binary')
res.attachment('foo.xlsx').type('xlsx').send(content)

However, when I try to pipe directly, I get corrupted data:
res.attachment('foo.xlsx').type('xlsx')
report.pipe(res)

I suspect this is an encoding-related issue. The response object doesn't support setDefaultEncoding (though IMHO it should as it derives from http.ServerResponse which should implement the Writable interface -- however this is probably a node problem). Is there some other way to fix/debug this?

Just provide a Buffer object to send, not a string:
const content = fs.readFileSync('test-foo.xlsx')
res.attachment('foo.xlsx').type('xlsx').send(content)

As for why piping in the report object is not working for you, I'm not sure since I have no idea what the report variable refers to. If you can provide a complete JavaScript file that can just straight up run with a copy and paste I can see what is going on. Yes, the "res" object is straight up from Node.js, including the way pipe works, so it should have the same issue even if you removed Express.

@dougwilson Thanks for the fast response, and for the tip on buffer ... (though the code w/ string is the working version....) Underlying, the report is passing the response to archiver zip.pipe() -- I can see if I can untangle for you. But to cut to the chase, how can I set the default encoding, which I believe is the problem?

The res object is from Node.js core and as far as I know it exposes the standard API to set the encoding for .write method. Of course if you call the .write method with a Buffer object the encoding doesn't actually matter at all.
I haven't seen a .pipe call not work, so it's really weird that it isn't just working without issue. I .pipe binary things directly to res all the time and there is no need to set any encoding anywhere, so that's why I was wondering what the full code is, as i have no idea why it wouldn't just be working fine.

Ok .. here you go (excuse the typesript...): I have written 3 routines to send the data -- pipeDirect pipes content directly to response; pipeVia pipes to a file, then reads into a buffer and sends. pipeViaString pipes to file, then reads string into buffer, converts to string via "binary" and sends. It turns out that pipeDirect and pipeVia both have the same problem, while pipeViaString works:
function pipeViaString (
    res: express.Response, readable: NodeJS.ReadableStream) {
  const fs = require('fs')
  const ws = fs.createWriteStream('test-foo.xlsx')
  readable.pipe(ws)
  ws.on('finish', () => {
    const content = fs.readFileSync('test-foo.xlsx').toString('binary')
    res.send(content)
  })
}
function pipeVia (
    res: express.Response, readable: NodeJS.ReadableStream) {
  const fs = require('fs')
  const ws = fs.createWriteStream('test-foo.xlsx')
  readable.pipe(ws)
  ws.on('finish', () => {
    const content = fs.readFileSync('test-foo.xlsx')
    res.send(content)
  })
}
function pipeDirect (
    res: express.Response, readable: NodeJS.ReadableStream) {
  readable.pipe(res)
}

The snippet to send:

    const archiver = require('archiver')
    const zipOptions = {forceUTC: true}
    const zip = archiver('zip', {zipOptions})
    pipeVia(res, zip)
    zip.append('a;sdf;kajgoiwu', {name: 'foo.txt'})
    zip.finalize()

The after saving to file using pipeVia:
-rw-r--r--  1 shauncutts  staff   144 Jul  9 16:30 test-foo.xlsx
-rw-r--r--  1 shauncutts  staff   142 Jul  9 16:30 test.xlsx

The test-foo.xlsx is "right". Its not merely a truncation problem:
cmp -l test-foo.xlsx test.xlsx
 11 325 143
 12 243 375
 13 351 112
 14 112   0
 26   0   7
 27   7   0
...

Update the problem is correctable on the other end: my test code uses superagent:
  const res = await request.post(`localhost:${PORT}/`)
    .send({data})
    .buffer(true)
    .accept('xlsx')
    .parse((res, callback) => {
      const buffer: Buffer[] = []
      res.on('data', chunk => {
        buffer.push(chunk)
      })
      res.on('end', () => {
        file = Buffer.concat(buffer).toString('binary')
        callback(null, null)
      })
    })

With this code, pipeDirect and pipeVia work and pipeViaString doesn't. If I change:
file = Buffer.concat(buffer).toString('binary')

to
file = Buffer.concat(buffer).toString('binary')

which is how I originally had it, it reverts to its original behavior as reported above. So... thanks for your help; there are some subtle issues here, but, as you say, the most straight forward useage "just works"!
:)

Thanks, I will check it out when I get to a computer. You definitely slimmed it down, have you tried without using Express at all and just using a direct Node.js HTTP server? That would narrow down if this is a Node.js issue or an Express issue and if I don't hear anything before I get to a computer, will be the first step I'm going to try.
Something like the following (sorry, it is basically impossible to format on the phone):
require('http').createServer(function(req,res){
const archiver = require('archiver')
const zipOptions = {forceUTC: true}
const zip = archiver('zip', {zipOptions})
pipeVia(res, zip)
zip.append('a;sdf;kajgoiwu', {name: 'foo.txt'})
zip.finalize()
}).listen(4000)

So AFAIK my last find solves this (modulo some documentation useful for anyone who wanders off the path in the same way I did). In think what was happening is with pipeVia and pipeDirect:
binary => (sent as) binary => (read as) UTF8 => (written incorrectly)

vs pipeAsString:
binary => (sent as) binary encoded into UTF8 => (read as) UTF8 => (written somehow as) binary

Now with my fix to reading, the first two pass through as binary the whole time (as desired), whereas pipeViaString sends "binary encoded into UTF8"

Oh, it looks like we both posted around the same time. Looks like you were able to figure it out, a superagent configuration issue, is that right? As for documentation, we're always happy to improve documentation, especially is a good start to begin contributions, and folks who were unfamiliar, went through some trial to figure out something, have a really good idea of what documentation would have helped them (and thus others) in that same situation.
Our docs are on our website, and it's pretty much just Markdown files in https://github.com/expressjs/expressjs.com so feel free to make suggestions and we'd love to help out getting it in :)


[Ruby] Minimum version bump

🤔 What's changed?
Bump minimum versions of gems/ruby
Remove lots of crud that supported old rubies
⚡ What's your motivation?
Tidy up codebase
🏷 What kind of change is this?

:bank: Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)

♻ Anything particular you want feedback on?

📋 Checklist:

[x] I agree to respect and uphold the Cucumber Community Code of Conduct
[ ] I've changed the behaviour of the code

[ ] I have added/updated tests to cover my changes.

[ ] My change requires a change to the documentation.

[ ] I have updated the documentation accordingly.

[ ] Users should know about my change

[ ] I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (d41178f) 91.17% compared to head (e4040ce) 91.17%.
Report is 7 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #228   +/-   ##
=======================================
  Coverage   91.17%   91.17%
=======================================
  Files           2        2
  Lines          34       34
=======================================
  Hits           31       31
  Misses          3        3

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


Problem using unoconvert inside docker container

Hi
I have a issue running unoconvert inside the docker container.
Running container

Listing files inside the mounted volume

Command and error
worker@33a3416026b7:~$ unoconvert /data/teste.odt /data/teste.pdf
INFO:unoserver:Starting unoconverter.
INFO:unoserver:Opening /data/teste.odt
INFO:unoserver:Exporting to /data/teste.pdf
INFO:unoserver:Using writer_pdf_Export export filter
Traceback (most recent call last):
  File "/usr/bin/unoconvert", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/usr/lib/python3.11/site-packages/unoserver/converter.py", line 340, in main
    result = converter.convert(
             ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/unoserver/converter.py", line 267, in convert
    document.storeToURL(export_path, output_props)
unoserver.converter.com.sun.star.io.IOException: SfxBaseModel::impl_store <file:///data/teste.pdf> failed: 0x507(Error Area:Io Class:Access Code:7) at /home/buildozer/aports/community/libreoffice/src/libreoffice-<IP_ADDRESS>/sfx2/source/doc/sfxbasemodel.cxx:3213 at /home/buildozer/aports/community/libreoffice/src/libreoffice-<IP_ADDRESS>/sfx2/source/doc/sfxbasemodel.cxx:1789

What am I doing wrong?

I'll try to see if I can reproduce. Just to confirm - the container has the correct permissions for the mounted volume?
$ id
$ ls -la

Do you get the same error if don't enter the container but convert directly from command line?

worker@262a0ac796ca:/data$ id
uid=100(worker) gid=101(worker) groups=101(worker)
worker@262a0ac796ca:/data$ ls -la
total 152
drwxr-xr-x    1 1001     985            144 Jan 23 18:36 .
drwxr-xr-x    1 root     root           154 Jan 25 20:13 ..
drwxr-xr-x    1 1001     985            138 Jan 23 18:23 .git
drwxr-xr-x    1 1001     985             46 Jan 23 18:23 .github
-rw-r--r--    1 1001     985           2093 Jan 23 18:23 Dockerfile
-rw-r--r--    1 1001     985           1064 Jan 23 18:23 LICENSE
-rw-r--r--    1 1001     985           1526 Jan 23 18:23 README.md
drwxr-xr-x    1 1001     985             20 Jan 23 18:23 build-context
-rw-r--r--    1 1001     985         129428 Jan 23 18:31 teste.odt
-rw-r--r--    1 1001     985           9028 Jan 23 18:36 testedois.odt

It seems that the docker container does not have write access to that directory.
For a quick fix do chmod a+w . outside of the container (standing in the same directory).
Alternatives are:

change the owner of the directory (and files) to the docker user.
add the docker user to the group that owns the directory and the files in it.

Thanks, it worked.

Thanks, it worked.