Add transform mode button for layers

References and relevant issues
Part of #3975
Description
Add a button to activate the layers transform mode. Also, add a way to reset the transform to the initial value set at layer creation (reset trigger via Alt + Left mouse click over the transform mode button):
A preview:

Notes/TODOs:

[x] Icon selection/definition needs to be done (in progress)

Possible icon design at https://github.com/napari/napari/issues/3975#issuecomment-2032718855
Selected icon at https://github.com/napari/napari/issues/3975#issuecomment-2067101276

[x] Implemented the Alt-click approach to trigger a reset with a confirmation dialog but happy to check any other alternatives/ideas

It is strange at first to see the tool icons for image layers, but it opens the possibility of other tools there (Crop? Histogram?)

<3

We'll need to make a docs PR to document the change.

Is there any specific place in the docs where things need to be added or changed? Not completly sure what needs to be done but happy to help with that :+1:

I think we'll need to write up a description of Transform mode somewhere -- viewer guide? I'd hate to duplicate it for every layer, need to think about this -- and then inform that the icon activates that mode and that alt-click resets transforms.

I think we'll need to write up a description of Transform mode somewhere -- viewer guide? I'd hate to duplicate it for every layer, need to think about this

Created https://github.com/napari/docs/pull/420 as quick draft but checking seems like probably some info should be also added over the layer types detailed descriptions at https://github.com/napari/docs/tree/main/docs/howtos/layers. Maybe to prevent duplication a general buttons (and even maybe controls) description should be added at https://github.com/napari/docs/blob/main/docs/howtos/layers/index.md ?

Gah! @dalthviz I didn't realize you'd addressed the 3D issue! Sorry to leave this hanging!
Next time, please ping! ❤
Could you remind me why the "normal" mode (pan mode) icon was changed to the magnifying glass?
Here's what Labels buttons look like on 0.4.19 (and main):

Zoom basically always works, so the magnifying glass would be misleading?
Oh, I guess cause the mode is still called pan_zoom and that's the name of the icon.
I made a suggestion to go back--I think that's the last thing!
I'm going to put this on 0.5.0 and a highlight. This is really high value/high impact!
@jni what do you think? The main question is the change in the look of the image layer.

@dalthviz thanks for this, it's awesome! ❤ I've played with all sorts of layers etc. and it works great, but I can't seem to get the reset shortcut to work on my Mac?

Huh, I'm also on macOS and Option-click on the the new icon works nicely -- or is there some other shortcut I missed?

Huh, I'm also on macOS and Option-click on the the new icon works nicely -- or is there some other shortcut I missed?

Ooooops I didn't realize I was meant to click on the button lol I was just clicking on the canvas and holding Option. It's probably just me right? Maybe we update the message to say Alt + Left click button to reset?

Maybe we update the message to say Alt + Left click button to reset?

That makes sense to me :+1:

Did a change to the tooltip text. Now it looks something like this:

Windows:

macOS:

Let me know what do you think!

Tooltip preview with the latest changes:

@jni Gentle reminder ping: if you could take a look at the change to add buttons to the image layer controls!

One more (hopefully last) request: when a layer is deselected, the transform overlay associated with that layer should probably (?) no longer be visible, since it can't be interacted with:

This example is using samples/napari builtins/Balls 3D.
The points box is a little offset from the image/labels boxes but that it's probably correct given points positions and extents, and therefore expected.

Yeah, same behavior with the keybind alone, so not really fault of this PR.
It matches the behavior of Shapes selection/transform mode--switch layers and the shape still shows the selection/transform handles.
I think it makes sense to have the handles switch off if the layer isn't selected--but then you'd want them to come back when you reselect, so we'd need to remember the previous state?
I mean I could see going between 2 layers (2 modalities) and adjusting rotation/transform back and forth, so it's a real use case.

Since this PR just adds the UI button, maybe we make an issue and punt for now?

I'm not opposed to punting but let's hear from @dalthviz what he thinks re difficulty of implementation. I hope it only means toggling .visible on a VisPy node somewhere in response to layer selection events... But if it's going to take longer then I am very happy to merge this as is.

I guess what @jni was suggesting is that if transform mode is enabled for a layer and then selection changes to a different layer, the transform mode overlay has visible = False. Then, if selection returns, set visible = True.
The other option would be to just auto-disable transform mode when changing layer selection, but I don't like this so much because you could be trying to register multiple layers and be adjusting two+.

@psobolewskiPhD @jni I added in the last commit some changes to update the transform box visibility following the layer list active selection. A preview:

Not sure if there could be a better approach but let me know what you think!

@dalthviz pulled it down and it works beautifully for me 🥰
...but I'm too tired to really look at the code. I will try and take a closer look tomorrow.

@dalthviz last changes look great except for the very final bit of the gif — I think when multiple layers are selected the mode should always be pan-zoom, as it is now. It's super super weird for a click and drag on the canvas to do nothing. Hopefully not a huge lift? Other than that the code looks really clean. ❤

I think when multiple layers are selected the mode should always be pan-zoom, as it is now. It's super super weird for a click and drag on the canvas to do nothing. Hopefully not a huge lift?

Did a quick check and I think the current behavior is to preserve last layer mode selection even when multiple layers get selected. So checking, with latest main, you will not be able to pan-zoom unless you leave the pan-zoom mode enabled in the first layer you select before selecting all the layers:

Main
This PR

I think that behavior is unchanged with this PR so maybe improvements to that should be done in another PR? :thinking: Not totally sure how that could be better handled but let me know if something needs to be done here!

I agree with @jni that pan-zoom should always work -- zoom will work right, so it's just pan?
But I do think it may as well be it's own PR, because it's not really related to the features here?

zoom will work right, so it's just pan?

Did a quick check and yep, that seems to be the case. I think since you are able to zoom with any mode is only the pan interaction that is not supported unless you leave the pan-zoom mode active in the first layer selected when doing a multiple layer selection

@dalthviz Thanks for checking.
I'm going to mark this read-to-merge
Can you make an issue with your findings above regarding the somewhat strange lack of pan ability when multiple layers are selected? It's definitely a bug we should fix, but not core to this PR.

So checking, with latest main, you will not be able to pan-zoom unless you leave the pan-zoom mode enabled in the first layer you select before selecting all the layers:

horrifying. 😱 😂 Thank you for checking! And sorry for the false alarm!


windows整合包 numpy和 rotary_embedding_torch报错

使用整合包的时候打开asr，tts推理的时候都报错了，怎么解决呀

numpy 版本不对吧！

numpy 版本不对吧！

是的，但我没看出来应该是哪个版本
还有就是整合包里的环境按理说不会出问题吧

可能是系统自带其他python环境混淆了？

都能用了，虽然还是显示包有冲突
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install -U rotary_embedding_torch
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting rotary_embedding_torch
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/0d/e1/1f9f7aebd2e424e750c495d2b253baba8db69759ee355801e368cb1d9bb2/rotary_embedding_torch-0.5.3-py3-none-any.whl (5.3 kB)
Collecting beartype (from rotary_embedding_torch)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/70/1a/1833bea6f648d301b24b265c5b41f6979ff321a0f607b0db6d721a0ad7a0/beartype-0.17.0-py3-none-any.whl (866 kB)
---------------------------------------- 866.1/866.1 kB 608.3 kB/s eta 0:00:00
Requirement already satisfied: einops>=0.7 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from rotary_embedding_torch) (0.7.0)
Requirement already satisfied: torch>=2.0 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from rotary_embedding_torch) (2.0.0+cu118)
Requirement already satisfied: filelock in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from torch>=2.0->rotary_embedding_torch) (3.10.0)
Requirement already satisfied: typing-extensions in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from torch>=2.0->rotary_embedding_torch) (4.4.0)
Requirement already satisfied: sympy in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from torch>=2.0->rotary_embedding_torch) (1.11.1)
Requirement already satisfied: networkx in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from torch>=2.0->rotary_embedding_torch) (2.8.8)
Requirement already satisfied: jinja2 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from torch>=2.0->rotary_embedding_torch) (3.1.2)
Requirement already satisfied: MarkupSafe>=2.0 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from jinja2->torch>=2.0->rotary_embedding_torch) (2.1.1)
Requirement already satisfied: mpmath>=0.19 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from sympy->torch>=2.0->rotary_embedding_torch) (1.2.1)
Installing collected packages: beartype, rotary_embedding_torch
Successfully installed beartype-0.17.0 rotary_embedding_torch-0.5.3
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts\pip.exe install --upgrade numpy
Fatal error in launcher: Unable to create process using '"E:\codes\py39\test-20230416b\RVC-beta-v2-0528\runtime\python.exe"  "E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts\pip.exe" install --upgrade numpy': ???????????
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install --upgrade numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: numpy in c:\users\zhuya\appdata\roaming\python\python39\site-packages (1.22.4)
Collecting numpy
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/b5/42/054082bd8220bbf6f297f982f0a8f5479fcbc55c8b511d928df07b965869/numpy-1.26.4-cp39-cp39-win_amd64.whl (15.8 MB)
---------------------------------------- 15.8/15.8 MB 7.9 MB/s eta 0:00:00
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.22.4
Uninstalling numpy-1.22.4:
Successfully uninstalled numpy-1.22.4
WARNING: The script f2py.exe is installed in 'E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: Could not install packages due to an OSError: [WinError 5] 拒绝访问。: 'C:\Users\zhuya\AppData\Roaming\Python\Python39\site-packages\~umpy\.libs\libopenblas.EL2C6PLE4ZYW3ECEVIV3OXXGRN2NRFM2.gfortran-win_amd64.dll'
Consider using the --user option or check the permissions.
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install --upgrade numpy
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: numpy in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (1.23.5)
Collecting numpy
Using cached https://pypi.tuna.tsinghua.edu.cn/packages/b5/42/054082bd8220bbf6f297f982f0a8f5479fcbc55c8b511d928df07b965869/numpy-1.26.4-cp39-cp39-win_amd64.whl (15.8 MB)
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.23.5
Uninstalling numpy-1.23.5:
Successfully uninstalled numpy-1.23.5
WARNING: The script f2py.exe is installed in 'E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fairseq 0.12.2 requires hydra-core<1.1,>=1.0.7, but you have hydra-core 1.3.2 which is incompatible.
fairseq 0.12.2 requires omegaconf<2.1, but you have omegaconf 2.3.0 which is incompatible.
numba 0.56.4 requires numpy<1.24,>=1.18, but you have numpy 1.26.4 which is incompatible.
scipy 1.9.3 requires numpy<1.26.0,>=1.18.5, but you have numpy 1.26.4 which is incompatible.
Successfully installed numpy-1.26.4
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install numpy==1.23.5
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting numpy==1.23.5
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/08/36/6589c7d5fc4fecda63de4453fefff7c58f6de2b1bb7dfbe7fa807bf85c46/numpy-1.23.5-cp39-cp39-win_amd64.whl (14.7 MB)
---------------------------------------- 14.7/14.7 MB 9.6 MB/s eta 0:00:00
Installing collected packages: numpy
Attempting uninstall: numpy
Found existing installation: numpy 1.26.4
Uninstalling numpy-1.26.4:
Successfully uninstalled numpy-1.26.4
WARNING: The script f2py.exe is installed in 'E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fairseq 0.12.2 requires hydra-core<1.1,>=1.0.7, but you have hydra-core 1.3.2 which is incompatible.
fairseq 0.12.2 requires omegaconf<2.1, but you have omegaconf 2.3.0 which is incompatible.
Successfully installed numpy-1.23.5
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts\python.exe -m pip install "hydra-core<1.1,>=1.0.7" "omegaconf<2.1"
'E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts\python.exe' 不是内部或外部命令，也不是可运行的程序
或批处理文件。
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install "hydra-core<1.1,>=1.0.7" "omegaconf<2.1"
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting hydra-core<1.1,>=1.0.7
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/5f/2a/9c698daa12ed6e09e7629e6908528f043fa9de8a441c56cc13608d765fb2/hydra_core-1.0.7-py3-none-any.whl (123 kB)
---------------------------------------- 123.8/123.8 kB 191.1 kB/s eta 0:00:00
Collecting omegaconf<2.1
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/d0/eb/9d63ce09dd8aa85767c65668d5414958ea29648a0eec80a4a7d311ec2684/omegaconf-2.0.6-py3-none-any.whl (36 kB)
Collecting antlr4-python3-runtime==4.8 (from hydra-core<1.1,>=1.0.7)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/56/02/789a0bddf9c9b31b14c3e79ec22b9656185a803dc31c15f006f9855ece0d/antlr4-python3-runtime-4.8.tar.gz (112 kB)
---------------------------------------- 112.4/112.4 kB 650.7 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: PyYAML>=5.1.* in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from omegaconf<2.1) (6.0)
Requirement already satisfied: typing-extensions in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from omegaconf<2.1) (4.4.0)
Building wheels for collected packages: antlr4-python3-runtime
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.8-py3-none-any.whl size=141217 sha256=c8917840a8813c897676f1ec33f2b72a7da0a6b57512d81f3a24419c0f425039
Stored in directory: c:\users\zhuya\appdata\local\pip\cache\wheels\ca\f8\40\218f8352de306c7febac08533df409791668006d2c0bbc8275
Successfully built antlr4-python3-runtime
Installing collected packages: antlr4-python3-runtime, omegaconf, hydra-core
Attempting uninstall: antlr4-python3-runtime
Found existing installation: antlr4-python3-runtime 4.9.3
Uninstalling antlr4-python3-runtime-4.9.3:
Successfully uninstalled antlr4-python3-runtime-4.9.3
Attempting uninstall: omegaconf
Found existing installation: omegaconf 2.3.0
Uninstalling omegaconf-2.3.0:
Successfully uninstalled omegaconf-2.3.0
Attempting uninstall: hydra-core
Found existing installation: hydra-core 1.3.2
Uninstalling hydra-core-1.3.2:
Successfully uninstalled hydra-core-1.3.2
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
funasr 1.0.0 requires hydra-core>=1.3.2, but you have hydra-core 1.0.7 which is incompatible.
Successfully installed antlr4-python3-runtime-4.8 hydra-core-1.0.7 omegaconf-2.0.6
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>.\runtime\python.exe -m pip install "hydra-core>=1.3.2"
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Collecting hydra-core>=1.3.2
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/c6/50/e0edd38dcd63fb26a8547f13d28f7a008bc4a3fd4eb4ff030673f22ad41a/hydra_core-1.3.2-py3-none-any.whl (154 kB)
---------------------------------------- 154.5/154.5 kB 188.6 kB/s eta 0:00:00
Collecting omegaconf<2.4,>=2.2 (from hydra-core>=1.3.2)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/e3/94/1843518e420fa3ed6919835845df698c7e27e183cb997394e4a670973a65/omegaconf-2.3.0-py3-none-any.whl (79 kB)
---------------------------------------- 79.5/79.5 kB 887.9 kB/s eta 0:00:00
Collecting antlr4-python3-runtime==4.9.* (from hydra-core>=1.3.2)
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/3e/38/7859ff46355f76f8d19459005ca000b6e7012f2f1ca597746cbcd1fbfe5e/antlr4-python3-runtime-4.9.3.tar.gz (117 kB)
---------------------------------------- 117.0/117.0 kB 757.4 kB/s eta 0:00:00
Preparing metadata (setup.py) ... done
Requirement already satisfied: packaging in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from hydra-core>=1.3.2) (22.0)
Requirement already satisfied: PyYAML>=5.1.0 in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (from omegaconf<2.4,>=2.2->hydra-core>=1.3.2) (6.0)
Building wheels for collected packages: antlr4-python3-runtime
Building wheel for antlr4-python3-runtime (setup.py) ... done
Created wheel for antlr4-python3-runtime: filename=antlr4_python3_runtime-4.9.3-py3-none-any.whl size=144578 sha256=0c849a52e17b62873533e43b5fd2ca4dfdaf98b475527242688443e2ea3243cf
Stored in directory: c:\users\zhuya\appdata\local\pip\cache\wheels\b9\0a\c0\fc0de68aa14c7066272aed9fdf29080aad637f3530d865ac86
Successfully built antlr4-python3-runtime
Installing collected packages: antlr4-python3-runtime, omegaconf, hydra-core
Attempting uninstall: antlr4-python3-runtime
Found existing installation: antlr4-python3-runtime 4.8
Uninstalling antlr4-python3-runtime-4.8:
Successfully uninstalled antlr4-python3-runtime-4.8
Attempting uninstall: omegaconf
Found existing installation: omegaconf 2.0.6
Uninstalling omegaconf-2.0.6:
Successfully uninstalled omegaconf-2.0.6
Attempting uninstall: hydra-core
Found existing installation: hydra-core 1.0.7
Uninstalling hydra-core-1.0.7:
Successfully uninstalled hydra-core-1.0.7
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
fairseq 0.12.2 requires hydra-core<1.1,>=1.0.7, but you have hydra-core 1.3.2 which is incompatible.
fairseq 0.12.2 requires omegaconf<2.1, but you have omegaconf 2.3.0 which is incompatible.
Successfully installed antlr4-python3-runtime-4.9.3 hydra-core-1.3.2 omegaconf-2.3.0
[notice] A new release of pip is available: 23.1.2 -> 24.0
[notice] To update, run: E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
E:\1_AI_Voice\GPT-SoVITS-beta>E:\1_AI_Voice\GPT-SoVITS-beta\runtime\python.exe -m pip install --upgrade pip
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
Requirement already satisfied: pip in e:\1_ai_voice\gpt-sovits-beta\runtime\lib\site-packages (23.1.2)
Collecting pip
Downloading https://pypi.tuna.tsinghua.edu.cn/packages/8a/6a/19e9fe04fca059ccf770861c7d5721ab4c2aebc539889e97c7977528a53b/pip-24.0-py3-none-any.whl (2.1 MB)
---------------------------------------- 2.1/2.1 MB 1.1 MB/s eta 0:00:00
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.1.2
Uninstalling pip-23.1.2:
Successfully uninstalled pip-23.1.2
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'E:\1_AI_Voice\GPT-SoVITS-beta\runtime\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed pip-24.0


replace obsoleted pyswagger with py-stf-client

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

25 of 28 (89.29%)  changed or added relevant lines in 3 files are covered.
4 unchanged lines in 1 file lost coverage.
Overall coverage decreased (-1.5%) to 82.051%

Changes Missing Coverage
Covered Lines
Changed/Added Lines
%

stf_appium_client/StfClient.py
23
26
88.46%

Files with Coverage Reduction
New Missed Lines
%

stf_appium_client/StfClient.py
4
91.04%

Totals

Change from base Build<PHONE_NUMBER>:
-1.5%

Covered Lines:
352

Relevant Lines:
429

💛  - Coveralls


correct envoy_build_system include  syntax, remove assumption that protobuf strings are std::string

Description: Corrects portability issues from https://github.com/envoyproxy/envoy/pull/3633, also adding in one case a format check to make sure it does not occur.
Risk Level: Low
Testing: //test/...
Docs Changes: N/A
Release Notes: N/A

@rgs1

@jmarantz the header-to-metadata bits lgtm — thanks for fixing it :+1:

@jmarantz can you merger master? I think the test flake was fixed.

merge done, thanks.


[DOCFIX] Fix various translation issues in CN docs

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/20735/
Test PASSed.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/20761/
Test PASSed.

@LuQQiu  PTAL

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/Alluxio-Pull-Request-Builder/20774/
Test PASSed.


chart: generate a CA cert with certmanager for hubble tls generation

Please ensure your pull request adheres to the following guidelines:

[x] For first time contributors, read Submitting a pull request
[x] All code is covered by unit and/or runtime tests where feasible.
[x] All commits contain a well written commit description including a title,
description and a Fixes: #XXX line if the commit addresses a particular
GitHub issue.
[x] If your commit description contains a Fixes: <commit-id> tag, then
please add the commit author[s] as reviewer[s] to this issue.
[x] All commits are signed off. See the section Developer’s Certificate of Origin
[x] Provide a title or release-note blurb suitable for the release notes.
[x] Are you a user of Cilium? Please add yourself to the Users doc
[x] Thanks for contributing!

When hubble tls auto method is set to certmanager with no issuer ref, generate the CA certificate using a self-signed issuer and use this CA for the hubble issuer.
Previous behavior was to generate the CA certificate using helm. It was confusing with the method set to certmanager as we could expect for all cert to be created with certmanager.
The generated secret containing the CA by helm was also missing the "tls.crt" key.
Fixes: #24500

Hey @vflaux, thanks for your contribution!
This is an heads up that we are merging #24666, which addresses #24500 in a different way. Essentially, that PR makes it mandatory to specify the issuer configuration when using cert-manager. That targets both hubble and clustermesh related configurations, and encourages the best practice of using the same CA for all components. I personally believe it also reduces the overall confusing during operations, explicitly demanding users to select which issuer type to use, since Cilium should not be concerned with the generation of the CA as much as possible. And users can just create a self-signed issuer with whatever deployment method they are using (e.g., flux2) if they are not interested in establishing a clustermesh.
Given the above, I'm closing this PR as superseded. Feel free to comment or open an issue and tag me if you feel something is still missing in this regard.


[stdlib] AutoreleasingUnsafeMutablePointer: eliminate questionable pointer use

AutoreleasingUnsafeMutablePointer is pointing to a +0 reference, but in its pointee property’s getter/setter implementations, it is loading the pointer into regular Unsafe[Mutable]Pointers. Those are assuming that the addressed memory contain a +1 reference, which can mislead the compiler into doing optimizations that aren’t valid.
Change the getter/setter implementations so that they use UnsafeRawPointer and load/store Unmanaged values instead. As long as Unmanaged.passUnretained(_:) and Unmanaged.takeUnretainedValue() do the right thing, then AutoreleasingUnsafeMutablePointer won’t have issues, either. (This boils down to ensuring that loading a strong reference out of an unmanaged(unsafe) value works correctly.)

This is still somewhat of a WIP - AutoreleasingUnsafeMutablePointer doesn't seem to have much test coverage yet, so perhaps this is the right PR to add those.

@swift-ci benchmark

Performance: -O

Regression
OLD
NEW
DELTA
RATIO

FlattenListFlatMap
6815
10537
+54.6%
0.65x (?)

FlattenListLoop
3974
5187
+30.5%
0.77x (?)

ObjectiveCBridgeStringHash
73
85
+16.4%
0.86x

RandomShuffleLCG2
704
768
+9.1%
0.92x

Array2D
6912
7520
+8.8%
0.92x (?)

Set.isDisjoint.Seq.Box.Empty
117
127
+8.5%
0.92x

RemoveWhereSwapInts
62
67
+8.1%
0.93x

MapReduce
369
398
+7.9%
0.93x (?)

MapReduceAnyCollection
370
399
+7.8%
0.93x

Improvement
OLD
NEW
DELTA
RATIO

LessSubstringSubstring
45
40
-11.1%
1.12x

EqualStringSubstring
45
40
-11.1%
1.12x

EqualSubstringString
45
40
-11.1%
1.12x

LessSubstringSubstringGenericComparable
45
40
-11.1%
1.12x

EqualSubstringSubstringGenericEquatable
44
40
-9.1%
1.10x

EqualSubstringSubstring
45
41
-8.9%
1.10x

ObjectiveCBridgeStubToNSDate2
1390
1290
-7.2%
1.08x (?)

SubstringEqualString
461
429
-6.9%
1.07x

Code size: -O
Performance: -Osize

Regression
OLD
NEW
DELTA
RATIO

ObjectiveCBridgeStringHash
73
85
+16.4%
0.86x

IterateData
1319
1452
+10.1%
0.91x

FlattenListLoop
4066
4437
+9.1%
0.92x (?)

RemoveWhereMoveInts
34
37
+8.8%
0.92x

Array2D
6928
7520
+8.5%
0.92x

RemoveWhereSwapInts
60
65
+8.3%
0.92x

Set.isDisjoint.Seq.Box.Empty
158
170
+7.6%
0.93x

Improvement
OLD
NEW
DELTA
RATIO

EqualSubstringSubstring
45
40
-11.1%
1.12x

EqualSubstringSubstringGenericEquatable
45
40
-11.1%
1.12x

LessSubstringSubstring
45
41
-8.9%
1.10x (?)

EqualStringSubstring
45
41
-8.9%
1.10x (?)

EqualSubstringString
45
41
-8.9%
1.10x (?)

LessSubstringSubstringGenericComparable
45
41
-8.9%
1.10x

Data.hash.Empty
74
68
-8.1%
1.09x (?)

SubstringEquatable
771
715
-7.3%
1.08x (?)

ObjectiveCBridgeFromNSArrayAnyObjectForced
5100
4760
-6.7%
1.07x (?)

Code size: -Osize
Performance: -Onone

Regression
OLD
NEW
DELTA
RATIO

ObjectiveCBridgeStringHash
73
85
+16.4%
0.86x

Improvement
OLD
NEW
DELTA
RATIO

ArrayOfPOD
1144
1061
-7.3%
1.08x (?)

Code size: -swiftlibs

How to read the data
The tables contain differences in performance which are larger than 8% and
differences in code size which are larger than 1%.
If you see any unexpected regressions, you should consider fixing the
regressions before you merge the PR.
Noise: Sometimes the performance results (not code size!) contain false
alarms. Unexpected regressions which are marked with '(?)' are probably noise.
If you see regressions which you cannot explain you can try to run the
benchmarks again. If regressions still show up, please consult with the
performance team (@eeckstein).

Hardware Overview
  Model Name: Mac Pro
  Model Identifier: MacPro6,1
  Processor Name: 12-Core Intel Xeon E5
  Processor Speed: 2.7 GHz
  Number of Processors: 1
  Total Number of Cores: 12
  L2 Cache (per Core): 256 KB
  L3 Cache: 30 MB
  Memory: 64 GB

The benchmark results seem irrelevant; I don't see how any of these benchmarks would touch AutoreleasingUnsafeMutablePointer paths.
However, this new version does generate a little bit worse code:
// SOURCE:
class Foo {}

func foo(_ p: AutoreleasingUnsafeMutablePointer<Foo>) -> Foo {
  return p.pointee
}

// ORIGINAL SIL:
sil hidden [signature_optimized_thunk] [always_inline] @$s6output3fooyAA3FooCSAyADGF : $@convention(thin) (AutoreleasingUnsafeMutablePointer<Foo>) -> @owned Foo {
bb0(%0 : $AutoreleasingUnsafeMutablePointer<Foo>):
  debug_value %0 : $AutoreleasingUnsafeMutablePointer<Foo>, let, name "p", argno 1 // id: %1
  %2 = struct_extract %0 : $AutoreleasingUnsafeMutablePointer<Foo>, #AutoreleasingUnsafeMutablePointer._rawValue // user: %3
  %3 = pointer_to_address %2 : $Builtin.RawPointer to [strict] $*Foo // user: %4
  %4 = load %3 : $*Foo                            // users: %5, %6
  strong_retain %4 : $Foo                         // id: %5
  return %4 : $Foo                                // id: %6
} // end sil function '$s6output3fooyAA3FooCSAyADGF'

// NEW SIL:
sil hidden @$s6output3fooyAA3FooCSAyADGF : $@convention(thin) (AutoreleasingUnsafeMutablePointer<Foo>) -> @owned Foo {
bb0(%0 : $AutoreleasingUnsafeMutablePointer<Foo>):
  debug_value %0 : $AutoreleasingUnsafeMutablePointer<Foo>, let, name "p", argno 1 // id: %1
  %2 = struct_extract %0 : $AutoreleasingUnsafeMutablePointer<Foo>, #AutoreleasingUnsafeMutablePointer._rawValue // user: %3
  %3 = pointer_to_address %2 : $Builtin.RawPointer to $*Optional<Unmanaged<AnyObject>> // user: %4
  %4 = load %3 : $*Optional<Unmanaged<AnyObject>> // user: %5
  switch_enum %4 : $Optional<Unmanaged<AnyObject>>, case #Optional.some!enumelt.1: bb1, case #Optional.none!enumelt: bb2 // id: %5

bb1(%6 : $Unmanaged<AnyObject>):                  // Preds: bb0
  %7 = struct_extract %6 : $Unmanaged<AnyObject>, #Unmanaged._value // user: %8
  %8 = unmanaged_to_ref %7 : $@sil_unmanaged AnyObject to $AnyObject // users: %10, %9
  %9 = enum $Optional<AnyObject>, #Optional.some!enumelt.1, %8 : $AnyObject // user: %11
  strong_retain %8 : $AnyObject                   // id: %10
  br bb3(%9 : $Optional<AnyObject>)               // id: %11

bb2:                                              // Preds: bb0
  %12 = enum $Optional<AnyObject>, #Optional.none!enumelt // user: %13
  br bb3(%12 : $Optional<AnyObject>)              // id: %13

bb3(%14 : $Optional<AnyObject>):                  // Preds: bb2 bb1
  %15 = metatype $@thick Optional<AnyObject>.Type // user: %16
  %16 = builtin "sizeof"<Optional<AnyObject>>(%15 : $@thick Optional<AnyObject>.Type) : $Builtin.Word // user: %17
  %17 = builtin "sextOrBitCast_Word_Int64"(%16 : $Builtin.Word) : $Builtin.Int64 // user: %21
  %18 = metatype $@thick Foo.Type                 // user: %19
  %19 = builtin "sizeof"<Foo>(%18 : $@thick Foo.Type) : $Builtin.Word // user: %20
  %20 = builtin "sextOrBitCast_Word_Int64"(%19 : $Builtin.Word) : $Builtin.Int64 // user: %21
  %21 = builtin "cmp_eq_Int64"(%17 : $Builtin.Int64, %20 : $Builtin.Int64) : $Builtin.Int1 // user: %23
  %22 = integer_literal $Builtin.Int1, -1         // user: %23
  %23 = builtin "xor_Int1"(%21 : $Builtin.Int1, %22 : $Builtin.Int1) : $Builtin.Int1 // user: %24
  cond_fail %23 : $Builtin.Int1, "Can't unsafeBitCast between types of different sizes" // id: %24
  %25 = unchecked_ref_cast %14 : $Optional<AnyObject> to $Foo // user: %26
  return %25 : $Foo                               // id: %26
} // end sil function '$s6output3fooyAA3FooCSAyADGF'

// Original x86_64 assembly:
output.foo(Swift.AutoreleasingUnsafeMutablePointer<output.Foo>) -> output.Foo:
        push    rbp
        mov     rbp, rsp
        mov     rdi, qword ptr [rdi]
        pop     rbp
        jmp     _swift_retain

// New x86_64 assembly:
output.foo(Swift.AutoreleasingUnsafeMutablePointer<output.Foo>) -> output.Foo:
        push    rbp
        mov     rbp, rsp
        push    rbx
        push    rax
        mov     rbx, qword ptr [rdi]
        test    rbx, rbx
        je      LBB5_1
        mov     rdi, rbx
        call    _swift_unknownObjectRetain
        jmp     LBB5_3
LBB5_1:
        xor     ebx, ebx
LBB5_3:
        mov     rax, rbx
        add     rsp, 8
        pop     rbx
        pop     rbp
        ret

AutoreleasingUnsafeMutablePointer isn't particularly performance sensitive, though.

The latest commits get rid of unspecialized generic calls (to UnsafeRawPointer.load/.storeBytes and Unmanaged.takeUnretainedValue) in -Onone builds.

(And they also use my new favorite type, UnsafePointer<Optional<Unmanaged<AnyObject>>>.)

@lorentey thanks for figuring out the semantics and documenting it. Just to limit the number of times unsafeBitCast appears in the code--since each occurrence is generally considered a "bug"--you can use _unsafeReferenceCast as long as the values are dynamically Optional<AnyObject>.

@swift-ci test

Build failed
Swift Test Linux Platform
Git Sha - 6a92bb9e2e0bfe26652f2a20935c1408dc87bba2

Build failed
Swift Test OS X Platform
Git Sha - 6a92bb9e2e0bfe26652f2a20935c1408dc87bba2


TN-2719 trigger states / engine

Implementation of EPROMs sub-study trigger engine.
Includes an API for the front-end to query at any time to get a user's trigger status:
/api/user/<int:user_id>/triggers
As well as a function that wraps a REDIS lock per user during the trigger evaluation process (including SDC / celery jobs, etc.) via:
portal.trigger_states.empro_states.enter_user_trigger_critical_section(user_id)
TODOs mark multiple integration points awaiting TN-2781 implementation.

Hello @pbugni! Thanks for opening this PR. We checked the lines you've touched for PEP 8 issues, and found:

In the file portal/migrations/versions/7fd6b3abfec2_.py:

Line 22:5: E128 continuation line under-indented for visual indent
Line 23:5: E122 continuation line missing indentation or outdented
Line 24:5: E122 continuation line missing indentation or outdented
Line 24:80: E501 line too long (116 > 79 characters)
Line 25:5: E122 continuation line missing indentation or outdented
Line 26:5: E122 continuation line missing indentation or outdented
Line 26:80: E501 line too long (82 > 79 characters)
Line 27:5: E122 continuation line missing indentation or outdented
Line 28:5: E122 continuation line missing indentation or outdented
Line 30:80: E501 line too long (95 > 79 characters)
Line 31:80: E501 line too long (103 > 79 characters)
Line 32:80: E501 line too long (99 > 79 characters)
Line 39:80: E501 line too long (81 > 79 characters)
Line 40:80: E501 line too long (83 > 79 characters)

In the file portal/trigger_states/empro_domains.py:

Line 117:1: W391 blank line at end of file

In the file portal/trigger_states/empro_states.py:

Line 4:80: E501 line too long (122 > 79 characters)
Line 18:1: E303 too many blank lines (3)


REPL error: Too late for parseStaticFlags: call it before runGhc or runGhcT

After creating a new stack project
stack new ghc8-playground new-template --resolver nightly-2016-06-14

...the C-c C-l command opens the REPL, but it is not possible to execute the main function.
` works though.
Starting the (stack) REPL outside of emacs in the native terminal, the main function works Ok.
stack.yaml

error "Too late for parseStaticFlags: call it before runGhc or runGhcT"

Native terminal (no error with main)

What if you run stack ghci --with-ghc intero ghc8-playground?

running that in the Mac terminal works Ok (main function is called correctly)

Seems to be Mac only
https://ghc.haskell.org/trac/ghc/ticket/10053

Hm, I think it might have something to do with -fobject-code

Try :set -fbyte-code before loading any modules and retry?

How can I set this option, when starting the repl by C-c C-l in Intero ?
(this problem is only inside Intero-Repl !)

You can write :set -fbyte-code in the REPL and then re-load your module with C-c C-l. :)

So I just ran into this myself and discovered something strange:
> main
Too late for parseStaticFlags: call it before runGhc or runGhcT
*** Exception: ExitFailure 1

> hspec spec

Parsing: Path Abs Dir
...

It seems like main itself doesn't work, but calling the function directly does. Go figure!

Perhaps main is special due to the relationship to OS-level entry-point.
Either way I found a workaround for this. If I declare it like this:
main :: IO ()
main = tests

tests :: IO ()
tests = hspec spec

And invoke tests from Intero it works.
This indicates a possible bug in GHC that leaks the entry-point dependencies of main even when invoked from Haskell code.

@AlainODea Indeed, I found that other functions work just fine. Came to the same conclusion.

I've switched the REPL mode to -fbyte-code, and using :r when loading the same module as last time (which gives a substantial speed up, almost making up for not using -fobject-code).

@chrisdone awesome! Thank you :)
I'll give this a spin tonight.

@chrisdone ! I forgot to report back. This works beautifully. Thank you for the fix :)


[Breaking Change] Mail accounts starting with a non-letter don't work anymore

Due to the change of target/start-mailserver.sh in 912cb5676b9538eb1c799b3c229c7e8dc9c94f40, mail accounts whose names do not start with a lowercase letter are ignored when the postfix-accounts.cf file is parsed during mailserver startup. As a consequence, logins for those accounts don't work anymore and the accounts are not known to the system so mail is potentially lost. Furthermore, fail2ban blocks the IP of clients which try to access.
In my case, I use a mail account which starts with a number for one of my mail addresses. Also, mailboxes starting with an uppercase letter (or even something else?) will run into problems.
Probably the correct rule would be to ignore lines which are starting with a comment (#) or are empty, but accept everything else (for backwards compatibility).

Hi @xelan, can you provide a PR for that?


Extension methods & conversions for Java host types

Based on the https://github.com/enso-org/enso/issues/8346#issuecomment-1898044109 idea.

#8016

Since #7858 was implemented, we can use polyglot java import types (e.g. host Java classes) in type ascriptions. The host Java classes are recognized in Meta.type_of and we can even use them in case of statements:
polyglot java import java.math.BigDecimal

c x = case x of
  _ : BigDecimal -> "big"
  _ -> "small"

However there are still few areas where the support of host Java classes isn't on par with Enso types - one cannot add extension methods to them and one cannot define conversion methods. Both of these features are technically possible and they would smooth interoperability between Enso and Java when designing the Enso libraries.

Now, when the attempts to compile some of the libraries by native image are discussed at

#10121

it makes little sense to invest in making Java types first class citizens in Enso. As it is not going to be possible to exchange an object from NI with object from JVM - even if they have the same java.lang.Class they will be different.


'mv' command not found when running npm run build on Windows

Describe the Bug

When running "npm run build", the build process stops with an error "mv command not found"
Steps to Reproduce

clone the modeler repository: git clone https://github.com/camunda/camunda-modeler.git
Change to the camunda-modeler folder
Run "npm run build"
The build fails with an error : mv command not found

Expected Behavior

npm build should end with
Verifying  distributables

camunda-modeler-4.3.0-win-ia32.zip

verifying contents
ok

camunda-modeler-4.3.0-win-x64.zip

verifying contents
ok

SUCCESS
Environment

OS: Windows 10
Camunda Modeler Version: 4.3.0

Workaround: create a file in the Windows\system32 folder called "mv.cmd", add the following line to the mv.cmd file: move %1 %2 %3

What command line are you using?

Can u assign this task to me

Can u assign this task to me

We do not even know what the exact problem is. What do you plan to do?

The mv  error is fixed . Shall I give a pull request

Solved it needed to change the postbuild script form 'mv' to 'move' in windows .

I have  give given a pull request kindly review it

Let's not add fixes for windows CLI. Instead, please use a Posix shell, i.e. via WSL, git bash or whatever is embedded in your IDE. That will help you in other places as you use and develop our tools, too.


Support GCE google_compute_network (TF)

Description
Add GCE support for google_compute_network (TF)
Sources

Terraform Resource Documentation
GCP Resource Documentation

LGTM!
tested with manual networks, simple resources, more complex modules ...
❯  LOG_LEVEL=debug CLOUDSDK_CORE_PROJECT=driftctl-sj-tests GOOGLE_APPLICATION_CREDENTIALS=keys/driftctl.json driftctl-0.16-pre scan -t gcp+tf  --deep
[...]
Found resources not covered by IaC:
  google_compute_firewall:
    - projects/driftctl-sj-tests/global/firewalls/default-allow-icmp
    - projects/driftctl-sj-tests/global/firewalls/default-allow-internal
    - projects/driftctl-sj-tests/global/firewalls/default-allow-rdp
    - projects/driftctl-sj-tests/global/firewalls/default-allow-ssh
  google_compute_network:
    - projects/driftctl-sj-tests/global/networks/default
  google_storage_bucket:
    - driftctl-pw77ai3raxkupa9s
    - manual_bucket_in_europe
Found 10 resource(s)
 - 30% coverage
 - 3 resource(s) managed by terraform
     - 0/3 resource(s) out of sync with Terraform state
 - 7 resource(s) not managed by Terraform
 - 0 resource(s) found in a Terraform state but missing on the cloud provider
Scan duration: 3s
Provider version used to scan: 3.82.0. Use --tf-provider-version to use another version.

Hint: use gen-driftignore command to generate a .driftignore file based on your drifts
DEBU[0003] Closing providers
DEBU[0003] Closing provider key=google
DEBU[0003] Closing gRPC client alias=


Custom Match

After the end of the coop match, the bot start custom game, how fix it?
I want to play over and over against coop

woops, never saw your message, sorry.
you should adapt the main.py script:
await bot.client.chain_game_at_eog(
    coros=[cg.create_custom_game, cg.fill_with_bots, cg.start_champ_selection]
)

changing the coros parameter to what you want, ex:
coros=[cg.create_coop_game, cg.start_matchmaking]


Images on Docker Hub are old

It looks like the images on Docker Hub are 2 years old. Could you please rebuild them so they contain the latest version of Taiga? Thanks!

This is the error I see when running an updated image:
./setup.sh
API_NAME: ubuntu1
1c08fe3f4d98802f939132afe2c2ea782b191729a3d1a6726432866eb5002b6d
379db65d4f900374e2db953ffa7d08588d9709f25c20ae57b4b3bf4cd5f6a26b
62c04c1fa78cd42affc0ab1475aeb72049e45031759c0a5cce1aa7d99388253b
createuser: creation of new role failed: ERROR:  role "taiga" already exists
createdb: database creation failed: ERROR:  database "taiga" already exists
WARNING!! This script REMOVE your Taiga's database and you LOSE all the data.
Are you sure you want to delete all data? (Press Y to continue): y
-> Remove taiga DB
regenerate.sh: line 24: dropdb: command not found
-> Create taiga DB
regenerate.sh: line 26: createdb: command not found
-> Load migrations
Trying import local.py settings...
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 316, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/src/app/taiga-back/settings/__init__.py", line 26, in <module>
    from .local import *
  File "/usr/src/app/taiga-back/settings/local.py", line 206, in <module>
    MEDIA_URL = "http://" + os.getenv("API_NAME") + "/media/"
TypeError: Can't convert 'NoneType' object to str implicitly
-> Load initial user (admin/123123)
Trying import local.py settings...
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 316, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/src/app/taiga-back/settings/__init__.py", line 26, in <module>
    from .local import *
  File "/usr/src/app/taiga-back/settings/local.py", line 206, in <module>
    MEDIA_URL = "http://" + os.getenv("API_NAME") + "/media/"
TypeError: Can't convert 'NoneType' object to str implicitly
-> Load initial project_templates (scrum/kanban)
Trying import local.py settings...
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 316, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/src/app/taiga-back/settings/__init__.py", line 26, in <module>
    from .local import *
  File "/usr/src/app/taiga-back/settings/local.py", line 206, in <module>
    MEDIA_URL = "http://" + os.getenv("API_NAME") + "/media/"
TypeError: Can't convert 'NoneType' object to str implicitly
-> Generate sample data
-> Rebuilding timeline
Trying import local.py settings...
Traceback (most recent call last):
  File "manage.py", line 29, in <module>
    execute_from_command_line(sys.argv)
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
    utility.execute()
  File "/usr/local/lib/python3.4/site-packages/django/core/management/__init__.py", line 316, in execute
    settings.INSTALLED_APPS
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 53, in __getattr__
    self._setup(name)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 41, in _setup
    self._wrapped = Settings(settings_module)
  File "/usr/local/lib/python3.4/site-packages/django/conf/__init__.py", line 97, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/local/lib/python3.4/importlib/__init__.py", line 109, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 2254, in _gcd_import
  File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
  File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1129, in _exec
  File "<frozen importlib._bootstrap>", line 1471, in exec_module
  File "<frozen importlib._bootstrap>", line 321, in _call_with_frames_removed
  File "/usr/src/app/taiga-back/settings/__init__.py", line 26, in <module>
    from .local import *
  File "/usr/src/app/taiga-back/settings/local.py", line 206, in <module>
    MEDIA_URL = "http://" + os.getenv("API_NAME") + "/media/"
TypeError: Can't convert 'NoneType' object to str implicitly


Add disk and CPU requirements for running service fabric on Mac

Hi,
Since running service fabric on docker is rather an intensive and resource consuming process, it would be nice to include disk and CPU requirements in order to avoid problems setting up a local cluster.
Kind Regards,
José.

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

ID: 36484192-c2fc-5239-9d7a-d6f3bd9176f2
Version Independent ID: f1926b80-64c8-7eff-83c0-137b9a1b6ecc
Content: Set up your development environment on Mac OS X to work with Azure Service Fabric
Content Source: articles/service-fabric/service-fabric-get-started-mac.md
Service: service-fabric
GitHub Login: @suhuruli
Microsoft Alias: suhuruli

@jfalameda thanks for the feedback. I am not sure if we have strict requirements around disk space and CPU requirements.
@suhuruli @aljo-microsoft Do either of you have any thoughts?

Hi! Do you mean specify directly in the documentation how much CPU and Memory the docker run command will require? We can definitely add that and that's a great idea.

Hi,
I now as a fact, that the docker virtual disk needs quite a lot of space,
like 70-90gb in order to work, also little ram will make SF to crash. I am
not a aware of the specifics, but I know as a fact that there are some
limitations.
Adding this information would prevent other users from running into the
same problem.
Kind regards,
/ José.
El sáb., 15 jun. 2019 a las 21:47, Sudhanva Huruli (<
<EMAIL_ADDRESS>escribió:

Hi! Do you mean specify directly in the documentation how much CPU and
Memory the docker run command will require? We can definitely add that
and that's a great idea.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/MicrosoftDocs/azure-docs/issues/33142?email_source=notifications&email_token=AACGHNWY2EMK6GCTFHZ6USLP2VBLPA5CNFSM4HXEL2C2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODXY647Y#issuecomment-502394495,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AACGHNUZFEY3XB6MB2DBKKTP2VBLPANCNFSM4HXEL2CQ
.

Thanks for the info @jfalameda
@suhuruli I will assign this issue to you to continue the work :)


NotifyContext does not play well with --interactive

If you hit Ctrl+C while in the --interactive session, you will exit when the subcommand returns, which isn't really what you want.
We need to actually handle the Interrupt signal differently inside Debug vs the rest of melange, which is tricky.
For now I'm just filing this bug so I can point to it in a log line when you get into an --interactive session.

Fixed by https://github.com/chainguard-dev/melange/pull/1008


Update committer name list

Signed-off-by: RongGu<EMAIL_ADDRESS>
Ⅰ. Describe what this PR does
Update committer name list
Ⅱ. Does this pull request fix one issue?

NONE.
Ⅲ. List the added test cases (unit test/integration test) if any, please explain if no tests are needed.
NA.
Ⅳ. Describe how to verify it
NA.
Ⅴ. Special notes for reviews
add Weiwei Zhu to committer list according to the vote result here: https://github.com/fluid-cloudnative/community/issues/44

@zwwhdls Congratulations!  Look forward to your key contributions in the near future!


Missing textures on somes machines + twinkling Voidic Power on Blast Furnace (build 0.16.2)

Hi Tamaized... it's me again :o)
Version used : 0.16.2 (not update the last yet on my server...)
One of my player on my private server have some issues with HUD on theses machines (he didn't use any ressources pack) :

Void Infuser
Void Infused Macerator

Somes screenshoots for you :
Void Infuser : Here !
Void Infused Macerator : Here !
Moreover, another issue with the Void Blast Furnace : when the voidic power is filling/draining, the amount is twinkling very quickly.
That's all ! :) Available for more informations if you need.
PS : He likes your mod :D
PS2 : If you want a little feature, it's possible to add a new armor between Void and Xia ?

I'll look into this all now, as for the armor, there's going to be more content added post-Xia (I've already started on it) but there won't be a new set of armor between the current ones.

Is it possible for you to give me an example on what you mean by "the amount is twinkling very quickly" as i'm not quite sure what the issue is.
On a side note, the texture issue is fixed here: 0b78be03755ceb1f4a7a680a72c11bd1fac5afa0 and the build will go out once i'm done fixing the last issue.

Here is a exemple about this twinkling issue ^^
Bug record
But that's weird because work perfectly on solo and try to test a new one on creative mode (same server) : work too... I don't know why his blast furnace react like this ^^

Thanks, that actually helps quite a bit, i'll look for what's causing this.

I assume you already tried to break and replace his blast furnace? and that it didn't work?

I assume too but he didn't replace the blast furnace so he did that and now it's work perfectly... sorry for the trouble :( I think you can close the case.

Sweet, yea not sure what exactly caused the issue, something weird must have happened with how the NBT was being saved with the tile entity, replacing will fix it as it did.


Installation Error

Hi QStraders,
I followed the exact commands to install the QStrader on a Unbuntu 18.04. While it kept throwing out the following Errors:
ERROR: Command errored out with exit status 1: /home/warren/venv/qstraderp3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b4ink__f/numpy/setup.py'"'"'; file='"'"'/tmp/pip-install-b4ink__f/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-6b5v_rs3/install-record.txt --single-version-externally-managed --compile --install-headers /home/warren/venv/qstraderp3/include/site/python3.7/numpy Check the logs for full command output.
Do not know what is going on here, any suggestion ?
Best,
Warren.

What was the command you used that threw the error?

thank you for the reply, it is the last command in the installation:
(qstraderp3)$ pip install -r https://raw.githubusercontent.com/quantstart/qstrader/master/requirements.txt

I'm not sure of the exact issue, but it's very likely that the installation is failing because you don't have all of the prerequisites installed on your machine.
It might be easiest to install scipy and numpy using your package manager so it can handle all of the dependencies:
sudo apt install python3-numpy python3-scipy
At that point you might be good to go. Just run your pip install command again to see if succeeds. If you run into more errors complaining about blas or lapack you can install them like so:
sudo apt-get install libblas3 liblapack3 liblapack-dev libblas-dev
And lastly, if you run into an error complaining about a missing fortran compiler, install this:
sudo apt-get install gfortran
P.S. Unfortunately, this project seems kind of dead so don't get your hopes up too high about using it...

The code has not been updated for a long time, so there may be conflicts between packages in requirements.txt. The simplest way is to remove all version restrictions in the it. BTW, some of these packages may need to use conda ininstall.

@TechnoConserve  @onshek
Thank you for your reply. I once tried to install it under an Anaconda env but it seemed to have conflicts of versions or something.
Thanks for your suggestion, I am installing it, because I want to familiarize with python as there is book out there on QStrading.

@wolfcuring
Hello. I am using ubuntu 19.04. I am installing this library and failed while Building wheel for numpy.
ERROR: Command errored out with exit status 1:
   command: ~/qstraderp3/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-nri_knr7/numpy/setup.py'"'"'; __file__='"'"'/tmp/pip-install-nri_knr7/numpy/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-34yui3_f --python-tag cp37
       cwd: /tmp/pip-install-nri_knr7/numpy/

I have already tried
sudo apt install python3-numpy python3-scipy
sudo apt-get install libblas3 liblapack3 liblapack-dev libblas-dev
sudo apt-get install gfortran

Do you install the library successfully? Would you mind to provide more details?
Thank you very much.

I managed to get it installed with the commands above using Mint 19.2 which is a derivative of Ubuntu 18.04.
I would suggest trying to install numpy alone in a virtual environment so you can work out what's preventing numpy from installing correctly.

@TechnoConserve
Thank you very much. I have tried but the error still there, I will see if there is another way. Thank you.


LUCENE-9856: fail precommit on unused local variables

See the JIRA for more details.
This turns on ecj option: ecj.javadocs.prefs:org.eclipse.jdt.core.compiler.problem.unusedLocal=error
For problematic generated code, mark with SuppressWarnings("unused").
For this to really prevent the linter from failing, also set org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=enabled
Set both options for eclipse IDE config as well.
Fix gradle regenerate to work again with modern python, some code was importing gcd from the wrong place (at least for python 3.9).

This change is largely mechanical: simply remove the unused local variables. Try to preserve any method calls that may have side effects (e.g. throw exception) in tests.
In general, it is usually a pretty bad smell to have such unused variables: the idea is not to go sniffing around that and debug deeply, but just to get the stuff fixed so the linter can stop new stuff from coming in.
If you want to help fix the issues (or make the gradle better!!!), please, feel free to just push commits to the branch!

OK i reverted the gradle changes completely, i found a secret option so that SuppressWarnings can be used. This fixes the expressions module, but we need to apply SuppressWarnings("unused") to some of the queryparser generated code. I am looking into it.

ok, I think ecj linter is now in better shape, especially as far as dead code goes.
But wow, the amount of dead private members and methods that we had was really surprising.
We should followup by enabling the check to enforce @Override annotations, so that when public/protected methods get removed, dangling bits aren't left around. That's a good way to improve it to the future. But, another issue. I am tired.

Thanks Robert for working on this! And yeah I didn't quite anticipate so much dead code lingering around when I created the issue! From your latest comment this PR is very much ready now? Any aspect I can still look into in this PR to help out as well at this point? (and sorry for coming in late in the discussion!)
In addition, I have a newbie question. It appears error prone was integrated fairly recently this year https://issues.apache.org/jira/browse/LUCENE-9497, but the issue itself didn't seems to mention why error prone was needed when there's already ecj lint, and which one should be preferred for which scenario. Is the plan to have both ecj & error prone to co-exist in Lucene to catch different kinds of bugs?

Is the plan to have both ecj & error prone to co-exist in Lucene to catch different kinds of bugs?

I think the union of all these tools is different than their intersection so they help catch issues, even if they do some duplicate work?

Thanks Robert for working on this! And yeah I didn't quite anticipate so much dead code lingering around when I created the issue! From your latest comment this PR is very much ready now? Any aspect I can still look into in this PR to help out as well at this point? (and sorry for coming in late in the discussion!)

We may always followup with more checks. I mentioned a good one in my comment above, i'd really like to enforce that @Override annotation is used everywhere, to help prevent dead public and protected methods in the future?
In the preferences file, we would set org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error and then fix all the problems. It would be good as a standalone followup issue

In addition, I have a newbie question. It appears error prone was integrated fairly recently this year https://issues.apache.org/jira/browse/LUCENE-9497, but the issue itself didn't seems to mention why error prone was needed when there's already ecj lint, and which one should be preferred for which scenario. Is the plan to have both ecj & error prone to co-exist in Lucene to catch different kinds of bugs?

I don't know the error-prone well, but it is more of a "static analysis tool": I immediately think that it leans towards heuristics and "false positives".
On the other hand, ECJ is a "compiler", but with a lot of nice checks. Maybe they are not as fancy as the kind of checks that error-prone might be able to do, instead they are simpler, more like "additional compiler warnings". We've used ECJ for a long time: It runs efficiently, has a TON more eyes looking at its output every day, and provides great error messages. IMO, for solving your problem of "my IDE can detect it is dead code, why doesn't the build", it is the perfect tool: since it is the thing doing that in your IDE (to my knowledge not just eclipse but intellij may use it too).

On the other hand, ECJ is a "compiler", but with a lot of nice checks. Maybe they are not as fancy as the kind of checks that error-prone might be able to do, instead they are simpler, more like "additional compiler warnings". We've used ECJ for a long time: It runs efficiently, has a TON more eyes looking at its output every day, and provides great error messages. IMO, for solving your problem of "my IDE can detect it is dead code, why doesn't the build", it is the perfect tool: since it is the thing doing that in your IDE (to my knowledge not just eclipse but intellij may use it too).

I fully agree with that. I was also thinking about further improving compile time in Java by using ECJ as the official compiler and move it from "Lint" stage. We can maybe reimplement compileJava tasks in Gradle to use ECJ (maybe it works out of box!?). So people would see those errors as soon as they compile or run tests. ECJ is just an alternative compiler and may work as replacement for javac.
This is no suggestion, but something to discuss on a separate issue.

I was also pleasantly surprised to see how well maintained this compiler is. It is nice to see things like JDK16 support, as opposed to error-prone which reaches into java internals and seemingly has no plan for JDK16 support at all! Also, they seem to pay attention to the performance especially, as it impacts a lot of IDE users. You can see this from the commits: https://github.com/eclipse/eclipse.jdt.core

When you fixed the stuff, maybe reopen a new pull request with same branch?

I still have the branch locally. I think the fix is to revert this commit: https://github.com/apache/lucene/pull/34/commits/7d823c84e3f7b6bebd25eda76f9e482016c78868
Redundant superinterface was too aggressive on my part. I was trying to enable checks around "unnecessary code" and this was one of them, but I think it borked the attributes? Seems it should be deferred for now, the gain isn't worth the pain :)
We may still enable the unusedLabel check from that commit, I think it is safe.

Is the plan to have both ecj & error prone to co-exist in Lucene to catch different kinds of bugs?

I think the union of all these tools is different than their intersection so they help catch issues, even if they do some duplicate work?

Thanks Robert for working on this! And yeah I didn't quite anticipate so much dead code lingering around when I created the issue! From your latest comment this PR is very much ready now? Any aspect I can still look into in this PR to help out as well at this point? (and sorry for coming in late in the discussion!)

We may always followup with more checks. I mentioned a good one in my comment above, i'd really like to enforce that @Override annotation is used everywhere, to help prevent dead public and protected methods in the future?
In the preferences file, we would set org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error and then fix all the problems. It would be good as a standalone followup issue

In addition, I have a newbie question. It appears error prone was integrated fairly recently this year https://issues.apache.org/jira/browse/LUCENE-9497, but the issue itself didn't seems to mention why error prone was needed when there's already ecj lint, and which one should be preferred for which scenario. Is the plan to have both ecj & error prone to co-exist in Lucene to catch different kinds of bugs?

I don't know the error-prone well, but it is more of a "static analysis tool": I immediately think that it leans towards heuristics and "false positives".
On the other hand, ECJ is a "compiler", but with a lot of nice checks. Maybe they are not as fancy as the kind of checks that error-prone might be able to do, instead they are simpler, more like "additional compiler warnings". We've used ECJ for a long time: It runs efficiently, has a TON more eyes looking at its output every day, and provides great error messages. IMO, for solving your problem of "my IDE can detect it is dead code, why doesn't the build", it is the perfect tool: since it is the thing doing that in your IDE (to my knowledge not just eclipse but intellij may use it too).

On the other hand, ECJ is a "compiler", but with a lot of nice checks. Maybe they are not as fancy as the kind of checks that error-prone might be able to do, instead they are simpler, more like "additional compiler warnings". We've used ECJ for a long time: It runs efficiently, has a TON more eyes looking at its output every day, and provides great error messages. IMO, for solving your problem of "my IDE can detect it is dead code, why doesn't the build", it is the perfect tool: since it is the thing doing that in your IDE (to my knowledge not just eclipse but intellij may use it too).

I fully agree with that. I was also thinking about further improving compile time in Java by using ECJ as the official compiler and move it from "Lint" stage. We can maybe reimplement compileJava tasks in Gradle to use ECJ (maybe it works out of box!?). So people would see those errors as soon as they compile or run tests. ECJ is just an alternative compiler and may work as replacement for javac.
This is no suggestion, but something to discuss on a separate issue. There's also a Grade plugin to do this: https://github.com/TwoStone/gradle-eclipse-compiler-plugin (and it allows to supply the properties file with warning/error config).

Thanks for the explanation and insight on ecj vs. error prone. They make a lot of sense! To keep the fun going, I have opened another Jira to enforce the use of @Override with org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=error suggested, and will try to see if I can get a PR out soon.


Properties are not passed on to nested task

I was trying out the nested tasks and it seems that the properties are not being passed on to it.
Invoke-psake .\nested\nested2.ps1 -properties @{$x = $x}
But still the value of x in nested2 is 200 instead of 300
Expected Behavior
Property value should be overwritten by the invoker
Current Behavior
Property value is not overwritten

Really Sorry!
It was my mistake: Instead of writing
Invoke-psake .\nested\nested2.ps1 -properties @{x = $x}
I wrote
Invoke-psake .\nested\nested2.ps1 -properties @{$x = $x}

Really Sorry!
It was my mistake: Instead of writing
Invoke-psake .\nested\nested2.ps1 -properties @{x = $x}
I wrote
Invoke-psake .\nested\nested2.ps1 -properties @{$x = $x}


Telebaton port from Nyano

About the PR
This PR ports the Telescopic Baton from Nyanotrasen, currently head's have little to no self defense (excluding HoS and Captain), so let's give them a good non-lethal weapon!
Screenshots

Changelog

:cl: Rane, eclips_e

add: Ported Telescopic Batons from Nyanotrasen!
add: CE, CMO, RD and HoP are now equipped with the new telescopic batons!

Telebaton on nyano changed to be a lot more boring and stamina focused

Mentioned on discord but here for posterity: This duplicates what esword does and the 2 should be combine.
Esword visualizer wasn't generic enough last time I tried

i'm just gonna close this for now, if someone else wants to upstream it then feel free to do so ¯_(ツ)_/¯


Add Condition References

This introduces the concept of a conditional reference. Implmentation is
still a little weird in my opinion since it has a hard dependeny on the
env.
Closes #38

Yeah, I agree it is a bit weird.
The alternative is that we make the toBool (toConditional? toConditionalReference?) method on the environment take a reference and produce a ConditionalReference directly:
// Interfaces in runtime
export class ConditionalReference implements Reference {
  private inner: Reference;

  constructor(inner: Reference) {
    this.inner = inner;
  }

  value(): boolean {
    return this.toBool(this.inner.value());
  }

  protected toBool(value: any): boolean {
    return !!value;
  }
}

abstract class Environment {
  toConditional(reference: Reference): ConditionalReference {
    return new ConditionalReference(reference);
  }
}

// Implementation in test-helper
class EmberishConditionalReference extends ConditionalReference {
  protected toBool(value: any): boolean {
    if (Array.isArray(value)) {
      return value.length > 0;
    } else {
      return super.toBool(value);
    }
  }
}

class TestEnvironment {
  toConditional(reference: Reference): ConditionalReference {
    return new EmberishConditionalReference(reference);
  }
}

That way, the ConditionalReference won't have to hang on to the environment (unless the implementation chose to do it).
By the way, we rarely use the bare Reference interface, so I suspect we will eventually have to change it. However, I don't know what it should be yet and that part of the system is due for a revisit soon anyway.
Also, I don't think we need to put the ConditionalReference interface/super class in glimmer-references (that is for the generic reference interfaces, but this is very specific to our need in the environment, so it can probably just stay in glimmer-runtime).

@chancancode I liked the suggestions and went with toConditionalReference.

Looks good to me otherwise!

@chancancode Uhhh not sure what happened. I think messed up the rebase because there were other issues. Would be nice is if tsc errors were failing tests.


2 Problem

Hello. This repository was very useful for me. Thank you very much. I saw only two problems while running the game, which I would appreciate if you could help to fix. The first problem is that in the simultaneous presence of two players in the main scene of the game, the player who joined as the first player can always move, but the second player who joins the main scene after the first player, is completely frozen and cannot move at all. The second problem was that when I built the Windows version of the project and play it, I went to world 1 and acquired that house, but when I opened the browser and pressed the copy button, nothing happened and the transaction was not completed at all. I would be very grateful if you could solve the two mentioned problems.

Hello¡ Thank you very much for buying the book, I am very happy to know that you are liking it. I'm going to check the problem you are telling me about and try to help you as much as I can. Best regards!

Hello friend¡ Please, can you share your DisableUnneededScriptsForOtherPlayers.cs class code ?
Also note when two players are instantiated, check if the player with the problem has the Third Person Controller or Player Input components. It is possible that one of them has been removed during the process of the DisableUnneededScriptsForOtherPlayers.cs class.

I did not change the scripts at all and they are exactly the same as the repository scripts.
DisableUnneededScriptsForOtherPlayers.cs:
using System.Collections;
using System.Collections.Generic;
using Photon.Pun;
using StarterAssets;
using UnityEngine;

public class DisableUnneededScriptsForOtherPlayers : MonoBehaviourPun
{

    void Start()
    {
        //We search for all components or GameObjects that can create interference with our player.
        PhotonView photonView = GetComponent<PhotonView>();
        CharacterController character = GetComponent<CharacterController>();
        ThirdPersonController controller = GetComponent<ThirdPersonController>();
        OVRPlayerController controllerVR = GetComponent<OVRPlayerController>();
        Transform camera = transform.parent.Find("Main Camera");
        Transform ovrCameraRig = transform.Find("OVRCameraRigWithControllers");
        Transform playerFollowCamera = transform.parent.Find("PlayerFollowCamera");
        Transform geometryParent = transform.Find("Geometry");
        Transform mobileController = transform.parent.Find("UI_Canvas_StarterAssetsInputs_Joysticks");

        if (!photonView.IsMine)
        {
            gameObject.tag = "Untagged";

            //If not us, we delete all GameObjects and Components that we have searched for before.

            if (mobileController)
            {
                Destroy(mobileController);
            }

            if (controller != null)
            {
                Destroy(controller);
            }

            if (controllerVR != null)
            {
                Destroy(controllerVR);
            }

            if (character != null)
            {
                Destroy(character);
            }

            if (camera != null)
            {
                Destroy(camera.gameObject);
            }

            if (ovrCameraRig != null)
            {
                Destroy(ovrCameraRig.gameObject);
            }

            if (playerFollowCamera != null)
            {
                Destroy(playerFollowCamera.gameObject);
            }

        }
        else
        {

            gameObject.tag = "Player";

            // We add the GameObject Geometry and its descendants to a specific layer that will allow us to filter it in the Camera.

            var transparentLayer = LayerMask.NameToLayer("TransparentFX");

            SetLayerAllChildren(geometryParent, transparentLayer);
        }

        void SetLayerAllChildren(Transform root, int layer)
        {
            var children = root.GetComponentsInChildren<Transform>(includeInactive: true);
            foreach (var child in children)
            {
                //            Debug.Log(child.name);
                child.gameObject.layer = layer;
            }
        }
    }
}

Player with the problem has both of Third Person Controller and Player Input components but the player with ability to move has only player input component.

I am sending you the errors of my console after player 2 join, maybe it can help to solve the problem:Error1:"Cannot load scene: Invalid scene name (empty string) and invalid build index -1
UnityEngine.SceneManagement.SceneManager:LoadSceneAsync (string)
NetworkManager:OnJoinedRoom () (at Assets/_App/Scripts/NetworkManager.cs:142)
Photon.Realtime.MatchMakingCallbacksContainer:OnJoinedRoom () (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:4203)
Photon.Realtime.LoadBalancingClient:OnEvent (ExitGames.Client.Photon.EventData) (at Assets/Photon/PhotonRealtime/Code/LoadBalancingClient.cs:3236)
ExitGames.Client.Photon.PeerBase:DeserializeMessageAndCallback (ExitGames.Client.Photon.StreamBuffer) (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PeerBase.cs:899)
ExitGames.Client.Photon.EnetPeer:DispatchIncomingCommands () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/EnetPeer.cs:583)
ExitGames.Client.Photon.PhotonPeer:DispatchIncomingCommands () (at D:/Dev/Work/photon-dotnet-sdk/PhotonDotNet/PhotonPeer.cs:1771)
Photon.Pun.PhotonHandler:Dispatch () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:226)
Photon.Pun.PhotonHandler:FixedUpdate () (at Assets/Photon/PhotonUnityNetworking/Code/PhotonHandler.cs:145)
", Error2:"Can't remove RectTransform because Canvas depends on it", Error3:"'Remote p#1 v#1' AnimationEvent 'OnFootstep' on animation 'Walk_N' has no receiver! Are you missing a component?"

Hello David. I know you're busy, and I'm sorry. Did you find a way to solve this issue?

Yes! Let me write you tomorrow with the fix, thanks!!
El dom, 24 dic 2023, 21:27, WHHM98 @.***> escribió:

Hello David. I know you're busy, and I'm sorry. Did you find a way to
solve this issue?
—
Reply to this email directly, view it on GitHub
https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/issues/1#issuecomment-1868588584,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZ73PA63XMAIWSPPFOFMWLYLCFZPAVCNFSM6AAAAABA5ZLSN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNRYGU4DQNJYGQ
.
You are receiving this because you commented.Message ID:
<PacktPublishing/Build-Your-Own-Metaverse-with-Unity/issues/1/1868588584@
github.com>

Thank you very much.

Hello friend, I have downloaded the project repository in a clean directory, it works perfectly both players online.
Can you check which scenes you have added in Build Settings?

Yes, that's right, the players are online, but can both players move? Always the second player who joins the main game scene freezes for me and can't move at all :(
in addition my build settings exactly are same.
Is it okay if I send you a video from time of extraction of the repository zip file until showing its problems?

Yes, in my case I can move both players.
Have you noticed that the unity editor freezes? or is it just the player and everything else works?
I want to rule out that it is a code problem
Can you attach your project in a zip?

Hi David. I hope you are well. I had a cold for a while and could not send you a message. I downloaded the repository zip file again and took a video from extracting the zip file to the moment of encountering the error and sent it to you. I think this video can solve my problem with your help. But if there is a need for further investigation, I will definitely send my project files. Thank you for helping me. I wish the best for you.
https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/assets/154488931/db4b3bb2-76c3-4cf3-ab2f-3dc444dcf22a

Hello friend, I have been testing:
I have cloned the repository, completely deleted everything related to Firebase and i have been able to play with both players connected.
In your video, I see that you get errors, related to Firebase, I have tried to do the same as you and I also get the errors.
The conclusion may be that the Firebase plugin is not correct in the repository. I suggest you to follow these steps to rule out:

Delete any folder or file that contains the name "firebase" in the project, after performing this action, when searching for "firebase" nothing appears.
Close the project.
Open it in sandbox mode, you will get a lot of errors because the Firebase plugin is missing.
Download this version https://dl.google.com/firebase/sdk/unity/firebase_unity_sdk_10.1.0.zip
Install FirebaseAuth.unitypackage and then install FirebaseFirestore.unitypackage.
The errors should now disappear.
Open the project without sandbox and test again.

Thank you very much for your patience

Hello David. I did what you said, but unfortunately, Unity got stuck in the endless loop of compiling the project and I have a new problem. In addition, i don't understand what you mean about sandbox mode. Do you mean sandbox mode, the same as reset mod?
https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/assets/154488931/b155c6a4-ffc4-437f-bba1-862844219d0b

Hello! Share your email with me, I will send you a wetransfer with s
version of the project, we will try it
El vie, 5 ene 2024, 11:46, WHHM98 @.***> escribió:

Hello David. I did what you said, but unfortunately, Unity got stuck in
the endless loop of compiling the project and I have a new problem. In
addition, i don't understand what you mean about sandbox mode. Do you mean
sandbox mode, the same as reset mod?
https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/assets/154488931/b155c6a4-ffc4-437f-bba1-862844219d0b
—
Reply to this email directly, view it on GitHub
https://github.com/PacktPublishing/Build-Your-Own-Metaverse-with-Unity/issues/1#issuecomment-1878471171,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AEZ73PFBQKB5MICWZYVVKW3YM7K2FAVCNFSM6AAAAABA5ZLSN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTQNZYGQ3TCMJXGE
.
You are receiving this because you commented.Message ID:
<PacktPublishing/Build-Your-Own-Metaverse-with-Unity/issues/1/1878471171@
github.com>

thank you. I sent you my email in Telegram.

The reader contacted me via Telegram and together we found the solution to the problem, please contact me at @davidcanton if the same thing happened to yo


Test Clippy in CI

Exactly what it says on the tin.
@frazar is working on this in #51

@frazar, if you leave a comment here, then I can assign this to you. Otherwise, it won't let me.

Sure thing! I'll be working towards closing this issue

Hahaha you know what I just realized? That PR only runs Clippy on zerocopy, but not on zerocopy-derive. Mind putting up another one for zerocopy-derive? It's just the exact same thing, but with an extra --manifest-path argument. E.g.:
https://github.com/google/zerocopy/blob/e5e9b1fa05933750db526a489f73050032c5eb70/.github/workflows/ci.yml#L90-L91

Sure!


Visual display of the alternate glyphs

Propose:

black on white screenshot of the glyphs x 4 variants at font size of ____ that is included in a Markdown file at the Unicode label directory root of the Unicode code point.

Taking screenshots of black on white with OSX preview of the *.glif file and then resizing to height="60" in html.  Adding this to README.md in each glyph subdirectory

Sample?

https://github.com/source-foundry/alt-hack/blob/master/glyphs/u0030-forwardslash/README.md

Perfect. Suggest exact steps for contributors to take these pictures so they are all the same?

Thoughts?  This was a suggestion to get feedback.  We can do it however felt to be best.  Could go as detailed as a website for display, could make it as simple as this approach with four images inside the individual glyph repo.


Update plooc.h

修复OpenWrt交叉编译报错
arm-openwrt-linux-gcc -c -g -fpic -I. -Iinclude -lpthread -I../common -I../common/log -I../network/mbedtls/include -I../network/mbedtls/include/mbedtls -I../network/mbedtls/wrapper -I../mqtt -I../mqttclient -I../network -I../platform/linux -I../test  ../mqttclient/mqttclient.c -o ../mqttclient/mqttclient.o
In file included from ../mqttclient/mqttclient.h:39:0,
                 from ../mqttclient/mqttclient.c:10:
include/plooc_class.h:47:5: warning: #warning For C89/90, __OOC_DEBUG__ is enforced. [-Wcpp]
 #   warning For C89/90, __OOC_DEBUG__ is enforced.
     ^
In file included from include/plooc_class.h:94:0,
                 from ../mqttclient/mqttclient.h:39,
                 from ../mqttclient/mqttclient.c:10:
include/./plooc.h:263:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(uint32_t wValue);
     ^
include/./plooc.h:272:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(uint_fast16_t wValue);
     ^
include/./plooc.h:281:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(uint_fast8_t wValue);
     ^
include/./plooc.h:291:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(int32_t wValue);
     ^
include/./plooc.h:300:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(int_fast16_t wValue);
     ^
include/./plooc.h:309:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(int_fast8_t wValue);
     ^
include/./plooc.h:318:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Set)(bool bValue);
     ^
include/./plooc.h:327:5: error: expected specifier-qualifier-list before 'bool'
     bool (*Enable)(void);
     ^
Makefile:37: recipe for target '../mqttclient/mqttclient.o' failed
make: *** [../mqttclient/mqttclient.o] Error 1

nice! thanks for yous contribution!!!

nice! thanks for yous contribution!!!


Missing data type when creating nwb

Going through this code:
from trodes_to_nwb.convert import create_nwbs
path = data_path # from step 1
output_dir = "/cumulus/rio/"

# for dual site recording:
probe_metadata_paths=['/cumulus/rio/BS28_raw_old/tetrode_12.5.yml',
                          '/cumulus/rio/BS28_raw_old/128c-4s8mm6cm-20um-40um-sl.yml']

create_nwbs(
    path,
    output_dir=output_dir,
    header_reconfig_path='/cumulus/rio/BS28_raw_old/20231107/20231107_BS28.trodesconf',
    #probe_metadata_paths=['/home/mcoulter/tetrode_12.5.yml'],
    #probe_metadata_paths=None,
    probe_metadata_paths=probe_metadata_paths,
    convert_video=False,
    n_workers=1,
    query_expression=None,
)

gets this error:
Cell In[6], line 11
      7 # for dual site recording:
      8 probe_metadata_paths=['[/cumulus/rio/BS28_raw_old/tetrode_12.5.yml](http://localhost:6502/cumulus/rio/BS28_raw_old/tetrode_12.5.yml)',
      9                           '[/cumulus/rio/BS28_raw_old/128c-4s8mm6cm-20um-40um-sl.yml](http://localhost:6502/cumulus/rio/BS28_raw_old/128c-4s8mm6cm-20um-40um-sl.yml)']
---> 11 create_nwbs(
     12     path,
     13     output_dir=output_dir,
     14     header_reconfig_path='[/cumulus/rio/BS28_raw_old/20231107/20231107_BS28.trodesconf](http://localhost:6502/cumulus/rio/BS28_raw_old/20231107/20231107_BS28.trodesconf)',
     15     #probe_metadata_paths=['[/home/mcoulter/tetrode_12.5.yml](http://localhost:6502/home/mcoulter/tetrode_12.5.yml)'],
     16     #probe_metadata_paths=None,
     17     probe_metadata_paths=probe_metadata_paths,
     18     convert_video=False,
     19     n_workers=1,
     20     query_expression=None,
     21 )

File [~/trodes_to_nwb/src/trodes_to_nwb/convert.py:185](http://localhost:6502/lab/tree/trodes_to_nwb/notebooks/trodes_to_nwb/src/trodes_to_nwb/convert.py#line=184), in create_nwbs(path, header_reconfig_path, probe_metadata_paths, output_dir, video_directory, convert_video, n_workers, query_expression, disable_ptp)
    183 else:
    184     for session, session_df in file_info.groupby(["date", "animal"]):
--> 185         _create_nwb(
    186             session,
    187             session_df,
    188             header_reconfig_path,
    189             probe_metadata_paths,
    190             output_dir,
    191             video_directory,
    192             convert_video,
    193             disable_ptp,
    194         )

File [~/trodes_to_nwb/src/trodes_to_nwb/convert.py:326](http://localhost:6502/lab/tree/trodes_to_nwb/notebooks/trodes_to_nwb/src/trodes_to_nwb/convert.py#line=325), in _create_nwb(session, session_df, header_reconfig_path, probe_metadata_paths, output_dir, video_directory, convert_video, disable_ptp)
    324 # run NWB Inspector to validate file for best practices before upload to DANDI
    325 logger.info("RUNNING NWB INSPECTOR")
--> 326 _inspect_nwb(output_path, logger)
    328 logger.info("DONE")
    330 return output_path

File [~/trodes_to_nwb/src/trodes_to_nwb/convert.py:337](http://localhost:6502/lab/tree/trodes_to_nwb/notebooks/trodes_to_nwb/src/trodes_to_nwb/convert.py#line=336), in _inspect_nwb(nwbfile_path, logger)
    334 """Run the resulting NWB file through the NWB Inspector to ensure it passes validation checks
    335 required for upload to the DANDI archive."""
    336 # this may take some time
--> 337 messages = list(
    338     nwbinspector.inspect_nwbfile(
    339         nwbfile_path=nwbfile_path, config=nwbinspector.load_config("dandi")
    340     )
    341 )
    342 logger.info("NWB Inspector output:")
    343 logger.info(messages)

File [~/miniforge3/envs/trodes_to_nwb/lib/python3.12/site-packages/nwbinspector/nwbinspector.py:557](http://localhost:6502/lab/tree/trodes_to_nwb/notebooks/miniforge3/envs/trodes_to_nwb/lib/python3.12/site-packages/nwbinspector/nwbinspector.py#line=556), in inspect_nwbfile(nwbfile_path, driver, skip_validate, max_retries, checks, config, ignore, select, importance_threshold)
    555     validation_error_list, _ = pynwb.validate(paths=[nwbfile_path], driver=driver)
    556     for validation_namespace_errors in validation_error_list:
--> 557         for validation_error in validation_namespace_errors:
    558             yield InspectorMessage(
    559                 message=validation_error.reason,
    560                 importance=Importance.PYNWB_VALIDATION,
   (...)
    563                 file_path=nwbfile_path,
    564             )
    566 with pynwb.NWBHDF5IO(path=nwbfile_path, mode="r", load_namespaces=True, driver=driver) as io:

TypeError: 'MissingDataType' object is not iterable

I would guess that there's something missing or incorrect in the metadata yaml file, but I'm not sure where to look for that in the metadata.

My guess is this may just be an odd case where there's exactly one error of a type so it can't iterate through.  in %debug can you see what validation_error_list and validation_namespace_errors are?

If you could also supply what animal/session this was (what's in the data path) that would be helpful

Had to rerun the cell so i'll let you know once i can look at %debug. data_path is "/cumulus/rio/BS28_raw_old/20231107/".
I suspect something crashes around here in the output?
[/home/rswenson/miniforge3/envs/trodes_to_nwb/lib/python3.12/site-packages/hdmf/build/objectmapper.py:671](http://localhost:6502/lab/tree/trodes_to_nwb/notebooks/miniforge3/envs/trodes_to_nwb/lib/python3.12/site-packages/hdmf/build/objectmapper.py#line=670): MissingRequiredBuildWarning: Position 'position' is missing required value for attribute 'spatial_series'.
  warnings.warn(msg, MissingRequiredBuildWarning)

but we should be able to make nwbs without trodes position info

The conversion log is in /cumulus/rio/BS28_raw_old/
Cell finished rerunning (oops) so from %debug validation_error_list = [Position (processing/behavior/position): missing data type SpatialSeries] and validation_namespace_errors = Position (processing/behavior/position): missing data type SpatialSeries

Ah it seems like it doesn't like Position being created without a SpatialSeries object. That should be something in trodes_to_nwb to be fixed. @samuelbray32 are you already on this?

I think the actual breaking error was just the fact that based on the way the validator returns things validation_namespace_errors was a single item rather than an iterable list.  This first level of problem is probably fixed by just adding a typecheck before iterating to catch this case of a single error item

@rpswenson I was able to run the inspector for this file.  Could you check your version of nwbinspector?  This can be done by running:
import nwbinspector
nwbinspector.__version__

@rpswenson I was able to run the inspector for this file. Could you check your version of nwbinspector? This can be done by running:
import nwbinspector
nwbinspector.__version__

Mine is 0.4.34

No, these are the first files I've tried to convert

@rpswenson  Was this still an issue?

@samuelbray32 actually now I am getting this error too. I talked to Rio, and they still get it too. This is happening for all days/NWBs for my two rats SC59 and SC65

Could you share the paths to the files on /stelmo or somewhere else where we can take a look? The first level error seems like it might be an issue with pynwb or nwbinspector as @samuelbray32 mentioned above re: validation_namespace_errors being a single item rather than an iterable list

@rly sure! For rat SC65, I am using the script /home/ebroyles/trodes_to_nwb/src/trodes_to_nwb_convert_SC65.py to convert to NWB for each  with the video files found in /stelmo/sc4712/rats/SC65/raw/<date> and the yamls found in /home/sc4712/yaml/SC65/generated

@emreybroyles  Are the nwb's still successfully generated when you hit this error? e.g. if you go look for them in /stelmo/nwb/raw (or wherever you're saving them) do they exist and are ~ the right size?

@samuelbray32 yes the NWBs generate and are of the correct size. This issue isn't too large or debilitating, but mainly just annoying because I'd like to batch-create NWBs for an animal in a loop, and the loop breaks after each NWB creation, so I end up having to create each one individually anyways


Fix Camera2D Incorrect Preview Bounds

Fixes #38316 while removing the incorrect dependencies of #38341.

The commits need to be squashed: https://docs.godotengine.org/en/stable/community/contributing/pr_workflow.html#the-interactive-rebase

whoops, that's right...

Thanks!


Sequelize v4.41.0 deprecation of findById

This sequelize release deprecated the findById method and I thought you should know, and maybe update the API to include the new findByPk method to the cache object.

Thanks! I will prepare new release with according changes soon.

Done in v1.2.5


Classify flights by radial distance (KC area vs cross-country)

Local map should just be a certain radial distance from KC (ex: 150 miles)
Total map should be all outside that same radial distance
This will require a distance calculation, NOT using total distance, but the first lat/lon coordinate compared to the final lat/lon coordinate.

With the current implementation in word, a new error condition needs to be created to prevent getting flight history data multiple times on the same day. Doing this will cause multiple flights to be logged in the flight_history schema due to the SELECT DISTINCT mySQL  and the way were are ultimately determining if the flight is local or non-local.


Test Release Actions

How was that? Is any problem or new idea about #20?

Let me renew this task from we’ve discussed in #20


Inconsistent exit codes across OSes

I am using the package to run my integration tests. It does two things

start the webpack dev server
run the jest tests against it

Tests run successfully and exit with 0, that in turn triggers the SIGTERM being sent to other processes (as shown in the logs) but the exit code sent to the process on windows is 1 while it is SIGTERM on mac.
We rely on SIGTERM to do some clean-up but because of the way it exits right now, we are unable to do so only on windows.
On Windows -

On Mac -

Well, yeah. Windows doesn't have signals AFAIK