There is no way to set RUSTFLAGS for build scripts (or proc macros) when cross-compiling

The cargo documentation environment-variables.md says
RUSTFLAGS - A space-separated list of custom flags to pass to all compiler invocations that Cargo performs. In contrast with cargo rustc, this is useful for passing a flag to all compiler instances.

This is wrong, unfortunately. The flag is not passed to all compiler instances: When cross-compiling (i.e., when --target is set), the flag is not passed to build scripts. It seems there is currently no way to pass anything to build scripts when --target is set, which clearly is a feature gap. Cargo should provide a way to set flags for build scripts even when cross-compiling.

This is currently intentional as it is the conservative choice of how to interpret RUSTFLAGS, but it's always possible to expand it!

This is currently intentional as it is the conservative choice of how to interpret RUSTFLAGS, but it's always possible to expand it!

So the fact that whether RUSTFLAGS applies to build scripts or not depends on whether --target was set or not is how things ought to be? That's a really surprising side-effect of setting a target! The option should be called --target-and-ignore-rustflags-for-buildscripts, then... ;)
Actually the code says this is just a hack:
    // We *want* to apply RUSTFLAGS only to builds for the
    // requested target architecture, and not to things like build
    // scripts and plugins, which may be for an entirely different
    // architecture. Cargo's present architecture makes it quite
    // hard to only apply flags to things that are not build
    // scripts and plugins though, so we do something more hacky
    // instead to avoid applying the same RUSTFLAGS to multiple targets
    // arches:

It seems that what we really want is two environment variables; one applied to plugins/build scripts and one applied to the "actual" code. (And maybe a third applied to both.) However, that's currently not easy to do because the function setting the flags has no idea whether this is for the host or target. Correct? That's what this comment sounds like.
Judging from trouble that xargo has wrt. plugins, I assume the problem is that when I just run cargo build, the kind is actually Kind::Host for everything? IOW, cargo build and cargo build --target $host_arch are very different. Not sure why this is, sounds like a bug to me.
One "easy" fix for this problem would be to double-down on the existing hack, and change env_args such that rather than not passing any arguments when it detects a build script in a cross-build, it just goes looking for a different environment variable, like RUSTFLAGS_HOST or so. That would be enough to solve my problem, but I'm not sure if you'd be willing to accept such a patch -- and anyway, it'd all still be a hack.
(My problem is described in https://github.com/japaric/xargo/issues/162: I want a way to run cargo build --target <...> such that all compiler invocations have --cap-lint=allow set.)
The alternative I guess is to fix cargo such that kind actually reliably says whether this is a build script or part of the "real" build. Judging from the fact that nobody did this so far, I expect that to be non-trivial, and there may also be good reasons for why things are the way they are right now.

Browsing through the code, I have found other code using Target::for_host to distinguish builds for plugins from builds for the target. What is the reason that env_args relies on a different signal?

er just to be clear, none of this behavior is a bug today, it's all intentional. RUSTFLAGS is intended to only apply to the "final artifact" which when cross compiling doesn't account for build scripts and such. We left ourselves room to grow other environment variables, though, so we can certainly add some more!

RUSTFLAGS is intended to only apply to the "final artifact" which when cross compiling doesn't account for build scripts and such

But that's not what happens. If I run just cargo build, RUSTFLAGS is applied to build scripts and the artifact alike.
The entire behavior in cross-compilation vs. "native" compilation mode is pretty inconsistent. Also see the xargo README which observes that

When using compiler plugins (e.g. serde_derive) the target triple must be provided even when compiling for the host platform due to the way cargo handles compiler plugins. I.e., use xargo build --target x86_64-unknown-linux-gnu instead of just xargo build. (Surprisingly, these commands are NOT the same to Cargo.)

Well anyway I submitted https://github.com/rust-lang/cargo/pull/4428 which tries to not touch this existing logic, but is just enough to fix my problem. Some other day I'll try to distill my trouble with this logic into a separate bugreport. ;)

@alexcrichton

RUSTFLAGS is intended to only apply to the "final artifact" which when cross compiling doesn't account for build scripts and such.

Why does it account for build scripts and plugins when not cross compiling?
Cross-compiling to the host and compiling to the host are the same thing, therefore I think that cargo build and cargo build --target=$host_arch should be equivalent.
I find the current behavior of RUSTFLAGS when --target is used to be sane, so I wouldn't mind if that behavior would apply to cargo build as well.

@RalfJung

It seems that what we really want is two environment variables; one applied to plugins/build scripts and one applied to the "actual" code.

We can keep RUSTFLAGS to apply to the code of the "target", and add RUSTFLAGS_BUILD_DEPENDENCIES to apply to build dependencies like crates, plugins, build.rs, ...

@gnzlbg for historical reasons cargo build is subtly different from cargo build --target $host, but it does indeed cause a lot of confusion and was likely a bad decision

Could something be done about it in the 2018 edition? Probably would need
an RFC, but that’s only worth writing if this can be technically changed
without “too much hassle”.

Could someone clarify if the following is impossible given the above decision?
I have a dependency which relies on proc_macro2 being compiled with RUSTFLAGS='--cfg procmacro2_semver_exempt', as it uses span().start() and span().end(). I want to use this procedural macro in another library which targets wasm32-unknown-unknown.
I am open to doing things like: forking proc_macro2 (seems easiest), or manually listing out all of the rustc commands I need to execute (this seems possible, but I tried to execute all of the rustc commands printed when I ran cargo build --verbose, but it did not work. So I am presumably missing something.)
Thank you for your help in advance!

Thanks! I will try that.

@Boscop noticed that build.rustflags being passed to build scripts when --target omitted, but not when it is passed, causes extra rebuilds when building for multiple targets.
For example, if you have build.rustflags set in .cargo/config, then running cargo build; cargo build --target $OTHER; cargo build will cause all build scripts (and anything that depends on them) to be rebuilt.  In practice this can mean that the third build command rebuilds nearly the entire dependency tree, even though everything should be cached from the first build.

[...] will cause all build scripts (and anything that depends on them) to be rebuilt.

(proc-macros and their deps, too.)

A workaround is to run cargo build --target $host when not cross-compiling.

That avoids the rebuild issue but it seems the rustflags aren't getting applied, so it's not really a working workaround. The resulting exe still links to the crt dynamically when I have this .cargo/config (so I guess the target-cpu setting is also ignored):
[build]
target = "x86_64-pc-windows-msvc"

[target.'cfg(all(target_arch = "x86_64", not(debug_assertions)))']
rustflags = ["-Ctarget-feature=+crt-static", "-Ctarget-cpu=haswell"]

So it has the same effect as no rustflags setting, that's why it "fixes" the rebuild issue.
Due to this (https://github.com/rust-lang/cargo/issues/5777) issue it doesn't seem to be possible right now to set different rustflags in release mode, so I switched to setting them in my justfile as env var in my release build recipe for now..

The workaround also works for cases where rustflags are applied, e.g.
[build]
target = "x86_64-pc-windows-msvc"

[target.'cfg(target_arch = "x86_64")']
rustflags = ["-Ctarget-feature=+crt-static", "-Ctarget-cpu=haswell"]

The fact that there's no way to set rustflags for release builds only is a separate issue, as you note, but the workaround prevents rebuilds whether you hit that bug or not.

Ah yes, originally I wanted to use those rust flags only for release, but I guess it's ok if they are also used for debug, but do they make the build take longer?
But for this use case I'd prefer to build my release build into target/release instead of a different folder and I had a justfile for post build packaging anyway so I'm keeping the env var solution for now.
(But I'm keeping the workaround in mind for the future.. )
I hope it will soon be possible to use different rustflags for different profiles..

@alexcrichton I need to set the -C link-args=-zstack-size=X,
but I want to chose the X at compile time.
Is this not possible in build.rs right now? Do this mean I have to use a Makefile?

@elichai does this question have anything to do with the issue we are discussing here? From what I can tell, it does not. In that case, please open a new issue -- or, probably better for this, ask on Discord.

Is this not possible in build.rs right now? Do this mean I have to use a Makefile?

@elichai this is possible in build.rs (see this, ping me on Discord or Zulip if you need help).

@gnzlbg It's not possible to set arbitrary linker arguments in build.rs. Currently build scripts are limited to specifying libraries to link to and directories for the linker to search in.

Indeed, I misremembered @elichai, buils.rs cannot do that. You can use a json target spec or a .cargo/config to specify these at compile-time, but then they are "static" - if you want to ship this somewhere, and have it do something else, then that's not a good solution. The targets specification of rustc_target are written in Rust and they can do these things programmatically.

I guess i'll need to use a Makefile for that.
@retep998 Is this a wanted feature? If so I can work on a PR to cargo

@gnzlbg for historical reasons cargo build is subtly different from cargo build --target $host, but it does indeed cause a lot of confusion and was likely a bad decision

Is there any documentation about those historical reasons somewhere? What would be the proper way to change that? Would a crater run make us confident that aligning cargo build with cargo build --target $host is ok?

@elichai The problem is that while it is a wanted feature, the big blocker is not implementing it but rather convincing the appropriate teams that it should be exposed. There is currently opposition to this feature on the basis of it trying Rust to a particular linker implementation (which would make it harder to switch to rustc using LLD as a library for example), or hampering the user's ability to compile your code for other platforms.

This makes it much harder for us to build rustc when our rust-std installation is separate from rustc. Normally, we pass RUSTFLAGS to cargo to target the correct rust-std location. For building the initial libtest, we need the build.rs to link against the old rust-std libs but the libtest to link against the new libstd. We currently have no way to override the flags for just the build process. We could make a wrapper around rustc to always append our flags, but this breaks compiling against the new libstd since we get duplicate crates in the search path (this is definitely undesirable). It's not trivially possible to tell whether or not we are building the target crate or build script artifacts.
If I could just pass RUSTFLAGS_(BUILD|HOST) it would make this easy.

This also happens with cargo doc, proc-macros, and RUSTDOCFLAGS; see https://github.com/rust-lang/rust/issues/66796. It's causing issues with docs.rs collecting docs for proc-macro crates.

FWIW, the reason why #9089 ended up mentioning this issue is because these build scripts are being built using CARGO_TARGET_...LINKER, and yet ignore CARGO_TARGET..._RUSTFLAGS, which might include special/magic target-specific -C link-arg= arguments to make the special/magic target-specific linker actually link; and so without the ability to have the build scripts consistently use my rustflags for my linker or, at least, just not try to use my linker, I can't get builds to work at all with some compiler stacks :(.

FWIW, the reason why #9089 ended up mentioning this issue is because these build scripts are being built using CARGO_TARGET_...LINKER, and yet ignore CARGO_TARGET..._RUSTFLAGS, which might include special/magic target-specific -C link-arg= arguments to make the special/magic target-specific linker actually link; and so without the ability to have the build scripts consistently use my rustflags for my linker or, at least, just not try to use my linker, I can't get builds to work at all with some compiler stacks :(.

There are some fixes that might help here in #9322.

I think this is probably a better place to mention it, so I'll carry over my comment from https://github.com/rust-lang/cargo/pull/10395#issuecomment-1055691480 here:
I wonder if the way to go here is to take a lesson from https://github.com/alexcrichton/cc-rs/pull/9 and add support for RUSTFLAGS_$TARGET and the like. That way we can say that RUSTFLAGS applies to all targets (including the host), TARGET_RUSTFLAGS applies only to the target(s), HOST_RUSTFLAGS applies only to the host, RUSTFLAGS_$TARGET applies only to $TARGET, etc. What do you think?

@jonhoo I really want this and I want TARGET_RUSTFLAGS take precedence of the existing RUSTFLAGS. Cargo already supports CARGO_TARGET_<triple>_RUSTFLAGS but unfortunately it has lower priority over RUSTFLAGS which could lead to breakage when user specified RUSTFLAGS.

https://github.com/BLAKE3-team/BLAKE3/pull/101#issuecomment-1057777114
The fix: https://github.com/messense/cargo-xwinbuild/commit/49a15a06b5b2563bfc989ff508793cf95ae8571c

Cargo already supports CARGO_TARGET__RUSTFLAGS

We see conflicting information regarding this env var above...

@alexcrichton suggested that it could be used to work around this issue
but later, @michaelforney said that setting target.x86_64-unknown-linux-musl.rustflags does not actually work, and @saurik said the same

Could some check and confirm what the actual current behavior is here?

https://doc.rust-lang.org/nightly/cargo/reference/unstable.html#target-applies-to-host seems to confirm that target.x86_64-unknown-linux-musl.rustflags and the corresponding env var do indeed not work.


docs: Update pod-identity-mode.md

Reason for Change:

In docs, in point 7 there is a typo usepodidentity should be usePodIdentity.

Requirements

[x] squashed commits
[x] included documentation
[ ] added unit tests and e2e tests (if applicable).

Issue Fixed:

Fixes #866
Does this change contain code from or inspired by another project?

[ ] Yes
[x] No

If "Yes," did you notify that project's maintainers and provide attribution?
Special Notes for Reviewers:
Just a documentation change.

Codecov Report

Merging #867 (b4fe4db) into master (ab6b43d) will not change coverage.
The diff coverage is n/a.


Move away from actions/create-release@v1

Description
We use actions/create-release@v1 in the goreleaser action to create a release draft. This project is archived.
FIx
We should jump on another action, or refactor the way we do releases. The archived project itself suggests a few maintained alternatives

https://github.com/googleapis/release-please looks good


Connection.close() is missing.

Hello,
While testing Kuzu, I have noticed the absence of a Connection.close() method, as one exists for sqlite3.
Is it supposed to be the case? If yes, how to release a lock on .lock ?
Cheers,
PHF

Here are a few lines of code that lead the previously mentioned observation.
This code:
writer = KuzuWriter(tmpdir)
writer.start()

viz = KuzuViz(tmpdir, debug=True)
viz.start()

where writer opens a connection using the Python API and viz starts the docker container visualization tool leads to the following error:
[15:13:22.343] INFO (1): Access mode: READ_WRITE
node:internal/process/promises:289
            triggerUncaughtException(err, true /* fromPromise */);
            ^

[Error: Could not set lock on file : /database/.lock]

As a workaround, this code:
writer = KuzuWriter(tmpdir)
writer.start()

del writer
gc.collect()

viz = KuzuViz(tmpdir, debug=True)
viz.start()

does not yield any error.

Hi @phf-1, this seems to be the same problem as mentioned in #3260. We will fix this problem in the coming week. Feel free to join the discussion if you have a different idea.
Thanks for bringing this up!
Best,
Xiyang

I have implemented a Database.close() method which should release the lock. A test case is added here: https://github.com/kuzudb/kuzu/blob/master/tools/python_api/test/test_database.py
I am closing this for now. If you still encounter issue releasing the lock, feel free to reopen this. Thanks.

Great ! Thank you @mewim.


shared mem cleanup

Sometimes, on crashes, /dev/shm/statbar is left behind, and not appropriately detected as "dead" on next run. Client will hang waiting for data

I read here that

if the key is removed (via the shm_unlink(2) system call), the object persists until all handles are destroyed.

It sounds like after server and client have connected over the SHM, we might be able to immediately unlink it, and the conn will stay around until the program dies (or crashes). This might prevent other clients from opening it, if it's been unlinked (though possibly not, if it's not been cleaned up yet?). Testing is needed


[RyuJIT] Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Internal.TypeSystem.Ecma.EcmaType' to type 'Internal.TypeSystem.ArrayType'.

Compiling a simple Tizen application on Ubuntu  causes the error in CoreRT/RyuJIT for the following method
 [Tizen.Applications]AppCommon.AppEventGetLanguage
         Unhandled Exception: System.InvalidCastException: Unable to cast object of type 'Internal.TypeSystem.Ecma.EcmaType' to type 'Internal.TypeSystem.ArrayType'.
            at Internal.TypeSystem.Interop.ArrayMarshaller.AllocNativeToManaged(ILCodeStream codeStream)
            at Internal.TypeSystem.Interop.Marshaller.EmitMarshalArgumentManagedToNative()
            at Internal.TypeSystem.Interop.Marshaller.EmitForwardArgumentMarshallingIL()
            at Internal.TypeSystem.Interop.Marshaller.EmitArgumentMarshallingIL()
            at Internal.TypeSystem.Interop.Marshaller.EmitMarshallingIL(PInvokeILCodeStreams pInvokeILCodeStreams)
            at Internal.IL.Stubs.PInvokeILEmitter.EmitIL()
            at Internal.IL.Stubs.PInvokeILEmitter.EmitIL(MethodDesc method, PInvokeILEmitterConfiguration pinvokeILEmitterConfiguration)
            at Internal.IL.PInvokeILProvider.EmitIL(MethodDesc method)
            at Internal.IL.ILProvider.CreateMethodIL(MethodDesc method)
            at Internal.IL.ILProvider.CreateValueFromKey(MethodDesc key)
            at Internal.TypeSystem.LockFreeReaderHashtable`2.CreateValueAndEnsureValueIsInTable(TKey key)
            at Internal.TypeSystem.LockFreeReaderHashtable`2.GetOrCreateValue(TKey key)
            at Internal.IL.ILProvider.GetMethodIL(MethodDesc method)
            at ILCompiler.Compilation.GetMethodIL(MethodDesc method)
            at Internal.JitInterface.CorInfoImpl.Get_CORINFO_METHOD_INFO(MethodDesc method, MethodIL methodIL, CORINFO_METHOD_INFO& methodInfo)
            at Internal.JitInterface.CorInfoImpl.CompileMethod(MethodCodeNode methodCodeNodeNeedingCode, MethodIL methodIL)
            at ILCompiler.RyuJitCompilation.ComputeDependencyNodeDependencies(List`1 obj)
            at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeDependencies(List`1 deferredStaticDependencies)
            at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.ComputeMarkedNodes()
            at ILCompiler.DependencyAnalysisFramework.DependencyAnalyzer`2.get_MarkedNodeList()
            at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper)
            at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper)
            at ILCompiler.Program.Run(String[] args)
            at ILCompiler.Program.Main(String[] args)
         Aborted (core dumped)

To reproduce this failure  unarchive the attached file into the directory corert/tests/src/Simple as one more "Simple" test and run the build.sh script.
XForms.TizenMobile.tar.gz

CC: @Dmitri-Botcharnikov

@shrah Is it one of the known bugs in marshallers that you are working on?

@shrah This bug is blocking for our work so it's desirable for us to know when it will be fixed.

I am looking into it. I will send out a PR today.

@shrah many thanks!

@sergign60, I tried to repro this in both linux and MacOSX but encountered the following exception:
     Unhandled Exception: System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
          at System.ThrowHelper.ThrowKeyNotFoundException()
          at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
          at Internal.Metadata.NativeFormat.Writer.RecordVisitorBase.MapToPooledRecord[T](T rec)
          at Internal.Metadata.NativeFormat.Writer.MetadataWriter.GetRecordHandle(MetadataRecord rec)
          at ILCompiler.CompilerGeneratedMetadataManager.ComputeMetadata(NodeFactory factory, Byte[]& metadataBlob, List`1& typeMappings, List`1& methodMappings, List`1& fieldMappings)
          at ILCompiler.MetadataManager.EnsureMetadataGenerated(NodeFactory factory)
          at ILCompiler.MetadataManager.GetMetadataBlob(NodeFactory factory)
          at ILCompiler.DependencyAnalysis.MetadataNode.GetData(NodeFactory factory, Boolean relocsOnly)
          at ILCompiler.DependencyAnalysis.ObjectWriter.EmitObject(String objectFilePath, IEnumerable`1 nodes, NodeFactory factory, IObjectDumper dumper)
          at ILCompiler.RyuJitCompilation.CompileInternal(String outputFile, ObjectDumper dumper)
          at ILCompiler.Compilation.ILCompiler.ICompilation.Compile(String outputFile, ObjectDumper dumper)
          at ILCompiler.Program.Run(String[] args)
          at ILCompiler.Program.Main(String[] args)

It happens for Xamarin.Forms.VisualElement._mergedStyle.
Do you have any idea what may be wrong with it?

Looking at the call stack it seems like you are using older version CoreRT build. We have added some interop features like struct marshalling, delegate marshalling, and others over the last month.
In any case your test would fail even if you updated as unfortunately we didn't have support
for Ref and Out for AnsiString. I have addressed that in https://github.com/dotnet/corert/pull/3208. Please let me know whether it fixes your issue.

@shrah
CC: @jkotas @Dmitri-Botcharnikov
Yes, you're absolutely right, I've used the older version, it's my fault. As I see now your PR fixes this issue, so this issue can be closed. Thank you very much.


SD.Next Second Pass change fixes.

Edit the file automatic\extensions\Config-Presets\scripts\config_presets.py
Hit Ctrl+F and find self.txt2img_component_ids
Change
txt2img_hr_upscaler to txt2img_sampling_alt
and
txt2img_hires_steps to txt2img_steps_alt

This should hopefully be resolved now after merging PR https://github.com/Zyin055/Config-Presets/pull/55 . If it is then you can close this issue.


Need Firmware for Device ID 000659N7

Hi,
I have camera with version V5.00.R02.000659N7.10010.140d00.0020000
I didn't find firmware for device id 000659N7.
Please build firmware for this id

Hi,
I have camera with version V5.00.R02.000659N7.10010.140d00.0020000
I didn't find firmware for device id 000659N7.
Please build firmware for this id

https://github.com/OpenIPC/coupler/releases/download/latest/000659N7_OpenIPC_IPC_GK7205V200_G4F_S38.bin
https://github.com/OpenIPC/coupler/releases/tag/latest


Doesn't stringify objects

To me, { a: { b: 'c' } } should be stringified to ?a[b]=c. This tool puts %5Bobject%20 in the query.. which is not what I want.
Maybe because there is no Object mapper? (arrays are being mapped like this: https://github.com/sindresorhus/query-string/blob/master/index.js#L192)

Duplicate of #100


App crashes by loading malformed task-entry

To reproduce the appcrash, a vjournal with due date entry must be set (did it with evolution on debian), to show up in task list. After sync, the entry appears in the tasklist, on the widget, but opening the entryinside the app will cause a crash.
I would suggest a verification of malformed entires
and intercept appcrash.
I am using bq aquaris x2 with android 9, december update, OpenTask v1.2.3. and Radicale CalDav server v2.1.11.

It would be interesting to know what exactly caused the crash. We already perform a large number of checks when a task is inserted: https://github.com/dmfs/opentasks/blob/master/opentasks-provider/src/main/java/org/dmfs/provider/tasks/processors/tasks/Validating.java#L110
A VJournal record is not that much different from a task. The presence or absence of a due date should not cause a crash.


Corrected some typos and grammar

Occassionally I had to guess whether it was Field or Fields. I'm sure I got it right for grammar but maybe don't understand the library, so actually it's wrong

Thank you ❤


V0.2.1

Current coverage is 47.42% (diff: 58.91%)

No coverage report found for master at 1418961.

Powered by Codecov. Last update 1418961...b661d19


IOption pattern in DryIoc

In ASP.Net, IOption pattern used for read config values from appsettings.json and populate concrete class. That is injected where ever required.  So it would be great if we have such with DryIoc pattern.
Expectation is if could achieve with Dry Ioc pattern it would be great.
services.Configure(
configurationRoot.GetSection(
key: nameof(TransientFaultHandlingOptions)));
Here is the IOption pattern applied in ASP.Net, (https://docs.microsoft.com/en-us/dotnet/core/extensions/options)
For example, to read the configuration values from an appsettings.json file:
{
"TransientFaultHandlingOptions": {
"Enabled": true,
"AutoRetryDelay": "00:00:07"
}
}
Create the following TransientFaultHandlingOptions class for the above setting.
public class TransientFaultHandlingOptions
{
public bool Enabled { get; set; }
public TimeSpan AutoRetryDelay { get; set; }
}
In the program.cs, (application start up) read the configuration.
IConfigurationRoot configurationRoot = configuration.Build();
    services.Configure<TransientFaultHandlingOptions>(
configurationRoot.GetSection(
    key: nameof(TransientFaultHandlingOptions)));

And the consumer uses these settings like below:
public class ExampleService
{
private readonly TransientFaultHandlingOptions _options;
public ExampleService**(IOptions<TransientFaultHandlingOptions> options**) =>
    _options = options.Value;

}

@sramananthula Hi,
So, are the options not injected with the current DryIoc adapter?

I have tested in the example project for #520 (https://github.com/dadhi/DryIoc/blob/9ea3bd9a2a58034792a0df30ecfe86af2ffdd574/samples/GHIssue520/Program.cs#L11), and DryIoc has injected the options just fine https://github.com/dadhi/DryIoc/blob/9ea3bd9a2a58034792a0df30ecfe86af2ffdd574/samples/GHIssue520/Program.cs#L169

Hi, I tested with my project and it is giving following exception.
DryIoc.MefAttributedModel.AttributedModelException
HResult=0x80131509
Message=code: Error._containerErrorCount;
message: Unable to find single constructor nor marked with System.ComponentModel.Composition.ImportingConstructorAttribute nor default constructor in Microsoft.Extensions.Options.OptionsFactory<Fmr.SuperNova.Settings> when resolving: Microsoft.Extensions.Options.OptionsFactory<Fmr.SuperNova.Settings>: Microsoft.Extensions.Options.IOptionsFactory<Fmr.SuperNova.Settings> as parameter "factory" FactoryId=331 (IsSingletonOrDependencyOfSingleton)
in Singleton Microsoft.Extensions.Options.UnnamedOptionsManager<Fmr.SuperNova.Settings>: Microsoft.Extensions.Options.IOptions<Fmr.SuperNova.Settings> as parameter "options" FactoryId=330 (IsSingletonOrDependencyOfSingleton)
in resolution root Singleton Fmr.SuperNova.OptionService FactoryId=329 (IsSingletonOrDependencyOfSingleton, IsResolutionCall)
from container without scope
with Rules with {TrackingDisposableTransients} and without {ThrowOnRegisteringDisposableTransient}
with DefaultReuse=Singleton {Lifespan=1000}
with Made={FactoryMethod=, PropertiesAndFields=, ParameterSelector=}
Source=DryIoc.MefAttributedModel
StackTrace:
at DryIoc.MefAttributedModel.AttributedModel.GetImportingConstructor(Request request, Object fallbackMethodOrSelector)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.Container.ResolveAndCache(Int32 serviceTypeHash, Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, IfUnresolved ifUnresolved)
at Fmr.BaseLibrary.IocProvider.ResolveT in C:\Users\a693097\source\repos\unified-service-design-poc\Fmr.BaseLibrary\IocProvider.cs:line 69.
Here is my code:
public class MyConfigurationProvider : IConfigurationProvider
{
//Constructor
public MyConfigurationProvider([Import]IOptions<Settings> options)
    {
        _options = options.Value;
    }

}
///Option Class
public class Settings
{
public string URL{ get; set; }
    public string KeyOne { get; set; }
}

//appsettings.json
{
"Settings": {
"ChartIQ": "http://iichart.fmr.com/branch/develop/pure/examples/chart.html",
"KeyOne": "I am from config settings"
}
}
//configure options
builder.Services.Configure(builder.Configuration.GetSection("Settings"));
//Failing here if the constructor takes IOptions. It resolves with out any issues if constructor does not take //IOPtions<>
var optionService = Container.Resolve();

I see that you are using MEF extension?
And here the thing is not in you control and sgould be registered: Microsoft.Extensions.Options.OptionsFactory<Fmr.SuperNova.Settings>.
Try to register OptionFactory<> in container and specify what constructor to use via ˋmade: Made.Of` parameter.

for each option do we need to register this way then along with get section from config ?
Instance.Container.Register<Microsoft.Extensions.Options.IOptionsFactory>();
builder.Services.Configure(builder.Configuration.GetSection(key: nameof(Settings)));

Instance.Container.Register<Microsoft.Extensions.Options.IOptionsFactory>();
DryIoc.ContainerException
HResult=0x80131509
Message=code: Error.RegisteringAbstractImplementationTypeAndNoFactoryMethod;
message: Registering abstract implementation type Microsoft.Extensions.Options.IOptionsFactory<Fmr.SuperNova.Settings> when it is should be concrete. Also there is not FactoryMethod to use instead.
Source=DryIoc
StackTrace:
at DryIoc.Throw.It(Int32 error, Object arg0, Object arg1, Object arg2, Object arg3)
at DryIoc.ReflectionFactory.ValidateImplementationType(Type type)
at DryIoc.ReflectionFactory.Of(Type implementationType, IReuse reuse, Made made, Setup setup)
at DryIoc.Registrator.Register[TService,TImplementation](IRegistrator registrator, IReuse reuse, Made made, Setup setup, Nullable`1 ifAlreadyRegistered, Object serviceKey)

@sramananthula
You are registering the interface instead of the implementation, that's why you are getting the error.
Looking at the MS docs https://learn.microsoft.com/en-us/aspnet/core/fundamentals/configuration/options?view=aspnetcore-6.0#use-di-services-to-configure-options
you may just call AddOptions to add them to services.
Btw, I don't see anywhere in this issue that you're doing this.

I registered Container.Register<Microsoft.Extensions.Options.OptionsFactory>(); and also did
builder.Services.AddOptions();
builder.Services.Configure(builder.Configuration.GetSection(key: nameof(Settings)));
But my class is not getting resolved though. Getting an error on .Resolve();
public class OptionService : IOptionService
{
private Settings _options;
    public OptionService(IOptions<Settings> options)
    {
        _options = options.Value;
    }
}

@sramananthula What is the error?

Sorry. i did not added madeof the container register method. I just added like this. I am not sure whether it is correct or not.
Container.Register<OptionsFactory>(made: Made.Of(req => typeof(OptionsFactory)));.
here is the error:
DryIoc.ContainerException
HResult=0x80131509
Message=code: Error.UnableToResolveUnknownService;
message: Unable to resolve Microsoft.Extensions.Options.IOptions<Fmr.SuperNova.Settings> as parameter "options"
in resolution root Fmr.SuperNova.OptionService: Fmr.SuperNova.IOptionService FactoryId=568
from container without scope
with Rules with {TrackingDisposableTransients} and without {ThrowOnRegisteringDisposableTransient}
with DefaultReuse=Singleton {Lifespan=1000}
with Made={FactoryMethod=, PropertiesAndFields=, ParameterSelector=}
Where no service registrations found
and no dynamic registrations found in 0 of Rules.DynamicServiceProviders
and nothing found in 0 of Rules.UnknownServiceResolvers
Source=DryIoc
StackTrace:
at DryIoc.Throw.It(Int32 error, Object arg0, Object arg1, Object arg2, Object arg3)
at DryIoc.Container.TryThrowUnableToResolve(Request request)
at DryIoc.Container.DryIoc.IContainer.ResolveFactory(Request request)
at DryIoc.ReflectionFactory.CreateExpressionOrDefault(Request request)
at DryIoc.Factory.GetExpressionOrDefault(Request request)
at DryIoc.Container.ResolveAndCache(Int32 serviceTypeHash, Type serviceType, IfUnresolved ifUnresolved)
at DryIoc.Container.DryIoc.IResolver.Resolve(Type serviceType, IfUnresolved ifUnresolved)

@sramananthula Ok, You are using the Made.Of wrong. Read the docs.
Regarding the initial problem with options...
I don't know what is wrong with your case, but I have the working example here.
You may

Fork the DryIoc repo
Checkout the v6-dev branch (the branch itself does not relate to your issue, it just contains the example)
Go to the samples\GHIssue520 project and run it via dotnet run or debug and see the output that options are injected just fine.

You may try to run it in isolation as well by replacing the line test.csproj
<ProjectReference Include="..\..\src\DryIoc.Microsoft.DependencyInjection\DryIoc.Microsoft.DependencyInjection.csproj" />

with
<PackageReference Include="DryIoc.Microsoft.DependencyInjection" Version="6.1.0" />

Hope it will be fixed for you @sramananthula by #544


Feat: add shift scroll and global scroll

Add globalScroll option, which when set to false only scroll when he pointer is over the top of the scroll box
Add shiftScroll option, which when the scrollbox is horizontal forces the user to use the shift + scroll to move the scrollbox, better emulating how scroll boxes work on the browser

That will be useful!
Maybe a related use-case: is there a way to not trigger other (global?) wheel events when scrolling a scrollbox?
I had to add some custom events to get this type of behavior.
Specifically, scrolling in a scrollbox would also trigger the wheel-event of pixi-viewport (meaning, zoom in / out).
So I had to do something like:
scrollbox.on('pointerenter', () => {
      this._isScrollboxActive = true;
      this.game.engine.viewport.pauseWheel();
    });
    scrollbox.on('pointerleave', () => {
      this._isScrollboxActive = false;
      this.game.engine.viewport.resumeWheel();
    });

I don't know if this option will fix that use-case, but I'll try it out!


Nadir's branch

Had to refactor my folder and work environment, still working on parrying but decided to implement the Healthbar system along the way.

Made a mistake on the pull request. Sorry.


Update action versions

:tada: This PR is included in version 2.0.14 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Fix Skull Bash variants

Another follow up to PR #4974.
For Gen Next, the charged -anim will be inherited from PR #4978. (I don't think Skull Bash can be charged in Gen 1, can it?)

I'm pretty sure Skull Bash is a two-turn move in Gen 1, it just doesn't boost.

This will need to be rebased on top of my change.

(I left the ChargeMove event in, maybe some custom format allows Power Herb...)


Proper Data is not sent to Sentry

Hi Jacob,
Your code is a little outdated. Lots of essential details which are needed to be sent to Sentry aren't covered in your code. I have updated the code that covers almost all those essential details. I'm not sure how I can contribute to your repo. Please suggest me how we can enhance the existing code.
Regards,
Jheel

The simplest way is to fork the repo, make a branch, and push your changes,
but if you're not up for that, you could send me a zip of your copy and I
can make a branch and PR for it to take a look.
On Tue, Apr 27, 2021 at 3:17 PM Jheel Agrawal @.***>
wrote:

Hi Jacob,
Your code is a little outdated. Lots of essential details which are needed
to be sent to Sentry aren't covered in your code. I have updated the code
that covers almost all those essential details. I'm not sure how I can
contribute to your repo. Please suggest me how we can enhance the existing
code.
Regards,
Jheel
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/jmather/SentryForSalesforce/issues/3, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AADODIWC74PKD6BPXSYUOKTTK4EWFANCNFSM43VTHMUA
.

@jmather I have just added the pull request for the same. Can you please have a look at it?


Ensure static zip file structure

Make sure the zip file structure is the same, no matter where the wp-cli command was called from.
The folders in the zip file will now always have the correct structure:
- wp-content
  - plugins
  - themes
  - uploads

@nicholasio I was thinking of omitting the wp-content and having the subfolders directly on the root level, but opted to leave it as is.
This ensures that all existing exports will still work seamlessly, without the need of any code fixes to accommodate that.

@noplanman Thanks for PR. I'm gonna run a few tests before merging. But this seems good to me


Bazel build error on Fedora 34

I can successfully build Verible on Ubuntu machines but I'm having trouble on Fedora 34 (Workstation Edition). When I run bazel build -c opt //... I see the error message below.
ERROR: /home/mustafa/verible/verilog/parser/BUILD:122:1: @platforms//os:windows is not a valid configuration key for //verilog/parser:verilog_y_cc
ERROR: Analysis of target '//verilog/parser:verilog_y_cc' failed; build aborted: @platforms//os:windows is not a valid configuration key for //verilog/parser:verilog_y_cc
INFO: Elapsed time: 0.249s
INFO: 0 processes.
FAILED: Build did NOT complete successfully (0 packages loaded, 0 targets configured)

I don't know anything about the Bazel build system. How can I fix this issue?
Thanks.

What is your bazel version ? I suspect it might not have the platform specific configuration yet.
bazel --version should output something at least 4.0. Current stable is 4.2.1, and there is even a pre 5.0.0 out there, but haven't tested that yet.
To hack things up to make it work, you can just remove the whole section in the file and try again.
 copts = select({
        "@platforms//os:windows": [],
        "//conditions:default": [
            "-Wno-implicit-fallthrough",
        ],
    }),

Turns out my Bazel version was too old. I thought dnf install bazel would install the latest version but it did not. Now I'm getting another error but at least there is some progress. Thank you @hzeller.


Fix dimensions for export variable

This PR fixes an issue found in exporting the remapped brightness temperature to the container.
group: ObsValue {
  variables:
        float brightnessTemperature(Location) ;
                brightnessTemperature:_FillValue = 3.402823e+38f ;
                brightnessTemperature:long_name = "3-by-3 Averaged Brightness Temperature" ;
                brightnessTemperature:units = "K" ;
  } // group ObsValue

The dimension of brighenssTemperature should be 2D (Location, Channel)

Sorry if I broke this when updating this code! Would it make sense to add a test case that uses this feature so we might catch things like this in the future?

Good idea.  I will add an ATMS test in this PR.

@rmclaren @nicholasesposito
Three updates:
(1) I removed the print statements
(2) add the remapping to the bufrtest_atms_mapping.yaml file
(3) update test output for test_bufr_atms
test_bufr_atms
1/1 Test #28: test_bufr_atms ...................   Passed    0.36 sec

The following tests passed:
	test_bufr_atms

100% tests passed, 0 tests failed out of 1

Label Time Summary:
bufr_query    =   0.36 sec*proc (1 test)
script        =   0.36 sec*proc (1 test)

Total Test time (real) =   0.38 sec


Clarifications about various test tasks

In addition this commit replaces eager tasks generation for running tests using different java versions with rule based task created on-demand.
The previous approach created thousands of tasks, only a portion of which would run. And even those tasks were unnecessary in my opinion. This PR creates only one umbrella task.
The downside of this approach is that you cannot run tests on different java versions in one gradle invocation: gradlew test testJava11. The upside - somewhat faster gradle runs due to greatly reduced tasks count. E.g. on my machine dry run gradlew clean testJava11 -m went from 14s to 2s.

Nice cleanup. Would you be interested in backporting this to the dd-trace-java repo to help keep them in sync?

I will take a look at that


Need more test case for vector index load/store

The vector extension allows index load insts to use different width of data and index. For example:
vsetvli t1, t0, e8,m1,ta,ma
vluxei64.v v1, (a0), v2

vsetvli t1, t0, e16,m1,ta,ma
vluxseg2ei64.v v2, (a0), v4

Added support for different data/offset widths in the above commit, sorry for the delay. The generated tests look good for me now, feel free to reopen this if there is any follow-up issue.

@ksco That patch results in code that causes accesses to undefined/out-of-bounds regions.
I do make VLEN=256 SPLIT=2000 MODE=virtual, which results in two types of failures:

Test failures in stage2 (but not in stage1)... this is because some tests now generate indexed accesses off the end of the testdata array. That region can change between stage1 and stage2
Page handling errors ... this is likely related to the above... this happens because there is a small bound on the size of the paged-in region for virtual-env tests.

IMO, the easiest way to resolve this is to fold in the index-generation and indexed-data generation into a single step, so the generator can guarantee that all indexed accesses like within the generated region.
Segmented loads/stores make this more complex as well.

Oops I forgot, my make command only works with latest riscv-test-env, that should be bumped

Ok, let me bump it and try.

Fixed, the main issue is we are using the same data section for all split tests, while it's okay for non-virtual env, I think it's sometimes too far for the virtual env. Anyway, I split the data section in above commit, and it works.

Currently it's only a workaround, the generator code is ugly and certainly needs some refactoring.


[RUM-5393] Tracking non-fatal ANRs and app hangs

What does this PR do?
Adds tracking for non-fatal ANRs on Android and app hangs on iOS.
Review checklist (to be filled by reviewers)

[ ] Feature or bugfix MUST have appropriate tests
[ ] Make sure you discussed the feature or bugfix with the maintaining team in an Issue
[ ] Make sure each commit and the PR mention the Issue number (cf the CONTRIBUTING doc)
[ ] If this PR is auto-generated, please make sure also to manually update the code related to the change

Looks good, I would just cleanup that one swift if let


Feature Request: "My decks" show agend pictures

In netrunner there are many identities (but only 7 factions), and in netrunnerdb it is easy to search "my decks" simply by looking on pictures.
In Game of Thrones there are 8 factions - and looking on pictures on this factions in "my decks" do not helps to navigate through decks.
My request - add picture of agenda next to faction picture - it will ease navigation.

Maybe add this feature to decklists search?

Decklists also display the 2 images.


14803 add approval type component

Issue #: /bcgov/entity14803
ApprovalType
Default

Default with isCourtOrderOnly = true

Default with isConversionToFullRestoration = true

Draft with approvedByRegistrar = true

Draft with draftCourtOrderNumber = '99-1234567'

With Validation error shown

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of the business-filings-ui license (Apache 2.0).

Please wait for another review before merging. I should not be the primary or only reviewer.

Thanks @severinbeauvais !


CommonJS bundle contains a syntax error

Bug report
Describe the bug
When I import pg-gateway with require (or my bundler transpiles my import calls into that), pg-gateway throws an import error.
To Reproduce
Using the PGlite example from the next branch, but with the imports at the top replaced by require, throws an error:
# index.cjs
const { PGlite } = require('@electric-sql/pglite');
const { createServer } = require('node:net');
const { fromNodeSocket } = require('pg-gateway/node');

$ node index.cjs
Debugger listening on ws://<IP_ADDRESS>:64418/6c461da5-f0a8-4d36-8ef9-e05ec5c48608
For help, see: https://nodejs.org/en/docs/inspector
Debugger attached.
Waiting for the debugger to disconnect...
/node_modules/.pnpm/pg-gateway@0.3.0-beta.3/node_modules/pg-gateway/dist/chunk-OSDXSGAD.cjs:1
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) ...........................................................................................................................................................................................; exports.n = zA; exports.o = L; exports.p = w; exports.q = m; exports.r = KI; exports.s = l; exports.t = XA; exports.u = uI; exports.v = sA; exports.w = BA;

SyntaxError: Unexpected token ','
    at internalCompileFunction (node:internal/vm:73:18)
    .........

System information

Version of pg-gateway: 0.3.0-beta-3
Version of Node.js: 20.11.1

Thanks for reporting @N2D4. Looks like a bug with tsup: https://github.com/egoist/tsup/issues/1124. Going to dig into this to see what our options are.

@N2D4 this should be fixed now in 0.3.0-beta.4 via https://github.com/supabase-community/pg-gateway/pull/24. Would you mind giving this another try?


Getting warning "WARNING: Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush"

From<EMAIL_ADDRESS>on 2014-04-11T17:10:51Z
Spyder Version:  2.3.0beta4
Python Version:  2.7.6
Qt Version    :  4.8.5, PyQt4 (API v2) 4.10.3 on Linux
pyflakes >=0.5.0:  0.8.1 (OK)
pep8 >=0.6      :  1.5.5 (OK)
IPython >=0.13  :  2.0.0 (OK)
pygments >=1.6  :  1.6 (OK)
sphinx >=0.6.6  :  1.2.2 (OK)
psutil >=0.3    :  2.1.0 (OK)
rope >=0.9.2    :  0.9.4 (OK)
matplotlib >=1.0:  1.3.1 (OK)
sympy >=0.7.0   :  0.7.5 (OK)
pylint >=0.25   :  1.1.0 (OK)
What steps will reproduce the problem?
When I launch spyder I get following, It was working before after I did some updates
user@somemachine:~ >-->   spyder
Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)"
WARNING: Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush'

The message "Unable to load library icui18n "Cannot load library icui18n: (icui18n: cannot open shared object file: No such file or directory)" can be ignored as it is outside the scope of spyder, that error is coming from Qt because I am using spyder on RHEL6 while the tools (Qt) were compiled on RHEL 5.5
"WARNING: Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush"  This is new warning, that started to popup after I updated the dependencies and spyder, I thought it was coming from psutil package but it doesn't seem so. What is the expected output? What do you see instead? There should no warning

Please provide any additional information below
.
Original issue: http://code.google.com/p/spyderlib/issues/detail?id=1789

From ccordoba12 on 2014-04-16T09:11:13Z
I'm seeing it myself. I think this warning is generated by IPython but I'll have to investigate it further.
Status: Accepted
Labels: Cat-IPythonConsole MS-v2.3.1

From<EMAIL_ADDRESS>on 2014-06-09T14:31:50Z
I'm seeing this too...
Spyder Version:  2.3.0rc
Python Version:  2.7.7
IPython >=0.13  :  2.1.0 (OK)
matplotlib >=1.0:  1.3.1 (OK)
pep8 >=0.6      :  1.5.7 (OK)
psutil >=0.3    :  2.1.1 (OK)
pyflakes >=0.5.0:  0.8.1 (OK)
pygments >=1.6  :  1.6 (OK)
pylint >=0.25   :  1.1.0 (OK)
rope >=0.9.2    :  0.10.2 (OK)
sphinx >=0.6.6  :  1.2.2 (OK)
sympy >=0.7.0   :  0.7.5 (OK)
Thanks for your help.

From<EMAIL_ADDRESS>on 2014-06-20T18:08:54Z
I just installed Spyder on a new Macbook. When Launch spyder, I got the same warming information. "Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush'".
what is the problem.

From<EMAIL_ADDRESS>on 2014-07-04T00:47:17Z
same here : OSX 10.8
WARNING: Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush'

From<EMAIL_ADDRESS>on 2014-07-05T15:43:04Z
I get the same error with newly installed Spyder on MacBook Pro, OSX 10.9.3,
Python 3.4.1 |Anaconda 2.0.1 (x86_64)| (default, May 19 2014, 13:05:46)
I always get the following errors when exiting python (Quit Python), even though I don't load or run a file.
1050-XXXXX:~ someuser$ spyder
WARNING: Unexpected error discovering local network interfaces: 'SysOutput' object has no attribute 'flush'
Exception in thread Thread-2:
Traceback (most recent call last):
File "/Users/someuser/anaconda/python.app/Contents/lib/python3.4/threading.py", line 920, in _bootstrap_inner
self.run()
File "/Users/someuser/anaconda/python.app/Contents/lib/python3.4/threading.py", line 868, in run
self._target(*self._args, **self._kwargs)
File "/Users/someuser/anaconda/python.app/Contents/lib/python3.4/site-packages/spyderlib/spyder.py", line 2097, in start_open_files_server
req, dummy = self.open_files_server.accept()
File "/Users/someuser/anaconda/python.app/Contents/lib/python3.4/socket.py", line 184, in accept
fd, addr = self._accept()
ConnectionAbortedError: [Errno 53] Software caused connection abort

From<EMAIL_ADDRESS>on 2014-07-20T03:55:30Z
OSX 10.9.4 with the same issue. Happens with both of my environments.
Python 3.4.1 |Anaconda 2.0.1 (x86_64) | IPython 2.1.0
Python 2.7.7 |Anaconda 2.0.1 (x86_64) | IPython 2.1.0

From ccordoba12 on 2014-07-06T06:18:54Z
@-dcsrobts: your second error is not related to the first one. I don't know where it can be coming from.

From<EMAIL_ADDRESS>on 2014-08-15T02:39:28Z
so do i... installed from debian::apt with package spyder3
python 3.4.1 / debian testing

From<EMAIL_ADDRESS>on 2014-08-12T16:25:52Z
osx 10.9.4  I have the same issue.
Python 2.7.7 |Anaconda 2.0.1| IPython 2.1.0

From ccordoba12 on 2014-09-10T13:30:08Z
I found the error. I'll fix it for 2.3.2
Labels: -MS-v2.4 MS-v2.3.2

From ccordoba12 on 2014-08-17T18:35:50Z
Labels: -MS-v2.3.1 MS-v2.4

From ccordoba12 on 2014-09-19T06:28:22Z
issue #1971 has been merged into this issue.

From ccordoba12 on 2014-09-19T11:28:05Z
This issue was closed by revision 7f89d0a8f424 .
Status: Fixed

From ccordoba12 on 2014-09-19T12:08:20Z
We needed to add a "dummy" flush method to one of our classes.
Click on the revision link above to see the details.

From<EMAIL_ADDRESS>on 2014-09-19T11:59:09Z
what is the fix for this problem


feat: update packages

update ci packages
update tsconfig files
point to new gh-pages
added github issue templates
added further checks to CI to work on pull requests

:tada: This PR is included in version 2.4.0-beta.1 :tada:
The release is available on:

npm package (@develop dist-tag)
GitHub release

Your semantic-release bot :package::rocket:

:tada: This PR is included in version 2.4.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Using Signals in Mixins

Does ViewModel support (or are you planning on supporting?) using Signals from Mixins?
I have developed a situation, where I'm trying to capture an event from the document in a ViewModel Mixin.
I had the same behaviour in multiple templates and it worked, but if I refactor the common parts into a Mixin, then the Signal stops working.

Try to make a repro. The following works fine:
import { Template } from 'meteor/templating';
import './main.html';

ViewModel.signal({
  mouse: {
    mousePosition: {
      target: document,
      event: 'mousemove',
      transform: function(event) {
        return {
          x: event.x,
          y: event.y
        }
      },
      throttle: 50
    }
  }
});

ViewModel.mixin({
  test: {
    signal: 'mouse'
  }
})

Template.example.viewmodel({
  mixin: 'test'
});

<body>
  {{> example}}
</body>

<template name="example">
  <p {{b "text: 'Mouse Position: ' + mousePosition.x + ',' + mousePosition.y"}}></p>
</template>

Here you go: https://github.com/arggh/signal-mixin-issue
Instructions are in client/main.js, but it basically seems to boil down to using Mixin-scope.

Also, changing mixin: { myMixin: 'myMixin' } to mixin: 'myMixin' and adjusting the rest accordingly fixes it in my actual app as well.

This one will take a bit more work than I expected...

Pick up 5.0.0


Add Vim 8 terminal highlighting

Vim 8 comes with a built-in terminal (:terminal). The default terminal colors don't look quite right.

:rocket: Deployed in release version 🏷 0.10.0


Add project json to target with project info

Used to generate the home page list of projects on ir-docs

Your orb has been published to the CircleCI Orb Registry.
You can view your published orb on the CircleCI Orb Registry at the following link:
https://circleci.com/developer/orbs/orb/infinitered/publish-docs?version=0.2.0


Support managing network forwards

LXD now supports network forwards. Support should be added to manage these via pylxd.
https://linuxcontainers.org/lxd/docs/master/howto/network_forwards/index.html#

Hello! Can you please also add delete call so we can also delete forwards?


build: Disable use_sysroot by default.

This is a no-op in M48, but starting with M49 use_sysroot is enabled
by default on Linux. This means the build will use a Debian Wheezy
chroot to build and use as few system dependencies as possible.
It is a nice idea, but we cannot use it with Crosswalk at the moment
because we have an additional dependency on libnotify that is not part
of the Wheezy chroot shipped by Chromium.
BUG=XWALK-5806

@mrunalk @darktears @halton @PeterWangIntel

LGTM, but shouldn't you be pushing this to next instead of master as the bug is for M49?

I like to keep the actual M49 rebasing patch as small as possible: since it contains dozens of squashed commits it's really annoying to do git bisect or git blame and stumble upon a huge rebasing commit that changes a ton of things.
Since this change also applies to M48 just fine, landing it before makes history tracking easier.


fix: negative highlight for CreateFailed status

Description
Changes proposed in this pull request:

...
...
...

Related issue(s)

/retest


The screenshot has a green background, but settings are set to Blue

Small error TestAppSettings:BackgroundColor is set to blue, but screenshot shows green.

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

ID: 80b8d3d6-4125-638f-746a-4bbdf0378625
Version Independent ID: d917d876-79b4-b935-08f0-09ef86038dd7
Content: Tutorial for using Azure App Configuration dynamic configuration in an ASP.NET Core app
Content Source: articles/azure-app-configuration/enable-dynamic-configuration-aspnet-core.md
Service: azure-app-configuration
GitHub Login: @yegu-ms
Microsoft Alias: yegu

@76mel Since we have not heard back from you we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

Assigning this to Product PM and Doc Author to evaluate and update as appropriate.

Thanks for report this! We'll fix this in our doc.

We fixed this and it's now published. #please-close

Thank you @yegu-ms
@76mel - We are closing this issue for now, if you have any further queries please tag us in your reply and happy to take the conversation forward. Thank you.


Make alerts trigger if they are more severe than previous alert

Codecov Report

Merging #442 into master will increase coverage by 0.19%.
The diff coverage is 100%.

@@            Coverage Diff             @@
##           master     #442      +/-   ##
==========================================
+ Coverage   74.74%   74.94%   +0.19%
==========================================
  Files          23       23
  Lines        1699     1700       +1
  Branches      152      152
==========================================
+ Hits         1270     1274       +4
+ Misses        383      381       -2
+ Partials       46       45       -1

Impacted Files
Coverage Δ

cabot/cabotapp/models.py
73.34% <100%> (+0.58%)
:white_check_mark:

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 206abcd...4a7aa4e. Read the comment docs.


Order matters for intersection types

Given these type aliases:
type Foo = {
  foo_type: "A" | "B"
}

type FooA = {
  foo_type: "A"
}

This line will validate:
var foo: FooA & Foo = {foo_type: "A"}
But this will not:
var foo: Foo & FooA = {foo_type: "A"}
The intersection operator should be commutative.

Upon testing this using Try Flow, both lines look to validate fine.

@rsolomo The presence of the first line causes both to succeed. Remove the first line, or rename the variable in the second line and you will see the failure. The first line on its own succeeds.

I assume what the author of the issue meant was that this will error as expected (because the intersection should be only "A"):
var foo: FooA & Foo = {foo_type: "B"}

But this will not:
var foo: Foo & FooA = {foo_type: "B"}

But both of them produce the same error since v0.37.0 so I am inclined to believe this is a misunderstanding of some sort from the author
@goodmind Closeable

@Mathspy
https://flow.org/try/#0C4TwDgpgBAYg9nKBeKBvAUFKAzBB9USALigCIBBUqAHzICFT0BfddQ6eOc5NTHfdiQqMWAelEAVABYBLAM5QANjIB20AO4zFiqADcAhsoAm+4BCLoDAJ35wSnbgDJYCHqlxwC4c2Uot04nQArsBQwLIKmtpQKnDAFtZQAEb6Vvauzg5uHl7EvqRMQA

@Mathspy that's not what I meant, see the link above.

Oh I see, my apologises!

now both work


Fine-tuning error for Falcon-7B & RedPajama-INCITE-Base-3B --> "ValueError: max() arg is an empty sequence"

Hi, I am trying to finetune RedPajama-INCITE-Base-3B-v1 on a custom small alpaca format dataset size of 170. When I execute the finetuning with both adapter_v2.py ( and even lora.py), I get the same error of max_seq_length = max(lengths)  ValueError: max() arg is an empty sequence.
I tried poking around in both of the python files to rectify the ValueError but to no avail. Even changing override_max_seq_length = None to force a maximum sequence length didn't work.
I got the same error when I was trying to finetune the Falcon-7b model.
Please help me proceed further. Thank you.

Google collab logs:
# Preparing dataset
!python scripts/prepare_alpaca.py \
    --destination_path data/alpaca \
    --checkpoint_dir checkpoints/togethercomputer/RedPajama-INCITE-Base-3B-v1

Loading data file...
Loading tokenizer...
train has 0 samples
test has 172 samples
Processing train split ...
0it [00:00, ?it/s]
Processing test split ...
100% 172/172 [00:00<00:00, 1402.62it/s]

The main part:
# Finetuning the model
!python finetune/adapter_v2.py \
    --data_dir data/alpaca \
    --checkpoint_dir checkpoints/togethercomputer/RedPajama-INCITE-Base-3B-v1 \
    --out_dir out/adapter/alpaca \
    --precision 16-true

/content/lit-gpt/finetune/adapter_v2.py:303: JsonargparseDeprecationWarning:
    Only use the public API as described in https://jsonargparse.readthedocs.io/en/stable/#api-reference.
    Importing from jsonargparse.cli is kept only to avoid breaking code that does not correctly use the public
    API. It will no longer be available from v5.0.0.

  from jsonargparse.cli import CLI
{'eval_interval': 600, 'save_interval': 1000, 'eval_iters': 100, 'log_interval': 1, 'devices': 1, 'learning_rate': 0.003, 'batch_size': 128.0, 'micro_batch_size': 2, 'gradient_accumulation_iters': 64.0, 'epoch_size': 50000, 'num_epochs': 5, 'max_iters': 125000, 'weight_decay': 0.02, 'warmup_steps': 781.0}
Global seed set to 1337
Loading model 'checkpoints/togethercomputer/RedPajama-INCITE-Base-3B-v1/lit_model.pth' with {'org': 'togethercomputer', 'name': 'RedPajama-INCITE-Base-3B-v1', 'block_size': 2048, 'vocab_size': 50254, 'padding_multiple': 256, 'padded_vocab_size': 50432, 'n_layer': 32, 'n_head': 32, 'n_embd': 2560, 'rotary_percentage': 1.0, 'parallel_residual': False, 'bias': True, 'n_query_groups': 32, 'shared_attention_norm': False, '_norm_class': 'LayerNorm', 'norm_eps': 1e-05, '_mlp_class': 'GptNeoxMLP', 'intermediate_size': 10240, 'condense_ratio': 1, 'adapter_prompt_length': 10, 'adapter_start_layer': 2}
Number of trainable parameters: 2677184
Number of non trainable parameters:<PHONE_NUMBER>
/usr/local/lib/python3.10/dist-packages/lightning/fabric/fabric.py:881: PossibleUserWarning: The model passed to `Fabric.setup()` has parameters on different devices. Since `move_to_device=True`, all parameters will be moved to the new device. If this is not desired, set  `Fabric.setup(..., move_to_device=False)`.
  rank_zero_warn(
Traceback (most recent call last):
  File "/content/lit-gpt/finetune/adapter_v2.py", line 305, in <module>
    CLI(setup)
  File "/usr/local/lib/python3.10/dist-packages/jsonargparse/_cli.py", line 85, in CLI
    return _run_component(component, cfg_init)
  File "/usr/local/lib/python3.10/dist-packages/jsonargparse/_cli.py", line 147, in _run_component
    return component(**cfg)
  File "/content/lit-gpt/finetune/adapter_v2.py", line 82, in setup
    fabric.launch(main, data_dir, checkpoint_dir, out_dir)
  File "/usr/local/lib/python3.10/dist-packages/lightning/fabric/fabric.py", line 789, in launch
    return self._wrap_and_launch(function, self, *args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/fabric/fabric.py", line 871, in _wrap_and_launch
    return to_run(*args, **kwargs)
  File "/usr/local/lib/python3.10/dist-packages/lightning/fabric/fabric.py", line 876, in _wrap_with_setup
    return to_run(*args, **kwargs)
  File "/content/lit-gpt/finetune/adapter_v2.py", line 121, in main
    train(fabric, model, optimizer, train_data, val_data, checkpoint_dir, out_dir, speed_monitor)
  File "/content/lit-gpt/finetune/adapter_v2.py", line 140, in train
    max_seq_length, longest_seq_length, longest_seq_ix = get_max_seq_length(train_data)
  File "/content/lit-gpt/finetune/adapter_v2.py", line 283, in get_max_seq_length
    max_seq_length = max(lengths)
ValueError: max() arg is an empty sequence

You would get this error if your data is empty. Did you check the contents of your train data?

Yes, I have checked the contents and it is exactly similar to the alpaca format. Here is an excerpt of it:
[
    {
        "instruction": "Explain data abstraction.",
        "input": "",
        "output": "Data abstraction is a technique used in computer programming to separate the implementation details of a data type from its interface, allowing the implementation to be changed without affecting the code that uses it. This is often achieved through the use of abstract data types (ADTs), which are defined by the operations they support rather than their specific implementation, or through the use of interfaces and classes in object-oriented programming languages. Data abstraction helps to reduce the complexity of software systems by allowing code to be written in a modular and flexible way and by hiding the underlying details of data types from the user."
    },
    {
        "instruction": "What is a syntax error",
        "input": "",
        "output": "A syntax error is an error in the structure of a programming language's code. It occurs when the code does not conform to the rules of the programming language's syntax. Syntax errors can occur for a variety of reasons, such as using the wrong punctuation, omitting required elements, or using an incorrect keyword. Syntax errors are usually detected by a compiler or interpreter when the code is being compiled or executed, and they can prevent the code from running correctly. To fix a syntax error, the code must be revised to conform to the correct syntax of the programming language."
    }
]

Do you think there is an error in my data or in my prepare_alpaca.py? Or in my understanding of finetuning with adapter_v2.py?
I cannot figure it out. Thank you.

If you open a terminal and do data = torch.load("data/alpaca/train.pt"), it should appear as an empty list. This suggests a problem when prepare_alpaca.py is run. In fact, it did say
Processing train split ...
0it [00:00, ?it/s]

Note the 0 iterations.
You should try debugging if this is doing what you expect: https://github.com/Lightning-AI/lit-gpt/blob/main/scripts/prepare_alpaca.py#L58-L60

Thank you so much Carlos! You have explained in great detail and pointed me in the right direction. I cannot overstate how timely you were. Things like this show how debugging is very an important skill.
The issue was with the test_split_size value, which by default is 2000 whereas my custom dataset's total size is 172 haha.

Glad I could help! I'll reopen this because we should totally add a check to avoid this. Would you like to contribute it?

Hmmm.  test_split_size should probably be a fraction of the total training set size, and the CLI parameter changed to siomething like test_percentage.  I can play around with this.

See PR https://github.com/Lightning-AI/lit-gpt/pull/264

Setting the test split size as a percentage is wise! And here I was trying to raise an exception instead of solving it for the user. Nice PR.


Calling sprintf() with a single argument should not be allowed

Is your feature request related to a problem?
Linters don't catch cases when sprintf() is called with a single argument:
echo sprintf( 'Some string' );

This can be seen as a potential performance issue, as calling sprintf() like that makes no sense.
Describe the solution you'd like
Linters should warn about such code, as this can lead to fatal errors.
Take a look at this example:
https://3v4l.org/T4mI9#veol

While I agree that it's not very useful to do so, I would like to see some data to back up whether this actually makes a real difference in performance.
Note: echo sprintf() in itself already is a little nonsensical as that should be replaced with a call to printf().
If a sniff for this would be created, I believe it should go into PHPCSExtra as the sniff is not WordPress specific.

Note: echo sprintf() in itself already is a little nonsensical as that should be replaced with a call to printf().

This was an example to provide some context. Please ignore the echo.
Whether using printf() or sprintf(), it does not change the point I am trying to make.
Please take a look at this example: https://3v4l.org/T4mI9#veol
This can happen when a developer forgets to add a second argument when calling printf().
It would be helpful if linters could alert developers about such cases.
I believe this applies to:

printf()
sprintf()
fprintf()
vprintf()
vsprintf()
vfprintf()

Ah, but that changes the feature request as the original example wouldn't throw a PHP error/warning (no placeholders), while the code you are posting now, would.
As this is a runtime error, not a compile time error, php -l (lint) will not detect this.
It is a coding error for sure, but I'm not sure it is typically something which should be caught by a CS run.
It also changes the focus of the feature request away from "performance" to "coding error".
If anything, I believe this belongs with PHPCompatibility to detect, as this is a change in PHP behaviour: a warning which is now an error.
Having said that, I'm not convinced this is reliably sniffable. Consider the following:

sprintf( $text ) - As the runtime error only occurs when the $text contains a placeholder and adjusts based on the number of placeholders, the sniff would need access to the $text to determine how many arguments are expected and whether there is an error. As the $text may be defined elsewhere and passed around, this is not always possible.
sprintf( 'text with %s', ...$replacements ) - Same story with $replacements, which may be passed around, but could also be an empty array, which would yield an error again.
Next, a function like vprintf() is not variadic, so yes, we could check that there are two arguments, though we'd then also need to take PHP 8 named parameters into account and again, the $text and/or $replacements may be passed in as a variable, so may not be analyzable as we may not be able to determine how many items are in the array.

Next, let's consider more generically the elevation of the argument count warning to error:

For a PHPCompatibility sniff, we'd then want to make sure we take all functions to which this error applies into account. While this will be a lot of work to research, it's doable, but the same considerations as I mention above will apply for other functions as well...

All in all, I personally think this is more something which belongs in the field of unit tests, though I'm not adverse to a sniff in PHPCompatibility, even though that sniff will probably be severely limited.

Thank you for your response, @jrfnl.

It also changes the focus of the feature request away from "performance" to "coding error".

From my point of view, the second code snippet simply better explains why calling sprintf() with one argument is bad.

Having said that, I'm not convinced this is reliably sniffable. Consider the following:

I fully understand that it's impossible to determine with certainty what is being passed to the sprintf() function as the first parameter and whether there are any conversion specifications. However, I wasn't suggesting that we try to do so. In fact, it's not necessary because calling sprintf() with one parameter is always problematic for the following reasons:

If there is one or more conversion specifications in $text, calling sprintf() will result in an error.
If there are no conversion specifications, then using sprintf() doesn't make sense since no formatting is necessary. In this case, $text can be used as is.

All in all, I personally think this is more something which belongs in the field of unit tests, though I'm not adverse to a sniff in PHPCompatibility, even though that sniff will probably be severely limited.
It is a coding error for sure, but I'm not sure it is typically something which should be caught by a CS run.

This issue has already caused some bugs, and unit tests were ineffective in catching them. Unfortunately, it's practically impossible to anticipate all cases and catch such errors with unit tests.

That is not something for PHPCS to safeguard against, as PHPCS cannot determine that arbitrary user provided input is being used. This is something which should have been caught in a code review.

Thank you for your response, @jrfnl.
I agree that it's probably a security risk (and I would add, an architectural issue).
But I still don't understand why PHPCS can't warn about it, since using *sprintf() with one argument is always bad. However, I won't push for this sniff anymore. :)
If there is any agreement about what should and shouldn't be in coding standards, I would be glad to familiarize myself with that information (for my better understanding).

If you want to do a one-time code base review, I can provide you with a list of *printf() calls with only one argument (which I expect to be small anyway), but I'm still not convinced this should be caught via a WPCS sniff.

I have tried searching for such function calls and regular expressions seem to work pretty well for this. But thanks for offering your help.


Move Landingpage & Storybook to Github Pages

Request
At the moment, our landing page is hosted in a separate repository and published from there. In order to unify the whole project and not have to do the hosting ourselves, we should use the possibility of Github Pages and have our storybook hosted there.
Description of the proposed solution

[ ] Create a public (?) repository for the landing page
[ ] Point the entry point of Github Pages to the output of the landing page app
[ ] Adjust the current workflow to load the most recent version of our Storybook to Github Pages
[ ] Remove the now unnecessary keys from secrets

Questions:

Do we need the current time machine feature?

If so, can this still be achieved with Github Pages?

Should the landing page be moved to the mono-repo?
Should we consider another cloud provider (Azure, ...)?

@pfecht Could you update the current status of this issue?


Consider straight edges

Currently the-graph draws "organic" curved edges:

In meemoo/dataflow we used edges with 45 degree angles:

This gave it a more "machine-like", and often cleaner look.
We could consider something like a hybrid of these, for example with edges that can only go at 45deg angles, but have rounded corners. That could fit well with the Tron-esque aesthetics.
This could be especially useful if autolayout noflo/noflo-ui#53 can give us edge bend coordinates

Check out the video called "Routing Highlights":
http://www.altium.com/altium-designer/features?field_ad_version_tid=All&tid=stress-free
Might be able to pick some ideas from there.

Chamfered Routing: http://techdocs.altium.com/display/ADOH/Chamfered+Routing


Weak hashing algorithm used for random number

In our testing we found
Weak hashing algorithm used for random number
in the class net/lingala/zip4j/tasks/AbstractModifyFileTask.java
could you provide any way to avoid this, or upgrade in the latest code,thanks

Close the issue due to PR merged
https://github.com/srikanth-lingala/zip4j/pull/448#event-6935484531


chore: upgrade Azure File CSI driver to v1.30.1 in vhd image

What type of PR is this?
/kind feature
What this PR does / why we need it:
chore: upgrade Azure File CSI driver to v1.30.1 in vhd image
Which issue(s) this PR fixes:

Fixes #
Requirements:

[ ] uses conventional commit messages

[ ] includes documentation
[ ] adds unit tests
[ ] tested upgrade from previous version

Special notes for your reviewer:
Release note:
none

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 82.077%

Totals

Change from base Build<PHONE_NUMBER>:
0.0%

Covered Lines:
2450

Relevant Lines:
2985

💛  - Coveralls


Raw forward index enhancement proposal

We would like to introduce a new format for raw forward indexes, which does not need a constant number of documents per chunk, instead partitioning columns based on uncompressed size. It is expected that this design will lead to:

less memory consumption when there are large values in a raw column
fewer chunks than when the number of documents is derived
more balanced chunk sizes than when the number of documents is derived
will provide support for realtime segments by breaking the dependency on column statistics for sizing

The format would be opt in for the foreseeable future.
Design document

Implemented in #7661, can be enabled with field level raw index version config.


Can't open settings JSON editor

I get this when I try, in the latest insiders

How are you opening it? Works for me

Fixed itself for me in next insiders.


Improve grid rotation

I implemented the requested changes, by improving the docstring of xorigin, yorigin and angrot.


Added accessibility support

This PR adds accessibility support, so the popover acts like a modal screen when used with assistive technologies. After the modal is dismissed, a notification must be sent to accessibility system, to correctly place the assistive cursor:

UIAccessibilityPostNotification(UIAccessibilityLayoutChangedNotification, nil)

Thanks! nice PR.


feat: qr code detector frame

adds qr code detector frame support in qr scan activity
also simplifies qr scan contract

fixes #146

@iamareebjamal please review.
Most of the QR scan activity stuff shifted in onCreate itself. Also removed interfere of the presenter from only view dependent stuff.

@mejariamol If our implementation of MVP was perfect, we would have 0 "view dependent stuff", not even click handlers are allowed to be present in view. So this is not a good implementation. We are using dagger to make it modular. The only thing that will be needed here is to notify the graphics class about the barcode and already there is PublishSubject for it. Please improve this. Only a correct configuration is needed to make it fit into our paradigm.

@iamareebjamal sure. I will do it in current style.

@iamareebjamal please review

@iamareebjamal please review

@iamareebjamal updated. Please review.

@Shailesh351 @rohanagarwal94 @arp95 please review


Added a common nav and footer for all pages

Checklist:

[x] Have you followed the guidelines in our Contributing document?
[x] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
[x] Have you successfully ran tests with your changes locally?
[x] Have you added an explanation of what your changes do and why you'd like us to include them?

Issues Solved
Fixes #{80}


Remove unnecessary code in EntityDetailMapper

Noticed that EntityDetailMapper adds unnecessary line to additionalProperties.

After remove:

@planetf1 @davidradl Can we include this fix in 2.1?

We've already branched for 2.1 . We would only normally add any critical /big impact fixes / customer regressions at this stage. Though this is a bug, it's an evolving area for subject area which is in development, so I would suggest we just fix in master, and it will go out with 2.2
What is your reason for needing it in 2.1?
cc: @davidradl

@planetf1 I think master and 2.2 is fine

@immmus @planetf1 I think master and 2.2 is fine. This API is still evolving. When we have addressed the open subject area API issues , we should think about assessing and releasing the subject Area API. At that time breaking API changes would not be possible without an API version change. As we are not a released API I do not see any urgency for this - we release every month so it will be in a release in a month or so's time.

Okay

@davidradl It is okay or no?


fix: include libwayland-egl1 in stage-packages

For a descrition of what this PR fixes, please read #23, but this should fix it by including the library.

Looks good, thank you!


A 0px legend border becomes .5px instead

If you try to set the legend's border to 0px, it becomes .5px instead. This causes a faint border to appear around the legend's color, which is undesirable.
Making the label's color value fully transparent ("rgba(0,0,0,0)") fixes this in Chrome, but not Firefox.
Here's an example: http://codepen.io/anon/pen/GjRKLX
Here's that example, scaled 3x to make it more obvious: http://codepen.io/anon/pen/yaLBky
The reason why this occurs is because, when setting canvas's lineWidth property, "zero, negative, Infinity and NaN values are ignored" and instead replaced with a value of 0.5.
To avoid this problem, Chart.js shouldn't draw the border if the borderWidth is set to 0.

The issue can be fixed by checking the desired width:
if (itemOrDefault(legendItem.lineWidth, lineDefault.borderWidth) == 0)
{
    var isLineWidthZero = true;
}
else
{
    var isLineWidthZero = false;
}

and then using that to decide whether a stroke should be drawn:
if (!isLineWidthZero)
{
    ctx.strokeRect(x, y, boxWidth, fontSize);
}

Fixed in #3242


feat: peripheral device tidying

What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)

Cleanup during SOFIE-1330

What is the new behavior (if this is a feature change)?

Defines a better type for PeripheralDeviceSubType

Replaces the getExternalNRCSName method with a sofie setting for each ingest gateway.

Replace hardcoded documentation urls for gateways, to be defined by the gateway upon connection.

Utilise async/await in more gateway code

Refactoring of mos and playout gateways to reduce some duplicate code

This removes most places where Sofie has any handling of the INEWS and SPREADSHEET gateway types. A couple remain, which could be abstracted similarly in a later PR.

Other information:

Status

[ ] Code documentation for the relevant parts in the code have been added/updated by the PR author
[x] The functionality has been tested by the PR author
[ ] The functionality has been tested by NRK

Codecov Report
Patch coverage: 51.59% and project coverage change: -9.18 :warning:

Comparison is base (24a7fc0) 59.33% compared to head (2f02dc2) 50.15%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@              Coverage Diff              @@
##           release50     #906      +/-   ##
=============================================
- Coverage      59.33%   50.15%   -9.18%
=============================================
  Files            464      364     -100
  Lines          71036    50886   -20150
  Branches        3662     2199    -1463
=============================================
- Hits           42147    25524   -16623
+ Misses         28839    25335    -3504
+ Partials          50       27      -23

Impacted Files
Coverage Δ

...ackages/server-core-integration/src/lib/process.ts
32.35% <32.35%> (ø)

meteor/server/migration/X_X_X.ts
61.51% <41.11%> (-10.07%)
:arrow_down:

meteor/server/api/peripheralDevice.ts
54.90% <100.00%> (+0.14%)
:arrow_up:

meteor/server/systemStatus/systemStatus.ts
96.33% <100.00%> (-0.17%)
:arrow_down:

packages/server-core-integration/src/index.ts
100.00% <100.00%> (ø)

.../server-core-integration/src/lib/coreConnection.ts
79.50% <100.00%> (+0.74%)
:arrow_up:

... and 104 files with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.


twitter.com links not scraped

for example
https://twitter.com/IvankaTrump
doesnt get description , title or images, is this a known issue ?

What do you get? Please check the response and see if the site is blocking your request.
Where are you making the request from? Do you get the same result if you do the request from your local development server?

It doesn't work because Twitter renders the same blank static page for every response and then fills in the content with Ajax.

@carsonbaker not exactly, what @cgarre complains about is not being able to get the page description, and I'm able to do that from my development server:
page.description
 => "Los Tweets más recientes de Ivanka Trump (@IvankaTrump). Wife, mother, sister, daughter. Advisor to POTUS on job creation + economic empowerment, workforce development & entrepreneurship. Personal Pg. Views are my own. Washington, DC"

Now, it probably fails in production if Twitter bans the request based on the server IP, for example.

require 'metainspector'

url = "https://twitter.com/BillGates/status/1213158756915105792"

METAINSPECTOR_OPTIONS_WITH_USER_AGENT = {
  headers: {
    'User-Agent' => 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/80.0.3987.132 Safari/537.36'
  },
}

results_a = MetaInspector.new(url)
results_b = MetaInspector.new(url, METAINSPECTOR_OPTIONS_WITH_USER_AGENT)

puts results_a.best_title == "Bill Gates on Twitter" # outputs true
puts results_b.best_title == "Bill Gates on Twitter" # outputs false

Looks like Twitter does different stuff depending on the User-Agent. Obviously this isn't a bug with Metainspector, but I just wanted to give @cgarre an idea of what might be going on, and also make sure I wasn't crazy...

That's right @carsonbaker , thanks for the example.
Most often, using a custom User-Agent string to fake a browser is the solution. Docs for doing this are here @cgarre
https://github.com/metainspector/metainspector#headers


ReferenceError: process is not defined for process.env.DEBUG

I am trying to integrate this library with docusaurus, but without any luck. After building and running it in the browser I am getting the message
ReferenceError: process is not defined, which is true for in-browser processes. It seems that in some environments process.env.XXX is replaced by webpack but not in my case. Could you try to make this more portable to other environments?
It's this line here: https://github.com/PiwikPRO/react-piwik-pro/blob/1aeee733eebb17930be3948c140406b08b62c4fb/src/core/index.ts#L34

I also run into the same issue, but in my case it was because I migrated from CRA to vite.
This helped me: https://github.com/vitejs/vite/issues/1973

The best fix would probably be to have the debug flag be in the initialize function. It should be an optional parameter defaulting to false in order to maintain backwards compatibility.
I've fixed the issue by setting the IS_DEBUG to true using patch-package but this is not a good solution as I have to change the patch when I build to have debug be false.

Looks like this is resolved, thanks for the fix


Destination Generation fails if the first parameter is non-navigation argument with default value

Hi, i'm trying to add your library to my project, but destinations with viewmodel injection in the constructor doesn't work:
@Destination
@Composable
fun myScreen(
    viewModel: myViewModel = hiltViewModel(),
    myObj: myObj
)

and the autogenerated code has an empty parameter on myScreen():
object myScreenDestination : DirectionDestination {

    operator fun invoke() = this

    override val route = "my_screen"

    @Composable
    override fun Content(
        navController: NavHostController,
        navBackStackEntry: NavBackStackEntry,
        dependencyContainer: DestinationDependenciesContainer
    ) {
		myScreen(,
			myObj= myObj()
		)
    }

}

Thanks for your work!

HI @carlesaguilar1 ! Thanks for reporting 👍
I found a bug here :) It's not related to Hilt or view models.
I'll release a new version (1.1.5-beta) with the fix, then please recheck it on your side and let me know :)

@carlesaguilar1 can you please update your project to use 1.1.5-beta and retry?
Please let me know if that fixes your issue :)


Add links to new Kubernetes Slack

What type of PR is this?

Uncomment only one  /kind line, and delete the rest.
For example, > /kind bug would simply become: /kind bug

/kind documentation
[skip ci]
What does does this PR do / why we need it:
Adds updated documentation to the README and Community pages with
regards to the new Slack channel.
Which issue(s) this PR fixes:
N/A
PR acceptance criteria:
N/A
How to test changes / Special notes to the reviewer:
N/A
Signed-off-by: Charlie Drage<EMAIL_ADDRESS>

/approve

/lgtm


Offline support

I see that offline support was 'not yet' in February: http://stackoverflow.com/questions/14670394/does-firebase-allow-an-app-to-start-in-offline-mode
I created some simple offline support for now, but I'd really like firebase to handle this. Is this still on it's way?
Mkkl.
PS! Doing a Spotify app btw, seems to work as expected so far.

any updates ? thanks

This isn't the forum for questions about the SDK or Firebase's release schedule. Also, Firebase does not offer release dates to the public. Offline persistence is a top priority for us and under active development as we speak.

any updates ? thanks

No updates to share. As Kato clearly mentioned above, this is not the correct venue for these kinds of discussions. Once the web SDK has full offline support, there will be plenty of announcements and discussion.


Simple authentication (Wildcard sessions)

The idea is to allow the server to modify the context:
server.login = async function(username, password) {
   if (await invalidCredentials(username, password)) {
     return;
   }

   // `this.user` is persisted
   this.user = {
     username,
   };

   // The user is now logged-in!
};

server.getUserPosts = async function() {
  // `this.user` was set by a previous `server.login` call
  const {user} = this;

  if (!user) {
    // Not logged-in
    return;
  }

  // The user is logged-in!

  const posts = await db.getUserPosts(user);

  // ...
};

~~~ EDIT ~~~
What happens here is that Wildcard sets a first cookie with the value of this.user and a second cookie with a signature.

Cookie Name
Cookie Value

wildcard_user
{"username":"brillout"}

wildcard-signature_user
60a3939232aehua12031389e99d52977e1c282

The signature ensures that the cookie was set by the server.
Wildcard sessions can be used to easily implement any auth strategy:
// Username + password
server.login = function(username, password) {
  if (await invalidCredentials(username, password)) return;
  this.user = { username }; // Wildcard will automatically persist `this.user` by using HTTP cookies
};

// OAuth
server.oauthCallback = function(userProfile) {
   // At the end of the OAuth flow, we save the user information to the context object
   this.user = userProfile; // Wildcard will automatically persist `this.user` by using HTTP cookies
};

// Etc.

I've already implemented a first prototype which I'm currently using in production.

@Johnson444 We can implement this together, if that's something you'd be interested in doing. I've cleaned up the source code, it's now all TypeScript, and test coverage is close to 100% which makes developing super comfy.

https://github.com/reframejs/wildcard-api/pull/58#issuecomment-711412477

I'm curious, you mentioned a while ago using getContext to set cookies, are you still using that approach? What do you think of #59?
I'm only using it in a small inactive pet project, but yes. Besides putting data in the context from Express, I'm also putting functions it in. It works fine. I think it's nicer to assign the those functions to the context than to the server object. If you read the code you would think the functions are provided by the library, because server is imported from the library.

I would prefer to move Wildcard sessions to its own plugin/library, because I would prefer to handle those things myself, although it's definitely a nice idea to showcase Wildcard and have some authentication running quickly.

The plan is to actually integrate this with an interface that could eventually become a public API. For now the interface would be private but you're right maybe it should be exposed right at the beginning.

I think it's nicer to assign the those functions to the context than to the server object.

Interesting. So basically you prefer to define server endpoints dynamically on each API request, is that correct? Personally, I find it simpler to reason about static functions + a context object. But maybe you are seeing something I'm not seeing.

I think it's nicer to assign the those functions to the context than to the server object.

Interesting. So basically you prefer to define server endpoints dynamically on each API request, is that correct? Personally, I find it simpler to reason about static functions + a context object. But maybe you are seeing something I'm not seeing.

No, with "those" functions I don't mean the endpoint functions, but the helper functions to interact with Express, like setCookies() or getHeaders().

The getApiHttpResponse() function could be used to control the context:
import express from "express";
import { getApiHttpResponse } from '@wildcard-api/server';

const app = express();

app.all('/_wildcard_api/*', async (req, res) => {
  const context = {
    user: getAuthUser(req.headers),
  };

  const {url, method, body} = req;
  const {httpResponse, endpointResult, endpointName} = await getApiHttpResponse({url, method, body}, context);

  if( endpointName==='login' && endpointResult.success ){
    setCookies(req, endpointResult.user);
  }

  // `httpResponse` contains the HTTP encoded equivalent of `endpointResult`
  res.status = httpResponse.statusCode;
  res.type = httpResponse.contentType;
  res.send(httpResponse.body);
});

This gives full control over to the user.
@michie1 Would that work for you?

I would prefer to handle those things myself

Why? Are you using an Express middleware that does this for you?

@michie1 Would that work for you?

I would prefer to handle those things myself

Why? Are you using an Express middleware that does this for you?

Different applications need different types of authentication. I think it's better if Wildcard is providing an authentication option (as a plugin) and not enforcing anything. I'm using my own Express middleware function that puts helper functions in the context object.

Wildcard Sessions will be optional and you'll have more control over the context/auth than what currently is the case.

I'm using my own Express middleware

Can you imagine yourself removing your custom Express middleware and use Wildcard Sessions instead? If not, why not? You said you prefer to handle these things yourself and I'm left to wonder why :-).

Wildcard Sessions will be optional and you'll have more control over the context/auth than what currently is the case.

Cool.

I'm using my own Express middleware

Can you imagine yourself removing your custom Express middleware and use Wildcard Sessions instead? If not, why not? You said you prefer to handle these things yourself and I'm left to wonder why :-).

Well, I might use it for simple applications, but like I said, different applications need different type of authentication. Maybe I don't want to use a password for authentication, but I want have an login link send by email, use 2FA or SSO. It's difficult to compare wildcard sessions that is not there yet versus all the other existing options.

Wildcard Sessions only does session management; you can use it with any auth strategy:
// Username + password
server.login = function(username, password) {
  if (await invalidCredentials(username, password)) return;
  this.user = { username }; // Wildcard will automatically persist `this.user` by using HTTP cookies
};

// OAuth
server.oauthCallback = function(userProfile) {
   // At the end of the OAuth flow, we save the user information to the context object
   this.user = userProfile; // Wildcard will automatically persist `this.user` by using HTTP cookies
};

// Etc.

Instead of dealing with cookies you simply deal with reading/writing the context object.

I would suggest that if you're looking to check the authenticity of the cookie, a library like https://npm.im/@hapi/iron is the gold standard for this sort of thing. I see that my colleagues at Auth0 reach for this library for similar uses-cases.

I would suggest that if you're looking to check the authenticity of the cookie, a library like https://npm.im/@hapi/iron is the gold standard for this sort of thing. I see that my colleagues at Auth0 reach for this library for similar uses-cases.

Thanks for the pointer. Wildcard is using HMAC-SHA256 which is old, battle-tested, and assailed against by researchers. So we should be good here.


[ADP 1963] introduce read vector algebra

This PR aims to introduce an algebra for functions that can work in all eras. This is achieved with values that hold vectors of functions called EraFun.
Related to those vectors, there are values the functions can work on, which are expected to be in only one of those eras called EraValue.  EraValues are isomorphic to InAnyCardanoEra but are built internally in a way that makes them linked to the EraFun at the type level via KnownEras, which is a type-list of all known eras (6).
Internally we implement this with SOP primitives, NP for EraFun and NS for EraValue. This gives us quite some functionalities for free, i.e., application of EraFun to EraValue .
As a bit of effect of this library, we already apply it to Read.Tx for an EraValue and to serializeTx and deserializeTx as applications of EraFun .
Because this code is relevant to reading transactions  I'm putting it into the Read hierarchy, but the concept with a different type-list (latest eras only) could be useful for the Write counterpart.
I have

[x] add list of eras typelist
[x] defined EraValue to hold a value that can be in any era (similar to InCardanoEra)
[x] redefine Tx as EraValue
[x]  defined the isomorphism with InAnyCardanoEra
[x] defined  EraFun to hold vectors of functions for the different eras
[x] defined categorical composition and parallel composition for EraFun
[x] defined applicative instance for EraFun specialized to hold era independent values
[x] changed TxCBOR to be an EraValue
[x]  defined codec from CBOR to Tx as instances of EraFun
[x] fixed  the cascade of effects

Comments

Issue Number
ADP-1963

bors try

bors r+


Improve legend for Figure 1A

Figure Legend 1A could be improved. suggestion: a) make smaller, b) put under the Map and horizontal c) Potentially have a zoom for Europe now that there are many lines between European countries.

Moved c) to #6, rest is done


typo in JSON

Issue in help/edge/solution-specific/analytics/link-tracking.md
"webPageDetailsr" had trailing "r". Should be just "webPageDetails"

Resolved the issue, documentation is live here