[Core] Performance fixes in GameProfilingSystem and ChromeTracingProfileWriter

PR Details
Description
This is a continuation of #1953 to fix performance issues with the Profiler.
As part of this work I ended up producing #2049.
From #1953

Fix busy-wait in GameProfilingSystem and make surrounding code clearer.
Add manual flushing to the JsonWriter, so the internal buffer doesn't grow indefinitely and put it on the fast path by skipping validation.

Additionally:

Refactor GameProfilingSystem to extract all string formatting related logic into a private class GameProfilingSystemStrings
Modify a lot of formatting code to allocate less
Interchange between two different tasks in the GameProfilingSystem depending on the filtering mode
Add cancellation tokens to the Profiler subscribers
Remove semaphore lock from the Profiler in favor of ConcurrentDictionary with a flag checked using Interlocked
Move from Unbounded channels to Bounded to reduce allocation and incredible GC pressure
Add Task.Delay to consumption of events in GameProfilingSystem to further reduce allocation by waiting on channels

Related Issue
Closes #1953
Motivation and Context
The Profiler should be very efficient. After all if by measuring performance we decrease it, it's not a great system.
These changes aim to improve mainly GC pressure by minimizing allocations.
There's still further field for improvement that needs some deeper investigation - I was aiming to achieve perf parity between Fps profiler mode and CpuEvents -> it's close but there's still a bit of a difference. Furthermore there's still difference between measuring FPS without Profiling turned on and with.
Types of changes

[x] Refactoring
[x] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist

[ ] My change requires a change to the documentation.
[ ] I have added tests to cover my changes.
[ ] All new and existing tests passed.
[ ] I have built and run the editor to try this change out.

I don't think we have tests for the profiler, could you run those changes ? Also pinging @froce for review, let us know if you don't have time, I should have time to take a look as well.

I was running the game (Starbreach) with those changes to validate the allocations are reduced (using allocation tool in VS). Didn't mark the checkbox for the editor as I didn't invoke it, but will give it a try later.

I'm gonna try and create some BenchmarkDotNet samples to ensure my evidence wasn't incorrectly collected.

Benchmark description
I wanted to check there's a difference between bounded and unbounded channel for 1P, 1C scenario and what is the impact of including cancellation token on allocations.

Code
[MemoryDiagnoser]
[SimpleJob]
public class ProfilerBenchmark
{
    private static ProfilingKey ProfilingKey = new ProfilingKey("Test");

    private readonly Channel<ProfilingEvent> boundedChannel = Channel.CreateBounded<ProfilingEvent>(new BoundedChannelOptions(short.MaxValue)
    {
        SingleReader = true,
        SingleWriter = true,
        FullMode = BoundedChannelFullMode.DropWrite,
    });

    private readonly Channel<ProfilingEvent> unboundedChannel = Channel.CreateUnbounded<ProfilingEvent>(new UnboundedChannelOptions
    {
        SingleReader = true,
        SingleWriter = true,
    });

    private readonly CancellationTokenSource CTS = new();

    [Params(1000, 10_000)]
    public int N { get; set; }

    /// <summary>
    /// Reads events from the stream, uses in a calculation and returns a result to ensure the compiler doesn't optimize out relevant parts.
    /// </summary>
    private async Task<TimeSpan> Consume(ChannelReader<ProfilingEvent> eventReader)
    {
        TimeSpan sum = default;
        int i = 0;
        // await foreach (var e in eventReader.ReadAllAsync()) // without cancellation token
        await foreach (var e in eventReader.ReadAllAsync(CTS.Token))
        {
            sum += e.ElapsedTime;
            if (++i == N) break;
        }
        return sum;
    }

    private void Produce(ChannelWriter<ProfilingEvent> writer)
    {
        for (int i = 0; i < N; i++)
        {
            writer.TryWrite(new ProfilingEvent(1, ProfilingKey, ProfilingMessageType.Begin, default, default, 1, null, default));
        }
    }

    [Benchmark]
    public async Task Bounded()
    {
        Task consumer = Consume(boundedChannel.Reader);
        Produce(boundedChannel.Writer);
        await consumer;
    }

    [Benchmark]
    public async Task Unbounded()
    {
        Task consumer = Consume(unboundedChannel.Reader);
        Produce(unboundedChannel.Writer);
        await consumer;
    }
}

Machine
BenchmarkDotNet v0.13.10, Windows 10 (10.0.19045.3693/22H2/2022Update)
AMD Ryzen 5 2600X, 1 CPU, 12 logical and 6 physical cores
.NET SDK 8.0.100
  [Host]     : .NET 8.0.0 (<IP_ADDRESS>103), X64 RyuJIT AVX2
  DefaultJob : .NET 8.0.0 (<IP_ADDRESS>103), X64 RyuJIT AVX2
  Job-LYCRLG : .NET 8.0.0 (<IP_ADDRESS>103), X64 RyuJIT AVX2

Runtime=.NET 8.0

Without cancellation token

Method
Job
Toolchain
IterationCount
LaunchCount
WarmupCount
N
Mean
Error
StdDev
Allocated

Bounded
DefaultJob
Default
Default
Default
Default
1000
459.7 us
20.31 us
59.88 us
822 B

Unbounded
DefaultJob
Default
Default
Default
Default
1000
128.9 us
2.47 us
2.31 us
838 B

Bounded
DefaultJob
Default
Default
Default
Default
10000
4,797.2 us
230.61 us
679.96 us
802 B

Unbounded
DefaultJob
Default
Default
Default
Default
10000
1,119.2 us
9.72 us
8.62 us
841 B

With cancellation token

Method
Job
IterationCount
LaunchCount
WarmupCount
N
Mean
Error
StdDev
Allocated

Bounded
DefaultJob
Default
Default
Default
1000
418.9 us
15.79 us
46.56 us
1050 B

Unbounded
DefaultJob
Default
Default
Default
1000
126.1 us
2.48 us
3.48 us
941 B

Bounded
DefaultJob
Default
Default
Default
10000
4,949.8 us
318.49 us
939.09 us
8028 B

Unbounded
DefaultJob
Default
Default
Default
10000
1,141.3 us
16.94 us
15.85 us
946 B

Is this ready for merge ?

No, it needs further work. Might need to convert it to draft for now


Added support for s3a URLs

This resolves https://github.com/RaRe-Technologies/smart_open/issues/210

Thanks for PR @mpenkov, is it really works? I'm confused a bit because you just allow other prefixes and don't change other code


Detect .babelrc

.babelrc is Babel configuration file in JSON 5 format.

Please see the guidelines to add support for a new extension to Linguist. In particular, notice the requirement on in-the-wild usage.

@pcantrell I'm sorry. Search results are here.


SSL file upload

Hi,
I had build meracat on current arch linux and it seems to be working well. But when I try to upload file with ssl enabled I receive only random mess of data with no boundary. To me it looks like it did not get deciphered or it is compressed. If i disable ssl everything works fine.
I tried to dig into source code, but I am unable to find where it gets messed up. Could you please point me to right direction where to look or help me to solve this problem.
Thanks for your time.
Vojta

Hi!
The HTTPS support is still farily new (and yet unreleased).  I've been meaning to get back to Merecat to finalize the support so I can start testing letsencrypt.  Would be great to get some help looking into this! :-)
I guess you mean CGI upload, right?  That code path is in src/libhttpd.c, likely the cgi_child() function handles this.  Not really sure I got around to inspecting that, could be that the forked child doesn't inherit the SSL socket, or that I've just forgot to add the correct wrapper methods. You can add some more syslog(LOG_DEBUG, ...) calls to help track it down further, use -l debug, to enable debug messages in the log.

Thank, you for your response. Yes I mean CGI upload. I looked into cgi_child(), but I am unable to find it.
At least I have some observations that could be helpful:

regular post of form data arrives to CGI without any problem.
file upload gets mangled but first three bytes are still the same no matter the file content:
\0x17\0x03\0x03 rest look to me like it is still encrypted.

OK, it's on line 3665 in src/libhttpd.c
Do you have an example CGI and config file, if any, I can test with?

Hi,
I meant that I can't find the bug, not the function :). Here is my basic shell CGI. There are two forms one with file input and second with basic text input. When I set ssl=false both works like expected, when I turn ssl on only text input works like expected.
merecat.conf
ssl = true
port = 8443
certfile = certs/cert.pem
keyfile  = private/key.pem

directory = /tmp/www

send.sh
#!/bin/bash

echo 'echo "Content-type: text/html"
echo

<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

    <form method="post" action="/cgi-bin/recieve.sh" enctype="multipart/form-data">
        <input type="file" name="file_data" />
        <input type="submit" />
    </form>
    <form method="post" action="/cgi-bin/recieve.sh">
        <input type="text" name="test" />
        <input type="submit" />
    </form>

'

recieve.sh
#!/bin/bash

if [ "$REQUEST_METHOD" = "POST" ]; then
    DATA=$( head -c $CONTENT_LENGTH )
fi

echo 'echo "Content-type: text/html"
echo

<!DOCTYPE html>

	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">

        Data recieved

        '"$DATA"'

        back

'

echo "$DATA" > /tmp/data

It was a bit ambiguous what you meant :-)
Thanks for the CGI and .conf, I'll have a look at it tomorrow or during the weekend at the latest!

OK, finally managed to reproduce your problem.  Had some trouble setting up a working self-signed cert with the latest firefox/chrome.
I think I've found the problem.  When in SSL mode Merecat uses the internal functions  httpd_ssl_write()  and  httpd_ssl_read() which are wrappers around the file descriptor to do the SSL magic.  However, the CGI is a forked off process that writes raw data to the file descriptor.
This is bad news since it means there's potentially a lot of work to get HTTPS working with CGI. I'll see what I can do, currently thinking about setting up a pipe() between the CGI child and the parent process, but it's likely gonna take me a while to get around to since i can only work on Merecat on my spare time.

Heh, funnily enough I may have fixed it! :-)
Turns out 1) there already was a pipe() and pre/post-processing of CGI, 2) when in SSL mode we read a LOT (all?) of data pre-processing, so all I had to do was to change a comparison > to >= ... works for my test case.
Love to head back from you if this fixes your problem as well.

Yes it seems to fix my problem too :). Thank you.

Awesome, thanks for getting back! (closing issue)
What remains (for me) before the next release is adding support for HTTPS and HTTP at the same time, with automatic redirect if so configured. Should be fairly straight forward, but unfortunately not prioritized atm. Hope you can make do with the current GIT master.

Thanks for fix. HTTPS and HTTP at the same time would be really nice, but I am ok with current master :).
I have one more question, is it intended to print stderr to web?

OK, great!
You mean from a cgi? Yes, I believe so. You'll have to redirect stderr yourself in the CGI. Either with syslog(), in C/Python, or maybe with logger, in shell scripts.


TLUL mem access gets stuck when there is a protocol error

seems like this PR #6994 makes a_ready always low when we issue an TLUL mem access with an error.
We removed error_internal in the code below, and gnt_i is always 0 if error_internal is set. So, a_ready is always low if error_internal is set.
a_ready : (gnt_i | error_internal) & reqfifo_wready & sramreqfifo_wready
// req_o is the same wire as gnt_i
https://github.com/lowRISC/opentitan/blob/4a7399f552e5c3c410db3060ee07e106d9e48fed/hw/ip/tlul/rtl/tlul_adapter_sram.sv#L187
we can reproduce this by running test spi_device_tl_errors with seed=1, or any *_tl_errors in the IP which contains a memory.
@sriyerg @cindychip

Oops, that's definitely my fault. I'll take a look tomorrow if no-one else fixes it in the meantime.

Oh! This is an easy fix: the gnt_i signal in spi_device was set to equal req_o for some reason. Just set it to 1'b1. Happy to file a PR tomorrow, but it might be worth just fixing immediately.

Oh! This is an easy fix: the gnt_i signal in spi_device was set to equal req_o for some reason. Just set it to 1'b1. Happy to file a PR tomorrow, but it might be worth just fixing immediately.

I tried to tie gnt_i to 1 and it works for spi_device. tlul_adapter_sram is used in many blocks, like otbn, otp_ctrl etc, and they all have a similar issue. Not sure if we can apply this fix for all the blocks. In some blocks, gnt_i isn't just simply connected with req_o.

hmm... should we consider reverting this?
it seems we have a fair number of cases where the grant signal is some version of req & blah logic.
So in the error scenario where req never goes high, the grant never goes high either.
While it's tempting to say that we should probably just remove req from most of these it'd be fine, in cases there is arbitration downstream (not sure if there is), it could become a problem.
In hindsight, since error internal is really meant for errors seen by the adapter directly, it's probably better to not depend on downstream behavior for correct behavior (especially when we don't assert request).
If we are worried about timing, maybe it's better to internally register the error internal and ack the transaction the next cycle instead of the way we are doing now.
Let me know what you guys think.
@eunchan
@msfschaffner

Was there a particular reason why error_internal has been removed in the first place?
I am with @tjaychen here in that this error path should probably be made independent of the downstream logic. the interface is req/grant, and requiring that grant be returned without a req going high in the first place is violating the interface protocol.

You're right. Let's revert that patch and then (maybe) follow up with a rename to rdy/vld if we get around to it.


Update c++ standard

Moveit2 cxx standard is c++17 https://moveit.ai/documentation/contributing/code/ but  pre-commit-config.yaml  use c++14.
Description
Please explain the changes you made, including a reference to the related issue if applicable
Checklist

[ ] Required by CI: Code is auto formatted using clang-format
[ ] Extend the tutorials / documentation reference
[ ] Document API changes relevant to the user in the MIGRATION.md notes
[ ] Create tests, which fail without this PR reference
[ ] Include a screenshot if changing a GUI
[ ] While waiting for someone to review your request, please help review another open pull request to support the maintainers

I think if you want to update the clang-format version to 17, you may need this CI job to run in ubuntu 24.04.
Also, this upgrade cannot really happen for all the Humble tests because those are tied to 22.04.

..fixed. ubuntu 20.04 use clang 15.

While clang version 15 is available on Ubuntu 22.04, it's not really the standard version as shown here: https://launchpad.net/ubuntu/jammy/+package/clang-format
So I might suggest to keep it at version 14 for all 22.04 jobs, and whereas 16 and 18 can be used for 24.04 jobs.
But if you want to keep around the pre-commit updates and small linting fixes, I'd be OK merging those.


WIP: Support edge runtime in self hosted TinaCMS

use more specific imports to code split out node stream apis

This will require more work then what has been done in the PR.
See https://github.com/tinacms/tinacms/issues/4363 for more info.


Unable to start with iOS Folio Reader /Swift3/Xcode 9

I am a newbie to Xcode and through various youtube videos I was able to install Cocoapod in my xcode and have also downloaded and installed the foliokit but when I started implementing the example code to get started, xcode is saying No such module 'FolioReaderKit' although I have included it as described. Can anyone please help me? is it because of Xcode 9 or Swift 3? Would be really thankful for the help.

please see the screenshots..

@hebertialmeida Your help needed sir.

you need to open the .xcworkspace that cocoapods creates not .xcodeproj


Issue in Release Mode

Hi, I managed to make the plugin work fine while in debug mode. Anyhow, as soon as I turn the app in release mode (even running "flutter run --release") on Android I get the following error, with the very same configuration and parameters as before: "Siamo spiacenti ma l'operazione non e' andata a buon fine. Per ulteriori informazioni, ti preghiamo di contattare l'esercente presso il quale stai effettuando il pagamento". Can't get what this issue depends on.
Thank you very much

I solved by signing the app. It doesn't work without the keystore.


Added Day 17 in Rust

@Derek52 I checked Day17 on hackerrank and it doesn't show an option for rust language to solve this problem.

can you pick another problem? looks like there is a limited number of problem that can be solved using rust.

let me know once will close this PR after your response.

I'll look at other problems, go ahead and close this PR.

@Derek52 okay, just make sure to check if the option to solve in rust is present for the problem you are picking up on hackerrank. also let me know the problems for which the option is not available when you go through thee questions.


Issues related with tests setting up on Windows

enable tests on windows
In this PR we are actually using  batch to trigger batch file in jenkins,  which means we have to separate  windows story from other platforms.
With build story getting complicated it is a kind of pain to maintain different stories. There are examples of build jenkins jobs on windows with cygwin, which could  align the windows story with the other platforms openj9 tests adoptopenjdk windows build
Not sure the exact jenkins build environment difference between our test windows machine and the machines mentioned before.  However default command line is not cygwin, probably extra setting are needed either in jenkins setting up or in jenkins build file. Looking are adopt build story may help.

To running some regression tests we need cygwin environment. Eclipse openj9 require cygwin as prerequisites. adopt jdk build use shell script to trigger build . Some regression tests are shell script, which also need cygwin on windows https://ci.adoptopenjdk.net/view/all/job/Grinder/39/console.

Further tested this by running get.sh on wins machine in OpenJ9 Jenkins and the test runs fine with minor change.
https://ci.eclipse.org/openj9/view/Test/job/Test-sanity.functional-JDK8-win_x86-64_cmprssptrs/29/
https://github.com/AdoptOpenJDK/openjdk-tests/pull/460
This issue is blocking us to switch to use AdoptOpenJDK test pipeline on wins in OpenJ9 Jenkins. https://github.com/eclipse/openj9/blob/5e482173e62fc430ddcfadcbe57c0b6df04e8202/buildenv/jenkins/common/pipeline-functions#L171

@llxia - we need to raise machine configuration requests as issues in the openjdk-infrastructure repo, I raised this one: https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/378  - you may want to add a note or query to it to raise the priority.

Configuration of win2012r2-x64-1 works well. Close this one, issue is tracked in AdoptOpenJDK/openjdk-infrastructure#378

@sophia-guo https://ci.adoptopenjdk.net/computer/test-packet-x64-windows-2012r2-1/ is still offline. Can it be brought back online?

@gdams Looks like the issue in AdoptOpenJDK/openjdk-infrastructure#378 is not updated so I don't think we can bring the machine back online.


django-extensions version 1.5.0

Hi @ocefpaf @kwilcox,
I would like to add django-extensions 1.5.0 to the feedstock. Could you tell me where I should push the recipe to?
Best,
Andreas

Just send a PR targeting master and I can create a branch for it later.

Perfekt, thanks :)


Associate eps with their levels

It might be interesting to associate them with has_many and belongs_to relationships to access them quicker and cleaner, as opposed to the verbose SQL command that is now being used. Though this might involve a tedious rebuilding of the database.

Oh, yeah, I see what you mean. For sure, I agree that would be way cleaner, and it makes semantic sense for the levels to 'belong to' an episode.

Late update for anyone following progress in this fork:
Addressed in https://github.com/edelkas/inne/commit/8965269132c301d8d181d96080c04d081a44c6a4 on 27 Nov 2020


Cleanup CLI flags and options for InfluxDB 3

Use case:
A better user experience tailored towards InfluxDB 3 OSS version
Proposal:
Roll our own clap_blocks crate for OSS
Current behaviour:
Currently we have clap options set by reusing clap_blocks from IOx and it reflects so in the comments which can be confusing and it includes many options we do not need for OSS that can make it hard for users to discover what options are available to them.
Desired behaviour:

CLI options with help text specific to the OSS version
CLI options that contain only the necessary flags for OSS
Removal of clap_block dependency from core

Alternatives considered:
We can also just do them inline in influxdb3 or not at all. With internal feedback however this is considered confusing and verbose and not doing it all is not as viable an option as other users are likely to experience the same confusion.

I think we can just copy the relevant parts that we need from clap_blocks and rewrite them or pare the options down a bit.


Support for Google Dialogflow

Add support for natural language/conversations using Dialogflow.
There's currently a "natural" plugin but it does nothing interesting. It would be interesting to have an actual natural language agent tied to it.
Using dialogflow through NodeJs is trivial:
https://www.npmjs.com/package/dialogflow

This is complete.


Code property for DotSpatial.Projections.GeographicInfo

Feature description
I noticed in the DotSpatial.Projections.GeographicInfo there is a Name property, but no Code or Authority.Code property.
In my particular use case I'm reading shapefiles with associated projection files (.prj) and would ultimately like to verify the geographic coordinate system and take actions according to what I'm reading there.
I find it much simpler to depend on an unique integer value (ex.: 4326) rather than on a string that's not guaranteed to be consistent (ex.: "WGS_1984" could be "WGS 84" or "WGS_84" or another format).

The Map Projection pop-up form has a translator but it looks like its from an EPGS code to a projection string. Take a look at the code for this part and see if there is a function for the other way.

Being able to access to the geographic coordinate system authority code in some manner is not really that much of a problem. I ended up using ProjNet's `CoordinateSystemWktReader' by re-reading the projection file associated to each shapefile.
The problem I'm trying to demonstrate is when you open a shapefile that has a geographic coordinate system with an AUTHORITY entity and you try to access the authority code of that geographic coordinate system, that information is simply not there.
Here's an overview of what I'm doing that further highlights how I think this feature could be beneficial:
I have these two files :

Streets.shp
Streets.prj

Streets.prj contains the following string:
GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433],AUTHORITY["EPSG","4326"]]
I open the Shapefile:

var shapefile = Shapefile.OpenFile("/Path/To/Streets.shp"));

I access its geographic information:

var geoInfo = shapefile.Projection.GeographicInfo;

...and at this point, geoInfo doesn't have the authority code, which I would expect to be 4326.

By taking a look at GeographicInfo.cs and Meridian.cs for example, there doesn't seem to be anything in regards to the AUTHORITY entities in their parsing methods. In the specific case of reading a Shapefile with an associated projection file, that information seems to be lost.


Problem with observer saving state of last mounted component instance

Hi all, I'm using mobx and mobx-react with React Native. I have a standard controller component that looks like this:
@observer
class MyComponent extends React.Component<{store: MyStore}, any> {
  componentDidMount() {
    console.log('MOUNT', this.props.store.id);
  }
  componentDidUpdate() {
    console.log('UPDATE', this.props.store.id);
  }
  render() {
    console.log('RENDER',  this.props.store.id);
    return (<Text>{this.props.store.id}</Text>);
  }
}

Every time this scene is mounted, a new MyStore() is created and passed to MyComponent as a prop. The first time I navigate to the scene, all is well - the store id (a guid()) renders correctly. If I then dismount this component (pop it off using react navigation) and re-navigate to it, the render function displays the PREVIOUS id value.
The strange thing is that the console.logs for MOUNT and UPDATE show the correct new id on second mount. Only in the render function is the old store referenced. Log output:
MOUNT id2
RENDER id1
UPDATE id2

Here are the steps I have tried to resolve so far:

Use the <Observer/> component instead. Same issue.
Use the non-decorator version of @observer. Same issue. I am using typescript so I thought it could be a problem with decorator compilation, but it seems not.
Binding the generated store (new MyStore) to the root store, as opposed to leaving it 'dangling'. Same issue.

I'd appreciate any guidance as to why the value of the prop would be different in the render function than in the other lifecycle functions. That would help me solve this problem.
Thanks!
Sam

If the new store instance is created and passed on every mount it should work out of the box without the need for @observer, because the update is caused by recieving new props and not by MobX. Does it work if you remove the @observer?

The specific issue of render having the wrong value does not occur when I remove @observer. But then, of course, my component does not react to changes.

@sampurcell93 best create a reproduction. To me it sounds like there are actually two instances of the same component, one getting reconciled and never rendered, or something like that. Is id property declared as an observable?

store.id is not declared as observable. But this is a reduction of the larger problem in my app, which occurs with ALL properties of MyStore (observable or not). And the problem persists when I mark id as observable. I suspect it has to do with react-navigation but nothing has turned up in my search for the answer :/.
I'll work on making a repo with this issue isolated.

Could it be possible that the new version of React would be upsetting mobx? Perhaps something in the reconciliation process has changed that breaks the lib. I am currently using<EMAIL_ADDRESS>I'll investigate but perhaps someone has encountered trouble.

This issue is resolved. It was a problem with the autobind-decorator package. Even when not using observer as a decorator, it seems that the autobind-decorator package conflicts and causes the described behavior. Be wary!


🤔 Typo in GitHub action workflow pushish.yaml

The workflow [.github/pushish.yaml] should be renamed publish.yaml

Oooops, thanks for pointing that out 😅


Bump xenial stemcell version to mitigate usn-4749-1 and bump cflinuxfs3

What
Bum xenial stemcell to 621.108 to mitigate USN-4749-1
How to review
Run down pipeline
Who can review
Not Me

🚨⚠ Please do not merge this pull request via the GitHub UI ⚠🚨

I'm going to add a cflinuxfs3 bump to this PR

Actually that was done in https://github.com/alphagov/paas-cf/pull/2606 :)


Typo "Azure container registry"→"Azure Container Registry"

https://docs.microsoft.com/en-us/azure/container-registry/container-registry-import-images
#PingMSFTDocs

@hyoshioka0128 : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Maven-publish plugin doesn’t work with Gradle 4.0-rc-1

Build fails with the following error:
A problem occurred configuring project ':android-standalone'.
> Could not resolve all dependencies for configuration ':android-standalone:alphaReleaseRuntimeClasspath'.
    > Exception thrown while executing model rule: PublishingPlugin.Rules#publishing(ExtensionContainer)
        > Could not get unknown property 'java' for SoftwareComponentInternal set of type org.gradle.api.internal.component.DefaultSoftwareComponentContainer.

In the build file, this happens in the following block:
publishing {
    ...

    publications {
        libraryJar(MavenPublication) {
            def name = 'library'
            from project(":$name").components.java

The error suggests that components.java can't be resolved, in fact, when I log components I get []. This works fine with Gradle 3.5.

The following works fine for me:
apply plugin: 'java'
apply plugin: 'maven-publish'

group = 'com.example'
version = '1.0'

publishing {
    publications {
        libraryJar(MavenPublication) {
            from components.java
        }
    }

    repositories {
        maven {
            name 'fileBased'
            url "$buildDir/repo"
        }
    }
}

Why can't use just use components.java instead of project(":$name").components.java? Maybe your path is incorrect there and the project that is resolved doesn't apply the Java plugin.

Yes, I will definitely re-check the setup. It's a multi-module project, and the main module tries to publish all its dependency modules and itself.

@Egorand Do you have any additional feedback here? I'd like to close the issue as I can't reproduce the problem.

@bmuschko haven't managed to investigate it further, but I'm pretty sure this is the problem with my configuration, which apparently was working in Gradle 3. Please feel free to close the issue.

Cool, fell free to open a discussion on the forum if you need further help.


[Question]Avoid having to use no non null assertion everywhere with Gatsby

It is my first time using graphql-codegen in a project, thank you very much for providing this tool.

I am working on a starter for Gatsby with typescript, and I am using graphql-codegen to generate the types for gatsby's graphql server.
It works well but all the fields are of type Maybe<T>, I am not sure why, the data is there in the API and is not null.
So in my code I have to add a lot of non null assertion like this:
  const {
    canonicalUrl,
    companyName,
    siteTitle,
  } = layoutQuery.site!.siteMetadata!
  return (
    <>

      {children}

        © {new Date().getFullYear()} Copyright{' '}
        {companyName} - All rights reserved

I feel it is a dirty way to handle this problem and I wonder if you have an advice for improving my code.
Describe the solution you'd like

A solution that feels right.
Describe alternatives you've considered

I tried to make the checks manually like this:
const siteMetadata = layoutQuery.site && layoutQuery.site.siteMetadata
  const companyName = siteMetadata ? siteMetadata.companyName : ''
  const canonicalUrl = siteMetadata ? siteMetadata.canonicalUrl : ''
  const siteTitle = siteMetadata ? siteMetadata.siteTitle : ''
  return (
    <>

      {children}

        © {new Date().getFullYear()} Copyright{' '}
        {companyName || ''} - All rights
        reserved

    </>
  )

But I feel it is very verbose.
Additional context

Here is a link to this code in the repository:
https://github.com/abumalick/gatsby-typescript-material-rebass-starter/blob/master/src/components/Layout.tsx#L23-L34
And here is the generated types:
https://github.com/abumalick/gatsby-typescript-material-rebass-starter/blob/master/src/types/gatsbyGraphql.ts#L2162
My config:
overwrite: true
schema: 'http://localhost:8000/___graphql'
documents:
  - ./src/**/*.{ts,tsx}
  - ./node_modules/gatsby-*/**/*.js
generates:
  src/types/gatsbyGraphql.ts:
    plugins:
      - 'typescript'
      - 'typescript-operations'
    config:
      avoidOptionals: true

I just found another workaround that is a lot better for me:
Set maybeValue to T instead of T | null
I will close the issue as I have my answer.
Your advices are very welcome through. I wonder if there is a very good reason to not do this.

I was wondering the same thing. Probably should have left the issue open.

It's a matter of the way you consume the types. The default behaviour generates Maybe when you declare a nullable type in your schema. It's not our choice to generate it, it just generates the reflection of your schema.
But, we do want to allow maximum flexibility for developers, so using T instead of T | null will workaround the existing behaviour - but note that it will effect your type-safety protection because if a field will be null and you'll try to access it as object - you'll get a runtime error.
The correct way to workaround this is to change your schema and reflect the real status of your fields - if it's a value that should never be null - add ! to your schema definition.

The problem is that when Gatsby automatically infers the GraphQL schema from the data it receives, it tends to define all types very loosely without the !. I had to explicitly define the schema with non-nullable types in order to avoid using the maybeValue: T and non null assertion workarounds in typescript. It was a lot of work, but it makes for a much more robust generation of query types.


Ready for release

Fixed some bugs and added a menu for LoRaWAN US915 and EU868

Agregue pre-commit al repositorio, tambien debe pasar la prueba porfa


Single character shortcut options fail on import

Using a single character shortcut option fail the import:
Does not work:
Anezka: Hi?
-> ?
Nela: what?

Does work
Anezka: Hi?
-> ??
Nela: what?

This feels like an issue with the compiler, so I'm moving it to that repo.

This feels like an issue with the compiler, so I'm moving it to that repo.


How to run the code

Hi Irfan,
Thank you for sharing the code.
I have several questions regarding this Matlab code.
In the first line of the code, it is mentioned that "% J integral for the static 3PB PMMA"; does it mean the example is the J-integral for pure mode I?
In the section "% evaluating the displacment derivatives" first some parameters are calculated, then a region is selected to calculate the derivative. Should it not be in the opposite way? First, the region containing data should be selected, and then the derivative should be determined. for instance, line 67 moves to line 62 for both u1 and u2.
Also, in line 110, in which parameter "e1m1" is calculated the average of e11 and up-down e11 is used. Why the same method is not used in line 62 to line 65:
u1m1 = u1 + flipud( u1 );
u1m2 = u1 - flipud( u1 );
u2m1 = u2 - flipud( u2 );
u2m2 = u2 + flipud( u2 );
What is the unit of the J-integral in your code? J/m^2?
The y label for the plot is 'SIF (MPa s^{1/2})'; s means millimeter or meter there? For instance, in frame 9, K2 is equal to 3.2 *10^4 MPa s^(1/2). This number seems irrational for PMMA if "s" means meter.
I am again confused since the 3pb means mode I test, which is mentioned in the first line of the code; the value of K2 is increasing.
I would appreciate it if you could provide here a clear example to help me understand your code more clearly.
Thank you.

Hi there,
To answer the questions,

All the units are in SI.
The spatial derivatives are taken after removing the asymmetric component (in this case, dispacement of the entire specimen). The function 'flipud' is used for that. The y-directional displacement is symmetric in Mode-1 fracuture.
Spatial derivatives (strains) are evaluated before deciding the area of interest to avoid the noise from the edges.
As you have mentioned, K2 should be zero for 3PB pure mode 1 load, the K2 present in the experiment is mainly due to the noise and the assymmetric area selection on the field.

Hope it helps.


[TOPI] Add GPU SSD

This PR adds the following ops:
nms including GPU sorting
multibox_prior for GPUs
and multibox_detection
Tests for individual ops can be found in topi/tests/python/test_topi_vision.py
@tqchen @kevinthesun @yzhliu @yidawang plz help review or comment, thanks!

Supporting vision operators for gpu is great. But it is less flexible with another copy of operators written with ir_builder. Is it possible to create schedules for IR? Or as suggested in #1322, vision operators should be migrated to use hybrid script? If these are not possible, a rewrite of the IR is fine.

We will migrate ssd related ops to hydrid frontend. IR builder version serves for a first stable version to support ssd on GPU.

@were @srkreddy1238 please review

Thanks @Laurawly for the contribution, this is now merged


Map does not watch for new features afer initial load

Hello Naimikan,
first of all: Thank you for your great work.
Today, I realized a strange behaviour: New features don't get displayed once the map has been painted.
For more information - see this Plunker (based on one of your examples):
https://plnkr.co/edit/qhRTztgEAZAhAijiOgM3
Have a great weekend
Tobi

Hi @Genericum!
Thank you for use my directive!
Yes, there was an issue, but I fixed it in version 0.34.1. If you change your current version of the directive, it will be solved.
Tell me if it worked!

It worked - thank you.


Update area path in tsaoptions.json

Updated area path in tsaoptions.json to cope with re-org changes.
A microsoft employee must use /azp run to validate using the pipelines below.
WARNING:
Comments made by azure-pipelines bot maybe inaccurate.
Please see pipeline link to verify that the build is being ran.
For status checks on the develop branch, please use TransportPackage-Foundation-PR
(https://microsoft.visualstudio.com/ProjectReunion/_build?definitionId=81063&_a=summary)
and run the build against your PR branch with the default parameters.
For status checks on the main branch, please use microsoft.ProjectReunion
(https://dev.azure.com/ms/ProjectReunion/_build?definitionId=391&_a=summary)
and run the build against your PR branch with the default parameters.

/azp run


Sync with (insert cloud service of choice)?

@unabatedshagie It is a great idea. I am developing a sync server and trying to sync with google drive.

google drive is 1st choice.

It provides an unlimited list sync service from v1.3.0. And also provide a way to save current list to google drive. You can have a try, and create a new issue if any problems occurred.
And it is welcome to share your new ideas.


martian plugin

Hi. I tried to write martian plugin for correlation id.
There is the link to the repo https://github.com/JaSei/krakend-martian-correlation-header/tree/implementation.
My implementation is based on https://github.com/kpacha/martian-components.
But if I start krakend, there are warnings around the loading of plugins and the martian plugin doesn't work. My feeling is martian plugins didn't load. Because the code of martian-components is 3 years old at least, it's possible the plugin system is changed and doesn't support now martian plugins?
log output maybe looks strange, because it runs in docker-compose
image: devopsfaith/krakend:1.4.1
krakend_ce_1   | [KRAKEND] 2021/10/07 - 16:26:12.874 ▶ WARNIN loading plugins: plugin loader found 1 error(s):
krakend_ce_1   | opening plugin 0 (/opt/krakend/plugins/krakend-martian_correlation_header.so): plugin: symbol ClientRegisterer not found in plugin github.com/JaSei/krakend-martian-correlation-header
krakend_ce_1   | [KRAKEND] 2021/10/07 - 16:26:12.874 ▶ INFO total http executor plugins loaded: 0
krakend_ce_1   | [KRAKEND] 2021/10/07 - 16:26:12.874 ▶ WARNIN loading plugins: plugin loader found 1 error(s):
krakend_ce_1   | opening plugin 0 (/opt/krakend/plugins/krakend-martian_correlation_header.so): plugin: symbol HandlerRegisterer not found in plugin github.com/JaSei/krakend-martian-correlation-header

...

krakend_ce_1   | [KRAKEND] 2021/10/07 - 16:26:12.880 ▶ ERROR {<nil> parse: unknown modifier: header.Correlation} map[github.com/devopsfaith/krakend-martian:map[header.Correlation:map[header_name:X-Correlation-ID]]]

thanks for advice

Thanks for explaining. I don't want to build my binary - this was the reasoning behind the plugin experiment. I'll pick another solution.
Thanks
Best regards
Jan


Using MD5 and SHA1 Digests from bouncycastle.

Here a proposal for #4641 - copied and modified version of bouncycstle lib.
This can be optimized even further by making it use a ByteBuf.
#4684 contains an unoptimized version, so you can compare

@CodingFabian should we close this for now ?

your call. I will work on this eventually. maybe even soonish. but if you prefer to keep your tracker clean go ahead and close it

Let me close this for now... You can re-open if you want to


Fix bugs in TimeDiscretization and enhance TimeDiscretizationInterface

See finmath-lib issue #58
We unify duplicate removal and tick size rounding in TimeDiscretization
Building upon that we define unions and intersections of discretizations
What is this PR for?
Unifying the handling of tick sizes and duplicates in the TimeDiscretization class in order to add unions and intersections to the TimeDiscretizationInterface.
What type of PR is it?
Bug Fix, Refactor and Feature
Todos

I would suggest revisiting retrieving the default tick size from a system property, as now it can be set when constructing the TimeDiscretization. It makes the thing harder to test and it might clash when two dependencies both use finmath with different tick sizes.

What is the related issue?
https://github.com/finmath/finmath-lib/issues/58
How should this be tested?
Unit tests are provided
Screenshots
Questions:
Does the licenses files need update?
NO
Are there breaking changes for older versions?
YES
If there was any reliance on duplicates or unrounded time points. I ran the whole unit test suite and it didn’t seem to be the case there.
Does the change require additional documentation?
NO

I had a very quick look, but looks to me as if the old constructor did a sort, but the new one does not. This might be an issue. Will check asap.

I will adjust the design changes later this day (asterisk import, tabs, missing Javadoc).
Regarding the tick sizes: I agree that it should be min for unions and max for intersections. I’m not sure how to reliably enforce that the tick sizes are integer multiples of each other for doubles, I guess I will not check and warn about it in the Javadoc like this: “If the tick sizes are not integer multiples of each other multiple operations might alter the time points, for example a.intersect(B.union(a)) might be different from a“.
What do you think about it?
Another possibility would be to remember the unrounded time points, but I guess at that point the user could remember it themselves and re-create a TimeDiscretization with a common tick size.

Your solution is fine. Remembering the original points sound good, but looks wasteful to me… lets don’t do it.
What do you thing about requiring tick sizes to be equal? The tick side is like a unit and you can union „days with days“ and „years with years“ but you are not allow to mix. (I would bet that we do not have the use case of different tick size, because here the tick size is just to have a robust definition of „equal“ the floating point times.

Am 13.07.2018 um 08:48 schrieb delreluca<EMAIL_ADDRESS>I will adjust the design changes later this day (asterisk import, tabs, missing Javadoc).
Regarding the tick sizes: I agree that it should be min for unions and max for intersections. I’m not sure how to reliably enforce that the tick sizes are integer multiples of each other for doubles, I guess I will not check and warn about it in the Javadoc like this: “If the tick sizes are not integer multiples of each other multiple operations might alter the time points, for example a.intersect(B.union(a)) might be different from a“.
What do you think about it?
Another possibility would be to remember the unrounded time points, but I guess at that point the user could remember it themselves and re-create a TimeDiscretization with a common tick size.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/60#issuecomment-404742623, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo8HzudGebaQzWHcas9bMC7eVxV6t5Kks5uGEK8gaJpZM4VNrBZ.

I think requiring the same tick size too restrictive. In many cases users
will not bother setting a non-default tick size. But if they do, they will
have to research these edge cases anyway, and they will find the answer in
the Javadoc.
Here is an example. Someone might reduce the tick size to do an intraday
volatility simulation with GARCH, but they want to use the simulated
volatilities in a Euler scheme with a coarser time grid where they don’t
specify a tick size. (Somewhat contrived example I admit)
On Fri 13. Jul 2018 at 09:11, Christian Fries<EMAIL_ADDRESS>wrote:

Your solution is fine. Remembering the original points sound good, but
looks wasteful to me… lets don’t do it.
What do you thing about requiring tick sizes to be equal? The tick side is
like a unit and you can union „days with days“ and „years with years“ but
you are not allow to mix. (I would bet that we do not have the use case of
different tick size, because here the tick size is just to have a robust
definition of „equal“ the floating point times.

Am 13.07.2018 um 08:48 schrieb delreluca<EMAIL_ADDRESS>I will adjust the design changes later this day (asterisk import, tabs,
missing Javadoc).
Regarding the tick sizes: I agree that it should be min for unions and
max for intersections. I’m not sure how to reliably enforce that the tick
sizes are integer multiples of each other for doubles, I guess I will not
check and warn about it in the Javadoc like this: “If the tick sizes are
not integer multiples of each other multiple operations might alter the
time points, for example a.intersect(B.union(a)) might be different from a“.
What do you think about it?
Another possibility would be to remember the unrounded time points, but
I guess at that point the user could remember it themselves and re-create a
TimeDiscretization with a common tick size.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/finmath/finmath-lib/pull/60#issuecomment-404742623>,
or mute the thread <
https://github.com/notifications/unsubscribe-auth/ADo8HzudGebaQzWHcas9bMC7eVxV6t5Kks5uGEK8gaJpZM4VNrBZ
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/finmath/finmath-lib/pull/60#issuecomment-404747012,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AiO6c-fWgc9Xkkdmql7hceioJFnHyzhbks5uGEgfgaJpZM4VNrBZ
.

Another thought on this:
Since tickSize is used to define the equivalent classes of „times“ I was thinking about the need to change it. Maybe  someone going intraday and someone going for end of day valuation would both be satisfied with „times are equal if they are equal up to the milli-second. That is tickSize is 1.0 / (365.0 * 24.0 * 60.0 * 60.0 * 1000.0). This is 3E10, leaving 1E5 years as the the highest possible time horizon. But since we are using IEEE754, best would be to have tickSize being a rounding of the mantissa only (which could be 10^-12 then). …

Am 13.07.2018 um 12:12 schrieb delreluca<EMAIL_ADDRESS>I think requiring the same tick size too restrictive. In many cases users
will not bother setting a non-default tick size. But if they do, they will
have to research these edge cases anyway, and they will find the answer in
the Javadoc.
Here is an example. Someone might reduce the tick size to do an intraday
volatility simulation with GARCH, but they want to use the simulated
volatilities in a Euler scheme with a coarser time grid where they don’t
specify a tick size. (Somewhat contrived example I admit)
On Fri 13. Jul 2018 at 09:11, Christian Fries<EMAIL_ADDRESS>wrote:

Your solution is fine. Remembering the original points sound good, but
looks wasteful to me… lets don’t do it.
What do you thing about requiring tick sizes to be equal? The tick side is
like a unit and you can union „days with days“ and „years with years“ but
you are not allow to mix. (I would bet that we do not have the use case of
different tick size, because here the tick size is just to have a robust
definition of „equal“ the floating point times.

Am 13.07.2018 um 08:48 schrieb delreluca<EMAIL_ADDRESS>I will adjust the design changes later this day (asterisk import, tabs,
missing Javadoc).
Regarding the tick sizes: I agree that it should be min for unions and
max for intersections. I’m not sure how to reliably enforce that the tick
sizes are integer multiples of each other for doubles, I guess I will not
check and warn about it in the Javadoc like this: “If the tick sizes are
not integer multiples of each other multiple operations might alter the
time points, for example a.intersect(B.union(a)) might be different from a“.
What do you think about it?
Another possibility would be to remember the unrounded time points, but
I guess at that point the user could remember it themselves and re-create a
TimeDiscretization with a common tick size.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub <
https://github.com/finmath/finmath-lib/pull/60#issuecomment-404742623>,
or mute the thread <
https://github.com/notifications/unsubscribe-auth/ADo8HzudGebaQzWHcas9bMC7eVxV6t5Kks5uGEK8gaJpZM4VNrBZ
.

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/finmath/finmath-lib/pull/60#issuecomment-404747012,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AiO6c-fWgc9Xkkdmql7hceioJFnHyzhbks5uGEgfgaJpZM4VNrBZ
.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/60#issuecomment-404790381, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo8H4Lx_JkKZuOe6-w6BqvTFQ5uXWsvks5uGHKggaJpZM4VNrBZ.

Hope the second commit resolves the issues.
Regarding changing the default to 1 millisecond, we could do that, but I guess that would be a different issue. By the way I’d also reconsider getting the default from the system property, as this seems a bad practice if the library is used as a dependency by two clients.

The properties file is an integral part of the distributed JA and a user has to actively overwrite that property. Why bad practice?

Regarding changing the default to 1 millisecond, we could do that, but I guess that would be a different issue. By the way I’d also reconsider getting the default from the system property, as this seems a bad practice if the library is used as a dependency by two clients.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/60#issuecomment-404928594, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo8H6kpwQYocWtMmnD-Dw749TAJtRxJks5uGPKkgaJpZM4VNrBZ.

Consider a Java program that depends on two other Java libraries A and B each depending on finmath.  They run on the same JVM. A sets the default tick size to 1 ms, but B sets it to 10 ms. Now the default tick size depends on the order A’s and B’s setProperty calls are executed.

I see the point.

Am 13.07.2018 um 22:44 schrieb delreluca<EMAIL_ADDRESS>Consider a Java program that depends on two other Java libraries A and B each depending on finmath. They run on the same JVM. A sets the default tick size to 1 ms, but B sets it to 10 ms. Now the default tick size depends on the order A’s and B’s setProperty calls are executed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/60#issuecomment-404948946, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo8H6WSVEHd2oLNkvGbTkf3hqmKHI78ks5uGQa2gaJpZM4VNrBZ.

I would favour a hard coded default, now that tickSize can be changed at construction.

Am 13.07.2018 um 22:48 schrieb Christian Fries<EMAIL_ADDRESS>I see the point.

Am 13.07.2018 um 22:44 schrieb delreluca<EMAIL_ADDRESS><EMAIL_ADDRESS>Consider a Java program that depends on two other Java libraries A and B each depending on finmath. They run on the same JVM. A sets the default tick size to 1 ms, but B sets it to 10 ms. Now the default tick size depends on the order A’s and B’s setProperty calls are executed.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub https://github.com/finmath/finmath-lib/pull/60#issuecomment-404948946, or mute the thread https://github.com/notifications/unsubscribe-auth/ADo8H6WSVEHd2oLNkvGbTkf3hqmKHI78ks5uGQa2gaJpZM4VNrBZ.

Me too, it fits with the new constructors. I’m not sure whether we should do it in this PR, though. If we change that line we might as well also change the default value itself as already suggested.
What’s your take on how changing the default (to 1 ms for example) might break existing code?

With respect to changing the default: My rule is that for revision a.b.c a change in c does not break code, a change in b does not break interfaces, but may lead to changes in behaviour and a change in a has massive changes in interfaces.  Changing the default is fine, but I would do a 4.3.0 release then. (Should be in a separate PR).  (Note: I have violated my own rule, but I try comply with it in the future).


ERROR in ./assets/js/core.js Module build failed: TypeError: Path must be a string. Received undefined

Hi - can you shed any light on the following which I get when running gulp?
ERROR in ./assets/js/core.js
Module build failed: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:390:24
 @ multi core

ERROR in ./assets/js/main.js
Module build failed: TypeError: Path must be a string. Received undefined
    at assertPath (path.js:7:11)
    at Object.dirname (path.js:1326:5)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:374:36
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:396:22
    at Array.map (native)
    at OptionManager.resolvePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:385:20)
    at OptionManager.mergePresets (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:369:10)
    at OptionManager.mergeOptions (/Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:328:14)
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:370:14
    at /Users/.../htdocs/wp-content/themes/dev/node_modules/babel-core/lib/transformation/file/options/option-manager.js:390:24
 @ multi main

getting same error

Had old npm version. Fixed when i installed node v4.6

@Ballpin nice! :) @larpo1 was the node version the issue for you as well?

Same error running initial gulp build after cloning
node: v7.0.0
npm: 3.10.9
gulp: 3.9.1

Fixed by upgrading babel-core to version 6.10.4 as referenced here

For future people here is what I ran to upgrade babel-core and related packages
ncu -u babel-core babel-eslint babel-loader babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2
npm upgrade babel-core babel-eslint babel-loader babel-plugin-transform-runtime babel-preset-es2015 babel-preset-stage-2

Where ncu is https://www.npmjs.com/package/npm-check-updates
Can the upgrade to babel-core be added to the project itself?

Upgrading babel seems like a fairly unwieldy option at this point (reconciling deps and plugins, webpack, etc). Downgrading node to 5.11.1 is way easier if a bit slow and.. old.


Fix import statement for MutableSequence

MutableSequence is now in collections.abc for python versions >= 3.9

Thank you for fixing that!


Building on postcss-log-warnings

@postcss/owners I've made some minor preliminary alterations to adapt postcss-log-warnings to this new name. Also, I changed the keepWarnings option to its reverse, clearWarnings, since people seemed to want that.
(For reference: the discussion for moving this was at https://github.com/postcss/postcss-messages/issues/17)
I could try to rewrite names and docs so that they're discussing "messages" more generically, rather than "warnings", specifically; but that might be kind of confusing since there are no other types of messages to give examples of, right? (Except errors, which this plugin is ignoring currently --- should it log them?)
Thoughts?

but that might be kind of confusing since there are no other types of messages

Any plugin might use some "debug" or "info" type (or even "error" - for recoverable error (eg: postcss-custom-properties will use "error" when a undefined variable is referenced)

postcss-console-log-messages is soooo long name :(. Wy not postcss-console-messages? Especially if you want to support not only log type.

why not. "log" was used to be clear that this plugin will display messages.

postcss-console-messages lgtm

Why not postcss-log or postcss-logger? Shorter still. :smile:

@ben-eb +1, I think that "log" word already means output to console

because you can show messages into terminal (console) or in the css (via postcss-messages).
Related: https://github.com/postcss/postcss-messages/issues/18

I think we should have some coherence between postcss-messages & postcss-log-warnings.
So something like

postcss-log-css + postcss-log-console
postcss-css-log + postcss-console-log
postcss-messages-css + postcss-messages-log
postcss-css-messages + postcss-console-messages

I'm not sure if there is any benefit to separating this out into two modules. postcss-log could build in support for both browser and console, or even custom functions. For example you could inject some function that would send out a message to AnyBar to change colour on warnings, errors, messages, etc.
If they must be two modules then I think I would like to see browser in the name of the module rather than messages which is too vague.

@ben-eb console and browsers output are very different in my opinion. There are many options only for browsers output. Also terminal and browsers output is about different user cases.

Those two modules does not share the same code I think (one append some css & the other output via console). That said, in the usage section of this module, we can see that the plugin that output into css might use it https://github.com/postcss/postcss-console-log-messages#usage
I have some stuff to push in postcss-messages so I think I will make a PR with the use of this module.
So what about

postcss-log-console & postcss-log-browser
postcss-console-logger & postcss-browser-logger

We can imagine to make a more abstract postcss-logger that doesn't do anything special without a function as an argument (runners might want to use this to display with their own methods (eg: Prepros app might want to use this))

@MoOx nice plan about common postcss-log. I like postcss-log-console & postcss-log-browser more, because it is shorter :).

@ai That is true, but I am just thinking about how Sass works by default; it will both emit an error in the console and write some warning in the CSS file itself. This way it is absolutely clear to the user that something went wrong.
@MoOx I like your second two ideas, postcss-console-logger and postcss-browser-logger. Perhaps we can write postcss-logger to consume both of those to mimic this Sass option. :smile:

@ben-eb do I remember correct, that Sass output only errors to CSS, not a warnings.

I think just errors, not warnings.

-logger make more sense to me than log-
Also for the we should have a postcss-logger that can consume reporter and return a string, that will be used by postcss-*-logger.
postcss-log-* might make sense but postcss-log is not at all. So I prefer the logger thing

Good point, I am OK with logger.

@MoOx :+1:

I'm :+1: for postcss-browser-logger and postcss-console-logger

These shorter names sound good to me.
@lydell added the section to the readme about using lib/processResult as a library because he wanted to then use that library in postcss-messages (https://github.com/davidtheclark/postcss-log-warnings/pull/10). If we wanted instead to have a new module that included the possibly shared code, I think it might postcss-stringify-messages or something; and it would have an options to add console colors via chalk and to clearWarnings when finished. Would we prefer to have this abstraction used by both -console- and -browser- loggers?
Another Q: If there are different types of messages being displayed --- if the console-logger shows errors, warnings, and any other type of message from any other plugin --- then should we change the format in some way? Should we log them all together but include the message's type in the readout? Or log separate sections: all warnings together, all errors together, all other messages together, etc.?

Maybe we should support reporter like lots of tool does ?

@MoOx This would be pretty sweet.

postcss-console-reporter
postcss-browser-reporter

I like the -reporter idea, too. How about combining that with postcss-stringify-messages, which both console and browser reporters would use?

Let's keep the naming simple & clear; the main module can provide the user with customisation of what log levels he/she wants, and can simply be called postcss-logger. It should then emit events which other modules can consume, such as postcss-console-reporter, postcss-browser-reporter, postcss-tap-reporter or postcss-json-reporter. That way output is easily configurable for usage in everything from browser environments to continuous integration testing.

Console & browser should be able to consume the reporters (which are just message formatters). Maybe formatter is a more accurate word.

I'm happy with formatter also. :+1:

Ok, so what I was calling postcss-stringify-messages you're calling a reporter, right? Which is: a module that takes the messages object from a postcss Result and outputs that information in some other format (whether string for console, XML for CLI, or whatever). Is that right?

Yes; essentially we are abstracting the logic of what to show in one module, and how that is shown in a reporter/formatter. :smile:

Hm. I'm still a little confused. Let's outline the proposed modules. Correct me if I'm wrong please:

postcss-console-formatter: formats messages to be read in the console
postcss-browser-formatter: formats messages to be read in the browser
postcss-logger: (this is where I feel unsure) consumes the formatters; end-users tell it how they want to log their messages, then it uses the proper formatter, makes that formatted info visible however the user specified (e.g. in console or in browser), optionally clears the messages so they won't be logged again.

Close?

@davidtheclark You can see an example of this architecture in my css-minifier tests repo. test.js contains the actual testing logic, then reporter.js just prints the result to console. You could swap out that reporter.js for something that went to the browser instead, for example.
https://github.com/ben-eb/css-minifier-tests

It's more

reporters (where): cli, browser, file...
formatters: default, stylish (see jshint/eslint), tap...

I was confused by thinking that you two were using reporter/formatter interchangeably, or deciding between those two terms. I'm still confused, though: are you two in agreement or not? Because @ben-eb's reporter.js both formats and reports. And that makes some sense to me, because if we format a string for colorful console output it's really not useful to "report" that formatted string anywhere except the console, right? It would really help if you would outline the modules that you imagine creating and how they would work together.

I will do that when I will be on my computer.
For a string that has been colored for console, we can strip color easily (webpack dev server do that when showing messages from terminal in the browser)

Yeah I think I may have got those mixed up. Here is another use case: https://www.npmjs.com/package/mocha-osx-reporter
So we need some main module to let the user decide which message/warnings/errors to display, then reporter modules to consume those messages and output them in a specific environment, and then optionally formatters to customise that display. Although I feel that those formatters are most likely only relevant to postcss-console-reporter. :smile:

So I am thinking about:

postcss-cli-reporter (or maybe just postcss-reporter)
postcss-style-reporter (because -browser- is to vague and a browser have a console - for example, webpack-dev-server reports console.log() in both cli & browser console) or maybe postcss-css-reporter (I admit this one sounds weird, even if it's accurate)
... postcss-notifier-reporter (we can imagine a crazy cross OS notifier using simple lib like https://www.npmjs.com/package/node-notifier, yes :D)
postcss-gnu-formatter (simple file:l:c: message)
postcss-stylish-formatter (like https://www.npmjs.com/package/jshint-stylish) (probably current postcss-log-warnings output)
postcss-*-formatter for people that would like their own formatter.

I think all formatter might add cli color, because most people will use the cli reporter. Then other reporter will be able to strip colors (using chalk or just https://www.npmjs.com/package/strip-ansi) to use the ouput.
Note that I would like to get verbose name like postcss-*-messages-(reporter|formatter) to be clear about what it is reporting, but I guess @ai will yell because modules names are too long... :)

:+1: To the ideas in this issue. Good thing I never started my plans from davidtheclark/postcss-log-warnings#10 :)

:+1: to @MoOx's plan. But I think browser is better than style. If people want to consume postcss-cli-reporter in the browser, that is fine; style doesn't make sense from just looking at the module name. I think even if browser is vague, it is better than style.

What about postcss-browser-style-messages-reporter ? Long but clear.
And for console reporter, maybe we should stick to postcss-console-messages-reporter ?

I think it is clear enough that postcss-cli-reporter is for the command line and postcss-browser-reporter is for the browser. If it is too long then people will not remember it. :smile:

Thanks for writing out that list. Sorry but I'm still unclear about the relationship between "reporter" and "formatter" -- because in all of the examples given so far the module combines both parts that it seems you're proposing we split up: the module takes an object in, turns it into a legible string, then "reports" that string in one way or another.
What, for example, would the output look like for postcss-cli-reporter if the user did not also include postcss-stylish-formatter? Or would postcsss-cli-reporter use postcss-stylish-formatter in the background all the time and the user won't need to know it's a separate module?

turns it into a legible string

That the formatter job.
All reporters will need to choose & use a default formatter.
See http://eslint.org/docs/user-guide/command-line-interface#f-format

The reporter should not turn something into a legible string - it simply consumes the PostCSS messages and emits events to its formatter, which returns a formatted string (in the case of postcss-cli-reporter), or some CSS styles (in the case of postcss-browser-reporter) which is then output accordingly.

Ok. So reporters all have a default formatter, but they can use different formatters if told to. I got it now. Thanks for bearing with me.
I will not have a lot of time for a week or two but would like to take on the cli-reporter and stylish-formatter, if that's alright with everyone.

Ok. So reporters all have a default formatter, but they can use different formatters if told to.

Exactly. :smiley:

So here is what I think we should do to go forward without making 10 packages:

rename this plugin to postcss-[messages-]reporter (no need for console/cli since it will be the most used/main package
rename postcss-messages to postcss-browser-[messages-]reporter
refactor postcss-browser-[messages-]reporter to use what it can from postcss-[messages-]reporter

Then after that we might want to :

directly include some formatters in postcss-[messages-]reporter
add a formatter option to both plugins to allow custom formatter

And maybe we can also do:

postcss-os-notifier-[messages-]reporter

I would like to see *-messages-reporter instead of just "reporter"  because some people might want to do linter or other plugins that might do some reporting using messages api (eg: postcss-oldcss-reporter that might want to add warnings when crazy old css has been detected - for example old ms filters); so I think "messages-reporter" is more clear on the purpose of the plugin.
If you find "messages-reporter" too long, maybe using "logger" seems a better idea, but I don't really like it anymore :)
I have some wip on that for cssnext I really want to push to communicate with cssnext users so I can probably handle some changes if @davidtheclark and @gazay are open too. Please let me know :)

I would like to see *-messages-reporter instead of just "reporter"  because some people might want to do linter or other plugins that might do some reporting using messages api (eg: postcss-oldcss-reporter that might want to add warnings when crazy old css has been detected - for example old ms filters); so I think "messages-reporter" is more clear on the purpose of the plugin.

@MoOx IMO, the purpose of this module is to be a singular source of displaying errors/warnings/messages from other PostCSS modules. So in this case, someone would write postcss-oldcss and then use PostCSS messages API to send the messages downstream to the reporter module. So I think it is not necessary to add messages to the module name.
The rest looks great. :+1:

Ok so I guess others will say the same.
I am ok for postcss-reporter and postcss-browser-reporter (the last one will have the first one as dep)

Sounds good.

Sounds like davidtheclark/postcss-log-warnings#10.

It does. I think the main changes from the log-warnings codebase would be:

processResult should be renamed defaultFormatter (or something) and should be replaceable with another formatter function (then another reporter like browser would use defaultFormatter as a lib)
non-warning messages need to be logged, as well (errors, and whatever else)

I also would like to improve the organization of the tests and do some integration tests in addition to the unit tests that mock postcss results.

@lydell I've had a couple of minutes to work on this and I thought of two possible changes that would affect that plan of using this as an library. I was thinking that maybe the division-of-labor would make more sense if the reporter were responsible for determining which messages get logged (reporter has the plugins option) and for clearing messages after they are logged (the clearWarnings option). That means the formatter would receive an already-filtered array of messages rather than receiving the original PostCSS result. It also means that if other modules used that formatter, they would not also get the plugins and clearWarnings functionality built in. Again, the reason I think this division makes sense is because in my mind it seems that the formatter should only be responsible for transforming data to a string, not for filtering the data or mutating it.
What do you think? Any other @postcss/owners have opinions?

the reason I think this division makes sense is because in my mind it seems that the formatter should only be responsible for transforming data to a string, not for filtering the data or mutating it.

I totally agree

@MoOx @davidtheclark Yep, agreed. This is how tape works; it always outputs an unformatted standard output. It is up to formatters to make that look pretty (or do something else with it). :smile:

I just published v0.1.0. Feedback welcome!


Security Vulnerabilities - Dependencies Need Updating

Need to run an npm audit and fix.
I did a quick test pull and audit and I think all but one of the vulnerabilities have automatic fixes.

Last issue dependent on gatsby updating the references to their dependencies.
Gatsby Issue

This last issue looks like it's fixed with the latest gatsby patch I rolled into PR


flutter-engine: do_rm_work failed: some vpython files have no write perm

If INHERIT += "rm_work" is specified in conf/local.conf, flutter-engine will cause the error in do_rm_work.
...
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/activate.fish': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/easy_install-3.8': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/python3': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/pip': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/python': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/activate_this.py': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/wheel': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/bin/pip3': Permission denied
| /workdir/build/tmp/hosttools/rm: cannot remove 'vpython/822d6b/include/python3.8': Permission denied

This is because some vpython files have no write permission like the following.
$ ls -l vpython/822d6b/bin -l
total 18084
-r--r--r-- 1 pokyuser docker     2154 10月 31 12:19 activate
-r--r--r-- 1 pokyuser docker     1096 10月 31 12:19 activate.csh
-r--r--r-- 1 pokyuser docker     2250 10月 31 12:19 activate.fish
-r--r--r-- 1 pokyuser docker     1137 10月 31 12:19 activate_this.py
-r-xr-xr-x 1 pokyuser docker      463 10月 31 12:19 easy_install
-r-xr-xr-x 1 pokyuser docker      463 10月 31 12:19 easy_install-3.8
-r-xr-xr-x 1 pokyuser docker      435 10月 31 12:19 pip
-r-xr-xr-x 1 pokyuser docker      435 10月 31 12:19 pip3
-r-xr-xr-x 1 pokyuser docker      435 10月 31 12:19 pip3.8
lrwxrwxrwx 1 pokyuser docker        7 10月 31 12:19 python -> python3
-r-xr-xr-x 1 pokyuser docker 18471128 10月 31 12:19 python3
lrwxrwxrwx 1 pokyuser docker        7 10月 31 12:19 python3.8 -> python3
-r-xr-xr-x 1 pokyuser docker     2552 10月 31 12:19 python-config
-r-xr-xr-x 1 pokyuser docker      442 10月 31 12:19 wheel

In all my tests today, I had INHERIT += "rm_work" defined in local.conf, for all cases.  I was building with podman and container.
how do I get a repro?

Also what branch?

@jwinarske
I used the dunfell branch.

The same error happened in kirkstone branch also.
I will open a PR to avoid this error.

This issue happened recently, but, we have not updated the revision of meta-flutter for 3+ months.
So, I think this issue may be derived from some Google changes.
Perhaps, there may be some missing factors to be fixed for the long term support, maybe, in depot-tools and gn build tools.
I have seen the similar issue (no write perms for installed files) when I handle a recipe using Bazel.
So, depot-tools/flutter-engine might start to use Bazel to fetch vpython.

Unfortunately, The only way to avoid the issue is to run chmod in the case of Bazel.

https://github.com/meta-flutter/meta-flutter/pull/604

@WAKazuyoshiAkiyama
On scarthgap I run CI using INHERIT += "rm_work" on rootless podman.
If you allow write access to $HOME then it will mask container contamination during build.  Rootless podman does not allow $HOME write access.  If you are not running rootless build, I recommend you switch.
I made a recent change in scarthgap which resolves vpython issue (using latest depot_tools); the directory (VPYTHON_VIRTUALENV_ROOT) has to be created.  I will investigate further.

@WAKazuyoshiAkiyama Issue should be resolved with https://github.com/meta-flutter/meta-flutter/pull/589.  Please check

@WAKazuyoshiAkiyama today dunfell has the same fix

Thank you. I could remove vpython.
The cause is that I use the old revision of depot-tools. (Due to https://github.com/meta-flutter/meta-flutter/issues/497)
My network issue was solved, so, I use the current revision of depot-tools, then, I could solve this issue also.
Sorry.


[Bug] [dinky-common] incorrect sql replace

Search before asking

[X] I had searched in the issues and found no similar issues.

What happened
for exampl
the sql is
select 1
 from test
 where '1'  <> '-- ::.'
 and 1=1
 and 'zz' <> null;

the  '-- ::.'  will replace ''
What you expected to happen
do not replace
How to reproduce
--
Anything else
--
Version
dev
Are you willing to submit PR?

[X] Yes I am willing to submit a PR!

Code of Conduct

[X] I agree to follow this project's Code of Conduct

fix pr #1882


3.0.0+1 Run object Detection take more time about 2~3 times

Hello, I upgrade my project to pytorch_lite: ^3.0.0+1,objectDetection becomes slow(441ms -> 1676ms), it's change to use ffi instead pigeon right?
object detection take more time and camera preview is lag ,below picture is my test with same model, can you help solve this problem? thanks.

Looks like the inference being in ffi, didn't help in speed, I was testing on my phone and it was faster but looks like it's not the case on all phones , also there is a problem with the lag and some configuration makes the project fail,
I do the image processing using image lib, maybe that is why it takes more time I will check if there an optimization I can do and if it will help, can you provide a repo with the logs for benchmarks (so I check if my optimization did improve the results or not )
If that didn't help, I am thinking of converting back to using platform interfaces and implement the iOS logic.
But this may take sometime so I will work on it when I get time, you can use version 2 for now

Hello, thanks you commented this issues.
I don't understand "can you provide a repo with the logs for benchmarks" what is it mean.
Can you tell me how can I help you, thanks.

A repo with the parts of the code where you print the times of each run, I can do it but I just want to make sure it's the same as you

Hello, both of single image detect or realtime camera have the problem.

I will provide you " A repo with the parts of the code where you print the times of each run" later, tks.

A repo with the parts of the code where you print the times of each run, I can do it but I just want to make sure it's the same as you،
Thank you, and I will check if the image processing is the problem, and I can convert it to c++.

Helllo, this zip including two folder, the complete folder is too big to compress. So if u need more, tell me.

/lib folder(include pytorch_lite.dart and native_wrapper.dart which I print some thing)
example/lib/

issues_code.zip

I would like to mention that the way of s1 and s2 times are wrong
You should get the time for each one by subtraction of the start
Like
Before running the function get the time
And after running the function get the time
Then subtract the end time from the before
And based on this the isolate is the one taking all the time, and in it I include the image processing,
I will make another branch where I test new configs and try some stuff
But all of that after I finish the cmake issues and make sure it's working for everyone

I would like to mention that the way of s1 and s2 times are wrong
You should get the time for each one by subtraction of the start
Like Before running the function get the time And after running the function get the time
Then subtract the end time from the before
And based on this the isolate is the one taking all the time, and in it I include the image processing,
I will make another branch where I test new configs and try some stuff
But all of that after I finish the cmake issues and make sure it's working for everyone

I know s1 and s2 time is not accurate. Because this simply test .I add the many print time everywhere in order to find the place which take most time.
So, I think the object executed time is ok to provide you check, because I didn't  tidy my test code sorry.

I will try to find a way to improve and find where is it slow, and let you know what I found

@zezo357 What is the current average inference time for a yolov8s model with a 640x640 sized input image?

@zezo357 What is the current average inference time for a yolov8s model with a 640x640 sized input image? And I mean only pure inference without pre-/postprocessing.

will test again and let you know

@zezo357 What is the current average inference time for a yolov8s model with a 640x640 sized input image? And I mean only pure inference without pre-/postprocessing.

image_model_inference time: 186ms average while testing i was able to get around 250 ms, this is the pure inference
keep in mind it may differ on other devices may be more or less

right now decoding the image decodeImage time: 111ms takes alot of time as i mentioned, will try to find a solution for it, most probably next weekend
but i will release a patch fix where is the compile time and inference improved greatly, full  inference time was reduced by about 100 - 200 ms

@zezo357 Is the inference with gpu or cpu?

@zezo357 Is the inference with gpu or cpu?

cpu, pytorch doesnt extract the models using gpu, maybe in future releases they will allow it but for now only cpu
also tflite can run yolov5 and yolov8 on gpu , and the app for yolo is using tflite for the same limitation

@ZhaoXinZhang can you test on 3.0.4, it should increase the performance, also i added logs for each operation time, just in case something takes more time in your device

and the app for yolo(the one you can test the models with) is using tflite for the same limitation
Which limitation do you mean?

and the app for yolo(the one you can test the models with) is using tflite for the same limitation

@zezo357 Which limitation do you mean? I already tried tflite but the tensor allocation for an 640x640 input image takes about 800ms which makes it unusable for real time usage.

Weird, I thought tflite should use GPU by default which make it faster
The limition is that pytorch on mobile doesn't use GPU, the do provide how to enable it but it's not in the stable build as far as I know
I think it may get included in the 2.* Pytorch lite , meanwhile I am not sure

You need to pass an argument to enable inference on a gpu.  The reason why I am asking is that using yolov8 with tflite is really slow at the moment. Thats are the stats that I experienced for the yolov8n coco model:
Phone used: Xiaomi 11 Lite 5G NE
preprocessing:
180 ms using the flutter image library for resizing the image and a neste map loop for pixel normalization (0 - 255 -> 0 - 1)
inference:
800 ms tensor allocation + 450 (or 50-100 ms on gpu) ms pure inference
postprocessing:
3 ms

You need to pass an argument to enable inference on a gpu.  The reason why I am asking is that using yolov8 with tflite is really slow at the moment. Thats are the stats that I experienced for the yolov8n coco model:
Phone used: Xiaomi 11 Lite 5G NE
preprocessing:
180 ms using the flutter image library for resizing the image and a neste map loop for pixel normalization (0 - 255 -> 0 - 1)
inference:
800 ms tensor allocation + 450 (or 50-100 ms on gpu) ms pure inference
postprocessing:
3 ms

Well, then I think this package is faster , which I thought was not the case
Glad to hear that , you can test the package example I do include a yolov8 coco model in it, with input 640 and 640

@ZhaoXinZhang can you test on 3.0.4, it should increase the performance, also i added logs for each operation time, just in case something takes more time in your device

Hi, I test 3.0.4 on my device.
this is my result.

@ZhaoXinZhang can you test on 3.0.4, it should increase the performance, also i added logs for each operation time, just in case something takes more time in your device

Hi, I test 3.0.4 on my device.
this is my result.

as i thought the decode image is the one that takes most of the time
will need to figure out a way to avoid it, or offer a way to make it faster

version 4.0.0 is released (which decreases decoding time)


enter launches search

It is default internet usage. Please don't make me click the magnifying glass!!

@wmburke commit 3fddf99ebcada32b9330cd56ff9d4329ca0961ae fixes this issue.

Yay!!


Build works locally with sandbox but production deployment fails

Environment information
System:
    OS: macOS 13.1
    CPU: (10) arm64 Apple M1 Pro
    Memory: 2.50 GB / 16.00 GB
    Shell: 5.8.1 - /bin/zsh
  Binaries:
    Node: 20.10.0 - /usr/local/bin/node
    Yarn: 1.22.19 - /usr/local/bin/yarn
    npm: 10.2.3 - /usr/local/bin/npm
    pnpm: Not Found
    bun: Not Found
    Watchman: Not Found
  npmPackages:
    @aws-amplify/backend: ^0.6.0 => 0.6.0
    @aws-amplify/backend-cli: ^0.9.2 => 0.9.5
    aws-amplify: ^6.0.9 => 6.0.9
    aws-cdk: Not Found
    aws-cdk-lib: ^2.110.1 => 2.110.1
    typescript: ^5.3.3 => 5.3.3

Description
When running npc amplify sandbox locally, all resources are created and the app works as expected. When a deployment build job is triggered by pushing to GitHub, a backend error is encountered with no valuable logs. The logs only suggest that there is an error in the amplify backend folder however no error is reported when building locally with the sandbox.
Deployment Logs:
2024-01-06T07:51:46.698Z [WARNING]: amplify pipeline-deploy
                                    Options:
                                    --help    Show help                                                  [boolean]
                                    --branch  Name of the git branch being deployed            [string] [required]
                                    --app-id  The app id of the target Amplify app             [string] [required]
2024-01-06T07:51:46.699Z [INFO]: BackendBuildError: Unable to build Amplify backend. Check your backend definition in the `amplify` folder.
2024-01-06T07:51:46.715Z [ERROR]: !!! Build failed
2024-01-06T07:51:46.715Z [INFO]: Please read more about Amplify Hosting's support for SSR frameworks to find if your build failure is related to an unsupported feature: https://docs.aws.amazon.com/amplify/latest/userguide/amplify-ssr-framework-support.html. You may also find this troubleshooting guide useful: https://docs.aws.amazon.com/amplify/latest/userguide/troubleshooting-ssr-deployment.html

hey @ideen1, thank you for reaching out. wanted to confirm an observation noticed the command does not have a branch and id being passed, was this removed from the output log being shown here?
npx amplify pipeline-deploy --branch $AWS_BRANCH --app-id $AWS_APP_ID

I actually didn’t remove anything. That is what was displayed in the console

@ideen1 thank you for the information, the no error message is odd. Could you provide us some information into the last change made when you started observing this issue. additionally, information on resources that would help us in reproduction and diving deeper into the issue.

Closing due to inactivity


saving to image file-handle overwrites with JSON

PNG with scene embeds is an ideal way to store excalidraw file because it can be both previewed (in the finder, or anywhere else) or opened with excalidraw to view the source. The problem comes from opening a png file, then hitting cmd+s to save. This will overwrite the PNG file with a json correspond to the excalidraw, as oppose to saving a PNG with excalidraw file embedded inside.
The right behavior after opening a png file and saving it back should be to save the png with the embedded scene data, rather than saving a json and overwriting the original PNG with json content (which results in an invalid png file anyways)

Related issue https://github.com/excalidraw/excalidraw/issues/3382

This will overwrite the PNG file with a json correspond to the excalidraw, as oppose to saving a PNG with excalidraw file embedded inside.

Are you sure the current behavior is it overwrites the PNG file with JSON? This was reported and fixed https://github.com/excalidraw/excalidraw/issues/2250 and I can't repro: it prompts me for a file location.
The feature request itself is a duplicate of https://github.com/excalidraw/excalidraw/issues/2261 though

Reading the source the fix was actually reverted. But I don't understand why I can't repro then :thinking:

Ok, got it. There's a different code path for drag&drop and file-open.

So the fix is to prompt user to "save as"? Or is it to write back to the PNG with embedded json scene?

To prompt, so that we don't override the png for now. Re-exporting the PNG is tracked in https://github.com/excalidraw/excalidraw/issues/2261


rq: build error when checking hashes

Issue description
Got an error trying to install rq
Fails on channel nixos-17.03 as well as on master
nix-env -i rq
...
output path ‘/nix/store/6x2bagn4ijyhg1am3pi57cdy5hz2gb61-rq-0.9.2-fetch’ has r:sha256 hash ‘0y6y66mfnlpks7bhvf6kdp5smnl0jfglq4iv2z49wjr6dv10c65p’ when ‘1pci9iwf4y574q32b05gbc490iqw5i7shvqgb1gblchrihvlkddq’ was expected
cannot build derivation ‘/nix/store/mdz29fvczm0mqybk35snynx76bifk4cr-rq-0.9.2.drv’: 1 dependencies couldn't be built
error: build of ‘/nix/store/mdz29fvczm0mqybk35snynx76bifk4cr-rq-0.9.2.drv’ failed

Steps to reproduce
nix-env -i rq

Technical details

System: Arch Linux 4.10.1-1-ARCH
Nix version: 1.11.7
Nixpkgs version: "17.03beta320.ade5837"

Note that the package is marked as broken in nixpkgs. @aristidb is the maintainer.

Oh, I see, I totally missed that.
When the hashes are fixed, it fails later during v8-rs compilation. I also tried to bump version but wasn't able to get Cargo dependencies right.
Since the package is marked broken, it's not an issue anymore.

Yeah feel free to fix it but yeah, it's probably not straight-forward :)


merge package from arlac77/npm-package-template

package.json

chore(package<EMAIL_ADDRESS>

Codecov Report

Merging #516 into master will decrease coverage by 3.7%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #516      +/-   ##
==========================================
- Coverage   72.59%   68.88%   -3.71%
==========================================
  Files           1        1
  Lines         135      135
==========================================
- Hits           98       93       -5
- Misses         37       42       +5

Impacted Files
Coverage Δ

src/service-consul.js
68.88% <0%> (-3.71%)
:arrow_down:

Continue to review full report at Codecov.

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

Coverage decreased (-3.2%) to 63.102% when pulling 7d9a89b1cd64e1c2e6161093b5239e3361a48247 on template-sync-1 into 48982272b687a3bfa21c8b92b9b1202536e1a804 on master.

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Autocomplete window bounces above and below line

I would expect that it picks a side, either above or below, and stays there.

#12632


Refactor select component

allow change "Select one..." as placeholder
add "select simple" to storybook
add "Knobs" addon to storybook

This one might be easier if you pull down the changes to your local branch and push up again after resolving any conflicts.

Going to close this until things get updated.  Feel free to reopen!


Do we have any option to read user group name or user roles in git hooks?

We would like to restrict users to delete remote branch based on user role/ users belong  to a group.
Can we read that information from git server side hooks?

Unfortunately not (yet)
If the user belongs to multiple groups, would a, separated list in a environmental variable be fine?

Yes, that might help us. how to get the list of groups for a user?
And do we have any function similar to getpwuid in perl?

There is no way yet. We need someon to implement this feature.
You can write the script for your hook in any language.
I'm no familiar with getpwuid in perl. What does it return?

It will return user information like name, password, group ect.
I heared bonobo will maintain a database, can we read data from that database in hooks?

@RedX2501 may know better than me, but my guess would be that in the hook, you're quite a way from the Bonobo process, and it would be difficult to provide services to that (I guess we could have an HTTP API).   It's easy to populate environment variables though, so the hook could be provided with everything that the database contains about the current user.  Would that be enough?

There is not much to get from the database, you cannot read any passwords (because they are hashed and salted). The only other piece of interesting information might be the email address of the user.
What exactly are you looking for?

We would like to restrict the users based on their roles. I guess we will have this information in database, if we have access to DB from hooks, we can read that details and restrict users based on it.

I propose that we add an export to the roles and groups of the user making the commit through an environment variable.
Is this a viable solution for you?

Yes, that perfectly make sense.


Add remaining CLI args for flask rq worker.

This resolves #121

@Jacoberts I tried this in my fork of the repository but the --with-scheduler argument doesn't seem to create a scheduler that works - the logs say a scheduler has started, but it doesn't seem to pick up any jobs:
Worker rq:worker:f2a74e6c9b7c4aee811a62f7aac2e9c7: started, version 1.13.0
Subscribing to channel rq:pubsub:f2a74e6c9b7c4aee811a62f7aac2e9c7
*** Listening on default...
Scheduler for default started with PID 9

When I brought my dedicated scheduler online the jobs started processing again. I'm not sure where the issue is exactly though.

Hi @matt-takumi, I have always found the RQ scheduler to be a little mysterious, and have avoided it for that reason. I looked into this error a little, and found that, based on your logs, the --with-scheduler flag is correctly being recognized:

your logs show that the "run(scheduler)" is being evoked
that function is only ever started in a separate process
that process is only started when the with_scheduler is true

My only remaining hypothesis: are your jobs on the default queue?

It's an interesting problem, because after adding the scheduled jobs via the flask-rq2 decorator they were picked up by the dedicated scheduler, but not via the one with the worker. I'll do some more exploration and feedback.


提掉名人堂cache

https://github.com/g0v/itaigi/issues/336

Coverage decreased (-0.007%) to 94.25% when pulling 13f6b1adc0f83e43c5a4243a655b434b3b714cc9 on 提掉名人堂cache into ea8e649d57e8456c861ae919b2585ccfe7cfd963 on master.


Google Cloud Armor Rules

Hi Ayaka,
I want to self-host my own API endpoint, please kindly share what Google Cloud Armor rules did you use?
Thank you.

Thank you! I have successfully created the rules, may I know how to connect this to my Cloud Run? I have been trying :(

Yes, I also think the setup is confusing :(

In Load balancing, create a load balancer.

In Cloud Armor - "Apply policy to targets", apply to the load balancer we've just created.

If you are willing to contribute, feel free to create a PR with the steps for the configuration!


Add support for detection exclusion zones

The DeepStack API returns a bounding box for the detected object. If the object is one that's supposed to trigger (based on class), there should be an optional secondary check on whether the rectangle intersects at all with a list of defined exclusion zones in the trigger's configuration.
This will enable blocking out parts of an image that are prone to false positives.

This shouldn't be too bad to do since the predictions already include the bounding rect.
Extend the trigger config to include masks, an array of mask objects: xMinimum, yMinimum, xMaximum, yMaximum.
Then it's just an if (predictions.some((prediction) => masks.some((mask) => mask.overlaps(prediction))) { skip it };


Need to add documentation for updated CreateDataStoreDataDictionary

Update the documentation prior to the next release.  The command now accepts table for table (default id, name, description) and column (id, table_id, name, description) metadata.  Use a view or read the table into TSTool first and map the columns to the required names.

I updated the documentation and also added documentation for new OpenDataStore command.  Close the issue.


Flask-session 0.4.1

@fengsp , this is a patch that I mentioned to you offline. And it has been shipped to PyPI. It would be great if you can merge it in, as-is.
The tangible change to the downstream developers is that this patch version temporarily pins to Flask<2.3. This is of course not a long term solution. Later we will merge in the other existing PR which will work on Flask 2.2+, and then we will ship it as Flask-session 0.5.0.
The other file that I introduced in this PR is a Github action that will make the subsequent release much easier. I did that all the time on projects that I own. It is harmless if you choose to not use it, but I would suggest to keep that file in.

👍