sdba - Fix from_string constructor

Pull Request Checklist:

[x] This PR addresses an already opened issue (for bug fixes / features)

This PR fixes an issue raised in slack.

[x] Tests for the changes have been added (for bug fixes / features)
[x] Documentation has been added / updated (for bug fixes / features)
[x] HISTORY.rst has been updated (with summary of main changes)
[ ] bumpversion (major / minor / patch) has been called on this branch
[ ] Tags have been pushed (git push --tags)

What kind of change does this PR introduce?
My misunderstanding of python's __new__. I though that it was executed upon class declaration, but it is rather called upon class instantiation. When sdba.base.Parametrizable.from_string encounter a class name, it would look in a registry populated in the __new__, so only when subclasses were created. Thus, in a brand new session, if the first thing you call is a from_string or from_dataset, the registry is empty because no objects have been created yet. Resulting in an error.
Rather, here we use the __subclasses__ python method to list all subclasses (recursively). No need for instantiation.
@huard Should we change the Indicator class to use this instead?   The main bonus is that classes that do not have instances would still be listed in the registry (ex: Daily, Hourly, Tasmax, ...).

Does this PR introduce a breaking change?
No

The registry is there so it's easy to subclass indicators, mainly because we create classes on-the-fly, so they are not importable and classic subclassing is not possible. Currently, if you want to subclass from a non-instance, you import it and do it normally. This change would only allow to harmonize the process and allow subclassing always to be done from the registry. Also, we would have the possibility to generate the registry "on demand", it wouldn't be a (mutable) variable.
All those things are quite weak arguments and anyway nobody uses this functionality currently (as far as I know). Let's not fix what already works.
As for the serialization-deserialization, it would indeed be nice if we used a more standard solution, but I don't know any, especially because I wanted the result to be readable, to carry information. pickle is the most common solution, but serializes to bytes. JSON alone doesn't carry python object information and is not as readable as the current solution. I found this : https://marshmallow.readthedocs.io/en/stable/, it would make JSON serialization easy to use.
For example.
current:
QuantileDeltaMapping(nquantiles=15, kind='+', group=Grouper(dim='time', add_dims=[], prop='dayofyear', name='time.dayofyear', window=1, interp=False))

json:
"{'nquantiles':15, 'kind':'+', 'group': {'dim': 'time', 'add_dims': [], 'prop': 'dayofyear', 'name': 'time.dayofyear', 'window': 1, 'interp': False}}"

This may be closer to what you want: https://jsonpickle.github.io/
In [1]: class Thing(object):
   ...:     def __init__(self, name):
   ...:         self.name = name
   ...:
   ...: obj = Thing('Awesome')

In [2]:

In [2]: obj
Out[2]: <__main__.Thing at 0x7fc4956a3700>

In [3]: import jsonpickle
   ...: frozen = jsonpickle.encode(obj)

In [4]:

In [4]: frozen
Out[4]: '{"py/object": "__main__.Thing", "name": "Awesome"}'

In [5]: thawed = jsonpickle.decode(frozen)

In [6]: thawed
Out[6]: <__main__.Thing at 0x7fc494d0eca0>


IF..THEN..REPEAT..ENDIF causes Ferret to become unresponsive

Reported by andrew wittenberg on 27 Oct 2014 20:26 UTC
The following is crashing a lot of my scripts.  This happens in v6.928 but not v6.927:
 	NOAA/PMEL TMAP
 	FERRET v6.928 (beta)
 	Linux 2.6.32-504.el6.x86_64 64-bit - 10/27/14
 	27-Oct-14 16:22

yes? IF 0 THEN; rep/i=1:1 say hi; ENDIF
yes? quit
yes? quit
yes? ^Z
Suspended

If we put the "say hi" in parentheses, this seems to work.  But parentheses haven't previously been required, so there are a lot of scripts that don't have them.
Migrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/2214

Comment by ansley.b.manke on 27 Oct 2014 22:10 UTC
Caused by the fix to 2211, reopening that ticket

Comment by andrew.wittenberg on 6 Nov 2014 00:39 UTC
After backing off of the previous fix to #2211, this issue is now fixed in v6.93_rc4 (dated 11/5/2014).

Comment by steven.c.hankin on 18 Dec 2014 17:36 UTC
The fix to this was modified in the process of refactoring GET_FER_COMMAND, PROCESS_IF and PARSE_COMMAND


flash.sh hangs "after flashing" the board

I am using STM32-E407 development board and trying to flash with the docker image.
Steps I followed:
$ docker pull microros/micro-ros-olimex-nuttx:crystal
$ sudo docker run -it --privileged -v /dev/bus/usb:/dev/bus/usb microros/micro-ros-olimex-nuttx:crystal

Once inside the image:
root@4ac582a9448e:/uros_ws/firmware/NuttX# openocd -f interface/stlink-v2.cfg -f target/stm32f4x.cfg -c init -c "reset halt" -c "flash write_image erase nuttx.bin 0x08000000"

I get the output:
Open On-Chip Debugger 0.10.0
Licensed under GNU GPL v2
For bug reports, read
	http://openocd.org/doc/doxygen/bugs.html
Info : auto-selecting first available session transport "hla_swd". To override use 'transport select <transport>'.
Info : The selected transport took over low-level target control. The results might differ compared to plain JTAG/SWD
adapter speed: 2000 kHz
adapter_nsrst_delay: 100
none separate
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : clock speed 1800 kHz
Info : STLINK v2 JTAG v24 API v2 SWIM v4 VID 0x0483 PID 0x3748
Info : using stlink api v2
Info : Target voltage: 3.316907
Info : stm32f4x.cpu: hardware has 6 breakpoints, 4 watchpoints
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
Info : Unable to match requested speed 2000 kHz, using 1800 kHz
adapter speed: 1800 kHz
target halted due to debug-request, current mode: Thread
xPSR: 0x01000000 pc: 0x08000188 msp: 0x20006f94
auto erase enabled
Info : device id = 0x100f6413
Info : flash size = 1024kbytes
target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000046 msp: 0x20006f94
wrote 524288 bytes from file nuttx.bin in 14.520902s (35.260 KiB/s)

It seems that flashing is complete, but openocd command does not end. I see the LED blinking on ST-Link for ever.

If I run openocd with -d 1 option I get the following output:
Debug: 20057 14557 hla_target.c:431 adapter_debug_entry(): entered debug state in core mode: Thread at PC 0x20000046, target->state: halted
Debug: 20058 14557 target.c:1517 target_call_event_callbacks(): target event 0 (gdb-halt)
Debug: 20059 14557 target.c:1517 target_call_event_callbacks(): target event 1 (halted)
User : 20060 14557 armv7m.c:556 armv7m_arch_state(): target halted due to breakpoint, current mode: Thread
xPSR: 0x61000000 pc: 0x20000046 msp: 0x20006f94
Debug: 20061 14557 hla_target.c:470 adapter_poll(): halted: PC: 0x20000046
Debug: 20062 14557 hla_target.c:58 adapter_load_core_reg_u32(): adapter_load_core_reg_u32
Debug: 20063 14557 hla_target.c:73 adapter_load_core_reg_u32(): load from core reg 15  value 0x20000046
Debug: 20064 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register xPSR with value 0x01000000
Debug: 20065 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register pc with value 0x08000188
Debug: 20066 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register r8 with value 0x00000000
Debug: 20067 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register r7 with value 0x00000000
Debug: 20068 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register r4 with value 0x00000000
Debug: 20069 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register r2 with value 0x00000000
Debug: 20070 14557 armv7m.c:510 armv7m_wait_algorithm(): restoring register r1 with value 0x00000000
Debug: 20071 14557 hla_target.c:750 adapter_read_memory(): adapter_read_memory 0x20000050 4 1
Debug: 20072 14557 target.c:2240 target_read_u32(): address: 0x20000050, value: 0x20000154
Debug: 20073 14557 target.c:1846 target_free_working_area_restore(): freed 16384 bytes of working area at address 0x2000004c
Debug: 20074 14557 target.c:1640 print_wa_layout():  * 0x20000000-0x2000004b (76 bytes)
Debug: 20075 14557 target.c:1640 print_wa_layout():    0x2000004c-0x20007fff (32692 bytes)
Debug: 20076 14557 target.c:1846 target_free_working_area_restore(): freed 76 bytes of working area at address 0x20000000
Debug: 20077 14557 target.c:1640 print_wa_layout():    0x20000000-0x20007fff (32768 bytes)
Debug: 20078 14557 target.c:2328 target_write_u32(): address: 0x40023c10, value: 0x80000000
Debug: 20079 14557 hla_target.c:764 adapter_write_memory(): adapter_write_memory 0x40023c10 4 1
User : 20080 14558 command.c:544 command_print(): wrote 524288 bytes from file nuttx.bin in 14.498052s (35.315 KiB/s)
Debug: 20081 14558 command.c:143 script_debug(): command - ocd_command ocd_command type ocd_init
Debug: 20082 14558 command.c:143 script_debug(): command - init ocd_init
Debug: 20083 14558 log.c:431 keep_alive(): keep_alive() was not invoked in the 1000ms timelimit (5533). This may cause trouble with GDB connections.

It's normal that OpenOCD does not terminate. After flashing it stays open as a debugging server. Simply interrupt it using Ctrl-C.

I was wondering if the flashing did not complete properly because the nuttshell doesn't show up in minicom:
$ sudo minicom -D /dev/ttyACM0

I see that the board is using uros configuration in the docker image. Does this use USB OTG by default or the UART? I tried using FTDI's FT232 as well.

Sorry, I just saw that the image uses serial transport. So I tried with serial cable and
sudo minicom -D /dev/ttyUSB0

Still the nsh prompt doesn't show up.

Try pressing "Enter" three times. See http://nuttx.org/Documentation/NuttShell.html for reasons...
If that doesn't work, make sure you have 115200 baud, 8N1 and no hardware flow control.

One more thing: After flashing, the board is stopped which you can also detect by the fact that the green LED is off. You need to press the reset button (next to the red LED). After that, you can try NSH.

I should have mentioned that in my previous comment: I have checked that the baud-rate is 115200, 8N1 and no hardware flow control.
Also, I reset the board and I see that the green LED is on.

@ipa-hsd

@ipa-hsd I didn't use it with the serial because i used the UART to connect with the agent. I set up everything manually as I tried with docker but it didn't work and I did not go into that.
Also as per the defconfig file for uros, which might be used in generating the docker image, (I'm not sure but i guess the repos accessed would be the same) has USB CDC/ACM profile enabled, so try to access nsh through ACM. Your dmesg command should show nuttx through a ACM profile.

Worked! Had to changed the cable, now dmesg shows:
[354712.503473] usb 2-1: new full-speed USB device number 80 using xhci_hcd
[354712.653021] usb 2-1: New USB device found, idVendor=0525, idProduct=a4a7, bcdDevice= 1.01
[354712.653027] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[354712.653030] usb 2-1: Product: CDC/ACM Serial
[354712.653033] usb 2-1: Manufacturer: NuttX
[354712.653035] usb 2-1: SerialNumber: 0
[354712.655461] cdc_acm 2-1:1.0: ttyACM1: USB ACM device

So with ttyACM1 profile, I get the nsh prompt.
Thanks @iluetkeb and @Viplav04 !!


Detailed deployment tutorial

Step-by-step deployment tutorial. Neo4J import script and corresponding header files.

Looks great. All I miss is a link from the main README to the detailed deployment one

Done


performance?

I see using linq; and I think allocation and performance killer
how are performance in real application?

Good enough for what I tested, in the editor, the rendering is by far the bottleneck (especially when you render fields in the nodes, which is very slow in Unity even with the GraphView LOD system).
I didn't profile in playmode without the editor yet, it's on my roadmap. But I'd be surprised if the result were bad, most of the linq stuff is done only for the editor and not the runtime version.

oh okok thanks!


Allow user to select location of the old content folder during upgrade installation on Windows

@MCGallaspy is implementing the steps to find content folder of the previous installation and move it (if necessary) to the new location during the upgrade to 0.16 (PR  #335). In case installer is unable to find the location of the content folder for the previous version automatically, the following step would be to allow users to browse and select the old-version content folder themselves. Suggested wording:
KA Lite Setup is unable to locate the content folder of your previous installation
in order to perform the upgrade to current version. Please select the ".kalite/content/"
folder on your computer and press the button "Continue" to finish the upgrade process.

There should, of course, be a field for a path and a Browse button in there too... :wink:

@radinamatic did this ever get implemented?

No, not that I recall @benjaoming!


Centos Extras DNF incompatible with versions less than EL7.6

Description
When attempting to configure a node, at the step where it is trying to install the iml-agent bundle, a traceback is shown in the log 3 times:
dnf clean all --disablerepo=* --enablerepo=e2fsprogs --enablerepo=epel --enablerepo=iml-agent --enablerepo=lustre --enablerepo=lustre-client --enablerepo=managerforlustre-manager-for-lustre --enablerepo=ngompa-dnf-el7: 1

Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python2.7/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python2.7/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import conf
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 17, in <module>
    _conf = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 16, in swig_import_helper
    return importlib.import_module('_conf')
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _conf

and the backtrace shows:
Traceback (most recent call last):
  File "/usr/share/chroma-manager/chroma_core/services/job_scheduler/job_scheduler.py", line 316, in _run
    result = step.run(args)
  File "/usr/share/chroma-manager/chroma_core/models/host.py", line 702, in run
    updates_available = package.update(host, package_report)
  File "/usr/share/chroma-manager/chroma_core/models/package.py", line 85, in update
    for repo_name in repo_names.intersection(package_report):
TypeError: 'NoneType' object is not iterable

Repro

Install Lustre 2.10.4 on CentOS 7.4 on the Lustre servers.
Install IML <IP_ADDRESS> on CentOS 7.4 on the IML server.
Add the Lustre servers in monitored mode by running this command (on the IML server) for each Lustre server (replace server-name with the actual server name):
chroma server-add server-name --server_profile base_monitored
On the IML web page, select the Servers link (under Resources) to display the list of servers. All machines should be added and should match this state:

Server State: (green checkmark) No Issues
Profile: Monitored Storage Server
LNET State: Unconfigured (green checkmark)
For example:

Click the Actions button for a server and select Continue Server Configuration (the tooltip will say Install packages on this server).
After a period of time, an error will be displayed:
Click the Install packages on server link to see the details:
Click the 3/4 Installing packages link to display the log:

Version
What version of IML? <IP_ADDRESS>
What Operating System? CentOS
What Operating System version? 7.4
iml-diagnostics
Attach any iml-diagnostics for nodes relevant to this issue.
sosreport-cv-g9-mgs-2019-03-19-mscdubo.tar.gz
Work-around
I determined that the problem was that some packages been installed or upgraded during the installation process which resulted in the wrong version of dnf and its dependencies being installed:
dnf-<IP_ADDRESS>-1.el7_6.noarch
dnf-data-<IP_ADDRESS>-1.el7_6.noarch
librepo-1.8.1-7.el7.x86_64
python2-dnf-<IP_ADDRESS>-1.el7_6.noarch
python2-hawkey-0.22.5-1.el7_6.x86_64
rpm-4.11.3-35.el7.x86_64
rpm-libs-4.11.3-35.el7.x86_64
rpm-build-4.11.3-35.el7.x86_64
rpm-build-libs-4.11.3-35.el7.x86_64
rpm-python-4.11.3-35.el7.x86_64

Running the following commands on each server resolved the issue and allowed the iml-agent bundle to be installed successfully (make sure any required proxy environment variables are already setup):
rpm --erase --nodeps --verbose \
  dnf \
  dnf-data \
  python2-dnf \
  python2-hawkey

yum downgrade -y \
  librepo-1.7.16-1.el7.x86_64 \
  rpm-4.11.3-25.el7.x86_64 \
  rpm-libs-4.11.3-25.el7.x86_64 \
  rpm-build-4.11.3-25.el7.x86_64 \
  rpm-build-libs-4.11.3-25.el7.x86_64 \
  rpm-python-4.11.3-25.el7.x86_64

yum install -y \
  python-librepo \
  rpm-plugin-systemd-inhibit

yum reinstall -y chroma-agent \
  --disablerepo=* \
  --enablerepo=e2fsprogs \
  --enablerepo=epel \
  --enablerepo=iml-agent \
  --enablerepo=lustre \
  --enablerepo=lustre-client \
  --enablerepo=managerforlustre-manager-for-lustre \
  --enablerepo=ngompa-dnf-el7

After the commands have been run:

From the IML web page, click on the Actions button for the server and select Continue Server Configuration and it will be setup without error.
Click Close to close the Install packages dialog box.
Click Close to close the Commands dialog box.
Click on the Actions button for the server and select Setup monitored server (the tooltip will say Setup this monitored host).
The Commands dialog box will show that the setup has Succeeded.
Clock Close to close the Commands dialog box and the LNet State will change to LNet Up.  We have fixed this issue in IML 4.0.9

I mistook this for a different issue. It appears the root cause here is just that the dnf that lives in CentOS Extras is not compatible with anything older than EL 7.6.
cat /etc/centos-release
CentOS Linux release 7.5.1804 (Core)
[root@vm9 ~]# yum repolist
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: mirror.keystealth.org
 * extras: mirror.keystealth.org
 * updates: mirror.fileplanet.com
repo id                                                                               repo name                                                                                status
base/7/x86_64                                                                         CentOS-7 - Base                                                                          10,019
extras/7/x86_64                                                                       CentOS-7 - Extras                                                                           385
updates/7/x86_64                                                                      CentOS-7 - Updates                                                                        1,513
repolist: 11,917
[root@vm9 ~]# dnf
-bash: dnf: command not found
[root@vm9 ~]# yum install -y -q dnf
[root@vm9 ~]# dnf
Traceback (most recent call last):
  File "/usr/bin/dnf", line 57, in <module>
    from dnf.cli import main
  File "/usr/lib/python2.7/site-packages/dnf/__init__.py", line 30, in <module>
    import dnf.base
  File "/usr/lib/python2.7/site-packages/dnf/base.py", line 29, in <module>
    import libdnf.transaction
  File "/usr/lib64/python2.7/site-packages/libdnf/__init__.py", line 3, in <module>
    from . import conf
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 17, in <module>
    _conf = swig_import_helper()
  File "/usr/lib64/python2.7/site-packages/libdnf/conf.py", line 16, in swig_import_helper
    return importlib.import_module('_conf')
  File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
ImportError: No module named _conf

So, the workaround here is to make sure to use the vault version of extras when installing / upgrading IML on an OS < EL7.6 and to disable the stock extras version before upgrading / installing.

Want me to update the upgrade docs to mention this?

I'll add it as a known issue.

Does anyone happen to know exactly what needs to be updated to 7.6 to resolve this, short of upgrading the whole node?

@brianjmurrell nope, haven't dug into the cause. We no longer use dnf for IML 5+.
If you need an older version, there is one available here. https://copr.fedorainfracloud.org/coprs/managerforlustre/manager-for-lustre/package/dnf/
Anything < IML 4.0.10.x should use that repo and pull in the corresponding dnf (provided 7.6 extras isn't enabled).

I mistook this for a different issue. It appears the root cause here is just that the dnf that lives in CentOS Extras is not compatible with anything older than EL 7.6.

After installing/updating some related packages, resolved the "ImportError: No module named _conf" issue for me.
yum update python*
yum install dnf-data dnf-plugins-core libdnf-devel libdnf python2-dnf-plugin-migrate dnf-automatic
dnf is now working on a CentOS 7.5 box. Some packages might be unnecessary, but you have to try for yourself...

I mistook this for a different issue. It appears the root cause here is just that the dnf that lives in CentOS Extras is not compatible with anything older than EL 7.6.

After installing/updating some related packages, resolved the "ImportError: No module named _conf" issue for me.
yum update python*
yum install dnf-data dnf-plugins-core libdnf-devel libdnf python2-dnf-plugin-migrate dnf-automatic
dnf is now working on a CentOS 7.5 box. Some packages might be unnecessary, but you have to try for yourself...

Thank you ,it works for me on centos 7.4.1708

@szsahin thank you :]

@szsahin  thank you very much, you saved my life !!! :)


Error creating batch jobs: Client secret not provided

Every time a new batch job is being created this error is returned:
ERROR 2021-06-29T12:45:00,405 [https-jsse-nio-8443-exec-9] 40296 org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/].[dispatcherServlet] Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.RuntimeException: Could not register protected resource] with root cause
java.lang.RuntimeException: Client secret not provided.

Waiting for a refresh of the page or doing it manually shows the created job.

this bug has beend fixed by chaning the keycloak config back to client-id and secret for communication between the openeo backend and keycloak.


refactor(Order/RelClasses): change linearOrderOfSTO definition of ≤

Since we're in a linear order, it's simpler to use x ≤ y ↔ ¬ y < x than to use x ≤ y ↔ x = y ∨ x < y.

Seems like we do make use of the current def-eq, so nevermind I guess.


bug: logs are not displayed in the Pulse macos app

I just wanted to express my gratitude for such a fantastic product! It works incredibly well, and I can tell how much care you put into creating it.
However, I encountered an issue with the Pulse app for macOS not displaying data for iOS archives. When I export the data in Pulse or Pulse package format, the logs don't appear in the app, even though the number of messages is displayed correctly.
I've attached the HTML version of the export, and you can see that the messages are indeed there. I tested this on demo projects in the repository.
I am using an iPhone 12 with iOS 17.4.1. MacOS app - Version 4.0.0 (17)
Is there any way you could assist with this problem? I believe the SDK is correct, so the error might be within the Pulse app for macOS.

iOS Console
Pulse (macos)
Pulse
HTML

logs-2024-06-04-23-31.pulse.zip
logs-2024-06-04-23-32.html.zip

Hey, thanks for the report and for testing it – unfortunately, I don't always have the time to run the regression tests.
Something is off with the recording session management, which is a relatively new addition. By default, it selects "current" (not sure what that means in that case) instead of selecting the latest session from the logs.
Workaround: select the session you are interested in manually.

Oh, thank you so much! It works!
If there's anything I can do to help with this problem, do post. I'd be happy to!

I'll look into it some time soon. It's not a great user experience.

Our team faced this too, it would be cool to have something like 6 sessions, 1 empty, look into others. Something like an empty state in list, probably.
Also I got some crashes in the app, so wanted to try and contribute, but Pulse for Mac seems to be closed-source?

The issue with opening documents was fixed in 4.0.0 (19). I also fixed a crash when re-ordering columns in a "Network" table.

Also I got some crashes in the app, so wanted to try and contribute, but Pulse for Mac seems to be closed-source?

I fixed most of the issues exepct for the following crash that doesn't seem to point anywhere in particular.


[nrf52] spi-slave, the transaction length passed to otPlatSpiSlaveTransactionCompleteCallback seems incorrect

When we are using an NCP/RCP that uses SPI (as slave), after the a transaction completed, otPlatSpiSlaveTransactionCompleteCallback would be called (from here: https://github.com/openthread/ot-nrf528xx/blob/main/src/src/transport/spi-slave.c#L81):
        if (sCompleteCallback(sContext, aEvent->tx_buffer, aEvent->tx_buffer_size, aEvent->rx_buffer,
                              aEvent->rx_buffer_size, aEvent->rx_amount))
        {
            // Further processing is required.
            sFurtherProcessingFlag = true;

            otSysEventSignalPending();
        }

So the aTransactionLength in the complete callback is set as aEvent->rx_amount.
By the OT API definition (https://github.com/openthread/openthread/blob/main/include/openthread/platform/spi-slave.h#L142):
/**
 * ......
 *
 * Note that even if `aInputBufLen` or `aOutputBufLen` (or both) are exhausted before the SPI master finishes a
 * transaction, the ongoing size of the transaction must still be kept track of to be passed to the transaction
 * complete callback. For example, if `aInputBufLen` is equal to 10 and `aOutputBufLen` equal to 20 and the SPI master
 * clocks out 30 bytes, the value 30 is passed to the transaction complete callback.
 *
 * ......
 *
 * @param[in] aOutputBuf              Data to be written to MISO pin
 * @param[in] aOutputBufLen           Size of the output buffer, in bytes
 * @param[in] aInputBuf               Data to be read from MOSI pin
 * @param[in] aInputBufLen            Size of the input buffer, in bytes
 * @param[in] aRequestTransactionFlag Set to true if host interrupt should be set
 *
 * @retval OT_ERROR_NONE           Transaction was successfully prepared.
 * @retval OT_ERROR_BUSY           A transaction is currently in progress.
 * @retval OT_ERROR_INVALID_STATE  otPlatSpiSlaveEnable() hasn't been called.
 *
 */
otError otPlatSpiSlavePrepareTransaction(uint8_t *aOutputBuf,
                                         uint16_t aOutputBufLen,
                                         uint8_t *aInputBuf,
                                         uint16_t aInputBufLen,
                                         bool     aRequestTransactionFlag);

So the aTransactionLength should be set to the actual transaction length (determined by the SPI master). As I know, aEvent->rx_amount does not equal to the transaction amount. And it seems that both tx_amount and rx_amount will not exceed their buffer size in callback. However this API has not been updated for some time. Is it still the case now? @abtink

Currently we don't have fatal issues with this because both sides will re-schedule the SPI frame if they think they haven't sent a complete frame. But it causes some waste and doesn't meet the specification of the API.
For example, when a host starts, it first reset the NCP and then receive the first SPI frame from the slave.  And the host do know this state after the first transaction. (We can see 'RCP reset: RESET_EXTERNAL'). But in the second transaction, the frame from slave is actually still the 'status' frame. (it header changes, but the content, the last 4 bytes keeps the same, 80 06 00 71).
This is because: before the first transaction, the slave prepare a receive buffer with size 5 bytes (https://github.com/openthread/openthread/blob/main/src/ncp/ncp_spi.cpp#L112). And after first transaction, rx_amount is 5 since it cannot exceed the buffer size. However, in the first transaction, the slave sends 9 bytes. Then in the callback, 5 is passed as transaction length. And the complete callback think the last transaction didn't send the 9 bytes successfully so it prepare the 'status' frame again (and this time the receive buffer changes to a larger one).
Note that in the two transations, the actual transaction lengths are both 53. So:

Shall we still adhere to the spec of the API and pass the transaction length (specified by the master) to the callback?
It looks like we cannot know this number from the event of nordic driver. Is there a way for us to get that? Or at least we pass max(event->tx_amount, event->rx_amount) to the callback.

Thoughts? @abtink @LuDuda

@Irving-cl , yes the SPI-slave platform implementation should follow the documentation in the header regarding this:
https://github.com/openthread/openthread/blob/main/include/openthread/platform/spi-slave.h#L142
/**
...
* Note that even if `aInputBufLen` or `aOutputBufLen` (or both) are exhausted before the SPI master finishes a
 * transaction, the ongoing size of the transaction must still be kept track of to be passed to the transaction
 * complete callback. For example, if `aInputBufLen` is equal to 10 and `aOutputBufLen` equal to 20 and the SPI master
 * clocks out 30 bytes, the value 30 is passed to the transaction complete callback.

Hi @MarekPorwisz,
Could you take a look on this?

Hi @MarekPorwisz,
Could you take a look on this?

Hi @MarekPorwisz,
Could you take a look on this?

@Irving-cl  I did some investigation and it seems our SPI does not provide info about transaction length. I created a PR https://github.com/openthread/ot-nrf528xx/pull/215 that takes the maximum value of the rx and tx data length.
This is not a perfect solution but should fix your issue.
I do not have possibility to test it so I would be grateful if you could try if the problem is gone for you after this fix.

@MarekPorwisz
Thanks! Sure, I'll check. Actually I tried locally to have use MAX of tx_amount and rx_amount. It can work.


move api keys out of the source code

To avoid using our API keys in other applications I tried to externalize them using environmental variables.
This works through the EnvironmentPlugin which basically replaces any occurrence of process.env.XY with the content of XY plus the string quotation (i.e. JSON.stringify(XY)).
TODO:

[ ] Is this the correct way to do this? I didn't find a different approach and e.g. deck gl seems to do this similarly. In old gh maps we used browserify-swap which I liked more, but made problems in the last months.
[ ] use a json file (or something not in git) in the webpack process to avoid setting up the variables everytime we start development (npm run watch). This would also allow simpler switching between development and production configs.
[ ] explain this setup in readme

Putting this into an environment variable is an appropriate approach I think.
Looking at the files it seems like you have checked in a key. Is this an intermediate step? (Asking because you stated in your initial comment that you don't want the keys in a repo.)

Yes, the key is still visible and we could hide it via some travis SECRET. I just wanted to make sure if we should go further in this direction or if there is a better approach in JS-world :)
Will then continue here and let you know once I think this is mergable.

Using the same mechanism I have now externalized it into a single JSON file so that no special shell command has to executed before and instead a file apikeys.js lives now in the root of the repo but is ignored from git.
For travis this was a bit tricky as I needed to escape the value of the json file like:
module.exports=\{\"graphhopper\":\"...

Let's use #123


Reusable browser automation

extract playwright automation of login page out of TestBrowserAuthorizationClient and into independent SignInAutomation module in @itwin/oidc-signin-tool. The logic is 99% the same (everything except handling of undefined authorization_endpoint) should be a pretty much exact lift
add loginElectronMainAuthClient function module to in @itwin/oidc-signin-tool, with a high level usage of SignInAutomation for electron apps, including those that run iTwin.js backends in an electron utility process
make playwright an optional peer dependency of @itwin/oidc-signin-tool to prevent double requiring it... in older versions of package managers (notably pre npm@7), this is a breaking change. This may be a breaking change... if anyone knows how to properly auto install this peer by default, please let me know.

I haven't added tests for the new loginElectronMainAuthClient I don't know what is the best way of going about it... this has been tested implicitly in another repository that is applying a patch based on this work. But due to the new peer dependency making the patch difficult, it hasn't been merged into main.
Please let me know how you would like to test this going forward:

coordinating with that repo
building a dummy electron test app that sets up an itwin desktop auth client

Adding a peer dep is definitely a breaking change, but I don't see a problem with that. Is it really optional though?

with a high level usage of SignInAutomation for electron apps, including those that run iTwin.js backends in an electron utility process

I just want to make sure these changes are intended for testing and not for other automation.

Adding a peer dep is definitely a breaking change, but I don't see a problem with that. Is it really optional though?

with a high level usage of SignInAutomation for electron apps, including those that run iTwin.js backends in an electron utility process

I just want to make sure these changes are intended for testing and not for other automation.

yes they are solely for testing. I will think about how to remove the peer dep... it is necessary for the case in which a consumer of the library brings their own playwright. You can't load two instances of playwright into the same node.js process, so then this package couldn't use its own dependency and the package manager has to place things correctly.
I suppose I might be able to do it by dynamically requireing playwright at usage sites throughout this package, that way if you use an API that requires passing your own playwright Page, then this package will not attempt to load its own playwright. But I will need to test consuming this from a consumer both with and without playwright

yes they are solely for testing

Cool.
Yeah the double playwright issue has been annoying with this tool. I think that adding it as a non-optional peer dep could be okay. I don't mind a breaking change if it clears this up once and for all.

@ben-polinsky bump? we just got this again in CI.
Also, I was thinking about the peer dependency... it might be possible to install playwright if it can't be found, as a postinstall script, but I'm really not sure.


MSAlertAction enabled isn't handled properly

Enabled property isn't applied If it is changed after controller is presented.
See example below. The example is taken from http://nshipster.com/uialertcontroller/.
alertController.addTextFieldWithConfigurationHandler { (textField) in
    textField.placeholder = "Login"

    NSNotificationCenter.defaultCenter().addObserverForName(UITextFieldTextDidChangeNotification, object: textField, queue: NSOperationQueue.mainQueue()) { (notification) in
        loginAction.enabled = textField.text != ""
    }
}

I've fixed this issue.
Please try ver1.0.2.

It works, but there are two bugs.

Keyboard is dismissed automatically when all characters are removed from text field.
Keyboard is dismissed automatically when text field is empty and user enters the first symbol.


Symlinks in project - loader not working when using include?

Can webpack read through symlinks? I have a simple symlink under /src with .jsx files. I have { test: /\.jsx?$/, loader: 'babel-loader?...', include: path.resolve(__dirname, 'src') } but it won't load files with babel-loader, I get ES5 compilation error.
If I replace the symlink with the actual folder and files - it works.
If I replace the include with exclude: /node_modules/ it also works.
Bug, or am I doing it wrong?

Having a similar issue with symlinks... I have all my modules under a /src folder in the root. Inside that /src folder I created a symlink to a directory /globals which is outside the root. Importing modules through the symlink works fine, however the loaders (in this case babel) don't transform these modules properly which causes:
1:61  error  Parsing error: Illegal export declaration
...
You may need an appropriate loader to handle this file type.
Tried a few things in the config such adding the actual path of the symlink to resolveLoader.modulesDirectories and in loader.include.
This issue seems similar but none of the solutions there worked solved the issue.

Seems like adding this should solve the issue:
resolveLoader: { root: path.join(__dirname, "node_modules") }
so that the loaders are found even when not all modules exist inside the root containing the node_modules and webpack config:

IMPORTANT: The loaders here are resolved relative to the resource which they are applied to. This means they are not resolved relative the the configuration file. If you have loaders installed from npm and your node_modules folder is not in a parent folder of all source files, webpack cannot find the loader. You need to add the node_modules folder as absolute path to the resolveLoader.root option. (resolveLoader: { root: path.join(__dirname, "node_modules") })

However, this didn't work for me :(

Seems to be an issue in the babel-loader (or my understanding of webpack and babel)... but I found another  issue there that seems to be more appropriate.
My style, css, and scss loaders all read through the symlink fine once I added the resolveLoader line mentioned above. It looks like the placement of .babelrc (or wherever you tell babel to allows modules) is the actual root cause. Sorry for blowing up this thread!

+1, I have this exact problem, the loader (babel) does not seem to be getting applied to files under a symlink. Replacing the symlink with an actual directory works.

I think that the main issue here is that webpack resolves symlinks and it actually 'sees' this files by their absolute url. And this absolute path doesn't match your include directive or test regexp.
Could you please check this?

Some info about this behavior can be found here https://github.com/webpack/webpack/issues/554

I was able to fix this by doing the following in webpack.config.js (this is for importing our components library using the jsx files rather than the compiled umd):
var includePaths = [
  fs.realpathSync(__dirname + '/app'),
  fs.realpathSync(__dirname + '/node_modules/my-repo/lib'),
];

And then later:
module: {
    loaders: [{
      test: /\.js?$/,
      include: includePaths,
      loader: 'babel'
    }, {
      test: /\.jsx?$/,
      include: includePaths,
      loader: 'babel'
    },{
      test: /\.json?$/,
      loader: 'json'
    }, {
      test: /\.css$/,
      loader: 'style!css?modules&localIdentName=[name]---[local]---[hash:base64:5]'
    }]
  },

I got this to work by setting the includePaths but also by setting both resolve.root and resolveLoader.root to path.resolve(__dirname, 'node_modules') (or wherever you want those external sources to be able to resolve modules).   @jraede I think that worked for you only because your include paths both had node_modules in an ancestor directory.   You need to set both so files external to your project that you want to import can themselves (a) import other modules from your project's node_modules, and (b) so your loaders can be resolved (otherwise you get cannot resolve module 'babel', etc).

@jraede would it be possible for you to provide your webpack.config I'm running into a similar problem and even after implementing your suggested solution i get the following error
ERROR in multi main
Module not found: Error: Cannot resolve 'file' or 'directory' /LifeInYourWay/iGem/src/index in /home/utibe/Desktop/GroundControl
 @ multi main

Note: /LifeInYourWay/ is a symlink pointing to a folder on a mounted drive

I tried the fs.realpathSync trick, but it seems that symlinked modules are still not transpiled. For some reason they are included in the build as ES6 (build passes, but browser complains).
I used yarn link and yarn link module-name to link the module.

@eagsalazar's suggestion of using resolveLoader worked for my predicament.  I didn't need to set resolve or use fs.realPathSync.

For anyone trying the resolveLoader approach with Webpack 2, the Webpack 2 equivalent of root seems to be modules, however this doesn't work. The only solution that works for me with Webpack 2 was to use fs.realpathSync.
Anyway, @eagsalazar's suggestion of using an absolute path for the value of root (or now modules might be problematic - see docs).

The modules approach does not work with Webpack 2. Sometimes it works when there's only 1 symlink, but once there are many of them (based on my scenario - 15) it stops working completely. For now, have to copy files to node_modules instead of using symlinks. but this is far from what I've expected to have with Webpack 2 to be honest.

@DenisVuyka Yep. Trying to work with linked modules in Webpack 2 is proving to be nightmare. I've wasted a horrible amount of time on related issues.

@Undistraction It is much better than Webpack 1 based on my experiments. Setting up 1 project with 1 symlink it usually a breeze. The problem is that it seems nobody tested the flow beyond 1 symlink.

Trying to remove the emotion here, but this really needs to be fixed: Ticket still unresolved for 68 weeks...

Updating followers of this ticket:
I ditched the symlink approach; instead, I created another node module which compiles on its own with babel that is locally linked.
}

And src/index.js etc.
Then execute npm link in that dir, which registers the module globally on my machine, and npm link awesome-module in my initial module. That way, webpack isn't responsible for that module.
Also running npm run watch to have files updated on save.

@elado Thanks for the info, but using npm link or yarn link is just using symlinks under the hood isn't it? npm link creates a symlink in your user dir, then npm link x creates another symlink from the dir in node_modules to this symlink.

@Undistraction correct, but the idea is  to have webpack only include the other module without transpiling it with babel-loader. It's already compiled by babel on its own, and looks like any other ES5 module.

@elado Sorry. Was getting confused with one of other bugs related to symlinks I've been hitting -  #985 - which is just a general issue with symlinked files, not specifically related to compilation. Can see how your solution negates this issue.

Still can't quite get this to work with Webpack 2.2.1 on node 6.10.0 even using the fs.realpathsync approach.
var includePaths = [
	fs.realpathSync(__dirname + '/src'),
	fs.realpathSync(__dirname + '/node_modules/my-core-services'),
	fs.realpathSync(__dirname + '/node_modules/my-view-modules'),
];

module: {
   {test: /\.js$/, include: includePaths, use: ['babel-loader']},
}

I have external javascript modules in a separate package that need to be compiled.
When I console log the includePaths I see
'/Users/mike/Dev/my-core-services',     <==== npm linked
 '/Users/mike/Dev/myapp/node_modules/my-view-modules' <==== not npm linked

However when I run webpack all the javascript in the npm linked module throws compile errors as it doesn't recognize the syntax I'm using. Not sure what I'm missing here. Any ideas?

Not the same problem but similar to this is resolved for me by --preserve-symlinks node option.
I needed to load symlinked ES6 script (with export & import) that is outside from project root with babel-register. Without node option this script was not compiled by babel. But with option --preserve-symlinks it works fine.

@elado I've been using the same approach but I'm experiencing issues with resolving a file with npm link... keeps giving me the error Error: Cannot find module "." at webpackMissingModule
Ever have this happen to you? If so, any suggestions?

Now with npm 5 all file dependencies are symlinks. So this just become a bigger issue.
Can we add native support in webpack for these cases? Something like a parameter says if this is a symlink or not..

I experience similar problem in monorepo created with lerna, where application built with webpack requires a module that is installed in node_modules as a link. That module is not transpiled.
I have created example repository that reproduces this problem: https://github.com/mass85/no_transpilation_with_lerna

Try setting resolve.symlinks to false (https://webpack.js.org/configuration/resolve/#resolve-symlinks), worked for me, YMMV.

@earnubs, It did not help.

@mass85 Pity.
Worked in my case because babel-loader was no longer passing a path outside of project root to babel-core, babel-core was then no longer looking outside of project root for a .babelrc, and not finding it, and not compiling. Maybe there is an option to make that fail more loudly ... but I guess it would be with babel-core?

For me, with webpack 3, the only thing I had to do is

Add the include path to my symlink package
Add an alias in the resolve for that package

With those 2, it works perfectly! 👍

@sebelga can you post your code examples? Is the alias pointing to the symlink or no? Tried this with 3 and it didn't work...

The solution of @jraede worked for me when using the following configuration:

Windows user (symlinks and webpack seem to work without any workaround in Linux - I use Ubuntu 16.04 LTS, but it failed with my colleague using Windows 7)
private scoped npm package
less, styles, css, babel and ngannotate loaders
webpack 1

Just added to webpack.config.js as he suggested:
const fs = require('fs');
const includes = [
 fs.realpathSync(`${__dirname}/src`),
 fs.realpathSync(`${__dirname}/node_modules/@organization/projects`),
];
config.module = [
  {
    test: /\.js$/,
    loader: 'ng-annotate!babel',
    include: includes,
    exclude: /node_modules/,
  }, {
    test: /\.less$/,
    loader: 'style!css!less',
    include: includes,
  }
];

@earnubs it's works. thanks !

I am on the latest webpack 2.11.1 and latest wds. These lines allow me to use my file:.. linked packages in package.json for local dev symlinked and have them update when I change it. The key is the path.resolve you want to make sure you point it to the TOP and only the top node_modules.
            modules: [                 path.resolve(path.join(__dirname, 'node_modules'))             ],             symlinks: true,

hi,
i have been working on a web app using reactjs but when i run "npm start" it
always print "Failed to compile.
Error in Cannot find module 'commondir'
@ multi main"
is there anything i can do to solve this please.
i tried running npm install commondir but still did not work.
and also remove node_modules and install again nothing
seems to change.
thanks

I was able to fix that problem modifying webpack.dev.conf.js which is in build folder.
As you see, in this file, you'll find something like
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.*']
}
I added some files to copy which are symlinks (lib for example). So I have static/lib --> ../../../lib
And I added this code to CopyWebpackPlugin
new CopyWebpackPlugin([
{
from: path.resolve(__dirname, '../static'),
to: config.dev.assetsSubDirectory,
ignore: ['.']
},
{
from: path.resolve(__dirname, '../static/lib'),
to: config.dev.assetsSubDirectory+'/lib',
ignore: ['.']
}

Try setting resolve.symlinks: false (https://webpack.js.org/configuration/resolve/#resolve-symlinks), worked for me, YMMV.

Also worked for us! If you have a symlink to a folder outside of your project root, this seems to be the way. Because otherwise the symlinked folder is resolved in an absolute path which is outside the project root and is then being ignored

node v10.15.3 webpack 4.35.3
the following works for me.
include: [
  path.resolve(__dirname, 'src'),
],
exclude: [
  path.resolve(__dirname, 'node_modules')
],

I figured out that babel-loader can not resolve modules outside of the project. For example I am using lerna@3 and<EMAIL_ADDRESS>After debugging I ended up that @babel/parser is responsible for the "issue" (I do not think it's an issue, more a CWD problem) because the plugins and loaders could not be resolved to node_modules. There is also an interesting article about that in the babel configuration: https://babeljs.io/docs/en/config-files#monorepos
However, after moving all my babel configs (originally from package.json#babel) to my webpack.config.js it works without any problems:
// [...]
{
    test: /\.tsx$/,
    exclude: /(disposables)/,
    use: {
        loader: "babel-loader?cacheDirectory",
        options: require("./package.json")).babel
    }
}
// [...]

References:

https://github.com/lerna/lerna/issues/1656

Try setting resolve.symlinks: false (https://webpack.js.org/configuration/resolve/#resolve-symlinks), worked for me, YMMV.
This work for me.

Try this solution when using lerna(monorepo with symlink) with webpack, you might find the loader trying to load what should be excluded.
It's because webpack resolve it to nearest relative path, so the path don't have a node_modules in it, thus not excluded.
Keywords for search engine: typescript ts-loader symlink lerna webpack
Keywords: export was not found in
Hope people in trouble can find this solution.

Should work with webpack@latest. Feel free to report new issue with reproducible repo.

For me (webpack 4.46.0) I needed to add an
{
  module: {
    rules: [
      oneOf: [
        {
          //The rule I want to fix
          // This is to also include monorepo packages
          include: [/node_modules\/@organization/]
        }
      ]
    ],
  },
  resolve: {
    symlinks: false
  }
}

For me (webpack 4.46.0) I needed to add both resolve.symlinks: false and add an include path to the rule.
{
  module: {
    rules: [
      {
        oneOf: [
          {
            //The rule I want to fix
            // This is to also include monorepo packages
            include: [/node_modules\/@organization/]
          }
        ]
      }
    ],
  },
  resolve: {
    symlinks: false
  }
}

It works for me, thank you!

Should work with webpack@latest.

It does not work for me with v5.71.0 on Windows.
npm linked absolute_root_path\app\node_modules\some-package to absolute_root_path\some-package
Using absolute_root_path\app\node_modules\some-package\src in includes does not work.
Using absolute_root_path\some-package\src in includes works.
The hack from https://medium.com/capriza-engineering/sharing-source-code-and-libraries-in-react-bd30926df312 step 5.1/5 is still required.
@vankop Are you sure webpack checks the paths against the include patterns both before and after resolving the symlinks?

there is nothing todo with module.rules here.. only resolve option make sense. make sure resolve.symlinks=true https://webpack.js.org/configuration/resolve/#resolvesymlinks .
Otherwise please add infrastructureLogging.debug=true https://webpack.js.org/configuration/other-options/#debug and post stdout here ( there should be log from resolver )

resolve: {
    symlinks: false
}

That was enough for me. Thank you folks.


Support for Twitter Keyboard Type

It would be very helpful to have access to the "Twitter keyboard type" (with prominent @ and # keys) in Flutter.
https://developer.apple.com/documentation/uikit/uikeyboardtype/twitter

This likely depends from the native platform rather than flutter

working on same will provide you ASAP @JStevens127

Any update?

@Piinks @LongCatIsLooong Is this forgotten?

ping

@Piinks @pedromassangocode can we have an update on this pls? This is a very important feature for our app.

ping, its used in discord, so its available in native.


do not try to resolve an already resolved path

side note: why are there so many empty lines in the code?

This is great. Thanks! I'll take a look into why the tests are breaking after work.
As for the whitespace, I kinda go nuts with that stuff. I plan on normalizing it when I add prettier to all of my open source projects.

@neogeek ok cool.
heh heh yeah prettier autofixed it nicely

@neogeek ping

Sorry for taking so long to get to this PR.
I've looked further into this issue and I'm not sure the code supplied will work. I've added new tests on master using absolute paths and I can not get them to work with your branch.
I've pushed a separate fix to master hopefully resolving any issues with using absolute paths. Can you confirm this is the case?
Thank you again for the PR and bringing this issue to my attention!

@neogeek yeah I forgot to call promise resolve with the resolved paths :-P I'll check

Shipped the fix for this issue in v2.0.3


[images]: install scylla-manager-agent as part of image build

Pre-install latest scylla-manager-agent for our images
Closes: https://github.com/scylladb/scylla-enterprise/issues/1387

Closing as not planned


ci: allow autoupdate when PRs have the shipit label

Overview
not 100% sure this will work, but i think it will?

PR Checklist

[ ] Related to designs:
[ ] Related to JIRA ticket: ABC-123
[ ] I have run this code to verify it works
[ ] This PR includes unit tests for the code change

🚀 Styleguide deploy preview ready!https://5fc81e6177d2340db672574e--gamut-preview.netlify.appDeploy Logs

🚀 Styleguide deploy preview ready!https://5fc81f26eb1a831ec1768b93--gamut-preview.netlify.appDeploy Logs

🚀 Styleguide deploy preview ready!https://5fd13f3f809b221b7d773725--gamut-preview.netlify.appDeploy Logs

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.1 out of 2 committers have signed the CLA.:white_check_mark: jakemhiller:x: codecademydevYou have signed the CLA already but the status is still pending? Let us recheck it.


Add support for Map that preserves insertion order

Currently there is just support for Map that doesn't preserve the insertion order of the config items.

config {
	items{
		"key1" =  "Hello"
		"key2" =  "World"
	}
}

When u call this code its not garuanteed that the keys are in the order they have been defined
 println(config.get[Map[String, String]]("config.items"))

Maybe add support for ListMap or TreeMap or any kind of Map which preserves insertion order ?

configs is wrapper for config, and config does not preserves insertion order of object keys.
if config is support it, also configs can support.
And ListMap preserves insertion order, but TreeMap does not.
TreeMap sorts entries by key.
So, configs may support TreeMap.
If you just need TreeMap, workaround is:
println(TreeMap.empty ++ config.get[Map[String, String]]("config.items"))

Add support for subclasses of Map on branch master.
You can write the following:
println(config.get[TreeMap[String, String]]("config.items"))

also can:
println(config.get[ListMap[String, String]]("config.items"))

But the returning ListMap does not preserve definition order.
On branch preserve-iteration-order, it preserves not definition order but iteration order of ConfigObject. If config add support for definition order iteration, I will merge this branch.

There is workaround.
First, write config file like the following:
config {
    items = [
        { "key1" =  "Hello" }
        { "key2" =  "World" }
    ]
}

then define custom Configs instance:
implicit val listMapConfigs: Configs[ListMap[String, String]] =
  Configs[List[Map[String, String]]].map(_.foldLeft(ListMap.empty[String, String])(_ ++ _))

and then:
println(config.get[ListMap[String, String]]("config.items"))


Large Number Prefixer

Description
This extension provides support for adding prefixes for large numbers.
How to use the extension
It provides:

Support for custom prefixes.
Custom place name intervals.

This extension may be used to create scoring system, inventory, game statistics, etc.
Checklist

[X] I've followed all of the best practices.
[X] I confirm that this extension can be integrated to this GitHub repository, distributed and MIT licensed.
[X] I am aware that the extension may be updated by anyone, and do not need my explicit consent to do so.

What tier of review do you aim for your extension?
Community (Unreviewed)
Example file
Prefix Adder Example.zip
Extension file
LargeNumberPrefixer.zip

Example file:
Prefix Adder Example.zip
Extension file:
LargeNumberPrefixer.zip


Add star pattern in Java

Description
Task

For the given input n the number of rows printed should be 2*n-1 for ex:

Note

Filename should be Pattern32.java

Assign the task to me as I have been developing my skills on these patterns for 6 years.

ok, @MrigankaGhosh I am assigning this issue to you but I am raising these issues so that any person can contribute whether he is a beginner or an experienced.

Pr merged #30


请问您的模型是否是一个freeze的vit提取query feature，然后再用相同的Vit进行继续训练？

应该是这样的，看源代码是这样

Thanks for Yuxian's answer. Exactly, we use the same pretrained ViT copy for query feature extraction, and then we use another copy (starting from the same initialized weights) for training.


sentry: absl::crc32c instead of stbrumme_crc32

reduce the number of external dependencies

Damn, apparently abseil has a different flavour of CRC


GoogleMap's onCameraIdle stops firing when in a SingleChildScrollView

I have a design where a SingleChildScrollView has a GoogleMap on the first 50% on the screen, and a listing of items in the lower 50%. The user can scroll the entire view up to look at all of the listings. However, at times the Map stops firing the onCameraIdle if the users scrolls the page, and it just won't start firing it again.
onCameraMove and onTap works just fine. It is just onCameraIdle that won't fire.

 SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Stack(
              children: <Widget>[
                Container(
                  height: screenSize.height / 2,
                  child: GoogleMap(
                    key: Key("GMap"),
                    mapType: MapType.normal,
                    markers: Set<Marker>.of(markers.values),
                    gestureRecognizers: Set()
                      ..add(Factory<PanGestureRecognizer>(
                          () => PanGestureRecognizer()))
                      ..add(
                        Factory<VerticalDragGestureRecognizer>(
                            () => VerticalDragGestureRecognizer()),
                      )
                      ..add(
                        Factory<HorizontalDragGestureRecognizer>(
                            () => HorizontalDragGestureRecognizer()),
                      )
                      ..add(
                        Factory<ScaleGestureRecognizer>(
                            () => ScaleGestureRecognizer()),
                      ),
                    initialCameraPosition: CameraPosition(
                        target: LatLng(14.551620, 121.053329), zoom: 14.5),
                    onMapCreated: (GoogleMapController controller) {
                      if (!_controller.isCompleted) {
                        _controller.complete(controller);
                        _lastCameraPosition = CameraPosition(
                            target: LatLng(14.551620, 121.053329), zoom: 14.5);
                      }
                    },
                    myLocationEnabled: true,
                    myLocationButtonEnabled: true,
                    onCameraIdle: () {
                      print("547: onCameraIdle");
                      _fetchOffers();
                    },
                    onCameraMove: (value) {
                      print("552: onCameraMove");
                      _lastCameraPosition = value;
                    },
                    onTap: (value) {
                      // Load items for current view if deselecting a marker
                      print('556: Tapped outside');
                    },
                  ),
                ),
                Positioned(
                  top: 50,
                  right: 20,
                  child: Container(
                    height: 30,
                    decoration: BoxDecoration(
                        border: Border.all(
                            color: Colors.white,
                            width: 2),
                        boxShadow: [
                          BoxShadow(
                            blurRadius: 10.0,
                            color: Colors.black.withOpacity(.5),
                            offset: Offset(3.0, 4.0),
                          ),
                        ],
                        color: Colors.white,
                        borderRadius: BorderRadius.all(Radius.circular(10.0))),
                    child: Center(
                      child: Padding(
                        padding: EdgeInsets.fromLTRB(10, 5, 10, 5),
                        child: Text(
                          "Balance: xxx",
                          style: TextStyle(
                            color: Colors.black,
                            fontSize: 14,
                          ),
                        ),
                      ),
                    ),
                  ),
                ),
              ],
            ),
            Container(
              color: Colors.white,
              child: _offers == null
                  ? Container(
                      child: Padding(
                        padding: EdgeInsets.all(30),
                        child: Row(
                          mainAxisAlignment: MainAxisAlignment.start,
                          children: <Widget>[
                            Icon(MdiIcons.foodAppleOutline,
                                size: 60, color: globals.themeColor4),
                            Padding(padding: EdgeInsets.only(right: 20)),
                            Expanded(
                              child: Column(
                                crossAxisAlignment: CrossAxisAlignment.start,
                                children: <Widget>[
                                  Text("Fetching offers",
                                      style: TextStyle(
                                          fontWeight: FontWeight.bold)),
                                  Padding(padding: EdgeInsets.only(top: 5)),
                                  Text(
                                      "We are fetching offers for you, please hold on...",
                                      style: TextStyle(color: Colors.grey)),
                                ],
                              ),
                            ),
                          ],
                        ),
                      ),
                    )
                  : Column(children: _offers),
            ),
          ],
        ),
      ),

Has anyone else encountered this and have a solution? Maybe force focus on the map somehow when  it starts moving or something could work?

@rgbinnovation Can you please try it using current flutter stable or master and current google_maps_flutter?

Without additional information, we are unfortunately not sure how to resolve this issue. We are therefore reluctantly going to close this bug for now. Please don't hesitate to comment on the bug if you have any more information for us; we will reopen it right away!
Thanks for your contribution.


fix(db): exclude the root endpoint from the openapi documentation

fixes #163
This fixes a bug where the platformatic root endpoint / (the one that displays the platformatic welcoming page) was being included in the openapi documentation.
This PR introduces the schema: { hide: true }  option in the root / route definition to exclude it from the openapi documentation and consequently from the swagger ui page.

Thank you guys.
I noticed CI was failing because of some tests that were still relying on having the root endpoint being included in the openapi documentation so I went on and integrated the necessary changes.


Installation Fail

I use Blender 3.6
I downloaded and install the .zip but nothing is actually installed
I don't have any other o3d import-export addon at this moment
Any idea? Thank you

@KCR58Game I can't reproduce this—are you sure you're enabling the addon after installing it?

@KCR58Game I can't reproduce this—are you sure you're enabling the addon after installing it?

The problem is, nothing installed, I can't even have the addon to tick enabling it.

I downloaded and install the .zip
Which .zip did you download?

I downloaded and install the .zip

Which .zip did you download?

Green icon [< > Code] , and download zip.
I install that .zip without doing anything, no unzip or whatever.

Ah, that explains it! The instructions say to download from the releases page - GitHub's source download encapsulates the repository in another folder, which breaks Blender's addon discovery. Manually copying the io_export_o3d folder up a level into addons should cause it to show up in the addons list.


Regain the flexibility of the module. Also add non-class functions to automate

I feel by https://github.com/Tithibots/tithiwa/pull/17
We removed the flexibility
before that, we can send any selenium drive to the functions like
memberlist = tithiwabot.group.scrape_members_from_group("PROGRAMMING", browser=any)

I think we should add separate functions, that can automate any selenium driver by just taking an argument for that.
Maybe create a file functions.py or something

I also felt that.
Let me try that.


Rename Scalar to Parameter

I think that Parameter is a better name for what we're calling Scalar at the moment.
Ideally, this should just be an alias for the Uniform distribution.

This was implemented in #13


Is there a file size limit for this plugin?

I'm trying to get this work to look at some larger webp files (tens of megabytes and up to 100 megapixels) and I get this error message:
qlmanage -d 4 -p -x  /Users/satadru/Desktop/Users/satmandu/Desktop/test.webp > ~/Desktop/stdout.txt

2017-02-19 14:39:32.489 qlmanage[1191:20862] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8303, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-02-19 14:39:32.503 qlmanage[1191:20862] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x9e3b, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-02-19 14:39:32.504 qlmanage[1191:20862] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa103, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.

from the stdout.txt:
Previewing file:///Users/satmandu/Desktop/test.webp. Content type UTI: public.webp. Generator used: <QLGenerator /Library/QuickLook/qlImageSize.qlgenerator>
[DEBUG] Thumbnailing file:///Users/satmandu/Desktop/test.webp - type: public.webp - generator: <QLGenerator /Library/QuickLook/qlImageSize.qlgenerator> (try #1)
quicklookd says generator of <QLThumbnail 0x7ff2ccfc02f0 31783 file:///Users/satmandu/Desktop/test.webp> misbehaved

On another file I get this:
qlmanage -d 4 -p -x  /Users/satmandu/Desktop/largetestfile.webp > ~/Desktop/stdout.txt

2017-02-19 14:50:24.489 qlmanage[1360:25841] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x8303, name = 'com.apple.coredrag'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-02-19 14:50:24.504 qlmanage[1360:25841] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0x9e3b, name = 'com.apple.tsm.portname'
See /usr/include/servers/bootstrap_defs.h for the error codes.
2017-02-19 14:50:24.506 qlmanage[1360:25841] *** CFMessagePort: bootstrap_register(): failed 1100 (0x44c) 'Permission denied', port = 0xa103, name = 'com.apple.CFPasteboardClient'
See /usr/include/servers/bootstrap_defs.h for the error codes.

from the stdout.txt:
[DEBUG] Previewing file:///Users/satmandu/Desktop/largetestfile.webp. Content type UTI: public.webp. Generator used: <QLGenerator /Library/QuickLook/qlImageSize.qlgenerator>
[DEBUG] Thumbnailing file:///Users/satmandu/Desktop/largetestfile.webp - type: public.webp - generator: <QLGenerator /Library/QuickLook/qlImageSize.qlgenerator> (try #1)

(When I do a get info on the file it does show me the correct dimensions for the file though.)
(I've attached the file here, split into zip files since it is too big to upload by itself.)
largetestfile.webp.001.zip
largetestfile.webp.002.zip
largetestfile.webp.003.zip
largetestfile.webp.004.zip

Thanks!

OK I found a better way to handle big WebP images that should always work. I successfully got a preview of your sample image.

Thank you. This works beautifully, even for webp files in excess of 100 megapixels!


Printer channel driver name "hardwired"

I tested "This is FreeRDP version 2.0.0-dev (git n/a)" version.
I started freerdp with option:
/a:printer,HP4650_PCL,"HP Universal Printing PCL 6"
But HP_4650_PCL always use "Microsoft Publisher Imagesetter" driver on remote Windows.
("HP Universal Printing PCL 6" installed on remote Windows.)
My hotfix:
I changed "printer_cups.c"...
From:
cups_printer->printer.driver = "MS Publisher Imagesetter";
To:
cups_printer->printer.driver = "HP Universal Printing PCL 6";
And now, HP_4650 works at remote Windows with the "HP Universal Printing PCL 6" driver! :):):)
My solution works, but not nice... Why not use the specified driver name in command line, instead of default "Imagesettler"...
Why printer drive name "hardwired", when I set this option in command-line?
This problem is independent from printer type.
I would be better, if freerdp use the given driver name if specified instead of "Imagesettler".

@szolnoki did you try with the /printer command line already?
/printer:<device>,<driver>

I'm not sure that that the "addin syntax" (using /a) parses additional parameters if an extra parameter (like /printer) exists.

I have tested. But not working. Absolutely same effect as "/a:printer". :(
Driver name only changed, when I modify the source code...
I think not possible to change driver name any other way. Because I searched "printer.driver" string in all source codes. "printer.driver" variable is set only one place, see the "hardwired" line above.

I continue to investigate this problem, and I found this.
Compiled with cmake options:
-DWITH_CUPS=ON -DCHANNEL_PRINTER=ON
Version: 2.0.0-dev (git df81e84)
Started the xfreerdp with option again and again:
/printer:HP4650_PCL,"HP Universal Printing PCL 6"
In remote Windows Devices&Printer settings, I see:

The HP4650_PCL appear with driver "HP Universal Printing PCL 6"
Some seconds later HP4650_PCL above disappear
Some seconds later HP4650_PCL appear again, but with "MS Publisher Imagesetter" driver.
:(:(:(:(

I added some extra logging "printf" to freeRDP printer channel driver, and I found the problem:

I see in log: "[INFO][com.freerdp.channels.rdpdr.client] - Loading device service printer (static)"
Calls GetPrinter for "HP4650_PCL"
Calls printer_cups_new_printer for "HP4650_PCL"
I see in log again:  "[INFO][com.freerdp.channels.rdpdr.client] - Loading device service printer (static)"
Calls EnumPrinters
Calls printer_cups_new_printer for "HP4650_PCL"
Calls printer_cups_new_printer for other printers...

I think, freeRDP calls the printer registration twice. First within driver->GetPrinter, when I specify a driver with "/printer" option. And again when try to enumerate all printers (driver->EnumPrinters). This last enumartion is destroys the initilaized printers and driver names, and use the default "MS Imagesettler" driver_name.
I made a quick test (and a fix for Me):
I commented out the total "if (name && name[0])" "else" code block in "DeviceServiceEntry" function.
With this change, I knocked out the whole enumaration process. But HP4650_PCL appear only in remote Windows when I specified "/printer:HP4650_PCL,...", but use the given driver. And printer appear only once, not twice
I think, freeRDP printer handling is broken, because always enumerate (and "overwrite") all printers, regardess given as "/printer:name,driver" option.

I dig a little deeper:
I start freeRDP only with this "device":
/printer:HP4650_PCL,xxxx
But in rdpr_process_connect, settings->DeviceCount is 2 !
DeviceArray[0]: Id=0, Type=4, Name="HP4650_PCL"
DeviceArray[1]: Id=0, Type=4, Name=NULL
The DeviceArray[1] is fire the 2nd printer_DeviceServiceEntry, wich calls the EnumPrinters later, and re-install all printers with defult "MS Imagsettler" driver.

any news about this issue, it seems that this issue persist with imagesetter...
thanks

Hi bmiklautz ,
Tried with  /printer:, and not working, always appears iamgesetter, also tried with 'driver'
Waht can I do?
thanks

@trentasis I confirm that the driver name is ignored and hardwired. I gave a look at the printer channel and it would need some love to fix that. I'll treat this when I'll have some time.

Tell when to expect patches? Really need this feature.

Does my pull work for you?

System: Ubuntu 14.04 Linux lxmsk38 3.13.0-77-generic #121-Ubuntu SMP Wed Jan 20 10:50:59 UTC 2016 i686 i686 i686 GNU/Linux
Download last github master.zip.
Compile switch:
cmake -DWITH_WAYLAND=OFF -DCMAKE_INSTALL_PREFIX=/opt/freerdp2 -DWITH_CUPS=ON -DWITH_CHANNELS=ON -DSTATIC_CHANNELS=ON -DCHANNEL_URBDRC=ON -DCHANNEL_URBDRC_CLIENT=ON -DWITH_GSTREAMER_1_0=OFF .
Run command:
/opt/freerdp2/bin/xfreerdp +clipboard /sec:rdp /v:ferma.alliance.ru /printer:HP-LaserJet-4050,"HP LaserJet 4050 PCL 6
[13:18:19:503] [32323:32324] [INFO][com.freerdp.client.common.cmdline] - loading channel rdpdr
[13:18:19:503] [32323:32324] [INFO][com.freerdp.client.common.cmdline] - loading channel rdpsnd
[13:18:19:503] [32323:32324] [INFO][com.freerdp.client.common.cmdline] - loading channel cliprdr
Segfault
Syslog:
Feb 29 13:03:05 localhost whoopsie[968]: Parsing /var/crash/_opt_freerdp2_bin_xfreerdp.65542.crash.
Feb 29 13:03:05 localhost whoopsie[968]: Uploading /var/crash/_opt_freerdp2_bin_xfreerdp.65542.crash.
Feb 29 13:03:10 localhost whoopsie[968]: Sent; server replied with: No error
Feb 29 13:03:10 localhost whoopsie[968]: Response code: 200
Feb 29 13:03:10 localhost whoopsie[968]: Got command: OOPSID
Feb 29 13:03:19 localhost whoopsie[968]: Parsing /var/crash/_opt_freerdp2_bin_xfreerdp.65542.crash.
Feb 29 13:03:19 localhost whoopsie[968]: Uploading /var/crash/_opt_freerdp2_bin_xfreerdp.65542.crash.
Feb 29 13:03:22 localhost whoopsie[968]: Sent; server replied with: No error
Feb 29 13:03:22 localhost whoopsie[968]: Response code: 200
Feb 29 13:03:22 localhost whoopsie[968]: Got command: OOPSID
I can provide file crash.

@fedsed Please test with pull #3171 merged, there is a known regression introduced with #3156 or wait until it has been reviewed and merged to master.

Include #3171.
Run command:
/opt/freerdp2/bin/xfreerdp +clipboard /sec:rdp /v:ferma.domain.local /printer:HP-LaserJet-4050,"HP LaserJet 4050 Series PCL6"
Printer redirected with the right drivers. Print test page OK.
Thank you for your work!

@fedsed Good to know it works now :)
closing as resolved.


Add github actions to validate DocGen metadata.

This uses the AWS Docs SDK Code Examples Tools validator to ensure metadata is valid for internal Code Library docs builds.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

OK to add repo as doc tributary


When does postingState.isPosting become false in the post(Object event) method?

The variable postingState is local to the thread retrieving it.
https://github.com/greenrobot/EventBus/blob/1d995077d0b620a6aae9c60a8b96443113752305/EventBus/src/org/greenrobot/eventbus/EventBus.java#L260
Therefore, it must always be unique to each concurrent (or parallel) thread running the same method.
When does the value of the if statement become false in the above condition? Assuming it does become false, why doesn't this cause any race conditions? Given that there are no locks used, and it is also not an atomic variable.

Thanks for clarifying. I was trying to understand the code and that part was confusing. Even if it does not have any performance impact, removing the condition statement (assuming there is no other reason for having it) could make that part less confusing.

Thanks for clarifying. I was trying to understand the code and that part was confusing. Even if it does not have any performance impact, removing the condition statement (assuming there is no other reason for having it) could make that part less confusing.

race condition will appear with shared variable ,but PostingThreadState variable is in  ThreadLocal.so it is unique for every thread , not a shared variable.
so it won't cause race condition.


fix: removed unreached throw

Fixes #112

This PR is incorrect

@MrJacz Can you elaborate further and I would be willing to fix?

This PR as a whole is incorrect. that if check if completely fine and reachable.

While it may be reachable, the command itself will never cause it to trigger. When the play command runs, it checks if it's in a voice channel, and if not runs the join command. Which means that the bot will always be in a voice channel before MusicManager.play() is called

@PyroTechniac you're assuming nothing will go wrong and everything before that will work

@MrJacz No, unless discord incorrectly reports that the bot joins the channel when it hasn't, then the previous checks will throw before this check is ever reached

@PyroTechniac You're removing a check for an edge case. I promise you its possible for it to happen as its happened to me before. No reason to remove an edge case that actually can happen.


Default branch for storing the publiccode.yml file

Discussion
Since there are no indications whether the default branch where to store the publiccode.yml file has to be master, maybe the standard should provide more details.
This may be a problem when a repository does not have a branch named master.

This needs to be addressed as soon as we can. Many projects are turning to a different default branch naming convention.
cc @libremente @bfabio @alranel

Also GitHub is planning on having main as the default branch soon


Some actions do not trigger properly in context menus with custom titleBarStyle

VSCode Version: 1.25.0-insider
Commit: b4a18da6e78f95295ea6538f5ae8dd0c9f0869a9
Date: 2018-06-19T07:49:07.900Z
Electron: 2.0.2
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64
OS Version: Windows 10 Pro
Version: 1803
Build: 17134.112

Steps to Reproduce:

Set "window.titleBarStyle" to "custom" and restart
Right click an item in the sidebar (E.g Extensions) and try to use the 'Hide' option, it does not properly remove the item.

This does not happen with "window.titleBarStyle": "native"
Does this issue occur when all extensions are disabled?: Yes

This is similar to issue #52284 , likely with identical cause


Unable to install KMOD-USB-STORAGE failing with The installed version of package kernel is not compatible, require 5.10.131-1-df52e9f1… while 5.10.131-1-dcae98e3… is installed.

I have upgraded from existing version to https://github.com/astolfogit/miwifi-r3-production/releases/download/2022.07.23-0139/openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.bin
updated installed packages and not able to install KMOD-USB-STORAGE and its failing with the mentioned error

It's actually easier to just rebuild the binaries with all the packages you need included than trying to install the packages. Check this out - https://openwrt.org/faq/cannot_satisfy_dependencies

openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip
Try this out (change the extension from .zip to .bin). I've included KMOD-USB-STORAGE in the config file.

It's actually easier to just rebuild the binaries with all the packages you need included than trying to install the packages. Check this out - https://openwrt.org/faq/cannot_satisfy_dependencies

not if you're abroad with no data plan ;)

openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip Try this out (change the extension from .zip to .bin). I've included KMOD-USB-STORAGE in the config file.

I tried this. Now i have KMOD-USB- STORAGE and KMOD-USB-STORAGE-UAS already installed but then i dont still have KMOD-USB-EXTRAS and NTFS-3G, FDISK available and they also have dependency on kernel version name. Would you kindly rebuild with expected kernel version name by these pkgs since i have never had such issues in earlier versions.

openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip
Fdisk isn't included, but it can be installed manually just fine since it doesn't depend on any kernel modules.

openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip Fdisk isn't included, but it can be installed manually just fine since it doesn't depend on any kernel modules.

Hei Thank you mate, I tried this version also and made some progress in configuring File Sharing on openwrt server with Samba 4 and again hit a problem, I can not see my 64 GB pendrive in Mount Points see screenshot

where as I can see it when I do LSUSB

Not sure if it could be because I don't have packages and I cant directly install due to kernel dependency
kmod-fs-ext4
kmod-fs-vfat
kmod-fs-ntfs
e2fsprogs
Sorry to keep bothering but would you please point me to some step by step instruction on how to get rid of these kernel dependencies just like you are installing packages in the BIN file

You can't just get rid of these kernel dependencies, you have to satisfy them. With kernel modules, it comes down to recompiling the whole thing (https://github.com/x-wrt/x-wrt#quickstart - there's the instruction to building openwrt). It could've been easier with snapshot images, but i have no idea if x-wrt snapshots use the same kernel configuration as openwrt snapshots do, and if it's not the same, kernel hash sums won't match, resulting in "kernel is not compatible ...".

Uploading openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip…
This one includes those three kernel modules. You can install e2fsprogs yourself.

Uploading openwrt-ramips-mt7620-xiaomi_miwifi-r3-squashfs-sysupgrade.zip… This one includes those three kernel modules. You can install e2fsprogs yourself.

Let me give it a try brother. I am probably not as good as you in Linux / OpenWRT why did this kernel dependency was not there in existing versions.

This one includes those three kernel modules. You can install e2fsprogs yourself.
https://drive.google.com/file/d/1yw7V8fY2gSz1FpDLnJnKVAKEhMmdkMe5/view?usp=sharing (github had some problems with uploading this file, idk why)

Closing this issue as have been able to mitigate this issue with last bin file provided.

I've tested an NTFS-formatted drive and an exFAT-formatted drive - both of them work fine.  I've updated the config file and launched the building workflow manually, new release will appear in a couple of hours.

I've tested an NTFS-formatted drive and an exFAT-formatted drive - both of them work fine. I've updated the config file and launched the building workflow manually, new release will appear in a couple of hours. I hope this will actually resolve the issue.

Thanks friend. Do you mean going forward all releases will have these installed already or is it only this release. Because I downloaded the recent release of 30 July and it did not have these packages already installed.

These packages will be included in all future releases.


docs: Add E2E test badge to the README

Summary
The goal of this PR is to add the E2E testing badge to the readme.
Changes
Adds status badge to the readme and renames the workflow to reflect e2e tests.
User experience
No change beyond visible badge on readme
Checklist
If your change doesn't seem to apply, please leave them unchecked.

[x] I have performed a self-review of this change
[x] Changes have been tested
[x] Changes are documented

Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Codecov Report
Patch and project coverage have no change.

Comparison is base (3a6fd98) 27.88% compared to head (fd9f218) 27.88%.

:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #87   +/-   ##
=======================================
  Coverage   27.88%   27.88%
=======================================
  Files          13       13
  Lines        1922     1922
=======================================
  Hits          536      536
  Misses       1386     1386

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

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


Reflection Free Configuration and Proguard

Is there any guidance on how to use the reflection free configuration with proguard and obfuscation?
Based on looking at the factories, it looks like I'll need to keep my class names at a minimum (possibly method names too).
-keepnames class com.myapp.**
Do you have any advice on how I can make this more specific?

Here's what I've got working on my project...
-keep class javax.inject.**

# Do not obfuscate annotation scoped classes
-keepnames @javax.inject.Singleton class *
# Add any custom defined @Scope (e.g. @Singleton) annotations here
# because proguard does not allow annotation inheritance rules

# Do not obfuscate classes with Injected Constructors
-keepclasseswithmembernames class * {
    @javax.inject.Inject <init>(...);
}

# Do not obfuscate classes with Injected Fields
-keepclasseswithmembernames class * {
    @javax.inject.Inject <fields>;
}

# Do not obfuscate classes with Injected Methods
-keepclasseswithmembernames class * {
    @javax.inject.Inject <methods>;
}

Hi @philipbjorge ,
Thanks for the rules!
Do you need -keep class javax.inject.**?
As we used them just at compile time as far as i remember.

As soon as @philipbjorge answers our question, we should add this to the wiki page about configurations.

@dlemures When I remove the -keep class javax.inject.**, I get the following error at runtime:
Unable to start activity ComponentInfo{com.xyz/com.xyz.activities.MainActivity}: e.c.e: No factory could be found for class com.xyz.a.a. Check that the class has either a @Inject annotated constructor or contains @Inject annotated members. If using Registries, check that they are properly setup with annotation processor arguments.
android.app.ActivityThread.performLaunchActivity

Any ideas why or how to debug?

Looking at my stacktraces + mappings.txt makes me think something real funny is going on.
I'll keep digging and might be able to remove the javax.inject rule...

OK, so I had the following rule to keep the names of all the classes annotated with my custom scope annotations
-keepnames @com.xyz.support.di.scopes.* class *
Turns out that doesn't work and you need to list them all out manually
-keepnames @javax.inject.Singleton class *
-keepnames @com.xyz.support.di.scopes.ActivitySingleton class *
-keepnames @com.xyz.support.di.scopes.FragmentSingleton class *
-keepnames @com.xyz.support.di.scopes.ChildFragmentSingleton class *

Now I'm running into a new issue though. Will update shortly.

Yes, probably the best here would be to recommend not to obfuscate any project class...

solved by https://github.com/stephanenicolas/toothpick/wiki/Proguard-&-TP

we recently migrated to toothpick from roboguice and these proguard rules worked on our project
-keepattributes Annotation
-keepnames class * {
@javax.inject.Inject (...);
@javax.inject.Inject ;
@javax.annotation.Nullable ;
}
Do not obfuscate annotation scoped classes
-keepnames @javax.inject.Singleton class *
-dontwarn javax.inject.**
generated toothpick classes
-keep class **$$Factory{ *; }
-keep class **$$MemberInjector{ *; }

wait, so the solution to this is not to obfuscate the code?! Most production applications require some form of obfuscation for a semblance of security. This seems like a major dealbreaker and i'm only saying that because I'm having trouble with the above proguard rules. It would have been nice to have a solution that included a recommended (Tested and true) way of using proguard with the library.

All names of classes using injection won't be obfuscated.
We use this at Groupon, not only because of toothpick but because of quite
a few other librairies that rely on some naming convention to.load classes
to avoid reflection. For instance ButterKnife, Dart, Icepick, etc. Dagger 1
or 2 would be no exception here.
As you say, obfuscation provides kind of a feeling of secrecy, not much
more. So, what else could a library offer ?
Also, besides name obfuscation, you can also use other proguard
transformations like optimization, method rewriting, etc that will probably
provide even further hard to decompile byte code.
We are really not sure about what TP itself removes to apps on this matter.
And we would be happy to hear from a better solution.
Le mar. 4 avr. 2017 00:02, Brian Shuman<EMAIL_ADDRESS>a écrit :

wait, so the solution to this is not to obfuscate the code?! Most
production applications require some form of obfuscation for a semblance of
security. This seems like a major dealbreaker and i'm only saying that
because I'm having trouble with the above proguard rules. It would have
been nice to have a solution that included a recommended (Tested and true)
way of using proguard with the library.
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
https://github.com/stephanenicolas/toothpick/issues/146#issuecomment-291287272,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABv33RXm0ncXILbFTPIFimZG2ICFRKiTks5rsWx1gaJpZM4JvwRt
.

@stephanenicolas
We need setup ProGuard with
https://www.guardsquare.com/en/proguard/manual/usage#adaptclassstrings
For changing class names in FactoryRegistry

Thx for hint @terrakok. If anyone feels like adding a proguard configuration page to TP wiki, feel welcome to do so.

@stephanenicolas
What do you think about PR?

So, we have the patched toothpick up and running in production, everything seems working fine.
Until the PR is merged or some other solution comes around, here is the temporary one:

Use patched annotation processor built from the fork:
annotationProcessor files('libs/toothpick-compiler-1.1.3-obfuscation-fixed.jar')
annotationProcessor 'com.squareup:javapoet:1.4.0'
annotationProcessor 'javax.inject:javax.inject:1'

Or kapt if you use kotlin.
The file is attached.

Use configuration with registries: https://github.com/stephanenicolas/toothpick/wiki/Factory-and-Member-Injector-registries
Add toothpick_obfuscation_support : "true" to annotation processor options (along with toothpick_registry_package_name)
Add adaptclassstrings ** to proguard rules.

toothpick-compiler-1.1.3-obfuscation-fixed.zip

This is adressed in TP 1.1.3, released today.


Remove needs_close from FdObject

This commit removes needs_close field from FdObject, and stores the underlying Descriptor without the ManuallyDrop wrapper.
As per our discussion in #147.

I'm trying to decide if we'll ever want the ability to have WasiCtx hold on to file descriptors it doesn't own, and if so, if it's worth keeping this code around until then.
I think where I'm arriving at is, we may want this capability at some point, but I think we're going to want it in a different form. Instead of making the Descriptor be ManuallyDrop, it should be the OsFile or perhaps even the underlying std::fs::File. It's ok to drop a Stdin object, for example. So I think removing it for now makes sense; we can reintroduce it in a different way in the future if we need it.

I agree that we can always re-add it in the future if need be, and make it slightly more informed given the ever-improving state of the crate.


Publish-DbaDacPackage - Please add meaningfull error message, if sqlcmd variable is missing

name: Improve error message in Publish-DbaPackage
about: give it more meaning

Summary of new feature
sqlpackage.exe gives a more detailed explanation what is going wrong.
Example

sqlpackage.exe

*** An error occurred during deployment plan generation. Deployment cannot continue.
Missing values for the following SqlCmd variables:LINKED_SERVER_TO_DWH.

Publish-DbaDacPackage

An error occurred during deployment plan generation. Deployment cannot continue.
In D:\Users\<<User>>\Documents\WindowsPowerShell\Modules\dbatools\allcommands.ps1:98143 Zeichen:9
+         throw $records[0]
+         ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], Exception
    + FullyQualifiedErrorId : dbatools_Publish-DbaDacPackage

Latest version of dbatools as of writing
Version 0.9.411

Thanks for the report, @chrgraefe ! @RichieBzzzt / @nvarscar, im unsure which of you this falls under. Please let me know and I'll keep in mind for the future.

Hello!
I’ve encountered this problem with returning the actual error from using the dac.dll before.
I think Chrissy we may have to have the full exception returned. This does mean we sort of fall into the risk of returning a sea of red. But at least we will get the cause of the failure.
I’m happy to do the work myself but wanted to raise it here first to get your thoughts on this.

Right now, the error output is pretty simple:
catch [Microsoft.SqlServer.Dac.DacServicesException] {
   Stop-Function -Message "Deployment failed" -ErrorRecord $_ -Continue
}

I wonder if there is a better way of using Stop-Function so that not only original error is thrown, but user also gets some useful info on the screen. Maybe, Write-Message -Level Warning before doing a Stop-Function?
I think, if user would run $error[0]|select *, the error would have appeared in full, but that needs testing, which I won't be able to do for another couple of days.
PS And sorry for being late to the party, was having some vacation time.

I've tried @nvarscar 's suggestion above of piping it to select * but it does not output the error.
In another module I wrote for this, the only way I could get the exception was something like this -
catch {
        $e = $_.Exception
        $toThrow = $e.Message
        while ($e.InnerException) {
            $e = $e.InnerException
            $toThrow += "`n" + $e.Message
        }
    }
    finally {
        if ($ToThrow) {
            Throw $ToThrow
        }
}

It's not pretty, but it got the pertinent error. So to get the full error we'd have to either change Stop-Function, or go rogue in this function and throw the exception something like above. Am open to alternatives.

What about $error[0].Exception | Select * ? 😸
Oh and we can (and probably should) definitely do something like this, putting the proper string into the -Message parameter, all we need to do is to construct the string itself and ditch -ErrorRecord $_, which kind of overrides the -Message.

@FriedrichWeinmann has a couple issues filed for better error messages and it's on his agenda to address this. I created an internal command, Get-ErrorMessage, that will be useful in the interim.  I'll make a PR shortly.

Is this resolved now? @chrgraefe could you please confirm

@nvarscar great! Correct error message is now visible. Much better debugging.

Thanks a lot

Fantastic news! I replaced Richie's change with a module-wide change and confirmed it worked in a number of places, but not all. Happy to see another scenario where it worked. You should see an improvement module-wide.


Bugs in Laserfarm Notebook, step "Extract features from tiles", function 'DataProcessing'

Describe the bug
Bug appears at step 'Extract features from tiles'  when run
processing = DataProcessing(t, tile_index=idx).config(feature_extraction_input).setup_webdav_client(conf_wd_opts)
processing.run()
It reports the error:
PanicException: assertion failed: mid <= self.len()

The idx was defined as: idx = [[int(el) for el in tile.split('_')[1:]] for tile in tiles], which is different from the original code: idx = int(t.split('_')[1:]) since using the original code gives the error :

It is necessary to check the definition of idx and the usage of DataProcessing from laserfarm for the new infrastructure.

No longer appearing


Update colormap import

Avoid
\src\components\DataDrawer\Chart\index.tsx
  1:1  error  Resolve error: unable to load resolver "import/parsers"  import/extensions

✖ 1 problem (1 error, 0 warnings)

@bencpeters thoughts on how to approach solving those?

Generally to solve circular imports you either refactor your logic so that one file depends only on the other instead of having mutual dependencies, or if that's difficult, you extract the mutual dependencies into a new shared dependency that both can import. Hard to say more without specifics though.

Note:
One worthwhile import cycle to fix is with loadLayerData and mapStateSlice.
loadLayerData depends on nso which depends on mapStateSlice which depends on loadLayerData, meaning in some cases, mapStateSlice always gets an undefined version of loadLayerData resulting in a failiure while constructing the map slice.
This makes testing difficult and leads to undesirable mocks. Ran into this issue while writing tests for #92

This makes testing difficult and leads to undesirable mocks. Ran into this issue while writing tests for #92

Good catch! That's why I don't just want to suppress these eslint warnings - I'd like to use import type to figure out what are "just" type dependencies, and try to fix any remaining cyclic dependencies after that...

@SimplyBallistic would you be able to take over this PR?

@SimplyBallistic would you be able to take over this PR?

sure! I'll update here if we face any blockers


Use proper bootstrap styling for views

cc @mlorbetske @Eilon for shiproom approval

@DamianEdwards can you take a look as well?

Updated.

Removed form-horizontal class
Removed form-actions no-color from Delete templates.