Parser Error Line Numbers Off?

I'm using a fresh copy of dev (both Stan and CmdStan).  The new parser error line numbers look great, but they're consistently off the model I'm trying to build.  For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:

variable "logmu_ooc_C" does not exist.

ERROR at line 124

122:      beta_theta ~ normal(0,2);
123:
124:      alpha_mu ~ normal(0,2);
                                                           ^
125:      alpha_sigma ~ normal(0,2);

while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129:   ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130:   ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }

The parser should be identifying line 129.
Has anyone seen inconsistencies like this?  If someone can confirm then I'll put together a simple reproducible example.

Possibly comments aren't getting counted in terms of line numbers?

I haven't and just tried a few examples and it seems fine
for line numbers.
Can you give me the whole program and I can try it here?
Whatever's causing this issue would also cause runtime
numbers to be off, since they're using the same counting.
Are you running this Windows or Linux or Mac?  They all have
different line ends, and that may also be messing things
up somehow.

Bob

On Apr 2, 2015, at 8:58 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
variable "logmu_ooc_C" does not exist.
ERROR at line 124
122:      beta_theta ~ normal(0,2);
123:
124:      alpha_mu ~ normal(0,2);
^
125:      alpha_sigma ~ normal(0,2);
while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129:   ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130:   ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
—
Reply to this email directly or view it on GitHub.

I’m on a Mac — runtime errors are definitely off, too.
The model/data aren’t public so I’ll try to whip up a
pathological model tomorrow.
On Apr 2, 2015, at 12:53 AM, Bob Carpenter<EMAIL_ADDRESS>wrote:

I haven't and just tried a few examples and it seems fine
for line numbers.
Can you give me the whole program and I can try it here?
Whatever's causing this issue would also cause runtime
numbers to be off, since they're using the same counting.
Are you running this Windows or Linux or Mac? They all have
different line ends, and that may also be messing things
up somehow.

Bob

On Apr 2, 2015, at 8:58 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
variable "logmu_ooc_C" does not exist.
ERROR at line 124
122: beta_theta ~ normal(0,2);
123:
124: alpha_mu ~ normal(0,2);
^
125: alpha_sigma ~ normal(0,2);
while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129: ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130: ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

Turns out it’s Windows newlines — the model was originally
written on a Windows box.  Is there any way for the parser
to aggregate newline types and warn the user of potential
biases in the reported line numbers?
On Apr 2, 2015, at 1:03 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:

I’m on a Mac — runtime errors are definitely off, too.
The model/data aren’t public so I’ll try to whip up a
pathological model tomorrow.
On Apr 2, 2015, at 12:53 AM, Bob Carpenter<EMAIL_ADDRESS>wrote:

I haven't and just tried a few examples and it seems fine
for line numbers.
Can you give me the whole program and I can try it here?
Whatever's causing this issue would also cause runtime
numbers to be off, since they're using the same counting.
Are you running this Windows or Linux or Mac? They all have
different line ends, and that may also be messing things
up somehow.

Bob

On Apr 2, 2015, at 8:58 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
variable "logmu_ooc_C" does not exist.
ERROR at line 124
122: beta_theta ~ normal(0,2);
123:
124: alpha_mu ~ normal(0,2);
^
125: alpha_sigma ~ normal(0,2);
while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129: ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130: ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

What do you want the behavior to be?
The line counting is happening below the level of the parser
in the iterator that Spirit uses.  And it'd be hard to change
there.  But the good news is we have the whole string representing
the program before it gets used to create the iterators.
Here's the iterator getting created in lang/parser.hpp:
  std::ostringstream buf;
  buf << input.rdbuf();
  std::string stan_string = buf.str();

  // ***** could add warnings or preprocessing here *****

  typedef std::string::const_iterator input_iterator;
  typedef boost::spirit::line_pos_iterator<input_iterator> lp_iterator;

  lp_iterator fwd_begin = lp_iterator(stan_string.begin());
  lp_iterator fwd_end = lp_iterator(stan_string.end());

It'd be easy to drop code in where I wrote the comment above.

Bob

On Apr 2, 2015, at 8:56 PM, Michael Betancourt<EMAIL_ADDRESS>wrote:
Turns out it’s Windows newlines — the model was originally
written on a Windows box. Is there any way for the parser
to aggregate newline types and warn the user of potential
biases in the reported line numbers?
On Apr 2, 2015, at 1:03 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:

I’m on a Mac — runtime errors are definitely off, too.
The model/data aren’t public so I’ll try to whip up a
pathological model tomorrow.
On Apr 2, 2015, at 12:53 AM, Bob Carpenter<EMAIL_ADDRESS>wrote:

I haven't and just tried a few examples and it seems fine
for line numbers.
Can you give me the whole program and I can try it here?
Whatever's causing this issue would also cause runtime
numbers to be off, since they're using the same counting.
Are you running this Windows or Linux or Mac? They all have
different line ends, and that may also be messing things
up somehow.

Bob

On Apr 2, 2015, at 8:58 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
variable "logmu_ooc_C" does not exist.
ERROR at line 124
122: beta_theta ~ normal(0,2);
123:
124: alpha_mu ~ normal(0,2);
^
125: alpha_sigma ~ normal(0,2);
while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129: ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130: ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

So are the Windows newlines messing up Spirit directly?
Or is it having a mix of Unix and Windows newlines?
In the former case having a comment like “I detected Windows newlines
so be careful with the error message” would be huge given
the relatively large number of Windows users that we have.
In the latter having a “I found mixed newlines, be careful…”
would be great.
On Apr 2, 2015, at 1:35 PM, Bob Carpenter<EMAIL_ADDRESS>wrote:

What do you want the behavior to be?
The line counting is happening below the level of the parser
in the iterator that Spirit uses. And it'd be hard to change
there. But the good news is we have the whole string representing
the program before it gets used to create the iterators.
Here's the iterator getting created in lang/parser.hpp:
std::ostringstream buf;
buf << input.rdbuf();
std::string stan_string = buf.str();
// ***** could add warnings or preprocessing here *****
typedef std::string::const_iterator input_iterator;
typedef boost::spirit::line_pos_iterator<input_iterator> lp_iterator;
lp_iterator fwd_begin = lp_iterator(stan_string.begin());
lp_iterator fwd_end = lp_iterator(stan_string.end());
It'd be easy to drop code in where I wrote the comment above.

Bob

On Apr 2, 2015, at 8:56 PM, Michael Betancourt<EMAIL_ADDRESS>wrote:
Turns out it’s Windows newlines — the model was originally
written on a Windows box. Is there any way for the parser
to aggregate newline types and warn the user of potential
biases in the reported line numbers?
On Apr 2, 2015, at 1:03 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:

I’m on a Mac — runtime errors are definitely off, too.
The model/data aren’t public so I’ll try to whip up a
pathological model tomorrow.
On Apr 2, 2015, at 12:53 AM, Bob Carpenter<EMAIL_ADDRESS>wrote:

I haven't and just tried a few examples and it seems fine
for line numbers.
Can you give me the whole program and I can try it here?
Whatever's causing this issue would also cause runtime
numbers to be off, since they're using the same counting.
Are you running this Windows or Linux or Mac? They all have
different line ends, and that may also be messing things
up somehow.

Bob

On Apr 2, 2015, at 8:58 AM, Michael Betancourt<EMAIL_ADDRESS>wrote:
I'm using a fresh copy of dev (both Stan and CmdStan). The new parser error line numbers look great, but they're consistently off the model I'm trying to build. For example,
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
variable "logmu_ooc_C" does not exist.
ERROR at line 124
122: beta_theta ~ normal(0,2);
123:
124: alpha_mu ~ normal(0,2);
^
125: alpha_sigma ~ normal(0,2);
while the model itself is given by
121: beta_theta ~ normal(0,2);
122:
123: alpha_mu ~ normal(0,2);
124: alpha_sigma ~ normal(0,2);
125: alpha_theta ~ normal(0,2);
126:
127: // Measurements
128: for(n in 1:N_ooc) {
129: ooc_count_C[n] ~ neg_binomial_2(exp(logmu_ooc_C), exp(log_sigma_ooc_C));
130: ooc_count_T[n] ~ neg_binomial_2(exp(log_mu_ooc_T), exp(log_sigma_ooc_T));
131: }
The parser should be identifying line 129.
Has anyone seen inconsistencies like this? If someone can confirm then I'll put together a simple reproducible example.
—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

—
Reply to this email directly or view it on GitHub.

I think the parser/iterator should treat end-of-line markers
from any OS as end-of-line markers.  That ensures we get the
same behavior from the same byte stream cross platform.
I'd guess that's what's happening now, but we need to add
tests as part of resolving this issue and to figure out what's
going on.

[ ] add tests for behavior with mixed end-of-line markers

Then we can follow your second suggestion:

[ ] provide a warning if there are mixed end-of-line markers

I can take on doing both of these.

Bob

This is still an issue in stanc2, from my experience.
It's been fixed in stanc3, however.


Create SkillSet class which stores Skill

Allow for better abstraction (SLAP)
SkillSet will store Skill and we will be able to modify Skill through SkillSet

Codecov Report

Merging #57 (2e4ebd6) into master (d8e5d2d) will increase coverage by 0.49%.
The diff coverage is 91.52%.

@@             Coverage Diff              @@
##             master      #57      +/-   ##
============================================
+ Coverage     72.46%   72.95%   +0.49%
- Complexity      480      493      +13
============================================
  Files            82       83       +1
  Lines          1489     1516      +27
  Branches        157      158       +1
============================================
+ Hits           1079     1106      +27
+ Misses          360      359       -1
- Partials         50       51       +1

Impacted Files
Coverage Δ

.../seedu/address/logic/parser/EditCommandParser.java
87.50% <ø> (ø)

src/main/java/seedu/address/ui/PersonCard.java
0.00% <0.00%> (ø)

...java/seedu/address/logic/commands/EditCommand.java
94.73% <75.00%> (-1.27%)
:arrow_down:

...c/main/java/seedu/address/model/team/SkillSet.java
91.66% <91.66%> (ø)

...a/seedu/address/logic/parser/AddCommandParser.java
100.00% <100.00%> (ø)

...in/java/seedu/address/logic/parser/ParserUtil.java
90.19% <100.00%> (ø)

...c/main/java/seedu/address/model/person/Person.java
96.15% <100.00%> (+5.67%)
:arrow_up:

.../java/seedu/address/model/util/SampleDataUtil.java
26.92% <100.00%> (ø)

.../java/seedu/address/storage/JsonAdaptedPerson.java
100.00% <100.00%> (ø)

Continue to review full report at Codecov.

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

I have now included removeSkill() and removeSkillSet() methods in both Add() and AddAll() to remove copies of Skill if they exist in SkillSet.


[General] Example of Custom Projects Nordic

Briefly summarize the issue being raised
I am trying to compile my own application outside of the amazon freertos source tree using a CMakeLists.txt
Describe the desired outcome
cmake ends with a success.
System information

Hardware board: nordic.nrf52840-dk
IDE used: none
Operating System: [ Linux ]
Code version: 202107.00-46-g6b5f95024
Project/Demo: [ Own Project ]

Code/Steps to reproduce the current status

Clone the amazon-freertos repository
Create a CMakeLists.txt with the following code snippet (https://github.com/tgsong/amazon-freertos-examples)

cmake_minimum_required(VERSION 3.13)

project(active_gps)

add_executable(active_gps sources/main.c)

# Tell IDF build to link against this target
set(IDF_PROJECT_EXECUTABLE active_gps)

include_directories(my_app PRIVATE "amazon-freertos/demos/include")
include_directories(my_app PRIVATE "amazon-freertos/demos/network_manager")
include_directories(active_gps PRIVATE "amazon-freertos/vendors/nordic/nRF5_SDK_15.2.0")

# AFR_BOARD tells which board we need to target.
set(AFR_BOARD nordic.nrf52840-dk CACHE INTERNAL "")

add_subdirectory(amazon-freertos)

target_link_libraries(active_gps PRIVATE AFR::ble)
target_link_libraries(active_gps PRIVATE AFR::ble_hal)
target_link_libraries(active_gps PRIVATE AFR::platform)
target_link_libraries(active_gps PRIVATE AFR::posix)
target_link_libraries(active_gps PRIVATE 3rdparty::pkcs11)

3.Run cmake
cmake -DCMAKE_TOOLCHAIN_FILE=$amazon-freertos/tools/cmake/toolchains/arm-segger.cmake -DAFR_TOOLCHAIN_PATH=/usr/share/segger_embedded_studio_for_arm_5.50a/gcc/arm-none-eabi/bin -S . -B build

cmake --build build --clean-first

I am getting the following error when running cmake:
Scanning dependencies of target active_gps
[ 64%] Building C object CMakeFiles/active_gps.dir/sources/main.c.obj
[ 64%] Linking C executable active_gps
/usr/share/segger_embedded_studio_for_arm_5.50a/gcc/arm-none-eabi/bin/ld: cannot open linker script file ../build/aws_demos.ld: No such file or directory

Additional context
File structure:
amazon-freertos
sources
CMakeLists.txt

I have seen other question/issue raise from other user about this same topic.
https://github.com/aws/amazon-freertos/issues/832
https://github.com/aws/amazon-freertos/issues/1940
I have no issue compiling the demo from inside the amazon freertos repository.
I have no issue compiling the demo https://github.com/tgsong/amazon-freertos-examples

Hello @vlockhead, apologies for the late response. I was busy figuring out an easy way to achieve what you want without much change to the amazon-freertos repository.
Instead of your CMakeLists.txt, you should use the one I have attached.
CMakeLists.txt
It builds on your version with some additions. Except this, you'd need to do the below steps to get the code to compile.

Modify the Nordic CMakeLists.txt and add the line set(exe_target my_gps) here. Note that I am going to raise a PR shortly so that if exe_target is already defined, it won't be set again.
Use this command to build CMake: cmake -DCMAKE_TOOLCHAIN_FILE=amazon-freertos/tools/cmake/toolchains/arm-segger.cmake -DVENDOR=nordic -DBOARD=nrf52840-dk -DAFR_ENABLE_TESTS=0 -DAFR_ENABLE_DEMOS=0 -DAFR_TOOLCHAIN_PATH=/<YOUR_PATH_HERE>/arm_segger_embedded_studio_v560_linux_x64_nordic/gcc/arm-none-eabi/bin -S . -B build

In point 2., we explicitly disable demos and tests so that amazon-freertos is built as a library instead of making it as an executable.
Let me know if this method works for you.
Thanks,
Aniruddha

Hello,

I have updated amazon-freertos repository to the latest main branch.
I have copied a paste the cmake file that you have linked
I have implemented step one of your solution
Here is my bash file to compile

# Create the makefile
build_path=build2
arm_segger_cmake_path=amazon-freertos/tools/cmake/toolchains/arm-segger.cmake
arm_segger_compiler_path=/opt/arm_segger_embedded_studio_v568_linux_x64_nordic/gcc/arm-none-eabi/bin

cmake -DCMAKE_TOOLCHAIN_FILE=$arm_segger_cmake_path -DVENDOR=nordic -DBOARD=nrf52840-dk -DAFR_ENABLE_TESTS=0 -DAFR_ENABLE_DEMOS=0 -DAFR_TOOLCHAIN_PATH=$arm_segger_compiler_path -S . -B $build_path

# Build
cmake --build $build_path --clean-first

Here is the output amazonFreertosOuput.txt

I dont know If I need the specific v560 of the nordic compiler?
I must say I am a bit worried about trying to create a custom project with amazon freertos. Is there a documentation that I missed that would have explained what you just answered me? If not that means that I will need to ask question at every bump? (You have answered pretty fast I must say)
I also got caught by a bug with the cmake version. Here is the link to the bug https://githubmemory.com/repo/aws/amazon-freertos/issues/3220.
Thank you,
Vincent

Hello Vincent,
I am not sure about the exact version number issues. I just downloaded the first one that I saw (Not a very scientific method, I know 🙂).
I have disabled bootloader as well by commenting this line. Also my main.c had a main function which didn't do much - it was a placeholder for testing - maybe that's the issue on my end?
You wrote:

I must say I am a bit worried about trying to create a custom project with amazon freertos. Is there a documentation that I missed that would have explained what you just answered me?

I would advise against using amazon-freertos to create a custom project. The documentation is lacking a bit in that domain and doing that is 'uncharted waters'. It was mostly designed to be used as an application rather than a library in my opinion.
I would instead advise you to use our libraries directly by submoduling them in your project. That would be easier and cleaner. We currently do not have an example for using all the libraries at once directly, but we are working on that. I expect that to be simple - if you have any questions you can raise an issue here about that or in FreeRTOS Forums.

Hello,
I might have not made myself clear. I am NOT asking you to add amazon-freertos as a submodule to your project.
What I am saying is just submodule all the components you need.
For example, if you need the FreeRTOS-Plus-TCP library, just add that into your project as a submodule.
If you need coreMQTT then submodule it into your project.
And whe you need PKCS11 just submodule that into your project.
And keep your source files as they are.
Let me know if that makes sense. As far as using your main is concerned, I shall give it a try.
Thanks,
Aniruddha

Hello,
I see what you mean, I will try to do that. I think it will be the easiest way to build a custom project.
Thank you,
Vincent

Hello @vlockhead ,
Did that helped or you have more questions regarding this topic?

Hello @pvyawaha,
It did answer my questions, I having no more questions.
I am just a bit sad that the integration of this project as a custom project is not easily feasible.


Inconsistent component import examples

Change Type
Correction
Proposed Changes
Every component in the docs has different ways of importing a component — one with /index.js and then without it in the Usage section. For example https://next.shadcn-svelte.com/docs/components/button

I think it should not append /index.js anywhere as it's not required.

Actually, (unless I'm wrong), because of "verbatimModuleSyntax": true, the /index.js is required.

Guess I could take my time to update others places in docs, unless there's an objection.

We will use /index.js everywhere as it provides the widest compatibility regardless if you're building a library, app, etc.


The parameter specified in the request is not valid.

...
client.listShares()                  // ["a", "b", ...] ok.
client.connectShare("a")             // ok.
client.listDirectory("")             // ["d", "e", ...] ok.
client.listDirectory("/d")           // error log -> "The parameter specified in the request is not valid."

Using AMSMB2 works normally. Switching to SMBClient causes this problem. (and this problem only occurs in some SMB source services)

SMBClient v0.1.1
iOS v17.4

This is the expected correct behavior as per the SMB2 protocol specification: the path given to Create Request must be relative to the share.
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/e8fb45c1-a03d-44ca-b7ae-47385cfd7997
https://learn.microsoft.com/en-us/openspecs/windows_protocols/ms-smb2/8c61e928-9242-44ed-96a0-98d1032d0d39
AMSMB2 handles this by removing the preceding and following slashes before sending the request.
https://github.com/amosavian/AMSMB2/blob/77156f4c8794fdb41e36c3e2ccdc153e08cbca22/AMSMB2/Extensions.swift#L227-L229
I will consider whether to do the same for this library. My opinion is that I don't like libraries to do too much extra processing.
In the meantime, you can do the same for paths as the AMSMB2 as a simple solution.
extension String {
    var canonical: String {
        trimmingCharacters(in: .init(charactersIn: "/\\"))
    }
}


More descriptive object names

Try to make human friendly object names based on the object class and different properties. Already written in the C++ version so it just needs to be ported.

Completed by 102a8c1e4ab58d53db0e68c7c655e05b76d5623b. Future improvements needed for SP objects in #58.


Create Int from Read-Host function in Module

We need a module level function that accepts and validates [int] input from console and returns the validated value to the dependent scripts.
We need to implement this because Read-host by default returns String/SecureString

resolved with Pull Request #80


Flawed distance calculation logic

For this scenario:

... jgitver is not able to calculate the commit distance between G and D  (where the tag is). For the above we would expect the distance calculation to result in: 2, however it results in Optional.empty().
The problem is flawed logic in DistanceCalculator.FirstParentWalkDistanceCalculator#distanceTo()
The problem can be reproduced with the following test case:
return new Scenarios.ScenarioBuilder()
        .commit("content", "A")
        .branchOnAppId("branch1", "A")
        .branchOnAppId("branch2", "A")
        .master()
        .commit("content", "B")
        .checkoutBranch("branch1")
        .commit("content", "C")
        .checkoutBranch("branch2")
        .commit("content", "D").tag("1.2.3")
        .branchOnAppId("branch3", "C")
        .merge("D", "E", MergeCommand.FastForwardMode.NO_FF)
        .master()
        .merge("C", "F", MergeCommand.FastForwardMode.NO_FF)
        .merge("E", "G", MergeCommand.FastForwardMode.NO_FF)
        .getScenario();

For the above we would expect the distance calculation to result in: 2, however it results in Optional.empty().
PR is coming.

I must admit I don't know if the fact that not all parents are analyzed is an intentional feature of FirstParentWalkDistanceCalculator. Is it?
I would think it is unintentional and a result of optimization done in https://github.com/jgitver/jgitver/commit/7f4dfbecc745f689fe3d38f9449c2616d3854c70.


Network monitoring and Login with token

in my app i need functionality for auto login as i forked project and made login with token public
and also whenever i call Meteor.call or meteor.update i am getting warning "too much task on main thread"
changes made in this forked project https://github.com/daupawar/Android-DDP

added functionality for network monitoring-line 231
call method in new thread (asyctask)-341 (for network call on main thread issue)
loginwithtoken method made public-  line number 883
Note-: setWORKLOCAL false will ignore network monitoring in method call

Thanks a lot for contributing your changes!
I have a few questions:

What does your network monitoring do exactly? Does it just reject operations when the device has no internet connection? Is this really required (and desired)? What's the current situation? Does your app crash without this?
It seems you've wrapped the workload of Meteor#send in an AsyncTask, right? (We could also use a simple Thread.) Do you really get The application may be doing too much work on its main thread otherwise? Have others been experiencing this as well?
Why do you need loginWithToken to be public? Does this related issue help?

A)

Network monitoring code monitors current state of network status. and aslo it has listener onInternetStatusChanged.
this code not reject the operations it fires onError with reason , please check isValidToCall() method for more info.
In my app i really need network monitoring , if i not do so then i need check network status every button click.
i also  added flag setWORKLOCAL if someone don't want to use network monitoring

B)

my application consumes huge JSON data, in that case i am getting warning on log  The application may be doing too much work on its main thread, i don't think everyone is getting same warning but after wrapping Meteor#send in AsynckTask, i am not getting this warning,
suggest me best way to do so (AsynckTask or Thread)
C)
In my app i need to implement auto-login functionality, so i use previously stored token for auto-login

Network connectivity ("A"):
You really shouldn't have to check internet connectivity yourself, even less so on every click of a button. So we 100% agree here.
But I'm not sure if network monitoring is really required for this. As you can see here, this library should queue all JSON messages when they can't be sent over the WebSocket. This should work today, already.
If it doesn't work, we should fix it. What's wrong for you right now? Let's track this problem here: https://github.com/delight-im/Android-DDP/issues/89
Too much work on main thread ("B"):
We should definitely implement your fix for this problem. Thank you!
You've already tracked down the correct method that should be wrapped in a separate thread. But is it the toJson call or the send call that's so costly? Did you test this, or can you check what's consuming more time and resources?
Public access to token-based login ("C"):
This library does already handle auto-login, doesn't it? If you sign in using email/username and password, the library should receive a token upon successful login, store it, and try to sign in with it the next time. Doesn't this work? Or do you need token-based login for your own social sign-in? In the latter case, does this issue help?

Network connectivity
library queue all json messages Its ok, but app user cant understand whats going on. it will be good if we can show app user the proper message "no connection etc".
case 1: public void call(final String methodName, final ResultListener listener)  if i call this method when no internet connection and i want to do something onSuccess or onError, how can i handle this case? How can i give user proper error message?
Too much work on main thread
I will test what's consuming more time and resources.
Public access to token-based login
My app working flow is like this.

I handle autologin on splash screen, if token is valid app redirects to main screen else it shows login screen , i dont want to ask username password to user every time
i use loginwithtoken method when user come from notification

Network connectivity:
The callbacks onSuccess or onError of your ResultListener should still be called for queued messages. That is, whenever they're released from the queue and successfully sent to the server. So, unless there's a bug here, everything should work conveniently and as expected.
I agree that the user may be confused why an operation is taking so long when it couldn't be dispatched but had to be queued instead. But isn't onDisconnect usually called in that case? If not, we should fix it. In this specific case, we could even replace onDisconnect with a new callback such as onConnectionLost or onWaitingForConnection.
But apart from that, everything should work fine already today. So can we discuss the problems of bad network connectivity again, please? There should be nothing that you need to add in order to make this library work when connections are lost and re-established. If something doesn't work, it's probably a bug and we should fix it.
Too much work on main thread:
Great, thank you! We'll just run that one call in a separate thread.
Public access to token-based login:
Where do you get that token from that you're checking for validity? Do you extract it from this library by exposing read access to the token as well?
Why can't you just connect with this library on your splash screen, wait for onConnect to be called, and use its parameter signedInAutomatically to determine if the token was valid or not? If the token was valid, you would be signed-in already.

Public access to token-based login:
signedInAutomatically resolved my problem
Too much work on main thread:
I cant figure out actual line of code where i get main thread warning so for now we can ignore the warning.
Network connectivity:
This is still open issue for me
onDisconnect called when i disconnect internet, but if user fires call again i cant handle this case

Thanks! Great that we have resolved one of the issues, now let's solve the other two problems as well.
Too much work on main thread:
Does that mean that you're not sure if the problem is still there? So we don't have to change anything? Or is it just that you can't determine if we have to put the call to toJson or the call to send within Meteor#send in a separate thread?
Network connectivity:
If I understand you correctly, the library fires your callback onDisconnect whenever the internet connection is lost. This is what is expected and thus it's fine.
Now as we discussed already, when internet connection is not available and you try to send a message, it's queued, which is fine as well. But in this case, you expect the library to fire onDisconnect again (because the message couldn't be sent), right? Is this what you were referring to?
That's actually not what should happen. You should only receive onDisconnect in the situations where it's fired already today. In the other case, when subsequent messages cannot be sent and need to be queued, there's no callback that should be fired, and I think that's what is being done. You may add an instance of ResultListener to your call, and then ResultListener#onSuccess or ResultListener#onError should be fired eventually, but only when the connection has been established again and a new attempt is made.
I think what you want could be an additional callback ResultListener#onWaiting or ResultListener#onQueued for a single call that tells you that a message has not been sent yet and there will be a new attempt shortly. Is this correct?

Too much work on main thread:
We don't have to change anything.
Network connectivity:
Your #98  solution will work for same case.

I will try to this by today :) https://github.com/delight-im/Android-DDP/issues/98

@daupawar So can we close this issue here and track the remaining problem (network connectivity) in https://github.com/delight-im/Android-DDP/issues/98 until it's done?

@mwaclawek thanks for your continuous support.


Activating Search Topology stuck - then eventually throws exception

Exception was:

Activating Search Topology...
PS>TerminatingError(ForEach-Object): "Exception calling "Activate" with "0" argument(s): "Topology activation failed. No system manager locations set, search application might not be ready yet. (at    at Microsoft.Office.Server.Search.Administration.SearchServiceApplication.GetSystemClient(IList`1 systemManagerLocations)

Long story short after a investigation revealed the following ULS log error:

NodeRunnerAdmin ... Unexpected ... ComponentManager(Storage) : Storage: Microsoft.Ceres.CoreServices.Storage.StorageComponent[Configuring] Component failure: Failed to configure component Microsoft.Ceres.CoreServices.Services.Configuration.ComponentConfigurationException: Access to the path '/root' is denied. ---> System.UnauthorizedAccessException: Access to the path '/root' is denied.

Manuallay creating a folder in C:\root and assigning full control to the search service account and then restarting the autospinstaller script fixed it. Go figure hey.

THANK YOU!!! This saved my bacon. I didn't see the /root in the ULS log but I did see the same noderunner failed to configure component. And then I looked on other SharePoint servers we have used AutoSPinstaller on and sure enough, they have a C:\root folder. Creating the C:\root on this new server with the Search account in security settings resolved the issue.


There should be a Kd-tree to search spot neighbors.

This is important for performance (e.g. GUI responsivity: we need to quickly retrieve the spot closest to a click location).
This is tricky, because we allow for incremental model changes. The Kd-tree cannot be recomputed for each single change, otherwise the performance will degrade quickly, which is not the desired effect. A system to cache changes must be implemented, which is another issue.

all done

@tpietzsch Links please?

https://github.com/fiji/TrackMate3/tree/master/src/main/java/net/trackmate/kdtree is the KDTree
https://github.com/fiji/TrackMate3/tree/master/src/main/java/net/trackmate/spatial is the search building on top of KDTree plus changes, in particular https://github.com/fiji/TrackMate3/blob/master/src/main/java/net/trackmate/spatial/SpatialIndexData.java

@tpietzsch Thanks!

@ctrueden my pleasure! I didn't know that you were following TrackMate3.

I didn't know that you were following TrackMate3.

Only very casually, unfortunately.
How come TrackMate3 needs a KDTree when ImgLib2 already has one? Different interfaces/frameworks/etc.?
There are quite a few KDTrees in this world. Weka has one. And so does ThunderSTORM though that one is lifted from Java ML.

This KDTree has the same interfaces as imglib2's (or rather the searches on it have). The difference is the objects that are stored in it. TrackMate3 is heavily based on PoolObjects (conceptually similar to imglib2 types; stored in Pools mapping to primitive arrays, similar to imglib2 Imgs but always 1D and can grow dynamically). This KDTree plays nice with them. It also stores its nodes as PoolObjects avoiding creating many Objects as imglib2 KDTree does. But algorithms for building and searching the tree are pretty much the same.


Fixing Config option...again

Fixed Range weapons, Spells, Fell calls, Runeshots, and Artillery.
Added Bows, crossbows, pistols and rifles to explosive weapons because one of my players uses explosive arrows.

Thanks!


Support time for SQLite

This can be closed, fixed by https://github.com/launchbadge/sqlx/pull/458.


The named parameter 'swapAnimationDuration' isn't defined.  (has been renamed to duration)

With recent flutter versions, passing the parameter swapAnimationDuration as explained in the documentation and in issues #684 and #109 results in an Error: The named parameter 'swapAnimationDuration' isn't defined.  ) .
It turns out the named parameter in ImplicitlyAnimatedWidget is (or has been renamed to?)  duration.
The following code works:
LineChart(
  duration: Duration.zero,
  LineChartData(
    // Your chart data here
  ),
)

Instead of:
LineChart(
  swapAnimationDuration: Duration.zero,
  LineChartData(
    // Your chart data here
  ),
)

I am not sure whether this should be fixed in the documentation or in the code of fl_chart.
Versions
Flutter 3.16.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision db7ef5bf9f (vor 7 Wochen) • 2023-11-15 11:25:44 -0800
Engine • revision 74d16627b9
Tools • Dart 3.2.0 • DevTools 2.28.2
fl_chart 0.66.0

There is a PR already to address this that has not been merged yet: https://github.com/imaNNeo/fl_chart/pull/1496


[Bug]: Don't show nominate for deletion / edit category and edit depicts for logged out users

Summary
It seems like we're showing the "Nominate for deletion" button and edit category and edit depicts buttons to the logged out users.
Steps to reproduce

Open the app using the "Skip login" option
Open an image from the "Explore" screen
Observe the "Nominate for deletion" button, edit category and edit depicts buttons shown for the image.

Expected behaviour
It should not be possible for users who are not logged in to "Nominate for deletion" button, edit category and edit depicts buttons shown for the image.
Actual behaviour
We show the option to "Nominate for deletion" button, edit category and edit depcits buttons but it won't work. Nominate for deletion results in an app crash. Trying to edit the image results in a indefinite spinning loader that then goes away.
Device name
OnePlus Nord
Android version
12
Commons app version
5.0.1
Device logs
Crash log when "Nominate for deletion" is hit

Calling startActivity() from outside of an Activity  context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
at android.app.ContextImpl.startActivity(ContextImpl.java:1082)
at android.app.ContextImpl.startActivity(ContextImpl.java:1058)
at android.content.ContextWrapper.startActivity(ContextWrapper.java:421)
at fr.free.nrw.commons.auth.LoginActivity.startYourself(LoginActivity.java:418)
at fr.free.nrw.commons.auth.SessionManager.forceLogin(SessionManager.java:120)
at fr.free.nrw.commons.delete.ReasonBuilder.checkAccount(ReasonBuilder.java:96)
at fr.free.nrw.commons.delete.ReasonBuilder.fetchArticleNumber(ReasonBuilder.java:66)
at fr.free.nrw.commons.delete.ReasonBuilder.getReason(ReasonBuilder.java:51)
at fr.free.nrw.commons.media.MediaDetailFragment.onDeleteClickeddialogtext(MediaDetailFragment.java:1242)
at fr.free.nrw.commons.media.MediaDetailFragment.lambda$onDeleteButtonClicked$22(MediaDetailFragment.java:1187)
at fr.free.nrw.commons.media.MediaDetailFragment.$r8$lambda$xhyCexNuF3zrc2K-l2yuaiumOfQ(MediaDetailFragment.java:0)
at fr.free.nrw.commons.media.MediaDetailFragment$$ExternalSyntheticLambda25.run(R8$$SyntheticClass:0)
at fr.free.nrw.commons.utils.DialogUtil.createAndShowDialogSafely$lambda$6$lambda$3$lambda$2(DialogUtil.kt:179)
at fr.free.nrw.commons.utils.DialogUtil.$r8$lambda$ECLVYheIYrcn9r0orhEVOej1iq8(DialogUtil.kt:0)
at fr.free.nrw.commons.utils.DialogUtil$$ExternalSyntheticLambda0.onClick(R8$$SyntheticClass:0)
at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:191)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loopOnce(Looper.java:233)
at android.os.Looper.loop(Looper.java:344)
at android.app.ActivityThread.main(ActivityThread.java:8212)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:584)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1034)

Screen-shots
No response
Would you like to work on the issue?
None

Hey there @sivaraam wanted to take this on as my first contribution. Can I take this up?

@djbloop It is yours, thanks!

Hi @nicolas-raoul , I wanted to clarify the expected behaviour of the delete button. Should the button be disabled if the user skips the login, or should it disappear entirely? I wanted to ask as I've disabled the function but I wanted to get some clarification.

I'm also unaware of the wording of "edit the image" as I'm unable to reproduce it. I can see that the metadata is editable but not the image itself.

Should the button be disabled if the user skips the login, or should it disappear entirely?

We're accustomed to hiding the buttons that are not relevant to the logged out user in other places. So, doing the same here would be ideal.

I'm also unaware of the wording of "edit the image" as I'm unable to reproduce it. I can see that the metadata is editable but not the image itself.

Sorry about that. There isn't any edit image button. The description was just trying to refer to the edit category and edit depcits buttons shown for the image. I've updated the description accordingly to avoid confusion.

I'm wondering how I'm supposed to run a unit test. But I can't find any documentation on it in "commons-app-documentation".

I'm wondering how I'm supposed to run a unit test. But I can't find any documentation on it in "commons-app-documentation".

Figured it out.


Ragged arange?

I am sorry in advance if a solution for this exists. I am wondering if there is a way to create a ragged arange along the axis of an existing ragged tensor?
For instance, imagine I have an arbitrarily nested ragged tensor x I need to perform masking on. Something like:
x = tf.ragged.constant([
    [[12, 9], [5]],
    [[10], [6, 8], [42]],
])

The easiest way for me to mask will be by index of an element. Is there a way to get a ragged arange with the same row lengths/splits like:
x = tf.ragged.constant([
    [[0, 1], [2]],
    [[0], [1, 2], [3]],
])

It would be really cool to be able to do something like tf.ragged.arange_along_axis(x, axis=2) to get something like this.

For a rank-2 ragged tensor (like you have in your example), you can use:
tf.ragged.range(x.row_lengths())

If you have a higher-rank ragged tensor and want to specify the axis, you could use something like this:
tf.ragged.map_flat_values(tf.ragged.range, x.row_lengths(axis=2))

E.g., the following snippet:
x = tf.ragged.constant([
    [ [[12, 9], [5]],
      [[10], [20]]         ],
    [ [[10], [6, 8], [42]] ],
])

for axis in range(1, 4):
  print('axis', axis)
  print(tf.ragged.map_flat_values(tf.ragged.range, x.row_lengths(axis=axis)))

prints:
axis 1
<tf.RaggedTensor [[0, 1], [0]]>
axis 2
<tf.RaggedTensor [[[0, 1], [0, 1]], [[0, 1, 2]]]>
axis 3
<tf.RaggedTensor [[[[0, 1], [0]], [[0], [0]]], [[[0], [0, 1], [0]]]]>

Hey thanks for the response. This is helpful, although it doesn't quite solve what I'm after. The desired output for rank 3 would be:
<tf.RaggedTensor [[[[0, 1], [2]], [[3], [4]]], [[[0], [1, 2], [3]]]]>

So the arange would populate elements on axis 3, but would need to increment along axis 2, if that makes any sense. Again, I appreciate your response.

Actually I think I found a way to do this.
x = tf.ragged.constant([
    [[12, 9], [5]],
    [[10], [6, 8], [42]],
])

x_2d = x.merge_dims(inner_axis=-1, outer_axis=1)
arange_2d = tf.ragged.range(x_2d.row_lengths())
arange_nd = tf.RaggedTensor.from_nested_row_lengths(
    arange_2d.flat_values,
    x.nested_row_lengths(),
)

>>> arange_nd
<tf.RaggedTensor [[[0, 1], [2]], [[0], [1, 2], [3]]]>

Although I have no idea how expensive the merge operation is if it's used solely for this masking purpose.

That should be possible to do as well, though it's a little trickier.  Here's some code to get you started:
x = tf.ragged.constant([
    [[[12, 9], [5]],
     [[10], [20]]],
    [[[10], [6, 8], [42]]],
])

# Flatten all but the outermost dimension of x.
x_flat = x.merge_dims(1, -1)

# Get the number of scalar values in each row of x
x_row_sizes = x_flat.row_lengths()

# Build a list of indices, corresponding 1:1 with the flat_valeus of `x`.
indices = tf.ragged.range(x_flat.row_lengths()).values

# Replace x's values with the computed indices.
x.with_flat_values(indices)

Looks like we came up with near-identical solutions within ~15 seconds of one another.  Looks good to me. :)

Thanks again for all your help. Your solution exposed me to some interesting behaviors in the ragged API with which I was not familiar!


Custom Nested AttrJson::Models Do Not Get Cast/Serialized Correctly when Reading from .attributes/.as_json/.serializable_hash

The Following Test Case Shows that there is an issue when reading the attributes when AttrJson:Model is nested inside other AttrJson::Model objects.
Note I used the faker gem to generate the test data for this case
test_case.rb
require 'faker'
class Product
  include AttrJson::Model
  attr_json :name, :string, default: Faker::Commerce.unique.product_name
  attr_json :cost, :string, default: Faker::Commerce.price(range: 25..100, as_string: true)
  attr_json :material, :string, default: Faker::Commerce.material
  attr_json :color, :string, default: Faker::Commerce.color
end

class Brand
  include AttrJson::Model
  def self.build_test
    new(products: Array.new(5) { Product.new } )
  end
  attr_json :name, :string, default: Faker::Appliance.unique.brand
  attr_json :products, Product.to_type, array: true, default: []
end

class Department
  include AttrJson::Model

  def self.build_test
    new(brands: Array.new(5) { Brand.build_test } )
  end

  attr_json :name, :string, default: Faker::Commerce.unique.department
  attr_json :brands, Brand.to_type, array: true, default: []
end

dep = Department.build_test

dep.attributes
#=>
# {
#     "brands" => [
#         [0] #<Brand:0x00007fdc5a55d190 @attributes={"products"=>[#<Product:0x00007fdc5a55edd8 @attributes={"name"=>"G
# orgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007fdc5a55e6f8 @attri
# butes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007f
# dc5a55e1a8 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #
# <Product:0x00007fdc5a55dc58 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color
# "=>"magenta"}>, #<Product:0x00007fdc5a55d708 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material
# "=>"Wool", "color"=>"magenta"}>], "name"=>"KitchenAid"}>,
#         [1] #<Brand:0x00007fdc5ae0e280 @attributes={"products"=>[#<Product:0x00007fdc5a55cd30 @attributes={"name"=>"G
#
# orgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007fdc5a55c7e0 @attri
# butes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007f
# dc5a55c290 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #
# <Product:0x00007fdc5ae0f978 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color
# "=>"magenta"}>, #<Product:0x00007fdc5ae0ee10 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material
# "=>"Wool", "color"=>"magenta"}>], "name"=>"KitchenAid"}>,
#         [2] #<Brand:0x00007fdc5a563540 @attributes={"products"=>[#<Product:0x00007fdc5ae0dd58 @attributes={"name"=>"G
# orgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007fdc5ae0d330 @attri
# butes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007f
# dc5ae0c958 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #
# <Product:0x00007fdc5ae0c0e8 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color
# "=>"magenta"}>, #<Product:0x00007fdc5a563ab8 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material
# "=>"Wool", "color"=>"magenta"}>], "name"=>"KitchenAid"}>,
#         [3] #<Brand:0x00007fdc5a561768 @attributes={"products"=>[#<Product:0x00007fdc5a563220 @attributes={"name"=>"G
# orgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007fdc5a562cd0 @attri
# butes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007f
# dc5a562780 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #
# <Product:0x00007fdc5a562230 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color
# "=>"magenta"}>, #<Product:0x00007fdc5a561ce0 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material
# "=>"Wool", "color"=>"magenta"}>], "name"=>"KitchenAid"}>,
#         [4] #<Brand:0x00007fdc5ae03218 @attributes={"products"=>[#<Product:0x00007fdc5a561448 @attributes={"name"=>"G
# orgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007fdc5a560ef8 @attri
# butes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #<Product:0x00007f
# dc5a5609a8 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color"=>"magenta"}>, #
# <Product:0x00007fdc5a560458 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material"=>"Wool", "color
# "=>"magenta"}>, #<Product:0x00007fdc5ae03e98 @attributes={"name"=>"Gorgeous Granite Coat", "cost"=>"61.00", "material
# "=>"Wool", "color"=>"magenta"}>], "name"=>"KitchenAid"}>
#     ],
#       "name" => "Shoes, Games & Toys"
# }

By Itself this doesn't seem like an issue(as_json and serializable_hash work perfectly fine on this case). However when adding these models to a json_column(Like the products table in the test app)  with a container attribute like so
class Store < ActiveRecord::Base
  include AttrJson::Record

  self.table_name = "products"

  attr_json :departments, Department.to_type, container_attribute: :other_attributes, array: true, default: []
end

store = Store.new(departments: Array.new(3) { Department.build_test })

Then running either
store.as_json or store.serializable_hash
The output gets further messed up
#=>
# .... "other_attributes" => {
#          "departments" => [
              # [0] #<Department:0x00007f3221c22518 @attributes={"brands"=>[#<Brand:0x00007f3221c1fe30 @attributes={"products"=>[#<Produc
# t:0x00007f32229232d0 @attributes={"name"=>"Synergistic Linen Pants", "cost"=>"64.00", "material"=>"Cotton", "color"=>
# "blue"}>, #<Product:0x00007f3222922678 @attributes={"name"=>"Synergistic Linen Pants", "cost"=>"64.00", "material"=>"
# Cotton", "color"=>"blue"}>, #<Product:0x00007f3222921c78 @attributes={"name"=>"Synergistic Linen Pants", "cost"=>"64.
#]
#
# }```

Also doing this without `array: true` produces similar results.

Thanks for report! Will try to look into this next week.

Is the problem just to manual/direct use of as_json or serializable_hash, the models actually work right as far as saving and fetching all data to/from the db?
Can you describe the nature of the problem in words -- I'm having trouble interpreting the pastes. Is it that you get the Model object (not serialized to json) in the output? Or do you actually get a string that looks like #<Department:0x00007f etc?

Its the former. Anytime you call those methods that hashify the top level object it doen't work recursively on nested models that are inside of a json column. If you call those on just the vanilla rails models ie department.as_json or department.serializable_hash it works recursively.  It seems  redundant in my use case to have to  to check the value of something twice ie(if its a Hash or if its type  is a kind_of AttrJson::Model).
It relates to a serializer I'm making for that project we discussed earlier. If there was a way to call store.departments with some arbitrary option or even just a reader method like department_attributes  and have it return as a Hash or a collection of hashes that would make it easier in my case.

Sorry I confused myself, I'm not sure which "the former" is!
I think you're saying everything saves and fetches properly as ActiveRecord, but does not return what you want when you call as_json and serializable_hash directly yourself.
And I think you're saying that the manner in which it doesn't work how you want is that the hashes include ruby model objects, when you want them to include just "json-ish" data, hashes of hashes and arrays and primitives.
Do I have it right?
If so -- what if you call #to_json? I think you're supposed to get a serialized JSON string -- does it have what you want correctly?  I know this is hacky and inefficient and not what you want, but both as a possible workaround and just to understand what's going on better: If you did JSON.parse(store.to_json), do you get what you want?
(I'm off tomorrow, but will try to get back to this next week)

Sorry I confused myself, I'm not sure which "the former" is!

" Is it that you get the Model object (not serialized to json) in the output? "- This is what I meant by the former  sorry for the consfusion

I think you're saying everything saves and fetches properly as ActiveRecord, but does not return what you want when you call as_json and serializable_hash directly yourself.

Exactly.

And I think you're saying that the manner in which it doesn't work how you want is that the hashes include ruby model objects, when you want them to include just "json-ish" data, hashes of hashes and arrays and primitives.

Do I have it right?
Yes

I Would take a look at this post to give you some ideas on how to fix this. Take a look at the gems mentioned too at the end. Specifcally store_model. I'm not saying you should overhaul attr_json to be like these implementations(Like including the ActiveModel::Attributes API) but going through the code in store_model may help give you ideas on how to refactor/fix the AttrJson::Model module to fix - "the manner in which it doesn't work how you want is that the hashes include ruby model objects, when you want them to include just "json-ish" data, hashes of hashes and arrays and primitives."

If so -- what if you call #to_json? I think you're supposed to get a serialized JSON string -- does it have what you want correctly? I know this is hacky and inefficient and not what you want, but both as a possible workaround and just to understand what's going on better: If you did JSON.parse(store.to_json), do you get what you want?
Yes. Also works doing that with the oj gem via Oj.load(store.to_json) Using it with oj probably won't be as inefficient, but more redundant.
(I'm off tomorrow, but will try to get back to this next week)
Let me know if you still have any questions, or are still confused in anyway. I hope I was able to clarify everything.

Cool, I think I understand, thanks! I'll think on it and look at the code.
One of the design decisions that makes attr_json different was the goal that you should be able to edit and read via the actual attribute OR via the the underlying serialized json column, and either one would work fine. If you edit via the json_attributes attribute in your ActiveRecord, it is immediately seen by access via a "cover" attribute, and vice versa, and either one is serialized properly.
That may have been an unnecessary requirement/goal (not sure?), but I think it's what leads to this weird behavior, and different implementation than some other things.  That the underlying storage is always in the Hash object ActiveRecord is using for the underlying JSON column, even for the attributes.
We should hopefully be able to fix this weird behavior somehow anyway though.
We actually DO use the ActiveModel::Attributes api in attr_json, in a bunch of ways -- it is definitely what makes possible this implementation.  However, I started this in Rails 5.0-5.1 days, when the Attributes API wasn't as developed as it became in Rails 5.2 -- it possibly would/could have been done differently with full Rails 5.2 Attributes API and no need to support earlier Rails, the idea of taking another look is tracked in #18

@bbarberBPL
Trying to reproduce, I've found a few things:

I  believe I've confirmed that as a workaround JSON.parse(store.to_json) works. I know that's inefficient and ugly, but if you need to get going with your code in the meantime, recommend using that as a hopefully temporary workaround.

However, actually, I am only able to reproduce with store.serializable_hash.  I can see the problem you report with store.serializable_hash -- however, store.as_json seems to be different, and works as expected for me. Can you double check and confirm whether you are indeed seeing different behavior? If this is so, does it work for you just to use #as_json instead of #serializable_hash?

Here's my adaption of your test code committed to a branch of attr_json with tests in rspec verifying behavior, submitted as a PR just to make it easier to track and view.
https://github.com/jrochkind/attr_json/pull/80
Thanks for trying out attr_json, for the error report, and for your help tracking it down!

@bbarberBPL Here's an analagous example from stock Rails features, that leads me to believe present behavior is correct and as expected and consistent with Rails.
Create a Rails model with a postgres "decimal" column.
    create_table :widgets do |t|
      t.decimal :some_decimal
    end

That turns to a ruby BigDecimal on the ruby side.
In the serializable_hash output, the value is still a ruby BigDecimal, although in the as_json  it turns into a String.
irb(main):007:0> widget = Widget.new(some_decimal: "4.99")
=> #<Widget id: nil, title: nil, some_decimal: 0.499e1, created_at: nil, updated_at: nil>
irb(main):008:0> widget.some_decimal.class
=> BigDecimal
irb(main):009:0> widget.serializable_hash
=> {"id"=>nil, "title"=>nil, "some_decimal"=>0.499e1, "created_at"=>nil, "updated_at"=>nil}
irb(main):012:0> widget.serializable_hash["some_decimal"].class
=> BigDecimal
irb(main):013:0> widget.as_json
=> {"id"=>nil, "title"=>nil, "some_decimal"=>"4.99", "created_at"=>nil, "updated_at"=>nil}
irb(main):015:0> widget.as_json["some_decimal"].class
=> String

This leads to me to conclude that specialized ruby domain objects (BigDecimal, a custom AttrJson::Model) are expected and appropriate in serializable_hash values; but not in as_json values.
As this is the behavior I am seeing in attr_json, it leads me to conclude attr_json is behaving as expected.
Do you have a read, @bbarberBPL ?
(If we/you did need to change this behavior as reported at top, I think I found it would be necessary to override read_attribute_for_serialization in the ActiveRecord::Model, to recognize attributes that were attr_json wrappers, and handle them differently by calling as_json on super. However, I don't believe this behavior is actually expected or consistent with stock ActiveRecord).

Hey @jrochkind  thanks for looking into that. Sounds like a good solution overriding the read_attribute_for_serialization method. I was thinking overriding read_attribute_for_serialization might be a possible work around as well. Now I think I have a good idea of how to implement that override. If you don't think this is an issue with the gem could you by chance add something to the documentation for using nested attr_json models with json serializers ? I can give you my work around for read_attribute_for_serialization to add to the docs if you want.

@bbarberBPL
So, I'm not sure we're understanding each other properly.
You originally reported that both store.as_json and store.serializable_hash were not as you wanted.
However, I could only reproduce with serializable_hash, as_json seems to already be as you want. Can you confirm this please?
Also, my investigations of how Rails handles analogous things with serializable_hash without attr_json lead me to believe that what you are asking for in inappropriate for serializable_hash -- even without attr_json, Rails/ActiveRecord puts "domain objects" in serializable_hash -- like BigDecimal -- so I don't think it's appropriate to ask that to be any different for attr_json.  I am curious if your undertanding is differnet here, and how?
If I thought it would be consistent with Rails/ActiveRecord to make serializable_hash differently, I'd have attr_json itself over-ride serializable_hash, I wouldn't make the developer-user do it. But since I think what you are asking for is actually inconsistent behavior for serializable_hash, and I don't understand why someone would want it, I don't see why attr_json should document it.
Sorry if I'm still being confusing, happy to talk about this further on Slack or a phone call or whatever.

I see you say "for use with JSON serializers" -- I guess you have a particular JSON serializer library for which this is causing a problem? i don't think it can possibly be universal for all "JSON serializers"?  I have definitely serialized things to JSON using the current code. I wonder how your JSON serializer library would handle the BigDecimal case I demo'd above?
Is there a reason you can't use the as_json instead of serializable_hash?  Can you actually call as_json on the results yourself? store.as_json, or even store.serializable_hash["other_attributres"].as_json should all get you what you want.
It's not clear to me that changing #serializable_hash to work differently than it does in stock Rails for analagous things (like BigDecimal) is the right solution, or one we'd want to recommend.

Hi @bbarberBPL, I'm sorry to have left this for so long.
I'm reluctant to introduce any code complexity to attr_json to work around a Rails bug which has already been fixed in recent versions of Rails -- especially when the code complexity will be there for even recent versions of rails, and perpetually too.
I'm just aware of the challenge of keeping what is already a somewhat complex codebase sustainably maintainable.
However, I also understand that your use case not working in older versions of Rails is a problem it would be good to solve!
I think ideally we'd provide a way for you to fix this locally just in your app; or to have attr_json fix it by changing code only in cases of old Rails versions, with code that's clearly fenced off for that, so can be removed later when we stop supporting those old Rails versions.
I'm going to try to look at this a bit more today, but it's confusing and my brain no longer remembers where it was at in January, so I might not make much progress.
If you still want to work on this (and understand if you don't), can you submit a PR that has:

In one commit, a test that fails in the current codebase
In a second commit, your proposed fix, that makes the test now pass. This second commit should not change the test added in (1) above, we should have a test that fails without the change, and passes with the change.

If as a result of discussion we change our mind about things or need to change them, then you can actually rebase/ammend the branch in the PR, to still have 1 and 2 as above with the new approach.
That would make it a lot easier to investigate and understand and suggest changes or refactors, as well as to get one's head back into it if one forgets what's going on and wants to come back ot it like now. What we have here, a bunch of comments with code examples as part of a discussion, takes a lot more mental effort to figure out what's going on.
Thanks for your interest and help!

Hey Jonathan. Sorry for not keeping in touch with you regarding this! After Code4lib with the covid situation things got hectic. Good news though we actually decided recently that we are going to update the gem to use rails 6 and above. This is more because ActiveStorage is more streamlined for our gems use case but this will also resolve the current reported issue with attr_json at the same time. So we can go ahead and close this out. Thank you again for your patience and support!

Now worries @bbarberBPL , I thought it was me who dropped it! These are tough times.
Now that I've got my head back in it... I actually kind of want to get it solved. At least for as_json , which I believe is broken in Rails 5.2 but not 6.0.
My understanding is still that serialized_hash is not actually broken, and if something is expecting serialized_hash to be different, that that thing with the expectations is broken. (And I can't promise it won't be under rails 6.0 too...)
I may get something in anyway, at least fixing as_json in Rails 5.2.

Here's the commit that changed/fixed as_json in Rails 6.0: https://github.com/rails/rails/commit/2e5cb980a448e7f4ab00df6e9ad4c1cc456616aa#diff-531b52ff1432c7c9f9472188b39d6a43R96
Before as_json returned serializable_hash (with options), but it's changed to return serializable_hash.as_json -- this makes sure any values that were ruby objects in the results of serializable_hash get converted into json-compatible data structures.  The commit was done for 'timestamps'; would also apply to BigDecimal as noted; also ends up applying to our custom internal models.
I'm not totally sure this will be enough to make your ActiveModelSerializer case work -- I'm not sure what ActiveModelSerializer is doing. But I'd be inclined to call it a bug in ActiveModelSerializer if it doesn't -- which I understand is not much consolation.
I guess we'll cross that bridge when we come to it!


2x MPU9250 i2c Esp32

Hey Guys,
I am having issues with my esp32 and interfacing my two IMUs (MPU9250 with different addresses). Both Imus are connected to 21,22 pins of the Esp32. My setup works at times and then it doesn't work. Here's the story -
2 months ago - Got Everything working. Then it stopped. Replaced the IMUs, eventually after many resets, it began to work. Both sets of IMUs worked fine.
AND KEPT WORKING
1 week ago - IMU's stopped work (Previous night everything worked fine!!)
I am using a basic i2c scanner sketch to test my communication. When both IMUs are connected. I am getting 'no devices found 'errors. When I connect them alone, both addresses are picked up just fine. Tried the basic I2c sketches. I get the -1 status errors.
I am not using any pullup resistors. As I believe, they come with the breakout boards (generic gy boards). I don't think I need them as my setup used to worked fine for months!!. And If I do use pull resistors, what would the circuit look like given that two IMU's are being used, will the resistors be in parallel (Electronics noob here)
PLEASE HELP as these IMUs are essential to my thesis due soon!

The answer to this issue on this other library should apply to your case https://github.com/kriswiner/MPU9250/issues/37

@74ls04 Thank you for the reply. I am not sure where in the post lies my answer, Sorry that I am a bit slow. How do I tweak my I2C scanner to get both addresses? I am currently using this scanner to check for the devices..
I've added Wire1.begin(5,4) and  Wire1.beginTransmission(address);. I am trying to use the second I2c on a different set of pins to see if I get better results.. still no luck, only able to find one imu attached to 21,21 pins
#include <Wire.h>
void setup()
{
  Wire.begin(21,22);
  Wire1.begin(5,4);

  Serial.begin(9600);
  while (!Serial);             // Leonardo: wait for serial monitor
  Serial.println("\nI2C Scanner");
}

void loop()
{
  byte error, address;
  int nDevices;

  Serial.println("Scanning...");

  nDevices = 0;
  for(address = 1; address < 127; address++ )
  {
    // The i2c_scanner uses the return value of
    // the Write.endTransmisstion to see if
    // a device did acknowledge to the address.
    Wire.beginTransmission(address);
    Wire1.beginTransmission(address);
    error = Wire.endTransmission();

    if (error == 0)
    {
      Serial.print("I2C device found at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.print(address,HEX);
      Serial.println("  !");

      nDevices++;
    }
    else if (error==4)
    {
      Serial.print("Unknown error at address 0x");
      if (address<16)
        Serial.print("0");
      Serial.println(address,HEX);
    }
  }
  if (nDevices == 0)
    Serial.println("No I2C devices found\n");
  else
    Serial.println("done\n");

  delay(500);           // wait 5 seconds for next scan
}

Have you addressed the IMUs by connecting the AD0 pin of one to ground and the AD0 pin of the other one to VCC with a resistor? If you've done that then they will each have unique addresses and you shouldn't have any issues. Here is the relevant section from the documentation

You should also add pull-up resistors to VCC on the SDA/SCL lines.

@74ls04 Thanks again for the reply, I did not use a resistor, but I have connected one of the AD0 pins to VCC to get 69 as the address. While the other, stayed unmodified with the default address of 68. The addresses can be checked using the I2C scanner separately. I did not use a resistor.
I am having the same issues with an arduino pro mini (just to see if it's an issue with the Esp32). I had both the imus working for about 10 seconds. Both being connected to the SDA and SCL pins of the pro mini. Screenshot of the imus being found is below.

Try adding pull-up resistors on the I2C lines -- in general they will improve stability of the bus.

Partially resolved the issue just by using 2 Pro minis to monitor the 2 Imus.. Data from pro minis was sent to Esp using serial. Thank  you everyone for your support!


Saveable, reproducable, parametrizable and measured experiences

This seems more destined to the offline mode.

Reviews: saved drawing using https://excalidraw.com
Or https://excalidraw.com/#json=5737216265420800,LVBF5Ta9n1jKWi8Qikd7JA

https://excalidraw.com/#json=4912495454060544,2Ab_1UbSdRZDRqOW5dhvDQ

https://excalidraw.com/#json=6194909992189952,QsZliHGFZ7zol8gbrWG_sA

https://github.com/louis030195/niwrad/issues/13


[Bug]:  ReferenceError: Worker is not defined when testing AppRouter component

Version
^28.1.2
Steps to reproduce
Steps to reproduce the error:

Clone this repo on the "testing" branch: https://github.com/AnthonyMadia/Unirep-Social-frontend/tree/testing
Run yarn install
Run yarn test src/tests/router.js

Please note that it would be difficult to reproduce this error without the dependencies and other code because they provide more context.
Expected behavior
When trying to test if a component renders to the screen, I get ReferenceError: WebWorker is not defined. This is strange because WebWorkers are not being used in the project but there is a node_module that uses a WebWorker.
Actual behavior
Render component without WebWorker error.
Additional context
I tried creating a Mock of a WebWorker, installing js-dom-worker, and tried other worker packages to try and mock the webworker to no avail. The error seems to be thrown because of the ff-javascript package. They use a web-worker package for cross-platform workers. This is what the import looks like.
Is there any support for this in Jest?
Environment
System:
    OS: macOS 12.4
    CPU: (8) x64 Intel(R) Core(TM) i7-7820HQ CPU @ 2.90GHz
  Binaries:
    Node: 16.13.2 - /usr/local/bin/node
    Yarn: 1.23.0-20220130.1630 - /usr/local/bin/yarn
    npm: 8.1.2 - /usr/local/bin/npm
  npmPackages:
    jest: ^28.1.2 => 28.1.2

Note:  Reposted on StackOverflow.

I added a setup.js file that has this line of code: Object.defineProperty(window, 'Worker', { value: 'worker' }); and that fixed the worker reference error.
Another problem has risen though. When testing a render of a component that uses a library that uses a index.browser.js file, it throws an error: SyntaxError: Cannot use import statement outside a module (see image below).
I made a StackOverflow about this and seems that I need to configure just to ensure Jest isn't consuming browser bundles as they may not adhere to Node's ESM conventions.
Is there a solution to this that I may have missed on the Jest docs? I thought it would be fixed with the the resolver option but that did  not work for me.


[Question] Classification using Machine Learning Algorithms

Hi, thanks for this awesome project. I have mobilefacenet and mobilenetv3 small models with GDC output. I'm struggling to use Classification Algorithms like SVM, KNN etc. I already tried other method like cosine similarity which is works really well. Do you have any advice to classify using SVM, KNN etc?

I only tried that a long time ago. Here's just my basic test, mostly it's fit -> precidt:
import numpy as np
data = np.random.randn(1000, 512).astype(np.float32)  # fake known face embeddings as ground truth

from sklearn.svm import SVC
model = SVC()
model.fit(data, np.arange(data.shape[0]))  # fit to known face embeddings

model.predict(data[:10])  # Predict
# array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9])

Thanks for the fast response, do i need to normalize the data first using sklearn.preprocessing.normalize?

Yes, it needs to be normalized, also before predict. Here's some results I previously tested comparing nmslib / dot / svm dist calculation if you are interested:
!pip install nmslib
import nmslib
data = np.random.randn(1000, 512).astype(np.float32)
index = nmslib.init(method='hnsw', space='cosinesimil')
index.addDataPointBatch(data)
%time index.createIndex({'post': 2}, print_progress=True)
# CPU times: user 520 ms, sys: 27.8 ms, total: 548 ms
# Wall time: 70.3 ms

neighbours = index.knnQueryBatch(data[:10], k=1, num_threads=4)

from sklearn import metrics
from sklearn.svm import SVC
model = SVC()
%time model.fit(data, np.arange(data.shape[0]))
# CPU times: user 2.44 s, sys: 15.1 ms, total: 2.46 s
# Wall time: 2.46 s

''' nmslib '''
%timeit index.knnQueryBatch(data[:10], k=1, num_threads=4)
# 306 µs ± 2.71 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)

''' dot '''
%timeit np.argmax(np.dot(data, data[:10].T), 0)
# 46.5 µs ± 179 ns per loop (mean ± std. dev. of 7 runs, 10000 loops each)

''' svm '''
%timeit model.predict(data[:10])
# 36.1 ms ± 422 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)

import nmslib
data = np.random.randn(100000, 512).astype(np.float32)
index = nmslib.init(method='hnsw', space='cosinesimil')
index.addDataPointBatch(data)

%time index.createIndex({'post': 2}, print_progress=True)
# CPU times: user 20min 7s, sys: 667 ms, total: 20min 7s
# Wall time: 1min 42s

neighbours = index.knnQueryBatch(data[:10], k=1, num_threads=4)

''' nmslib '''
%timeit index.knnQueryBatch(data[:10], k=1, num_threads=4)
# 1.17 ms ± 2.06 µs per loop (mean ± std. dev. of 7 runs, 1000 loops each)

''' dot '''
%timeit np.argmax(np.dot(data, data[:10].T), 0)
# 10.9 ms ± 14.1 µs per loop (mean ± std. dev. of 7 runs, 100 loops each)


Automated Package Upgrade

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

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


Release date?

Hi, I enjoyed your talk at UKGS, where it was stated that the software would be released in "a couple of weeks". Please could you clarify when we can expect MetaSV to be released? I'm looking forward to trying it with my datasets.

Hi @RoyChaudhuri , MetaSV is released now. Please give it a try when you get a chance. And feel free to file issues you encounter in the process. Thanks.


Interaction UI

Healthbar works and is connected to the players health.
Some work on the interactive buttons has been made.

Merge conflicts have been fixed.


Remove *.html from .prettierignore

Address whitespace-related issues and remove *.html from .prettierignore.

Resolve in DX.


Feature/create space improvements

@Caruso33 I've closed this PR as these changes are now included in the other PR: https://github.com/embrace-community/embrace-dapp/pull/32


Understand changes to CircleCI subscription

Background

We need to understand the changes to CircleCI subscription. Arrange discussions with CircleCI to understand changes and options that may be available.
Acceptance Criteria

[ ] We better understand what the changes are so that we can determine actions that need to be taken.

Reference
How to write good user stories

Would be great to know what advice they can give us beyond "prune the cache" which is in their docs. We have a lot of projects and there's no way we can use that approach on all of them or consistently or anything like that.

Impact of subscription changes understood and shared with team.


switch to colored logo

Closes #838

Coverage increased (+0.006%) to 86.417% when pulling a1650185b53dc51a9ba4990d37f532d7393c330d on na3d:switch-logo into 1f7719ac472cbdb21ec6e4dd8af03cbb2cc71970 on linode:master.

Coverage remained the same at 86.41% when pulling 25aaab4148de71c3bba90746322493a5b387b87a on na3d:switch-logo into 1f7719ac472cbdb21ec6e4dd8af03cbb2cc71970 on linode:master.


Add option to hide Files and Folder pop-up information.

What's the Problem?
This annoying pop-up which shows "Name: So-and-So. Type: Folder" is, I feel, pretty much a 90s thing. It takes a point away from the "modern" UI which Files takes pride in.

Solution/Idea
However, some people may find the pop-up information helpful. So under Files and Folders in Settings, you could implement an option to hide/show this pop-up.

Alternatives
n./a
Priorities
n/a
Files Version
<IP_ADDRESS>
Windows Version
Windows 11 Home  21H2 22000.438
Comments

@KumarjitDey can you clarify which option you're looking for and update the description and title accordingly?

@KumarjitDey can you clarify which option you're looking for and update the description and title accordingly?

Sorry for creating a confusing post. English is not my native language. I have edited the post. Hopeful it is comprehensible.

@KumarjitDey can you clarify which option you're looking for and update the description and title accordingly?

Option to hide this obvious thing, which hides Avril's face (lol):

@KumarjitDey the tooltip is only shown when hovering over the thumbnail, can you just move the mouse away from the item?

@KumarjitDey the tooltip is only shown when hovering over the thumbnail, can you just move the mouse away from the item?

I just found out that I can move my mouse around, yes. But, in the future if you devs have the time and no other priorities, building an option to turn it off would be truly awesome.

I agree this would be a werry useful option.

Thank you for your feedback, we don't have plans to include an option for this right now.


unable to run Parsec when installed by brew cask

General troubleshooting steps

[x] I have retried my command with --force and the issue is still present.
[x] I have checked the instructions for reporting bugs (or making requests) before opening the issue.
[x] None of the templates was appropriate for my issue, or I’m not sure.
[x] I ran brew update-reset && brew update and retried my command.
[x] I ran brew doctor, fixed as many issues as possible and retried my command.
[x] I understand that if I ignore these instructions, my issue may be closed without review.

Description of issue
unable to run Parsec when installed by brew cask, got stuck at the loading stage in the beginning
It runs with no problem if installed manually with the pkg
The pkg file I downloaded from the website and the one brew cask download is from the same url
Output of your command with --verbose --debug
brew cask install --verbose --debug
==> Hbc::Installer#install
==> Printing caveats
==> Hbc::Installer#fetch
==> Satisfying dependencies
==> Downloading
==> Downloading https://s3.amazonaws.com/parsec-build/package/parsec-macos.pkg
/usr/bin/curl --show-error --user-agent Homebrew/1.5.14-3-g94c0d83 (Macintosh; Intel Mac OS X 10.13.4) curl/7.54.0 --fail --location --remote-time --continue-at - --output /Users/username/Library/Caches/Homebrew/Cask/parsec--latest.pkg.incomplete https://s3.amazonaws.com/parsec-build/package/parsec-macos.pkg
% Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
Dload  Upload   Total   Spent    Left  Speed
100 48.9M  100 48.9M    0     0  5883k      0  0:00:08  0:00:08 --:--:-- 8457k
==> Downloaded to -> /Users/username/Library/Caches/Homebrew/Cask/parsec--latest.pkg
==> Verifying download
==> Determining which verifications to run for Cask parsec
==> Checking for verification class Hbc::Verify::Checksum
==> No checksum defined for Cask parsec, skipping verification
==> 0 verifications defined
==> Installing Cask parsec
==> Hbc::Installer#stage
==> Extracting primary container
==> Determining which containers to use based on filetype
==> Checking container class Hbc::Container::Pkg
==> Using container class Hbc::Container::Pkg for /Users/username/Library/Caches/Homebrew/Cask/parsec--latest.pkg
==> Executing: ["/usr/bin/ditto", "--", "/Users/username/Library/Caches/Homebrew/Cask/parsec--latest.pkg", "/usr/local/Caskroom/parsec/latest/parsec-macos.pkg"]
==> Creating metadata directory /usr/local/Caskroom/parsec/.metadata/latest/20180407070535.513.
==> Creating metadata subdirectory /usr/local/Caskroom/parsec/.metadata/latest/20180407070535.513/Casks.
==> Installing artifacts
==> 2 artifact/s defined
#SortedSet:0x00000101ad1838
==> Installing artifact of class Hbc::Artifact::Pkg
==> Running installer for parsec; your password may be necessary.
==> Package installers may write to any location; options such as --appdir are ignored.
==> Executing: ["/usr/bin/sudo", "-E", "--", "/usr/sbin/installer", "-pkg", "/usr/local/Caskroom/parsec/latest/parsec-macos.pkg", "-target", "/", "-verboseR"]
==> installer: Package name is parsec-macos
==> installer: Installing at base path /
==> installer:PHASE:Preparing for installation…
==> installer:PHASE:Preparing the disk…
==> installer:PHASE:Preparing parsec-macos…
==> installer:PHASE:Waiting for other installations to complete…
==> installer:PHASE:Configuring the installation…
==> installer:STATUS:
==> installer:%28.381756
==> installer:PHASE:Writing files…
==> installer:%95.162142
==> installer:PHASE:Cleaning up…
==> installer:PHASE:Validating packages…
==> installer:%97.750000
==> installer:STATUS:
==> installer:PHASE:Finishing the Installation…
==> installer:STATUS:
==> installer:%100.000000
==> installer:PHASE:The software was successfully installed.
==> installer: The install was successful.
🍺  parsec was successfully installed!
Output of brew cask doctor
==> Homebrew-Cask Version
Homebrew-Cask 1.5.14-3-g94c0d83
caskroom/homebrew-cask (git revision 661d0; last commit 2018-04-07)
==> macOS
10.13.4
==> SIP
Enabled
==> Java
10
==> Homebrew-Cask Install Location

==> Homebrew-Cask Staging Location
/usr/local/Caskroom
==> Homebrew-Cask Cached Downloads
~/Library/Caches/Homebrew/Cask (2 files, 56.9MB)
==> Homebrew-Cask Taps:
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-cask (3956 casks)
/usr/local/Homebrew/Library/Taps/caskroom/homebrew-versions (173 casks)
==> Contents of $LOAD_PATH
/usr/local/Homebrew/Library/Homebrew/cask/lib
/usr/local/Homebrew/Library/Homebrew
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/gems/2.3.0/gems/did_you_mean-1.0.0/lib
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/site_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby/2.3.0/universal-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/vendor_ruby
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/x86_64-darwin9.0
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/universal-darwin9.0
==> Environment Variables
LC_ALL="en_US.UTF-8"
PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/Homebrew/Library/Homebrew/shims/scm"
SHELL="/usr/local/bin/zsh"
Output of brew tap
caskroom/cask
caskroom/versions
homebrew/boneyard
homebrew/core

Will be fixed by https://github.com/caskroom/homebrew-cask/pull/45688.
Two notes for future bug reports:

Please keep keep the details in fenced code blocks, as they were. As they are now, they are difficult to read.
Please give as many details as possible. I tried the install, and it shows an error -1003. That was crucial in understanding the problem and making the fix.


Ionic/React Links not opening in a new tab

The Ionic/React Links on the opportunities page are not opening in a new tab, they redirect the current tab to that URL.

This is resolve within PR #87, please re-test with the latest develop

Running on the latest version of dev they still are not opening in a new tab @PaulPaulDevelops

URLs are opening in a new tab, Closing the ticket.


Unknown command-line option '--changed-files-index'.

I am using this command
infer -- ./gradlew run --changed-files-index app/src/main/java/com//ui/MainActivity.java
It is giving : Unknown command-line option '--changed-files-index'

This is passing --changed-files-index to gradle, not infer. You want to specify it before -- and give it as argument a file containing a list of source files to reanalyse:
$ infer --help
[...]
  --changed-files-index <file>
                         Specify the file containing the list of source files from which
                         reactive analysis should start. Source files should be specified
                         relative to project root or be absolute
[...]
$ cat changed_files.txt
app/src/main/java/com//ui/MainActivity.java
$ infer --changed-files-index changed_files.txt --reactive -- ./gradlew run
[...]

This will capture all the files in your project, but analyze only MainActivity.java and the files it depends on.

Thanks for the answer!
Is --changed-files-index works same as if you run keeping the file name in .inferconfig as whitelist?
"infer_whitelist": [
"app/src/main/java/com/ui/MainActivity.java"
],

@jvillard  Can you please reply I am stuck?

The whitelist is so that infer doesn't skip analyzing a file that would otherwise be blacklisted. --changed-files-index tells infer where to start the analysis from and makes sure all the files in the index are re-analyzed by infer. Without --changed-files-index infer will analyze all the files that were captured (or, if --reactive was passed, all the files that infer finds have changed since the last run). The blacklist/whitelist options is another mechanism on top of that; for instance, if a file in the index is blacklisted, it will still not be analyzed.
What are you trying to achieve, what have you tried and where are you stuck?

Thanks for explaining @jvillard .
Problem statement :

What I am trying to achieve is to run Infer on some files, then re analyse those files after fixing issues.

First I whitelisted some files on which I want to run infer then,
I tried all these commands.
infer -- ./gradlew run  //I was running this each time after fixing my issues It worked but it is taking too much time.
infer --reactive -- ./gradlew --offline run // This gives no issues found each time after first build
infer --changed-files-index changed_files.txt --reactive -- ./gradlew run // This gives no issues found. If I don't use --reactive It takes same time as infer -- ./gradlew run
I tried
-j 16 but It was not of much help because it took same time.
Can you please suggest what should be done to get result faster for specific files.


[BugFix] fix cloud table does not support cross db colocation

Fixes #issue
What type of PR is this:

[x] BugFix
[ ] Feature
[ ] Enhancement
[ ] Refactor
[ ] UT
[ ] Doc
[ ] Tool

Checklist:

[x] I have added test cases for my bug fix or my new feature
[ ] This pr will affect users' behaviors
[ ] This pr needs user documentation (for new or modified features or behaviors)

[ ] I have added documentation for my new feature or new function

Bugfix cherry-pick branch check:

[x] I have checked the version labels which the pr will be auto-backported to the target branch

[x] 3.0
[ ] 2.5
[ ] 2.4
[ ] 2.3

[FE PR Coverage Check]
:heart_eyes: pass : 2 / 2 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/catalog/ColocateTableIndex.java
2
2
100.00%
[]

[FE PR Coverage Check]
:heart_eyes: pass : 2 / 2 (100.00%)
file detail

path
covered_line
new_line
coverage
not_covered_line_detail

:large_blue_circle:
com/starrocks/catalog/ColocateTableIndex.java
2
2
100.00%
[]

@Mergifyio backport branch-3.0


mavros: 2.5.0-1 in 'foxy/distribution.yaml' [bloom]

Increasing version of package(s) in repository mavros to 2.5.0-1:

upstream repository: https://github.com/mavlink/mavros.git
release repository: https://github.com/mavlink/mavros-release.git
distro file: foxy/distribution.yaml
bloom version: 0.11.2
previous version for package: 2.4.0-1

Hi @vooon, this package is regressing for version 2.4.0 in Foxy, do you want to fix the issues as soon as possible? Foxy is going EOL and we might need to revert it to a stable version if there's no fix for the newest versions.

Closing this out as reverting to 2.3.0

Hey @vooon, even 2.3.0 is regressing for libmavconn, mavlink, mavros, mavros_extras and mavros_msgs, is it possible for you to take a look or I'll probably revert it down further. See https://repo.ros2.org/status_page/ros_foxy_ubv8.html?q=REGRESSION.

So I think the problem here is that mavlink also needs to be downgraded.  And it looks like we already synced 2.4.0 out to the main repositories, so we'll want to re-upgrade this to 2.4.0.
@quarkytale I'll contact you this week to try to resolve this.


Update maven-wrapper to 0.5.3 and maven to 3.6.0

Include the latest fixes from https://github.com/takari/maven-wrapper

Coverage remained the same at 48.395% when pulling 9cbdc2bcc1617a014542a3fb74b22aca039a46f3 on sepe81:maven-wrapper-3.6.0 into ce4f192676aeb433f8aa020977b62cda0fedf27b on apache:master.