Dmix supported?

I got bluealsa running, but it can only play audio from a single application at a time. The rest of the apps complain that the device is busy. Does bluez-alsa support the dmix plugin?

Unfortunately not. Dmix requires hardware PCM (hw). It is hardcoded in
the plugin. Once, I've tried to tinker a little bit with the dmix code,
however without any promising results. Anyway, I will try to make it
work... someday :)

Is there any progress with this issue?

Unfortunately, it's not as easy as I previously thought. Making a patch for dmix plugin might be impossible after all (it uses internal timer from audio card).
There is no roadmap for bluez-alsa, however this issue might be on my working bench in a month or two. I have to finish my struggle with the HFP support. So, stay tuned :).

Just a thought about the dmix support. I think it's highly desirable to be able to use bluetooth headphones as normal headphones but without being physically connected to a computer. That is what makes bluetooth devices so attractive. But if they work worse (OK, significantly worse :-) ) or cannot be used the same way, then it just makes no sense.
One, I believe, pretty common case is using bluetooth headphones in meetings. Skype works only with PA, that was one of the reasons (among others) why many people were looking for alternative conferencing software like ZoomUs, TeamViewer, Google Hangouts and others. Google Hangouts themselves do not depend on a sound subsystem. You just need to use your favourite browser which doesn't need PA. Chromium was a solution for me, I built it without PA support and it worked (not fine, but it worked). Unfortunately Chromium starts several processes and this is where dmix becomes very important. It's even worse, because, as far as I understand, even though you start only one Google Hangout session, Chromium starts several processes where it plays sound and without dmix we've done. Randomly you may hear ring sounds and do not hear incoming voice or vice versa depending on what process gains a sound device first.
This works with PA, so BluezAlsa just cannot be an alternative solution here. To my mind, it may be crucial if there is a goal to make BluezAlsa a competitive software, a good alternative to PA.
I wish could help, but I am just a Java software developer. Not sure how I could be useful here, but if you think I could help, please let me know.

Hi @keyoffecka,
You are right, that dmix-like support is required for this project to be an alternative for PA.
After some investigation, I know that this mixer functionality has to be incorporated in the bluealsa code (not in the ALSA PCM plug-in). However, it is rather hard to develop few things simultaneously. Right now, I'm focused on playback as it is. When the playback functionality will be good enough (e.g. mSBC support will be merged in to the master branch), I will try to make parallel playback possible.
If someone wants to help, there is a short overview how I think this feature should be implemented:
It is required to make some middle layer between PCM FIFO and (source) IO thread. This layer has to read PCM samples from multiple FIFOs and mix them together, than feed it into the IO thread via e.g. internal PIPE. One might also look at the dmix code (in the ALSA repository) and see how it is implemented (mixing algorithm). Of course some other design might be good as well.

+1 for dmix

+1000 for dmix... how do we combine multiple bluetooth speakers to play at the same time?  I have searched high and low, and jackd is my next attempt.

Thank you!!  This is what I was looking for. I’ll test it out!

@repk there was a code change since your patch, I'm not sure how this has any affect or not, but here's an updated diff:
diff --git a/src/asound/bluealsa-pcm.c b/src/asound/bluealsa-pcm.c
index d12bb64..7bbd789 100644
--- a/src/asound/bluealsa-pcm.c
+++ b/src/asound/bluealsa-pcm.c
@@ -139,7 +139,8 @@ static void *io_thread(void *arg) {
                snd_pcm_uframes_t io_buffer_size = io->buffer_size;
                snd_pcm_uframes_t io_hw_ptr = pcm->io_hw_ptr;
                snd_pcm_uframes_t io_hw_boundary = pcm->io_hw_boundary;
-               snd_pcm_uframes_t frames = io->period_size;
+               /* snd_pcm_uframes_t frames = io->period_size;*/
+               snd_pcm_uframes_t frames = io->appl_ptr - io_hw_ptr;
                char *buffer = areas->addr + (areas->first + areas->step * io_ptr) / 8;
                char *head = buffer;
                ssize_t ret;

As far as this goes, yes, I was able to get audio through alsaloop but it did have static.
@Arkq - Thank you for this project.  I am utterly confused and have difficulty finding any documentation and through the vast sources of confusing information about the setup of the .asoundrc or /etc/asound.conf  I have to admit, I am beyond humbled at how lengthy this process has become.
What I am trying to do, and somehow succeeded briefly is to pair and connect multiple bluetooth speakers and have them play at the same time. I found the delay setting in the bluealsa to be extremely helpful at tuning the delays between them, however, this was such a mess on Raspbian with Stretch since they just flipped the switch and yanked out pulseaudio leaving behind a half implemented version of bluealsa that works... sort of.
So, I want to play audio from pretty much any source, aplay, mplayer, omixplayer, MPD, shairport and etc using an alsa PCM defined as my route to hopefully a 'multi' plugin in alsa so I can play out to the other speakers.  (I was inspired by Amazon Alexa / Echo 'Everywhere' Music Groups where you can tie together bluetooth speakers virtually to create speaker groups) to do this... I already have the ability to play individually to one or more speakers at a time, but to send to one Alsa PCM and route back out to those with the current Bluez4 / Bluez5 (no alsa? huh?) and bluez-alsa, now bluealsa conundrum of confusion.
This of course works stock for bluealsa at defining a PCM and playing audio
~/.asoundrc
defaults.bluealsa.delay 30000
defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "5A:ED:45:FD:B1:93"
defaults.bluealsa.profile "a2dp"

pcm_slave.!bluetooth1Slave {
   pcm {
     type bluealsa
     device "5A:ED:45:FD:B1:93"
     profile "a2dp"
     delay 8000
   }
}

pcm.!bluetooth1 {
  type plug
  slave bluetooth1Slave
  hint {
    show on
    description "Bluetooth 1 PCM PLUG"
  }
}

ctl.!bluetooth1 {
  type jack
}

## End bluetooth 1

pcm_slave.!bluetooth2Slave {
   pcm {
     type bluealsa
     device "07:AE:0A:19:1C:B8"
     profile "a2dp"
     delay 8000
   }
}

pcm.!bluetooth2 {
  type plug
  slave bluetooth2Slave
  hint {
    show on
    description "Bluetooth 2 PCM PLUG"
  }
}

ctl.!bluetooth2 {
  type jack
}

In the example above, I used pcm_slave.XXXX so I don't have to redefine the slaves if I want to use them in other configs.
If I do:

aplay -D bluetooth1 ~/test.wav

I get sound, -D bluetooth2  works perfectly as well.
So, I move on to trying out dmix... I want to mix these together. Nope, apparently bluealsa isn't dmix capable, or dmix isn't bluealsa capable. Damn.
The next idea came up to attempt to Loopback using snd_aloop.  As simple as this idea was, wow, what a complex feature this has been.  I followed Remi's advice above and got that sort of working.  I was able to play a sound with the attached patch above using alsaloop like:
alsaloop -C "hw:Loopback,1,0" -P "bluetooth1" -t 50000
Then:  aplay -D "hw:,Loopback,1" ~/test.wav
Worked. So, now I have to run alsaloop in the background, multiple processes, which seems very ineffective. But wait, doesn't Bluealsa already work if the PCM is defined even using the -D bluealsa:xxxxxxxxx? Is there another way to route one input stream to multiple speakers?
A: along comes this guy... Output to Multiple Audio Devices with Alsa
As much as I tried, I could not get the above example to work with bluealsa, so I figured I would emulate using the Loopback, and give that a shot.  I could not conquer the configurations enough to make that happen, so I was lead down the path of the multi plugin using jack. Continuing my .asoundrc above I started getting into Jack Audio (which the complete project seems in the process of going 4 directions at once with different versions, some support dbus which some don't, there's conflicting documentation practically leaving one in the current situation like the bluetooth package, but I hacked this together:
pcm.!default {
  type plug
  slave bluetooth1Slave
  hint {
   show on
   description "Default Speaker - bluetooth1Slave"
  }
}

pcm.!jack {
  type plug
  slave {
    pcm "hw:0,0"
  },
  hint {
    show on
    description "Jack plug"
 }
}

ctl.!jack {
  type hw
  card 0
}

pcm.rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
        2 system:playback_3
        3 system:playback_4
    }
    #capture_ports {
    #    0 system:capture_1
    #    1 system:capture_2
    #}
}

pcm.jackme {
    type plug
    slave { pcm rawjack }
    hint {
      description "JACK Audio Connection Kit PCM PLUG"
    }
}

pcm.jackd {
    type multi;

    slaves.a.pcm bluetooth1
    slaves.a.channels 2;

    slaves.b.pcm bluetooth2
    slaves.b.channels 2;

    bindings.0.slave a;
    bindings.0.channel 0;

    bindings.1.slave b;
    bindings.1.channel 0;

    bindings.2.slave a;
    bindings.2.channel 1;

    bindings.3.slave b;
    bindings.3.channel 1;

    hint {
      description "JACKD Audio Connection Kit PCM MULTI"
    }
}

ctl.jackd {
    type hw
    card ALSA
}

pcm.quad {
    type asym
    playback.pcm {
        type plug
        slave.pcm jackd
    }
}

I was able to figure out how to use alsa_in and alsa_out to create jackd channels and briefly had this solution working.
My biggest questions are:

What is bluealsa_aplay and why do some examples like the Volumio discussions launch this to run in the background?  Am I suppose to use it for something? Does it mean anything in the alsa configurations? Is it possible to send audio TO these processes from alsa using a pcm plug, and why is it even needed when playing through alsa works without bluealsa_aplay running?  --help shows nothing, there's no documentation, and I could only assume it's a wrapper for alsa's aplay?  What is it for, what can we use it for?

In defining dmix PCM's, what does it take to get bluealsa working?  Is it possible to use Loopback and send the music streams to the Loopback, then using a 'multi' or 'route' alsa plugin to send to multipe?

I am also trying to do this on on a headless raspberry pi with Stretch, but also at the same time, I am building a newer implementation of Bluealsa Bluetooth for Volumio that can route to mutiple groups of speakers.

How can I group bluetooth speakers to route from one input PCM?

Thank you, I apologize if this seems like a frustrating post, and it is, I have gone deep into the rabbit holes trying to do something so simple that I am out of words.  To jack or not to jackd, to use Loopback or not loopback, to use multi, dmix, route plugins... has anyone tackled this yet?
Here's my last known working config with bluealsa (from raspbian stretch package) and jackd2 before I switched over to Volumio and dealt with absolutely no bluetooth on the system.
defaults.bluealsa.interface "hci0"
defaults.bluealsa.device "00:XX:XX:XX:XX:13" # Controller address, or speaker?
defaults.bluealsa.profile "a2dp"
defaults.bluealsa.delay 1000
defaults.bluealsa.battery "no"

pcm.!default plug:echo1

# blue party: XX:XX:XX:XX:XX:2C
# porch echo: XX:XX:XX:XX:XX:93

pcm_slave.!bluepartySlave {
   pcm {
     type bluealsa
     device "XX:XX:XX:XX:XX:2C"
     hci=hci0
     profile "a2dp"
     delay 0
   }
}

pcm_slave.!porchEchoSlave {
   pcm {
     type bluealsa
     device "XX:XX:XX:XX:XX:93"
     profile "a2dp"
     delay 8000
   }
}

# PCM Config
pcm.!blueparty {
  type plug
  slave bluepartySlave
  hint {
    #show on
    description "Big Blue Party Speaker PCM PLUG"
  }
}

ctl.!blueparty {
  type jack
}

pcm.!echo1 {
  type plug
  slave porchEchoSlave
  hint {
    show on
    description "Echo Porch PCM PLUG"
  }
}

ctl.!echo1 {
  type jack
}

## General Notifications for Homebridge

pcm.!notifications {
  type plug
  slave porchEchoSlave
  hint {
    show on
    description "Notifications Group"
  }
}

ctl.!notifications {
  type jack
}

########################### JACKD Configs

pcm.!rawjack {
    type jack
    playback_ports {
        0 system:playback_1
        1 system:playback_2
        2 system:playback_3
        3 system:playback_4
    }
    #capture_ports {
    #    0 system:capture_1
    #    1 system:capture_2
    #}
}

pcm.!jackme {
    type plug
    slave { pcm rawjack }
    hint {
      description "JACK Audio Connection Kit PCM PLUG"
    }
}

pcm.!jackd {
    type multi;
    slaves.a.pcm blueparty
    slaves.a.channels 2;
    slaves.b.pcm echo1
    slaves.b.channels 2;
    bindings.0.slave a;
    bindings.0.channel 0;
    bindings.1.slave b;
    bindings.1.channel 0;
    bindings.2.slave a;
    bindings.2.channel 1;
    bindings.3.slave b;
    bindings.3.channel 1;

    hint {
      description "JACKD Audio Connection Kit PCM MULTI"
    }
}
ctl.!jackd {
    type hw
    card ALSA
}

# jackd -d alsa -d pcm.jackd (I think?)

# These dmix didn't seem to work...
pcm.dmixedEcho {
    type dmix
    ipc_key 1024
    ipc_key_add_uid 0
    slave echo1

}

pcm.dmixedParty {
    type dmix
    ipc_key 2048
    ipc_key_add_uid 0
    slave blueparty
}

##### Asymetrical playback? This sounds sexy...
# I believe this worked with jackd... for a minute.

pcm.!quad {
    type asym
    playback.pcm {
        type plug
        slave.pcm jackd
    }
}

###### Defaults, yes just going back to one speaker.

pcm.!default {
  type plug
  slave porchEchoSlave
  hint {
   show on
   description "Default Speaker - Porch"
  }
}

pcm.!jack {
  type plug
  slave {
    pcm "hw:0,0"
  },
  hint {
    show on
    description "Jack plug"
 }
}

ctl.!jack {
  type hw
  card 0
}

If you have any ideas, advice, or whatever please let me know! More specifically what is bluealsa-aplay? Is it like asoundloop and how can I bind the output of these bluealsa pcm's to Loopback devices like
Loopback,0  (for speaker 1)
Loopback,1 (for speaker 2)

etc?

@repk

Is there any reason that bluealsa is an alsa PCM io plugin besides being a deamon that polls a Loopback device for reading directly?

Hmm, I've based this design by following examples found in the alsa-plugins repository. I had no idea, that there is a loopback device for ALSA. I will have to read a little bit about this :) Thx for the tip.

Am I right saying that io_thread() forwards the io_ptr by period_size chunk no matter how snd_pcm_write*() is used ?

Yes, that's right because (as far as I know) transferring less then period_size does not make any sense (from the point of view of PCM ring buffer). I might be mistaken, though.

If so, can we fix it with a transfer() callback to synchronize the io_thread() each time snd_pcm_write*() is called ?

At first I was using transfer() callback, however at some point I was forced to write a separate thread for transferring data. The reason for this was that writing data to bluealsa PCM PIPE blocks - and transfer() callback shall not block. But right now (my knowledge abut ALSA has grown significantly) I think you might be right, that using transfer() callback for data synchronization might be a good idea.
@drumfreak

What is bluealsa_aplay?

This application is a helper which simplifies BT speaker configuration. It is used to read data from bluealsa server directly and then transfer it to the PCM device (just like aplay reads data from file and writes samples to PCM device). It also adds some extras which are not possible (or require a lot of hacks) with a arecord ... |aplay ... configuration.

In defining dmix PCM's, what does it take to get bluealsa working?

In its simple design, bluealsa should be a PCM device (or devices). Then, you can use any ALSA configuration you want (except dmix, which required PCM to be of hw type).

How can I group bluetooth speakers to route from one input PCM?

I've never done that. You will have to search this topic by yourself. I'm not a .asoundrc wizard :D

@Arkq thanks! I actually just got this all working wonderfully using MPD.  I went down the wrong rabbit hole and chose to try and do this with ALSA, which I may do later, but MPD which is where I'm trying to stream from and to the speaker group just happens to have multiple alsa definition feature so it'll stream out to the speakers.  Just define a new one for each speaker, after setting up a basic asound.conf.
Thanks again, I'll keep link back when I publish my project to git.  It's working great!

Did anyone succeed in using alsaloop? I got to the point where:

playback through bluealsa (of course only one PCM stream at a time) without alsaloop works fine
playback with alsaloop through my integrated laptop soundcard works fine
playback with alsaloop through bluealsa opens the stream (I can see it in bluealsa logs and hear in my headphones, as they start to hiss a little when stream is opened), but there's no sound (despite mixer being set correctly, and another PCM stream, after stopping alsaloop, being able to play)

My headset is JBL E55BT.
Logs and important snippets (I redacted only address of my headphones):
$ grep -v '^#\|^$' .asoundrc
pcm.jbl
{
        type plug
        slave.pcm
        {
                type bluealsa
                interface hci0
                device XX:XX:XX:XX:XX:XX
                profile "a2dp"
        }
        hint
        {
                show on
                description "JBL E55BT"
        }
}
pcm.!default
{
        type plug
        slave.pcm "jbl"
}

$ aplay -l | grep Loopback
card 10: Loopback [Loopback], device 0: Loopback PCM [Loopback PCM]
card 10: Loopback [Loopback], device 1: Loopback PCM [Loopback PCM]

$ aplay -D hw:10,0 /tmp/piano2.wav
Playing WAVE '/tmp/piano2.wav' : Signed 16 bit Little Endian, Rate 48000 Hz, Stereo

$ alsaloop -C hw:10,1 -P jbl -t 50000
../../../src/asound/../shared/ctl-client.c:105: Connecting to socket: /var/run/bluealsa/hci0
../../../src/asound/../shared/ctl-client.c:219: Getting transport for XX:XX:XX:XX:XX:XX type 1
../../../src/asound/bluealsa-pcm.c:546: Setting constraints
../../../src/asound/bluealsa-pcm.c:294: Initializing HW
../../../src/asound/../shared/ctl-client.c:375: Requesting PCM open for XX:XX:XX:XX:XX:XX
../../../src/asound/bluealsa-pcm.c:317: FIFO buffer size: 4096
../../../src/asound/bluealsa-pcm.c:323: Selected HW buffer: 8 periods x 4800 bytes == 38400 bytes

And from bluealsa program itself:
/usr/bin/bluealsa: ../../src/ctl.c:638: Received new connection: 14
/usr/bin/bluealsa: ../../src/ctl.c:651: New client accepted: 14
/usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
/usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
/usr/bin/bluealsa: ../../src/ctl.c:353: PCM requested for XX:XX:XX:XX:XX:XX type 1 stream 0
/usr/bin/bluealsa: ../../src/transport.c:874: New transport: 20 (MTU: R:672 W:672)
/usr/bin/bluealsa: ../../src/bluez.c:1058: Signal: PropertiesChanged: org.bluez.MediaTransport1: State
/usr/bin/bluealsa: ../../src/transport.c:734: State transition: 0 -> 2
/usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
[New Thread 0x7ffff1b57700 (LWP 3864)]
/usr/bin/bluealsa: ../../src/io.c:386: Starting IO loop: A2DP Source (SBC)
/usr/bin/bluealsa: ../../src/transport.c:122: Created new IO thread: A2DP: A2DP Source

/usr/bin/bluealsa: ../../src/io.c:90: FIFO endpoint has been closed: 15
/usr/bin/bluealsa: ../../src/transport.c:1027: Closing PCM: 15
/usr/bin/bluealsa: ../../src/transport.c:901: Releasing transport: A2DP Source (SBC)
/usr/bin/bluealsa: ../../src/ctl.c:605: Client closed connection: 14
/usr/bin/bluealsa: ../../src/transport.c:929: Closing BT: 20
/usr/bin/bluealsa: ../../src/transport.c:1069: Exiting IO thread
/usr/bin/bluealsa: ../../src/bluez.c:1058: Signal: PropertiesChanged: org.bluez.MediaTransport1: State
/usr/bin/bluealsa: ../../src/transport.c:734: State transition: 2 -> 0
/usr/bin/bluealsa: ../../src/ctl.c:675: +-+-
[Thread 0x7ffff1b57700 (LWP 3864) exited]

Anyone?

It seems that I was finally able to make dmix work. My setup is far from perfect (I wasn't able to avoid using soundserver, but ESD seems most clean from all of them... and a hack with esdcat is ugly, but there's no support for ESD in Alsa shipped with Debian), but works.
Audio path is: dmix -> loopback -> rate conversion -> esd -> bluealsa. I had to find and compile esound-0.2.41 from sources, as it seems it has been superseded by pulseaudio (which I don't want to use – for many reasons).
 But I'm able to listen to music, at least that's good...
ESD configure command:
./configure --enable-alsa --disable-oss --disable-arts --disable-artstest --enable-local-sound --disable-ipv6
ESD run command:
esd -d jbl -unix -as 10
snd-aloop load line in /etc/modules:
snd-aloop index=10
Alsaloop run command:
alsaloop -C hw:10,1 -P esd -t 150000
And finally .asoundrc:
pcm.jbl
{
        type plug
        slave.pcm
        {
                type bluealsa
                interface hci0
                device XX:XX:XX:XX:XX:XX
                profile "a2dp"
        }

        hint
        {
                show on
                description "JBL E55BT"
        }
}

pcm.esdcat
{
        type file
        file "| /usr/local/bin/esdcat"
        slave.pcm null
        format raw
}

pcm.esdrate
{
        type plug
        slave
        {
                pcm esdcat
                rate 44100
                format S16_LE
                channels 2
        }
}

pcm.esd
{
        type plug
        slave.pcm esdrate
}

pcm.mix
{
        type dmix
        ipc_key 1986
        slave
        {
                pcm "hw:Loopback,0,0"
                period_time 0
                period_size 1024
                buffer_size 8192
                rate 44100
        }

        bindings
        {
                0 0
                1 1
        }
}

pcm.!default
{
        type plug
        slave.pcm mix
}

ctl.!default
{
        type bluealsa
        battery yes
}

Regardless of whether alsaloop alone method works or not (I couldn't get it to work), there's one more problem with this method. When reconnecting headphones (I need to restart bluealsa for that, it's probably a bug in bluealsa) you need to exit applications that have open streams (including web browser).
My working setup (a terrible workaround, but at least usable) is having four terminal windows open on a separate workspace.

bluealsa
bluetoothctl (because sometimes bluealsa fails to connect and I have to issue connect command)
esd.sh script, which contains: sudo nice -19 su queequeg -c 'esd -d jbl -unix -as 10'
aloop.sh script, which contains: sudo nice -19 su queequeg -c 'alsaloop -C hw:10,1 -P esd -t 150000' > /dev/null

When connecting headphones, I:

Turn headphones on
Run bluealsa and wait for it to connect
If it fails to connect, I issue connect command in bluetoothctl
I manually reduce volume (it sets volume to maximum) with volume keys on keyboard (which call another script, which calls amixer -D bluealsa sset "JBL E55BT - A2DP" $volume)
I run esd.sh script
I run aloop.sh script
If aloop.sh terminates after a while (a second or so), which happens rarely, but it does, I need to Ctrl-C bluealsa and do steps from 2 to 7 again
If I hear a soft hiss for a while after running esd.sh, I know it will work now and I can go to youtube and play my favorite music (movies are unplayable due to the lag)

This is a terrible workaround (compare it to my Android phone, where I just turn headphones on, everything pairs automatically and I can play music almost instantly), but I don't think we have any better alternative for now. dmix support will be the greatest feature to be added to bluealsa.
The good thing is that once it works, it's quite stable. I never experienced disconnects. Sound hiccupped from time to time, but it stopped after running esd and alsaloop with nice.

I have nothing to add, just wanted to say thanks to @Arkq  for the project and to @repk  for the solution. Main guidelines + second patch worked. Did not try esd workaround.


Turn off elementWatcher?

Hello! I have this function
onExit = () => {
    let form = document.querySelector('.the form');
    if (form) {
      let scrollMonitor = require('scrollmonitor');
      let elementWatcher = scrollMonitor.create(form);
      elementWatcher.exitViewport(function () {
        console.log('I have left the viewport');
      });
    }
  };

which is tied to a componentDidMount one on
window.addEventListener('scroll', this.onExit);

I wanted to know if there is a way to turn of the watcher after just one console.log because now it returns a lot of logs! I saw an issue about an .off options but I couldn't find anything in the documentation. Thanks!!

 If you want to bring it back after then you can create a new one. you can also elementWatcher.one('exitViewport', () = {}) to run the function once but keep the watcher alive.
https://github.com/stutrek/scrollmonitor/blob/master/README.md#methods


Incorrect code in docs

In the Views section here the & should not be present, since the entt::view::get function in that case returns a std::tuple of references, by copy.
// ... or multiple components at once
auto &[pos, vel] = view.get<position, velocity>(entity);

Wiki updated. Thanks for pointing this out. :+1:


fix(model): keep track of correct model reference

What
Fix for issue #656
Why
I did not take into account such basic scenario - no test case was failing and it all seemed to work on my app
How
field object does not contain model property that is the model itself for the basic field usage where the model is $scope.model. I assumed we could then assign this $scope.model as a property to field object and operate only on this property. This would make it consistent with the scenarios when field.model was passed as a string and resolved to an object (with a watcher) or assigned as an custom object.
This was a mistake because when scope.model reference changed, field.model referenced old model object. To make it work I would have to put a watcher on scope.model and update field.model accordingly but this would add a lot of unnecessary watchers so I've reverted to the original solution where we use construction field.model || scope.model which works fine now.
One test case added, one test case fixed.
For issue #656
Checklist:

[x] Follows the commit message conventions
[x] Is rebased with master
[x] Is only one (maybe two) commits

closes #656

Current coverage is 96.03%

Merging #657 into master will decrease coverage by -0.01% as of 84d5d97

@@            master    #657   diff @@
======================================
  Files           16      16
  Stmts         1163    1161     -2
  Branches         0       0
  Methods          0       0
======================================
- Hit           1117    1115     -2
  Partial          0       0
  Missed          46      46

Review entire Coverage Diff as of 84d5d97

Uncovered Suggestions

+0.35% via ...alidationMessages.js#25...28
+0.26% via src/test.utils.js#38...40
+0.26% via ...s/formlyUsability.js#18...20
See 7 more...

Powered by Codecov. Updated on successful CI builds.

Ok, looks good


JPL not compatible with SWI-Prolog 8.1.23

Hello everyone,
I am using:

SWI-Prolog 8.1.23
JPL 7.4.0 (jar deployed in Maven Central)

If I perform this simple query
 Query q1 = new Query(
    "use_module",
    new Term[]{new Compound("library", new Term[]{new Atom("lists")})}
);

I obtain the following error:
org.jpl7.JPLException: unsupported blob type passed from Prolog
Whereas, with SWI-Prolog 8.1.21 the query is executed without errors. I tested that by using an 11-day-old docker image deployed here: https://hub.docker.com/repository/docker/giuseta/cplint-trill
I would be very grateful for any information on solving the issue. Of course, I am keen to provide more information.

I don't know what JPL 7.4.0 (jar deployed in Maven Central) means.  You must use the jar that is shipped with SWI-Prolog, as well as the jpl.dll/so/... from SWI-Prolog.  8.1.22 breaks binary compatibility of the SWI-Prolog C interface.    Some of the constants also appear in the JPL classes.  I have updated these and all pases the bundled tests again.  Note that SWI-Prolog can not report terms of type rational, which are not (yet) supported by JPL.

I mean the one deployed here: https://search.maven.org/artifact/jpl/jpl
Until a few weeks ago, I was able to use this version, because It was convenient to simply add
<dependency>
  <groupId>jpl</groupId>
  <artifactId>jpl</artifactId>
  <version>7.4.0</version>
</dependency>

in the pom file of my Java application. Are you saying that the JPL library deployed in Maven Central is not official?

Are you saying that the JPL library deployed in Maven Central is not official?

I don't know how things get into Maven, but surely I have nothing to do with it.   Version 8.1.22 and later require a new version of JPL and each binary version of SWI-Prolog ships with a matching jpl.jar and jpl.so/dll/...    That is all I can say.   My advice would be to either track the maintainer of the Maven version and request an update or use these files from the Prolog release to your Java project.  I don't know how the latter works in Maven, but it is definitely the reliable route.

@giuseta as Jan stated, generally every swi-prolog come with its own compatible jpl. Someone uploaded the jars, did all the boring signature process in order to make them available but as you may see from the dependency definition:

group-name is not standard, it should be something like com.github.swi-prolog
artifact id is just jpl, I think it should be something like packages-jpl

So what you see is a very old maven dependency and that's why probably the person that uploaded that version is no longer maintaining it.
You cand find the versions at https://github.com/SWI-Prolog/packages-jpl/releases
and unfortunately, in order to get the library working with your maven project, you will need to import manually the library by either adding it into a folder and declare your dependency as "system" or by installing the jar at your local maven repository.

@javatlacati Thanks for this comment.   Note that the releases are just snapshots of the source.  The useful stuff (the jar and shared object/dll) is not in there and you cannot build JPL separately, it is part of the full SWI-Prolog build.   Most binary distributions include it.

I got it, thank you very much for your help.

and unfortunately, in order to get the library working with your maven project, you will need to import manually the library by either adding it into a folder and declare your dependency as "system" or by installing the jar at your local maven repository.
That's what I did, I declared the dependecy with scope "system" and provided the path to the jar. Thank you again.

Hi @giuseta @javatlacati
Just want to follow up on this and let you know that the JPL repo now is a Maven-project, so one can get the latest JAR package (containing the Java API) directly via Maven:
https://jpl7.org/DeploymentJava
Of course one still needs to have an SWIPL system installed to get SWI-Prolog itself and the C-native code part of JPL.

Hi
this is great, thank you very much for your work. We will surely add JPL as
Maven dependency in our project.
Best wishes
Giuseppe
Il sab 27 giu 2020, 00:10 Sebastian Sardina<EMAIL_ADDRESS>ha
scritto:

Hi @giuseta https://github.com/giuseta @javatlacati
https://github.com/javatlacati
Just want to follow up on this and let you know that the JPL repo now is a
Maven-project, so one can get the latest JAR package (containing the Java
API) directly via Maven:
https://jpl7.org/DeploymentJava
Of course one still needs to have an SWIPL system installed to get
SWI-Prolog itself and the C-native code part of JPL.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/SWI-Prolog/packages-jpl/issues/36#issuecomment-650425837,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AA6ES2XTULCURKQWPJAAH4TRYUMHBANCNFSM4K3LIROA
.


[SPARK-19537] Move pendingPartitions to ShuffleMapStage.

The pendingPartitions instance variable should be moved to ShuffleMapStage,
because it is only used by ShuffleMapStages. This change is purely refactoring
and does not change functionality.
I fixed this in an attempt to clarify some of the discussion around #16620, which I was having trouble reasoning about.  I stole the helpful comment Imran wrote for pendingPartitions and used it here.
cc @squito @markhamstra @jinxing64

Test build #72662 has started for PR 16876 at commit 3e9af42.

Makes good sense to me.

Thanks for the quick look @markhamstra !

You're welcome -- but do be aware that I'm going to be extremely busy with non-Spark stuff for at least the next week, so for awhile my Spark code reviews are likely to be more cursory than they should be.

It's great to have pendingPartitions in ShuffleMapStage.

Test build #72662 has finished for PR 16876 at commit 3e9af42.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72662/
Test PASSed.

Test build #72684 has started for PR 16876 at commit 8fdecda.

lgtm when tests pass

Test build #72684 has finished for PR 16876 at commit 8fdecda.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/72684/
Test PASSed.

@kayousterhout
It's great to give a definition of pendingPartitions in ShuffleMapStage.
May I ask a question and make my understanding about pendingPartitions clear ? It means:

PartitionId gets removed from pendingPartitions because of real success(not including ones from failed executors);
pendingPartitions is the exact mirror(in reverse) of ShuffleMapStage 's output locations. Thus when pendingPartition is empty, all output locations are available;
When executor lost, we should check if there is need to add partitionId back to pendingPartitions accordingly.
No need to consider resubmit stage when pendingPartitions is empty.

Is my understanding correct ? It'd great if you can help rectify my wrong points.

@jinxing64 I wrote a long comment on your other PR to attempt to explain (my current understanding of) these issues!

Thanks all for the review; merged this into master


reading from STDIN / defining variables

Bats can't read from stdin, which makes it impossible to run a command with an isolated rcfile:
#!/bin/bash
startdir="$(dirname "$0")"

bats <<EOF
@test "this better be true" {
  cmd --rcfile="$startdir"/rc # FIXME doesn't work
  [ 1 -eq 1 ]
}
EOF

Instead of reading from STDIN, bats prints out its help usage:
bats <<EOF
@test
EOF
# OUTPUT:
Bats 0.4.0
Usage: bats [-c] [-p | -t] <test> [<test> ...]

A work around would be to allow users to specify variables that can be used globally within the bats file, however, bats should still probably be able to read from stdin regardless.
bats -v startdir="$(dirname "$0")" test.bats

Is there a way to deliberately bring in an environment variable like $MYVAR into a test from the test file?


[Feature request] Improve post-lapse stability analysis

I really like the new post-lapse stability analysis feature, and I think we can improve the post-lapse stability (PLS) formula if we analyze how post-lapse stability is related to D and R as well.

In other words, the two new graphs should have D and predicted R (at the time of the review) on the x axis and PLS on the y axis, with both true PLS (dots) and predicted PLS (curve), of course. This will help us determine how exactly PLS depends on D and R and whether the current formals provide a good fit. In the future, a similar approach can be used for the main formula as well, just with three different graphs for each grade. For now, the idea is to analyze how PLS depends on the three components of memory.

@L-M-Sherlock, thank you for making a Google colab notebook! Please, implement my suggestion above as well.

I noticed something, I think Sherlock mentioned a similar phenomenon before.
I replaced the function for calculating PLS with a different one, and while RMSE for "Again" got better, the overall RMSE got worse. I have no idea how to explain this.

I update the test version for notebook: https://github.com/open-spaced-repetition/fsrs4anki/blob/test/fsrs4anki_optimizer_test.ipynb

You can set the group_key to last_s_bin, last_d_bin and last_r_bin.

It's not exactly what I wanted, I wanted 3 charts just like the one you originally made, but thank you.

@L-M-Sherlock I have another request. It seems that no matter how I improve the formula for PLS, it somehow makes the overall RMSE worse, which means that we need to analyze the main formula the same way. Please, add 3 more graphs:

new S as a function of previous S
new S as a function of last R
new S as a function of last D
And remove grades 2 and 4, leaving only 3. In other words, only reviews when user pressed "Good" should be used for analysis, to simplify things.

Please, add 3 more graphs:

new S as a function of previous S
new S as a function of last R
new S as a function of last D

Done:

Is there no way to speed this code up? It takes more time than any other part of the code related to plotting graphs.
ns_dataset["last_state"] = ns_dataset.progress_apply(
    lambda x: my_collection.predict(
        ",".join(x["t_history"].split(",")[:-1]),
        ",".join(x["r_history"].split(",")[:-1]),
    ),
    axis=1,
)

Interestingly, S as function of previous S provides practically a perfect fit (log coordinates):

Is there no way to speed this code up? It takes more time than any other part of the code related to plotting graphs.

Done in https://github.com/open-spaced-repetition/fsrs4anki/commit/a5ae9f187c687231e41ebce181580c3cba4efe58

Thank you. A few more suggestions, nothing urgent:

Add RMSE between true S and predicted S (and do that for PLS too), like this:

rmse = mean_squared_error(pls_df_group["true_s"], pls_df_group["predicted_s"], sample_weight=pls_df_group["total_count"], squared=False)
print(f'RMSE={rmse:.2f}')

Analyzing new S as a function of preivous S is more convenient when both are in log coordinates, so add this:

    if group_key == "last_s_bin":
        ax1.set_ylim(0.1, ns_df_group["predicted_s"].max() * 1.1)
        ax1.set_xscale("log")
        ax1.set_yscale("log")

By the way, you may be interested in these charts for my collection

It seems that the main formula provides a good fit overall, but the formula for PLS tends to overestimate S

Thank you. A few more suggestions, nothing urgent:

Done in: https://github.com/open-spaced-repetition/fsrs4anki/commit/7cb2bb4ccc4d26d27f945190226f460081645ab7

Nice. Once you have enough free time, please test my idea regarding PLS: https://github.com/open-spaced-repetition/fsrs4anki/issues/461#issuecomment-1773870958


Gledopto RGBWW controller issue

So I read through issue #571, and I'm not so advanced in this but it seems like the issue I am having. The homekit interface seems very glitchy when changing colors or changing the temperature of the white LED's.
I'm using a GLEDOPTO RGBWW controller (type GL-C-008). I have set certain colors in different scenes with a certain intensity. When switching between scenes, only the intensity is changing and the color is remaining the same. I have no automations or scenes other than in homekit itself, so that's the big difference compared to the user in the linked issue.
I'm not sure where to look for the problem and if the current new homekit version (in beta) already tackled this issue. I now installed this controller on 1 location in my house and wanted to expand to 5 more, but as long as this issue is not fixed, I'm not expanding. So I wanted to know if there is a fix to this issue or not.
So I linked the GLEDOPTO controller through phoscon to my CONBEE II stick. It worked straight away and showed up in homebridge/homekit. Switching colors in scenes is the big issue here.
Any help?

Maybe one thing to add: these GLEDOPTO controllers of this type do exist in 2 versions, one where the RGB and CW/CC functions are shown in 1 device (this is the one I have), and another version where the RGB is shown as 1 device and the CW/CC is shown as another one. I'm not sure but maybe that might be the way to go to get around this issue? I'm not sure.. In each case, it should work as well when shown as 1 device, which I prefer anyway to keep the amount of devices in homekit to a minimum

Are you using Zigbee scenes or HomeKit scenes?  Could you please capture ant attach a debug log file, while recalling the scene?  See https://github.com/ebaauw/homebridge-hue#debug-log-file.

Are you using Zigbee scenes or HomeKit scenes? Could you please capture and attach a debug log file, while recalling the scene? See https://github.com/ebaauw/homebridge-hue#debug-log-file.

Hello, I will look into the dumpfile, I need to hook up a monitor to the Pi I assume, since it is tucked away in the basement without a screen or remote desktop.
I did make this screenshot from the webapp while switching back and forth between the 2 scenes I was talking about. It shows a brightness and colorchange, however it is not changing to the color I'm expecting. Instead of going from cold white 100% to green LED 50% it is going to cold white 50%. It seems it is unable to jump from the white LED scheme to the RGB scheme or something?
https://ibb.co/HN0MKwL

Looks like you're (also?) setting colour temperature from the HomeKit scene?  What does the scene look like in Eve?

Looks like you're (also?) setting colour temperature from the HomeKit scene? What does the scene look like in Eve?

So I don't use the EVE app, I installed it to check and I found the issue I think. In the EVE app it is showing both a "temperature" and "color" change for the LED strip. When I turn of the temperature when it needs to switch to green en turn of the color when it needs to switch to bright cold white it works perfectly fine from EVE. However when I call the scene from homekit, it doesn't work? When changing scenes in Eve, can't homekit take this behavior over or do I need to do something special to let homekit take over the logic from what I programmed in EVE?

Looks like you're (also?) setting colour temperature from the HomeKit scene? What does the scene look like in Eve?

What do you mean exactly by "what does it look like"? You also have 2 tabs, one for color, one for temperature. When I set the scene, it works once, it jumps to green, but it does not jump back to the white leds once the other scene is called. It seems it has difficulties switching between the two "tabs" if that makes sense.

I uploaded the dumpfile here: https://gofile.io/d/gYq45k

Looks like you're (also?) setting colour temperature from the HomeKit scene? What does the scene look like in Eve?

Sorry I closed the topic by accident, so I deleted the scenes and started over and only added the LED controller to make things a bit simpler. These is what I have for both scenes. One I'm asking bright White light, on the other one 50% colored. It works once, but once it is switched to either one of the (either the white leds or the RGB leds), it seems to be stuck in there.
https://ibb.co/wcgq2NB
https://ibb.co/VTMbgYK

Please run Homebridge -D and capture and attach the log file, while recalling the scenes.

I uploaded the dumpfile here: https://gofile.io/d/gYq45k

You're running an old version of Homebridge Hue, please update to the latest version.  Notably v0.11.68 has some changes handling color temperature, which might be related to your issue.  You might be hitting some HomeKit limitations, that .68 and later work around.

I uploaded the dumpfile here: https://gofile.io/d/gYq45k

You're running an old version of Homebridge Hue, please update to the latest version. Notably v0.11.68 has some changes handling color temperature, which might be related to your issue. You might be hitting some HomeKit limitations, that .68 and later work around.

Yes I know, I get this warning "The homebridge-hue plugin recommends running on Node.js v12.18.2 or later. You are currently running Node.js v12.16.2." So I don't want to update yet. Still need to figure out how to update the Node.js (still relativly new to all of this).

Please run Homebridge -D and capture and attach the log file, while recalling the scenes.

Please forgive me that I still don't know what I'm doing but I get this:
https://ibb.co/5jbfVC9

Damn, autocorrect like to capitalise homebridge.  It’s homebridge -D.

Damn, autocorrect likes to capitalise homebridge. It’s homebridge -D.

Oh ok thanks, now I get an error that the file is not found?
https://ibb.co/BL6GbC0

Damn, autocorrect likes to capitalise homebridge. It’s homebridge -D.

Any idea what is causing that error?

Too old version of Homebridge Hue in combination with newer version of Homebridge.

Too old version of Homebridge Hue in combination with newer version of Homebridge.

Thanks for the reply, I updated everything to the latest version as you can see here:
https://ibb.co/5LVmFzN
I retried and still got the same error message:
https://ibb.co/Nm8cTmh

You probably need to specify -U /var/lib/homebridge as well (assuming that's where your config.json is).

You probably need to specify -U /var/lib/homebridge as well (assuming that's where your config.json is).

I want to say thank you for the patience to get me through this issue since it's obvious I have no where near the knowledge compared to other users. So I tried that command, but also here it's throwing "command not found" error.
So sorry to ask again, but how and where do I need to specify that command? I really want to provide you with the log to solve this issue

Try homebridge -D -U /var/lib/homebridge > homebridge.log 2>&1.  Make sure to stop any homebridge service first, or you’ll get the EADDRINUSE error.

Hello, I'm sorry I had a very busy week, I will check it this weekend, the issue still exists so I will provide you with the log ASAP!

Hello,
So I did what you asked. Do you need to specify the path everytime? I don't really know what the command "homebridge -D -U /var/lib/homebridge > homebridge.log 2>&1" does, but in each case If I don't specify the path it doesn't work, If I type in the command you suggested I get no errors so I assume the log is written.
So in what order do I need to do what in order to provide you with what you need to have a look at what goes wrong here?

When do I need to run that command?

 Is this correct?

How do I find that log?

@KLucky13 Some of your controller channels may be fried. I have 2 of this model and mis-wired one. Now the RGB channels are still working fine but the 2 CCT channels are misbehaving: having both set at 50% they are both lit, but changing to cold or warm color, both are dropping to 0% instead of one dropping to 0% and the other raised to 100%.
I know this is a hardware issue for me because the second controller with the exact same setup works just fine.
Your symptoms look very much like my dead controller...

@KLucky13 Some of your controller channels may be fried. I have 2 of this model and mis-wired one. Now the RGB channels are still working fine but the 2 CCT channels are misbehaving: having both set at 50% they are both lit, but changing to cold or warm color, both are dropping to 0% instead of one dropping to 0% and the other raised to 100%.
I know this is a hardware issue for me because the second controller with the exact same setup works just fine.
Your symptoms look very much like my dead controller...

It does not sound like the same issue, it's a brand new controller without it ever being miswired. It also works perfectly fine when I manually control it. It's just when calling scenes that it does not do what I ask. If I manually ask whatever colour, it always does it as expected

@KLucky13, I need a debug log from the moment homebridge starts to the moment the issue occurs.

Stop any homebridge service;
Start homebridge in debug mode, capturing the output into a file:sudo homebridge -D -U /var/lib/homebridge > homebridge.log 2>&1

Try to switch scenes, reproducing the issue.
Stop homebridge by hitting ctrl-C in the terminal where you issues the command.
Check the homebridge.log contains the output.
Compress the file by gzip homebridge.log.
Attach the file homebridge.log.gz here.

Ok so you saw the other topic where my entire HomeKit automation list was gone after a power failure. So in order for this test I needed to re-create the scenes as described as above. For some reason it seems to work.. the thing is, before the power failure I deleted the scenes and started over multiple times without it ever properly working. Now it works first time.. it both switches brightness AND colour when switching between scenes.. I'm very confused to be honest.. I will do some more tests tomorrow, I will expand the scenes with more lights and see if it keeps working or not.

@KLucky13 did you manage to do the tests?  Are you still experiencing the issue?

@KLucky13 did you manage to do the tests? Are you still experiencing the issue?

Hi, so far so good. Pretty annoying since I still don't know what caused the problem in the first place.. I now created scenes with both the RGBWW lights and other lights and can switch between them as much as I want, the RGBWW switches both color and brightness as expected...

OK, thanks.  Closing this issue then.

HI, i am not sure is it a same issue.
i am using decoz as gateway. i am able to control the brightness & color on my iphone via Home App.
However, changing the color temperatures is not working properly.
The log is showing hue and color is changing when setting the color temperature

so it's not changing the color temperature. so i back to the Phoscon App to change the color temperature.
it;s works flawlessly. Would you please help to take a look?

Not related.  Apple’s Home app doesn’t support colour temperature properly for color lights, use Eve instead.  See #571.


Fraction analysis

I know the wiki contains a section about fractions but I couldn't understand it well - is there a way to tell the software to sum up fraction to a single column output (LFQ, #PSMs, etc.)?
Thanks!
David.

Not yet, no; I'm actually working on that now, actually. The difficulty is in normalizing the fractions. But we'd like to have the user input the conditions, biological rep, tech rep, and fraction info for each file and sum/normalize appropriately to make quantitative analysis easier. So hold tight!

I'm going to close this issue and merge with issue #291.


Migrating v3 entries to v5 with entries with the same ID already in library creates duplicates

Steps to reproduce

Restore this backup https://cdn.discordapp.com/attachments/569823838305648640/1011391735210987531/tachiyomi_2022-08-22_01-38.proto.gz - Made in TachiSy r476
Migrate all entries to v5
Check to see if there are duplicate entries

Expected behavior
Entries with the same link are not removed from the library entirely
Actual behavior
Two entries with the same MangaDex id are created
Crash logs
No response
Neko version
<IP_ADDRESS>
Android version
Android 9
Device
Amazon Fire HD 10 Plus
Other details
No response
Acknowledgements

[X] I have searched the existing issues and this is a new ticket, NOT a duplicate or related to another open issue.
[X] I have written a short but informative title.
[X] I have tried the troubleshooting guide.
[X] I have updated the app to the newest version Latest.
[X] I have filled out all of the requested information in this form.

Was a restore issue


Api.ai - Empty query parameter

Hi,
I'm just trying to implement the Api.ai middleware. For some reason, the query parameter is empty during POST request to Api.ai (I think it should be the user message):
User says: This is my test
$botman->hears('myAction', function(BotMan $bot) {
    $bot->reply("this is my reply");
})->middleware(ApiAi::create('xxx')->listenForAction());

{"query":[""],"sessionId":1487019928,"lang":"en"}
Did I miss something?
Thank you!

Which Driver do you use? Query should be just $message->getMessage(), are you getting the message at https://github.com/mpociot/botman/blob/master/src/Mpociot/BotMan/Middleware/ApiAi.php#L67?

I'm using the FacebookDriver. Yes, this is the line where I get the message.

If you remove the middleware and echo the received message back to the user, does it work?
Any other settings you apply to Botman?

I've added two custom drivers and I'm using DoctrineCache. I've also removed both options to simulate botmans "default" behaviour. Without success.
Could you give me an example for:

remove the middleware and echo the received message back to the user

Thank you.

Something like:
$botman->hears('hello', function(BotMan $bot) {
    $bot->reply($bot->getMessage());
})

You're right. It seems to be a general issue and not related to the Api.ai middleware. I did:
$botman->hears('hello', function(BotMan $bot) {
       $bot->reply(' . ' . json_encode($bot->getMessage()));
});

And got:
. {}
So $bot->getMessage() is empty. Any advice?
Thank you.

@ribb3r $bot->getMessage() is not empty. It's just not JSON serializable.
Try this instead and you should receive a dump of the message object:
$botman->hears('hello', function(BotMan $bot) {
    $bot->reply(' . ' . print_r($bot->getMessage(), true));
});

makes sense ;-) Thank you.
My issue was resolved with  108c890

Awesome :)


kconfig: drivers: audio: Remove redundant AUDIO_DMIC deps.

These files are sourced within an if AUDIO_DMIC, in
drivers/audio/Kconfig.
if FOO is just shorthand for adding depends on FOO to each item
within the if. There are no "conditional includes" in Kconfig, so
if FOO has no special meaning around a source. Conditional includes
wouldn't be possible, because an if condition could include (directly
or indirectly) forward references to symbols not defined yet.
Tip: When adding a symbol, check its dependencies in the menuconfig
(ninja menuconfig, then / to jump to the symbol). The menuconfig also
shows how the file with the symbol got included, so if you see
duplicated dependencies, it's easy to hunt down where they come from.

Codecov Report

Merging #14217 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #14217   +/-   ##
=======================================
  Coverage   52.68%   52.68%
=======================================
  Files         307      307
  Lines       45473    45473
  Branches    10530    10530
=======================================
  Hits        23956    23956
  Misses      16640    16640
  Partials     4877     4877

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 d7ae2a8...78c04c4. Read the comment docs.


generic EntityManager in JsonObject

Here is a PoC of what I suggested you the other day.
A self-explanatory use-case:
>>> route = cf.route.get_first()
>>> route.apps
<cloudfoundry_client.entities.EntityManager object at 0x7f3288963e10>
>>> route.apps.get_first()
{u'entity': {u'version': ...

As you see, one can immediately use the result of a request to make another one.
It's a PoC because I'm not sure it's a good idea, in this scenario, to have self.__dict__ = self; let me know what you think about it.
Otherwise there is the: for item in cf.route: and a small optimisation.

@romain-dartigues Hi , I took a look at what you did.
First of all thank you very much.
Regarding the optimisation (0ee6900) and the __iter__( e4b92c1), I did a cherry pick to keep track of your contribution and directly push them under the masterbranch.
The next point is a little harder. Here is my point of view: I understand completely the idea you pushed. nevertheless , if we push further, we may want that for an application to have a start() method for example. And for that we need to have separate class for each entities.
Thinking that way made me review the way I did things:

for further need, the Clientobject directly inherits is a credential manager itself; that way, for example the ApplicationManager can access to the SpaceManagerand vice versa. There is a impact on the token initalisation since methods of the mother class does not have the same name.
each Manager will be responsible to instanciate its own objects
keep the generic JsonObject for operations such as get_instances
create a new Entityclass that inherits from JsonObject but has a reference of the client
For example Application inherits from Entityand offers some methods such as space() , routes(**kwargs), ... On this point I did wanted that each underlaying call (access to the space for example) to be a method call, in order not to hide the underlaying network call
Space inherits from Entity and offers applications(**kwargs) and service_instances(**kwargs)

You can take a look at my work on the work branch
Thank you for your involment, I hope the choice I made will suit you

Development :heavy_check_mark:
Unit tests :heavy_check_mark:
Lacks a little integration maybe

integration


Add missing file jquery.fastLiveFilter.js

#58 Add missing file vendor/jquery-fastlivefilter/jquery.fastLiveFilter.js

It is supposed to be missing. It's a third party library. You should use 'bower install' to collect the third party libraries. (see README.md)


request update

Description

How has this been tested?

Types of changes

[ ] New feature - feat
[ ] Bug fix - fix
[ ] Refactor - refactor
[ ] Test cases - test
[ ] Other(s):

Remarks

N/A

Hi @handta,
It looks like you accidentally included modifications on brandings and attributions in your pull request. Would you mind supplying some details by filling in the PR description template?
If this was created by mistake, feel free to close it.
Thanks!

Hi @handta,
It looks like you accidentally included modifications on brandings and attributions in your pull request. Would you mind supplying some details by filling in the PR description template?
If this was created by mistake, feel free to close it.
Thanks!

@handta, I have decided to close this pull request due to the lack of activity and a detailed description. However, if you believe that closing it was a mistake or if you have additional information or updates to provide, please feel free to reopen the pull request. I appreciate your understanding and cooperation. Thank you.


VDC: Kubeapps raise error when deploy twice

Description
Kubeapps failed to deploy another solution if there is one deployed.
Steps to reproduce

Deploy successful Kubeapps solution
Deploy another one
Will failed to deploy the second one

Traceback/Logs/Alerts

From logs

2021-02-11 09:03:01.214 | ERROR    | jumpscale.sals.chatflows.chatflows:wrapper:173 - error when executing step install_chart. exception: Failed to deploy chart marketplace/kubeapps, error was WARNING: Kubernetes configuration file is world-readable. This is insecure. Location:~/.kube/config
W0211 09:02:58.940238  711894 warnings.go:70] apiextensions.k8s.io/v1beta1 CustomResourceDefinition is deprecated in v1.16+, unavailable in v1.22+; use apiextensions.k8s.io/v1 CustomResourceDefinition
Error: rendered manifests contain a resource that already exists. Unable to continue with install: ClusterRole "kubeapps:default:apprepositories-read" in namespace "" exists and cannot be imported into the current release: invalid ownership metadata; annotation validation error: key "meta.helm.sh/release-name" must equal "jnpqjctvcp": current value is "frnsskumxy"

From frontend


Use more lightweight library for parsing/handling JSON data

As per request by a user in discord, the library currently uses fasterxml-jackson databind, which in itself is likely too large for a library with this little volume, especially when this library is required to be shaded/exported into the final jar users will export.

Replacing said jackson-core databind with a more lightweight library, org.json:

Tested locally using the already existing "LocalTesting.java", works as well as before.

Keeping https://github.com/stleary/JSON-java/issues/893 in mind, will update with another pr once this goes through

Thanks for contributing!


Add build folder for CMake

Usually CMake builds are performed in a folder called build that also shouldn't be tracked

Surprised this  wasn't already in there 👍


Could you help me get it to work?

Hello good morning, how are you? I'm Hewerton.
I would like some help.
I've been trying to get your system to run for a week now and I can't.
Could you give me some tips?

Hi Hewerton,
Thanks for reaching out. I now added a Getting Started section to the README, which should help you set up the project. Please check it out for step-by-step instructions. I hope this helps!
Best,
Jens


[BACKLOG-1153] As a Hadoop Copy Files (VFS Browser) user I need to select named clusters

@mdamour1976 Please Sir!

Ran unit tests and passed (core and engine).  Merging..


Test for wordsWithMaximumScore

Unfortunately there doesn't seem to be a good way to compare equality of
two slices w/ golang std lib.

Oh this is just great.
Thanks!


Fix: Add Transactions Button

Add Tx btn now works even after txs are submitted. Also added a fix for multicalls where after the main batch had been signed, we got more signature requests for individual steps - therefore potentially triggering a tx twice.

@poocart do you know if this is still relevent?

@poocart do you know if this is still relevent?

I don't think so, closed and parked for now.


notary lapis app

Child of threefoldtech/home#135

implement placeholder functions in notary actor:

register(3bot_id, key, content, content_signature)
get(key) ---> returns json
delete(3bot_id, key, key_signature)   ---> returns True/False

notary REST API should be exposed in lapis
document how to use

How to run Notary
in kosmos run the following:

server = j.servers.gedis.configure(host="<IP_ADDRESS>", port=8888)

server.actor_add('/sandbox/code/github/threefoldtech/digitalmeX/Notary/actors/notary_actor.py')

server.start()

using Tmux
cd /sandbox/code/github/threefoldtech/digitalmeX/Notary/

moonc . &&lapis server

How to use it
to register
curl -d '{"robot_id":"123", "key":"test", "content":"Notary", "content_signature":"Notary_test"}' -H "Content-Type: application/json" -X POST http://localhost:8080/register

to get
http://localhost:8080/get?key="test"

to delete
http://localhost:8080/delete?robot_id="123",key="test",key_signature="Notary_test"

Lapis API doesn't return properly formatted json yet.

@zaibon
i think now it works good after using MessagePack

it's working fine.
i run the same steps as in ticket and doc


Improve speed of browser tests by caching container build

Store browser test container in ECR and make the build step use a cache from there.  Is this the right place to start?  https://github.com/actions/cache. Seems like it might help?

Looks promising. The only complaint? I have is the size limit of the cache of the whole repo is 5GB. Considering our images, we can only cache at most 2!

Woah, our images are huge!  I suppose our prod image is merely "big".  Bummer!


Create OAuth communication system and user

Whole certificate process in communication system can be simplified

rename "Step 10: Get SAP Cloud Platform subaccount's metadata" to "Step 10: Get SAP Cloud Platform subaccount's signing certificate"
adapt descriptive text to for example "Switch to your SAP Cloud Platform subaccount. Open trust settings, copy all data from the Signing Certificate field ( in windows: click inside and press CTRL+a ) and paste it to some text editor.

rename "Step 11: Create certificate from metadata" to "Step 11: Create certificate file"
delete step 1 from Step 11
adapt descriptive text of step 1 (former 2) of step 11 to for example "In the text editor file that you pasted SAP Cloud Platform subaccount's signing certificate into before, add a line with value "-----BEGIN CERTIFICATE-----" in front of the Signing Certificate and a line with value "-----END CERTIFICATE-----" after.

          -----BEGIN CERTIFICATE-----
               <SIGNING_CERTIFICATE>
          -----END CERTIFICATE-----

Adapt descriptive text of Step 12 to for example "Go back to your SAP S/4HANA Cloud system and open your created communication system draft. Edit your draft and enable it for OAuth 2.0 by checking the enabled box. Then upload the certificate by clicking upload signing certificate. Take the provider name from the CN attribute of the Signing Certificate Subject, that appears after upload and enter it as the provider name. Click Save.

With this step, you’ve uploaded your certificate to your communication system. Now your S/4HANA system trusts your SAP Cloud Platform subaccount."
The picture should also show the execution sequence

Done


Create Contributions guide

@BrainlessLabs @sp-mishra Can I take up this issue?

@sp-mishra For the contributions guide do we have to create another contributions.md file and add the entire process of how to find an issue, to forking a repository to finally making a PR?

Yes we need to. I have added some guide but you can review and then modify it.


Add base class for all styles

Closes #17 .
I can also work on #16 if you want

@rurickdev What do you think?

This looks really cool. Is approved from my side, but I think only @rektdeckard can merge the branch
Also, I'm a little busy this morning, if you can work on #16 too that would be great!

Hmm, I found out, const isn't very nice to work with these abstract classes, I will look at it to fix both

Hmm, I think we cannot remain the PhosphorIcons.regular structure with static classes, or we need to do something like
static const _address = ...;
final address = _address;

but I don't think this would be nice

Update: I implemented the second option in this commit. Share your opinion!
But this would be the second breaking change

Hi can somebody test if the example app builds on android?
I have currently no android sdk installed

@CodeDoctorDE I don't know if that's the best approach, afaikn the idea is to have the same style of API for all the Phospho libraries and this will definitely break that idea. @rektdeckard can you confirm that?
I would prefer this option
PhosphorIconsRegular.plus

rather than this
PhosphorIcons.plus(PhosphorIconsStyle.regular)

the first options is what the community package of font awesome does
https://github.com/fluttercommunity/font_awesome_flutter/blob/master/lib/font_awesome_flutter.dart
and for example, both MDI community icons package (and all the icon packas i know about) does the previous sintax with the style as subfix of the icon
https://github.com/pepsighan/mdi-dart/blob/master/mdi/lib/mdi.dart
https://github.com/ziofat/material_design_icons_flutter/blob/master/lib/material_design_icons_flutter.dart
the second syntax would include too much boiler plate for the users.

I had added both systems, if you want to use it.
I added this complicated system too, to allow something like:
PhosphorIcons.plus(selected ? PhosphorIconStyle.filled : PhosphorIconStyle.regular)

What improvement bring doing this
PhosphorIcons.plus(selected ? PhosphorIconStyle.filled : PhosphorIconStyle.regular)

over this
selected ? PhosphorIconsFilled.plus : PhospohorIconsRegular.plus

I build my app very modular. For example I have this abstract class
abstract class Handler {
PhosphorIconData getIcon({bool filled = false});
}

With this implementation I can further improve the ui and more, I can use this new Style enum in the parameter to easily choose the icon for the current ui.
It would help me a lot, if there is a connection between these styles with the same icon.

As a non flutter dev I don't feel qualified to have a real opinion here, so I'm happy with whatever you all agree to as long as it follows the principle of least astonishment for users :)

@rurickdev I have given you write access on this repo, BTW

That sound really handy for some cases.
I would just ask if you are sure that all that static getters are tree shaked (I believe it does), if not then the package could be adding a lot of code that maybe many apps don't need, also, this feature will not be in other phospho libraries, something that will (maybe) force other packages to implement, but again, thats part of some restrictions that @rektdeckard knows better than me.
at the end, I'm not against it, looks like a good feature, just wonder why other icons packages don't have something similar, makes me think...
also, in your example, I still don't see the advantages
abstract class Handler {
  PhosphorIconData getIcon({bool filled = false});
}

class PenHandler extends Handler {
  PhosphorIconData getIcon = PhosphorIcons.pencil;
}

class NoteHandler extends Handler {
  PhosphorIconData getIcon({bool filled = false}) => filled ? PhosphorIconsFilled.note : PhosphorIconsRegular.note;
}

buuuut I could see them if there is anyone that has created some kind of design system / themeData / template where they just needs to pass the style and all the icons in the app changes to that.
/// example using riverpod

/// pod that controls the style state
final iconsStylePod = StateProvider((_)=>PhosphorIconStyle.regular));

/// some consumer widget
Icon(
  PhosphorIcons.pencil(
    style: ref.watch(iconsStylePod),
  )
),

/// some user settings options callback
onIconStyleChange: (PhosphorIconStyle style){
  ref.read(iconsStylePod.notifier).state = style;
}

Maybe the only thing I'll add is a default option in the getters, so the users can use this option without having to pass a style always. Also, please add docs in the class and methos that clarify the difference on why use PhosphorIcons.pencil(style) or PhosphorIconsRegular.pencil
and update the migration guide in the readme to notify about this feature and how the user can use it.
and @rektdeckard can you confirm this new feature dont break the idea of the same API for all the packages, or if there is no problem to have it just here?
for my side, I'll be happy to approve it when the previos comments are solved

Sure, I can add this default option. Should I just use regular as default or what do you mean?
PhosphorIconData pencil([PhosphorIconStyle style = PhosphorIconStyle.regular])

yeah, I think regular is the way to go

Or you can also make a special PhosphorIcon widget that has a function as icon attribute:
final PhosphorIconData Function(PhosphorIconStyle) icon; property and the style will be get from the widget tree

and @rektdeckard can you confirm this new feature dont break the idea of the same API for all the packages, or if there is no problem to have it just here?

I think we do what we can. It's fine to  long as we have:

Smart defaults (regular weight is the default)
Support for all features available to other libs (we now have duotone, so satisfied)
Idiomatic (does not surprise users in how it is consumed)
Performance/size do not suffer terribly from 1-3

I think we do what we can. It's fine as long as we have:

I believe this proposed changes satisfies all points

Or you can also make a special PhosphorIcon widget that has a function as icon attribute: final PhosphorIconData Function(PhosphorIconStyle) icon; property and the style will be get from the widget tree

that sounds like a good idea, but I don't know if it should be in this package or maybe other one that depends on this to keep the single responsibility (and like other packages that have extensions/plugins)
for the freature I think something like:
PhosphorStyleProvider( //don't like this name but couldn't think in another one
  style: PhosphorStyle.regular,
  child: MaterialApp(...),
);

then do something like final style = PhosphorStyle.of(context).style to read the style
the only weird thing I could think of the function approach is how to direct the users to do
PhosphorIcon(
  icon: PhosporIcons.pencil,
),

instead of
PhosphorIcon(
  icon:(style) => PhosporIcons.pencil(style),
),

or worst
PhosphorIcon(
  icon:(style){
    // more code and logic 😨
    PhosporIcons.pencil(style: style);
  }
),

either way I think we are diverging the discussion, all add the comments to the code so we can keep track of them, but after resolved we can merge the PR


Update trimmer docs to include warning IL3003

Updates the docs related to the trimmer to include info about warning IL3003

Please also add an entry to https://github.com/dotnet/docs/blob/main/docs/fundamentals/toc.yml.


Fix-threading-join()

Removed the threading from a couple of calls (await market open and trade).
Added parallel threading start, followed by joining.

have you tested it?
how about the performance of parallel threading?
does it need to add the num of cores?

have you tested it?
how about the performance of parallel threading?
does it need to add the num of cores?

@marcipops
This branch has conflicts that must be resolved
Conflicting files
tutorials/FinRL_PaperTrading_Demo.ipynb
pls revise it

Please explain 'num of cores'.
Currently this PR is simpy to offer a fix for the issue of lack of parallelism of trades. The code now multi-threads properly - the joins are invoked after all the threads have started.

for example, there are 8 cpu cores, and 10 threads are opened.

I'm not an expert at this, so I'll leave to someone more qualified, but it looks like "Unfortunately, in many cases your code can only run one thread at a time, due to Python’s global interpreter lock, the GIL for short": source:  https://pythonspeed.com/articles/python-gil/


Can't open personal private folder - reset message included

Please reset my access to the private folder
$ keybase sign -m "Please reset folder /keybase/private/thanandorn because all the devices that have access have been revoked."
BEGIN KEYBASE SALTPACK SIGNED MESSAGE. kXR7VktZdyH7rvq v5weRa0zkS1DxuS VoVE2HRXmNQtJM5 QtJmhLoo5oATFzV 29pnt1ejBbkOxTm m1LisDisj2L27W0 LfPN0sX1u7Q7KdC hA1TZukHEePXrPa cq06qhX85bJxw0N juRNWDokUINcPWY JuQ3RabUcOWZxNH kzogaKdaj8Aa3jW pgNvWKl45e1gWTA 3rSmplM4Vgm6JfH AWqglO3sonCHNAw L7a3OgHdvLd8hP4 qRFw1DBPVgQfoHe 0yRNyluCodiGQTt nzfMh0qS014jVuR xRJTTFkdqvWronJ 71612n4UDnXIpih sYRbnVaJ9IyAsUY . END KEYBASE SALTPACK SIGNED MESSAGE.

@thanandorn: I can do that, but can you please include the current time and date in the signed-over message?  Something like this, substituting the time and date where indicated:
keybase sign -m "<DATE_AND_TIME>: Please reset folder /keybase/private/thanandorn because all the devices that have access have been revoked."

Thanks!

@strib Here you are. Hope I've got it right this time.
keybase sign -m "Oct 4, 2017 10:16:34: Please reset folder /keybase/private/thanandorn because all the devices that have access have been revoked."
BEGIN KEYBASE SALTPACK SIGNED MESSAGE. kXR7VktZdyH7rvq v5weRa0zkS1DxuS VoVE2HRXmNQtJM5 QtJmhLoo5oATFzV 29pnt1ejBcEBszD 8hWkxMKyDiGZqyJ BZcMmTQL44iLsrQ 6pSnL2qkbbKy9Lq WyLF4g6k4mbSsvr jXnSCyurEtS9F7y 8BEijArUu7WlxIg 1FJZp3fMchbMKYt Ts9SB9fO8iDGVkb 2M1uWtoct0SBgih HjbY8J4OQO97AIo XwSyMjs05DruYA7 4w8Jw8OlGxs29KU pj7S4RdVknYs3Jj IHIbApC4Xc8a5Zq naL2AicnPX6jv0b YNo2Lvhn5JaNDLB wX7MWE0Po1DGxzH i6aSrK3SAItsrF9 t1GFjoZG7lhFRm. END KEYBASE SALTPACK SIGNED MESSAGE.

Many thanks!

I reset the folder.  Please check it out and close this if everything seems ok.  (Might require a Keybase restart.)

@strib Works now. Thank you very much.

@thanandorn your private folder is still readable by the following, unrevoked devices on your account:

puppy review (paper key)
mimix
marcos
sriracha

Those seem to be the only devices currently associated with your account, so the problem must be something else.  Can you please run keybase log send, and post the resulting log ID here, and I can look more into it?

@strib Here you are. Thx
------------
Success! Your log ID is:

  f1f673d96a17d9b2fafaa91c

There was a regression in the linux builds around reading folders that had been written by old revoked devices, as in your case.  The latest linux release has the fix, so please try upgrading and close this out if things seem ok now.

@strib sorry its still not working after upgrading the client.
$ rpm -qi keybase
Name        : keybase
Version     : <IP_ADDRESS>80530173728.f81992c7c9
Release     : 1
Architecture: x86_64
Install Date: Wed 30 May 2018 19:27:45 BST
Group       : Unspecified
Size        : 254090408
License     : BSD
Signature   : RSA/SHA256, Wed 30 May 2018 18:47:51 BST, Key ID 47484e50656d16c7
Source RPM  : keybase-<IP_ADDRESS>80530173728.f81992c7c9-1.src.rpm
Build Date  : Wed 30 May 2018 18:47:12 BST
Build Host  : cafc96653d13
Relocations : (not relocatable)
Summary     : Keybase command line client
Description :
Keybase command line client

$ ls -al /keybase/private/thanandorn/
ls: cannot open directory '/keybase/private/thanandorn/': Permission denied

$ ls -al /keybase/public/thanandorn/
total 2
-rw-------. 1 tron root 395 Aug 24  2016 id_rsa.pub
-rw-------. 1 tron root  22 Jan 26  2017 index.md
drwx------. 1 tron root 489 Apr  4  2017 tara
-rw-------. 1 tron root 370 Sep 20  2017 Vagrantfile

Can you please do another keybase log send then?

Success! Your log ID is:

  09ac3cc6e14e89b7462f111c

Thank you.

Thanks.  I've tracked down the issue.  Your client is actually still trying to access the old version of the folder that I reset back in October.  This is because of a complicated chain of events relating to a new chat feature, which I won't bother to detail here unless you're really interested.
Suffice it to say, this is a bug in our code, and I'm working with a few people to figure out a safe resolution for you.  Sorry for the inconvenience, and thanks for your patience.
(P.S.: There's no data loss or anything, the new folder is still there with all its data, we just need to fix things so that your client sees it instead of the older one.)

Summary of the problem would be interesting to see but I'll let you work on it first. Please take your time. Many thanks.

@thanandorn sorry about the delay.  We reset some data on our servers that should let you access your new folder again.  First, run keybase db nuke.  Then, just to be safe, restart Keybase.  Then try again and let us know what happens. Thanks!
(I'll give a rundown of the problem in a separate message so it doesn't delay this one.)

In the beginning, there was the file system (KBFS).  KBFS was built with a special-purpose keying mechanism for its data, which had some operational drawbacks.  (Like, if you add a new device, the rekeying isn't instantaneous; there is an asynchronous operation that has to happen and can fail silently.)
Then we introduced chat, which originally relied on the same keys that KBFS generates.  So under the hood, each chat was "powered" by a matching KBFS folder in terms of the keys it used.
Then we introduced teams, and at the same time we added a more general keying mechanism that doesn't have the drawbacks of the KBFS one. Adding a new device atomically gives that device access to all the keys it needs.  Our intent was (and is) to migrate all chats and KBFS folder to this new mechanisms, so they can all benefit.
Chat migration happened first (very recently) because it's a bit less complicated.  KBFS migration is almost ready, and in fact existing clients can already understand the migrated KBFS folders, when that eventually happens.  These migrations use the new keying mechanism by relying on "implicit teams" -- that is, in order to use the new team keying mechanism, we turn EVERYTHING into a team (such as your private folder and self-conversation) under the hood.  Every team has its own "sigchain", which is a the sequence of operations, signed by valid users of the team, to make sure Keybase isn't cheating anywhere.
For KBFS migration, we are going to store the folder ID in the sigchain itself (rather than as a separate mapping between folder name and ID in the KBFS server db, as it is today).  Chat also needs to store the ID in the sigchain, because it needs to be able to find the old KBFS keys for migrated chats.  So, as part of chat migration, it stored the folder ID for every existing chat in the sigchain for that chat.
In your case, because you had this old folder ID (that has previously been reset) lying around in our database, the chat migration code accidentally picked up the old ID instead of the new ID and put it in your sigchain.  Then, your KBFS folder saw that and started using its post-migration code, and treated that as the real folder ID instead of checking with the server.  So that's why it's not seeing the new, post-reset folder.
This is a bug, but it only affects users who've had a manual reset done to their folders AND had a chat conversation that matched that folder, AND got unlucky and the wrong folder ID was put into the sigchain.  We (hopefully) fixed it for you by just nuking the implicit team associated with your private folder/chat, and when you access it again a brand new implicit team will be made instead.

@strib thank you very much for the help and much appreciated for the explanation.


Incomplete angular installer

From my, very rudimentary, understanding of the angular language server I believe the current config may be incomplete (feel free to correct me if that is not the case).
Currently the script, will install the language server and update the default cmd.
However, if we want to make use of the angular language server in a portable fashion, I believe it requires a typescript installation. So if I were to try and use it from its installed folder, it will trigger an error like so :
node node_modules/@angular/language-server/bin/ngserver --stdio --ngProbeLocations ./
/home/jemag/.local/share/nvim/lspinstall/angular/node_modules/@angular/language-server/index.js:157
      throw new Error(`Failed to resolve '${packageName}' with minimum version '${minVersion}' from ` + JSON.stringify(probeLocations, null, 2));
      ^

Error: Failed to resolve 'typescript/lib/tsserverlibrary' with minimum version '4.2' from [
  "--help"

Also the command does not specify the --tsProbeLocations and --ngProbeLocations. So if I am in an angular project called "Neptune" , LspInfo will return the following command used:

Which will not work if the project does not have @angular/language-service installed, or if the project uses a Typescript version < 4.2
Basically, I think it would make sense to also install typescript and properly set the --tsProbeLocations and --ngProbeLocations to the nvim-lspinstall's installed typescript and angular/language-service. Perhaps leaving the freedom to the user to change those, if needed.
For example, this was the previous basic setup that I was using to make angularls work:
local configPath = vim.fn.stdpath("config")
local languageServerPath = configPath.."/languageserver"
local angular_cmd = {"node"<EMAIL_ADDRESS>"--stdio", "--tsProbeLocations", languageServerPath, "--ngProbeLocations", languageServerPath}

require'lspconfig'.angularls.setup{
  on_attach = on_attach_common,
  cmd = angular_cmd,
  on_new_config = function(new_config,new_root_dir)
  new_config.cmd = angular_cmd
  end,
}

where languageserver is a folder containing the required dependencies (angular/language-server and typescript).
P.S.: For some reason, even with projects having typescript >4.2 and @angular/language-service installed, the current default configuration did not seem to work. Curious if you've made it work for some test angular projects?

Yes, I made it work by installing angular language service and typescript for each project that is using it. I'll try again, see if it still works.
iirc this is also what the VSCode extension does, and I think it's the only correct approach. I can't assume what specific version of typescript (or angular) a project is using.

Seems the emacs guys are using a similar approach (https://github.com/emacs-lsp/lsp-mode/wiki/Install-Angular-Language-server), although with globally installed @angular/language-service, typescript and @angular/language-server (I personally prefer to avoid globally installed npm packages whenever possible)

So is the advice to install typescript globally on the system? Having to install the angularls inside each project seem to be slightly contradictory to the point of the LspInstall extension

iirc this is also what the VSCode extension does, and I think it's the only correct approach. I can't assume what specific version of typescript (or angular) a project is using.

VSCode extension ships the language service and typescript within itself as stated in the README.
This code seems to work with the language server shipped with lspinstall.
local config = require"lspinstall/util".extract_config("angularls")

local cmd = { "./node_modules/.bin/ngserver", "--stdio", "--tsProbeLocations",  "./node_modules", "--ngProbeLocations", "./node_modules" }

config.default_config.cmd = cmd
config.default_config.on_new_config = function(new_config,new_root_dir)
    new_config.cmd = cmd
end

return vim.tbl_extend('error', config, {
  install_script = [[
  ! test -f package.json && npm init -y --scope=lspinstall || true
  npm install @angular/language-server @angular/language-service typescript
  ]]
})

Just to mention that this will not work on legacy projects as per this issue. I didn't get to a proper solution, if someone is interested in helping.

hey @mactep. this edited config that is being returned is the one that would be passed to require('lspconfig').angular.setup?
I can't get it to work, everything I try gives Error: cmd not defined for "angular". You must manually set cmd in the setup{} call according to CONFIG.md. when starting LSP.

Salve.
Actually I changed this file.
But if you want to get it working, just do something like this. Just change languageServerPath to the directory you installed @angular/language-service and typescript.

Great, I'll try it later today. Obrigado querido :)


Add dockerfile format to snippet

I did not know about this!  I will fix some of my other extensions too!

@all-contributors add @gastaldi for docs


testAzure

Product and Version [VS/VSCode]:
OS Version [macOS/Windows]:
Live Share Extension Version:
Target Platform or Language [e.g. Node.js]:
Steps to Reproduce / Scenario:

Closing due to lack of information.


Enable State selection?

Is it possible to let US customers select their state during checkout?

...and I missed it.  Sorry to bother you, amazing work on this!

Glad you figured it out. Did you just read over it, or is there something we can improve in the checkout?

The checkout system is excellent.  I wish it improved the paypal flow as well (confirmation page), but overall very nice job.


[Bug]: When the user uses the 'Suggested widgets' the bindings fails for Select widget in Welcome tour

Is there an existing issue for this?

[X] I have searched the existing issues

Current Behavior
When a user follows the Welcome tour and does the tour manually by following the instructions of the tour when the user selects the Select widget that appears below 'Suggested widgets' on the right, the binding fails and no data is shown. (Refer video)
https://loom.com/share/5948225656234aa5be50984d109cfbed
Steps To Reproduce

In Homepage click on Welcome tour present at the bottom left
Follow instructions > Let's go > Start Building > New Query > Run > Under Suggested Widgets click on Select Widget > Observe the widget drop down and bindings >

Environment
Production
Version
Cloud

Removing QA label as new welcome tour is available now and this could not be tested.


Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work.

go-sqlite3 - tag v1.14.3
I'm building app in the goreleaser in docker environment. I read on README:
If you want to build your app using go-sqlite3, you need gcc. However, after you have built and installed go-sqlite3 with go install github.com/mattn/go-sqlite3 (which requires gcc), you can build your app without relying on gcc in future.

I'm running:
CGO_ENABLED=1 go install github.com/mattn/go-sqlite3
goreleaser --snapshot --rm-dist

goreleaser.yml:
builds:
  binary: [...]
  env:
  - CGO_ENABLED=0
  goarch:
    - amd64
  goos:
  - linux

and the error is:
./myapp
2020-09-17T14:24:42.648+0200    INFO    app/db.go:15    using database ./app.sqlite
panic: Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub

CGO_ENABLED=1 go install github.com/mattn/go-sqlite3
go build
./app

gives same error so it is not related to the goreleaser itself

I don't think the statement in the goreleaser README is true. (Or at least, isn't true anymore.)
 To my knowledge, there is no way to force the Go compiler to use a pre-built version of a library, and if detects any changes (including enabling/disabling cgo), it will recompile.

I'm facing the same issue.

I'm facing the same issue.

same issues here

same issues here!

@aviddiviner Thanks man my tests were not building I was using sqlite database for go application, getting this error -
failed to initialize database, got error %v, /var/lib/jenkins/workspace/GoBuildTest/repository/repository.go:80%!(EXTRA *errors.errorString=Binary was compiled with 'CGO_ENABLED=0', go-sqlite3 requires cgo to work. This is a stub)
I was using it as a part of jenkins build process, and my jenkins server was running on EC2 ubuntu machine, with build-essential this worked fine.

If you are using M1 Mac and have specified the environment variable GOARCH=amd64, you will need to change it as follows
go env -w GOARCH=arm64

same issues here

Has anyone managed to solve this in a windows environment?

go env -w CGO_ENABLED=1

I has this issue in Windows and did the following to fix it:
tl;dr:

Run go env -w CGO_ENABLED=1
Download and install tdm64-gcc-5.1.0-2.exe with default options (to add to PATH env variable), and restart your terminal or IDE session.

Longer explanation:

Thanks to @ayoubzulfiqar, I ran go env -w CGO_ENABLED=1
Then when I run go run ., it shows the error: cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%
I search the web, and found an article that I can use MinGW (mingw-get-setup.exe), and I followed the article, and I had GCC available, but then go run . didn't work, it showed the error: cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
So I searched the error, and found this SO answer that said TDM-GCC only works in Windows x64, so I downloaded tdm64-gcc-5.1.0-2.exe and installed it, and removed MinGW from my System PATH environment variable, and now I can build and run my go app using go-sqlite3 package.

I has this issue in Windows and did the following to fix it:
tl;dr:

Run go env -w CGO_ENABLED=1
Download and install tdm64-gcc-5.1.0-2.exe with default options (to add to PATH env variable), and restart your terminal or IDE session.

Longer explanation:

Thanks to @ayoubzulfiqar, I ran go env -w CGO_ENABLED=1
Then when I run go run ., it shows the error: cgo: C compiler "gcc" not found: exec: "gcc": executable file not found in %PATH%
I search the web, and found an article that I can use MinGW (mingw-get-setup.exe), and I followed the article, and I had GCC available, but then go run . didn't work, it showed the error: cc1.exe: sorry, unimplemented: 64-bit mode not compiled in
So I searched the error, and found this SO answer that said TDM-GCC only works in Windows x64, so I downloaded tdm64-gcc-5.1.0-2.exe and installed it, and removed MinGW from my System PATH environment variable, and now I can build and run my go app using go-sqlite3 package.

it works, thx

@margani works! Thanks
Note that the installer tells you to get the new ver from:
https://jmeubank.github.io/tdm-gcc/download/

gorm.io/driver/sqlite still depends on this

Is there a workaround for docker on Mac M1 with amd64?

Heroes of the day!!! 🎉 @margani @Kaloszer @ayoubzulfiqar @jmeubank
Rarely seen guidance so to-the-point and excellent installer of the tdm-gcc team, instantly up and running
Go really has a slick (and sick ^^) ORM with GORM!

@rittneje said here:

I don't think the statement in the README is true. (Or at least, isn't true anymore.)

Seems that line was added to the readme in https://github.com/mattn/go-sqlite3/pull/250, back in 2015. Not much extra context there, but quickly searching online I agree with your conclusion.


⌘K Enter is documented as Tab 'Keep Open' on Mac, but doesn't work

VSCode Version: Code 1.19.3 (7c4205b5c6e52a53b81c69d2b2dc8a627abaa0ba, 2018-01-25T10:25:01.248Z)
OS Version: Darwin x64 16.7.0
Extensions:

Extension
Author (truncated)
Version

tslint
eg2
1.0.24

csharp
ms-
1.13.1

Steps to Reproduce:

Right-click a tab, observe that ⌘K Enter is the keyboard shortcut for 'Keep Open'

Press ⌘K+Enter in the text editor, get this error message;

Reproduces without extensions: Yes

Well it does not, the keybinding is Cmd+K followed by just Enter.


sfz~ fix load scalastring

There's code copied from ceammc's sfizz~ that doesn't work. All we need is a string into a built in sfizz_load_scala_string function. The string is tuning name, number of steps and steps in cents in this format "weird\n4\n155\n555\n777\n1111\n"
So I am trying to build this string from a list of intervals in cents and it is failing, but trying the string above works! The code from ceammc's sfizz~ uses this structure below and if I print the string in the code I do get something that looks exactly like a string that gets accepted, but trying to build this string this way fails somehow (while it must work for ceammc maybe, haven't tested)
char scale[2048] = "autogenerated scale\n";

char* pscale = &scale[0] + strlen(scale);

pscale += sprintf(pscale, "%d\n", ac);

for(int i = 1; i < ac; i++)

    pscale += sprintf(pscale, "%f\n", atom_getfloat(av+i));

see https://github.com/porres/pd-else/blob/master/sfizz~/sfizz_puredata.c#L107

In order to print an actual backslash character you have to escape it with an additional backslash I think

have you tried adding an additional backslash character before the \ns?

it would also help if you point to the original file you're working from on github

https://github.com/uliss/pure-data/blob/d627d8775a5655555b36d58ee0cf810b655cc215/ceammc/ext/src/misc/sfizz_tilde.cpp#L531

have you tried adding an additional backslash character before the \ns in the sprintfs?

didnt see why it'd work and it didn't :/

@porres yeah idk thought it might be some weird escaping thing the file format expected or something.

by the way "weird\n4\n155\n555\n777\n1111" also works (without ending with "\n")

does it work with "weird\n4\n155.0\n555.0\n777.0\n1111.0"?

good question, it actually works even better!

sorry I'm not on my dev computer rn, what message do you test it with that it fails with?

i think i see the issue now

the number of steps in the scale was 1 too many higher :) thanks!

to me it looks like the for should start at int i = 0

It should maybe, but it doesn't, the way I specify scales in cents is that it always starts with "0" cents and this firs one needs to be ignored. Anyway, it's intentional

Should you -1 from ac?

exactly, that fixed it :)


[TYPO] Readme.md

Readme suffer a typo wherein it states Follow us onTwitter but should be Follow us on Twitter / X

Kindly review @phyleria

@phyleria consider merging if not yet