"Scorched" Lletya Fruit Tree Patch Not Recognized in Time Tracking plugin

Describe the bug
I am far enough along in Song of the Elves that Lletya has been attacked, and is "scorched". Without completing the quest, I have planted a palm tree in the fruit tree patch there, but it is not timed in the Time Tracking plugin. I am not sure yet whether Lletya actually returns back to normal after the quest, but maybe someone can fill me in on that.
To Reproduce
Steps to reproduce the behavior:

Advance in Song of the Elves until Lletya is attacked. Do not continue.
Plant a fruit tree in the fruit tree patch just west of the Lletya Bank.
Observe that Time Tracking does not recognize anything planted in that patch.

Expected behavior
The tree should be recognized and timed within the plugin interface.
Screenshots

Environment (please complete the following information):

OS: Windows 10, Version 2004
RuneLite version: 1.6.31
Launcher version: 2.1.3

Additional context
I'm not sure whether the patches are ground objects or game objects, but the ground object of the patch is 7517, and the game object looks to be 26579.

Tile location is (2794, 6105, 0) to (2795, 6106, 0).

I've just learned that when passing through the tree entrance to Lletya,

your character is warped from region 9265 on the left side, to region 11103 on the right side. Presumably this creates the distinction between scorched and unscorched Lletya.
The existing code (snippet below) references Lletya by region 9265.
https://github.com/runelite/runelite/blob/b520e58034f034da81bc6b40d70a9847752403dd/runelite-client/src/main/java/net/runelite/client/plugins/timetracking/farming/FarmingWorld.java#L194-L196
In fact, when I crossed the tree line into region 9265, without unloading my tree patch, the timer picked up on it, and it is now tracked. Once crossing back into the scorched Lletya via the tree, it failed to update as the tree grew.

I believe there are two possible fixes for this issue, one being quick and the other requiring more work. The first is to add a second "Lletya (Scorched)" entry to the Fruit Tree page, and the other is to update FarmingRegion to allow an array of regions, rather than just one. The former seems too much like a band-aid fix, but I will start on a fix to allow regionID arrays shortly.

Adding the additional regionID to the FarmingWorld#add call worked. Corresponding log output while I was loaded in to the scorched region:
2020-11-12 16:08:09 [OkHttp https://api.runelite.net/...] DEBUG n.r.http.api.config.ConfigClient - Synchronized configuration value<EMAIL_ADDRESS>to '226:1605215278'```

Pull request will be up shortly.


More warnings that setting OAuthConfigObject.ClientSecret will cause the client secret to show up in the html

I was working on customizing the swagger UI when I noticed at the bottom of the HTML is some inline javascript that included the clientID and client secret. We were using user name and password OpenID auth against AAD so we didn't actually need the client secret. However sometime our app uses its client secret to do Bearer Auth to other things so its in the app settings, and we passed it down to swagger until we learned this was bad and harmful.
While this is ultimately swagger-ui rendering the secret, swashbuckle should do more.to warn carelessly adding the client secret. At the very least the xmldoc comments should warn you this is bad. The examples should warn you explictly not to set it whenever they set client secret. I'd even go as far as making ClientSecret a field backed property so you can stick a #WARNING in the setter that the user could ignore of they really need to expose the client secret.

#2449


Query Builder - Add today-7 into default datetime validations

Currently there is not option to check / query anything on last 7 days
I need to check Custom Field Value of datetime is before Last 7 days

[@today-7] is available in query


Name of Prison validation not displaying validation error

env: Local
On "About the prisoner" page, if you submit with no data in fields, the "Name of Prison" field does not display a validation error in summary or field.

Also seeing this issue on the test environment

verified


Typo iUNSAFE ?

https://github.com/xianyi/OpenBLAS/blob/ecbeb802a0d3b3f32430e618bd0a882320f41015/driver/level2/gemv_thread.c#L168
I believe there is a typo here?

@martin-frbg

Hehe. Sponsored by Apple probably. At least it landed in a totally harmless spot where it would only create an unused variable (and possibly a compiler warning about same).

hehe.. ;-)

Probably not so shiny, and true sponsor is vim editor...
It is actually an unused diagnostic parameter and could be wiped out of file.

Not unused. It is a flag that is set when the splitting code did not "goto Outer" due to the size of the matrix.

Actually fixed right away by a direct edit rather than going through all the PR stuff. Thanks for spotting this.

Thanks!


Profiler States User Does Not Have Permission But Same Login Works in SSMS Profiler

Azure Data Studio Version: 1.36.2
OS Version: W10 20H2

Steps to Reproduce:

Connections - Servers Select Server to profile and get the green dot.
Right click that server and select Launch Profiler

Toast message comes up stating

The user does not have permission to perform this action.

Go to OS and run SQL Profiler and profile the same Server. It works.
Message in Render.Log

An Unknown error occurred. Please consult log for more details.

Other logs don't have any relevant information.

Does this issue occur when all extensions are disabled?: Yes/No
N/A

N/A

@CheetahChrome the SQL Profiler installed with SSMS uses the older TRACE technology, whereas ADS Profiler uses XEvents.  It's possible that permissions can be configured to allow one or other independently.  Can you confirm whether the "XEvent Profiler" available in the SSMS Object Explorer tree works for you, since that should require the same permissions as the ADS Profiler.  Thanks!

Yes, with Standard and TSQL

I have encountered this same issue and have also confirmed the XEvent Profiler is accessible for Standard & TSQL, any news here?


Configuring both OIDC and IAM authentication?

Hello everyone,
We currently use OIDC auth for user-based interactions with Kubernetes (deployed via kops) and IAM auth for automated build deployments. Unfortunately, my team doesn't have any control over this configuration. Is it possible to use this project for IAM auth in conjunction with OIDC auth enabled in the API Server?
Thanks.

+1

/remove-lifecycle stale

So why not let AWS take the ownership for this OSS?


[Question] 2 Questions about New-NavContainer cmdlt.

Hello,

Can i change containers database name like CRONUS -->BC1411-DEV etc. etc. The reasong i am asking is we are trying to use docker environment for our C/SIDE developments. We have a container which includes customers objects. But every customers container database name becomes CRONUS hence its hard to see which customers database you are working with.

How can i install languages packages to docker containers for on prem installations? (the .msi files that are created from building translated resx files located in partnertranslationtoolkit relased by micrsoft)

For the first one - you could place the database on the host or a standalone SQL Server and use that.
If you want to do it in the container, you can easily override the SetupDatabase.ps1 and use whatever name you want.
for 2 - I haven't tried, but I guess you should be able to install the .msi files silently (no UI) in the container (use Invoke-ScriptInNavContainer)


Add a "setup environment" convenience function

also decide whether to force the env to be called spikewrap. seems like a bad idea but useful for slurm.

Duplicate of #81


Video Orientation Incorrect

I have a video that is 1080 x 1920.  When it gets uploaded via carrierwave-video, the video appears to be rotated 90 degrees counter-clockwise.  How can I ensure that the video is not rotated?  What types of methods can I use to detect the video's dimensions when the user uploads the file?
This is only an issue when uploading portrait videos.

I am facing the issue with a portrait video.The thumbnail is rotating right. I am using the above code.Can you suggest me on that.
when i am removing custom attribute working fine but image is a blur and stretch more.
please tell me what type of custom attribut need to use.


fix: Upgrade controller-gen to v0.14.0

What this PR does / why we need it:
Upgrade controller-gen to v0.14.0, in order to avoid runtime panic when conducting make install with Go 1.22.
(About this problem and solution is mentioned in controller-gen: #888)
Which issue(s) this PR fixes (optional, in Fixes #<issue number>, #<issue number>, ... format, will close the issue(s) when PR gets merged):
Fixes #2025
Checklist:

[ ] Docs included if any changes are user facing

Pull Request Test Coverage Report for Build<PHONE_NUMBER>
Warning: This coverage report may be inaccurate.
This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

For more information on this, see Tracking coverage changes with pull request builds.
To avoid this issue with future PRs, see these Recommended CI Configurations.
For a quick fix, rebase this PR at GitHub. Your next report should be accurate.

Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.09%) to 42.908%

Totals

Change from base Build<PHONE_NUMBER>:
0.09%

Covered Lines:
3757

Relevant Lines:
8756

💛  - Coveralls

@champon1020 Could you re-generate CRD?

@tenzen-y Now I re-generated CRD by make manifests.

The building failed due to unintended errors:

#13 126.4 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#13 127.4 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#13 127.4     unknown package:
#13 127.4         Expected sha256 abad2e08652df153a72177ce20c897d083b0c4ebeec051239e2654ddf4d3c996
#13 127.4              Got        87ed613b5633f5c43e8a3237061548036f19c1e261b78491afa23d7b7ad211a3
#13 127.4
#13 ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

https://github.com/kubernetes-sigs/kueue/blob/975b5f238ee08c27c5988ec46a52ce1f29e38285/test/integration/scheduler/podsready/suite_test.go#L96-L97
@deepanker13 Could you investigate this?

The building failed due to unintended errors:

#13 126.4 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#13 127.4 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#13 127.4     unknown package:
#13 127.4         Expected sha256 abad2e08652df153a72177ce20c897d083b0c4ebeec051239e2654ddf4d3c996
#13 127.4              Got        87ed613b5633f5c43e8a3237061548036f19c1e261b78491afa23d7b7ad211a3
#13 127.4
#13 ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

https://github.com/kubernetes-sigs/kueue/blob/975b5f238ee08c27c5988ec46a52ce1f29e38285/test/integration/scheduler/podsready/suite_test.go#L96-L97
@deepanker13 Could you investigate this?

Sure, looking into it

The building failed due to unintended errors:

#13 126.4 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#13 127.4 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#13 127.4     unknown package:
#13 127.4         Expected sha256 abad2e08652df153a72177ce20c897d083b0c4ebeec051239e2654ddf4d3c996
#13 127.4              Got        87ed613b5633f5c43e8a3237061548036f19c1e261b78491afa23d7b7ad211a3
#13 127.4
#13 ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

https://github.com/kubernetes-sigs/kueue/blob/975b5f238ee08c27c5988ec46a52ce1f29e38285/test/integration/scheduler/podsready/suite_test.go#L96-L97
@deepanker13 Could you investigate this?

Sure, looking into it

Sorry, I put an irrelevant link above. The correctly link is https://github.com/kubeflow/training-operator/actions/runs/8282278962/job/22664907995?pr=2026#step:5:1615

The building failed due to unintended errors:

#13 126.4 Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
#13 127.4 ERROR: THESE PACKAGES DO NOT MATCH THE HASHES FROM THE REQUIREMENTS FILE. If you have updated the package versions, please update the hashes. Otherwise, examine the package contents carefully; someone may have tampered with them.
#13 127.4     unknown package:
#13 127.4         Expected sha256 abad2e08652df153a72177ce20c897d083b0c4ebeec051239e2654ddf4d3c996
#13 127.4              Got        87ed613b5633f5c43e8a3237061548036f19c1e261b78491afa23d7b7ad211a3
#13 127.4
#13 ERROR: process "/bin/sh -c pip install --no-cache-dir -r requirements.txt" did not complete successfully: exit code: 1

https://github.com/kubernetes-sigs/kueue/blob/975b5f238ee08c27c5988ec46a52ce1f29e38285/test/integration/scheduler/podsready/suite_test.go#L96-L97
@deepanker13 Could you investigate this?

Sure, looking into it

Sorry, I put an irrelevant link above. The correctly link is https://github.com/kubeflow/training-operator/actions/runs/8282278962/job/22664907995?pr=2026#step:5:1615

@deepanker13 @champon1020 We will fix the dependencies issue in https://github.com/kubeflow/training-operator/pull/2031.
After it is merged, we can merge this into the master branch. Thank you for your patience.

@champon1020 Could you rebase this PR since we fixed CI issues?

@kubeflow/wg-training-leads Could you approve CI?

/hold cancel


Evaluate using Profile-Guided Optimization (PGO)

Hi!
A few days ago I found an article about OpenVMM on Reddit - as far as I see, the project tries to deliver peak performance. Recently I checked Profile-Guided Optimization (PGO) improvements on multiple projects including many projects - the results are available in the awesome-pgo repo. Since PGO has helped in many cases, I think it would be a good idea to try optimizing OpenVMM by applying PGO to it.
I can suggest the following things to do:

We need to perform PGO benchmarks on OpenVMM. If it shows improvements - add a note about possible improvements to the documentation. Providing an easier way (e.g. a build option) to build scripts to build OpenVMM with PGO can be useful for the end-users too.
It will be a good idea to integrate building with PGO into your CI pipelines. In this case, users will get already PGO-optimized binaries from the website (if you are going to provide prebuilt binaries, of course)

For the Rust projects, I suggest trying to start with cargo-pgo.
Here you can find different materials about PGO: benchmarks in different software, examples of how PGO is already integrated with different projects, PGO support in multiple Rust compilers, and some PGO-related pieces of advice.
After PGO, I suggest evaluating the LLVM BOLT optimizer - it can give more aggressive optimizations even after PGO. However, starting with regular PGO will be easier to do.
I would be happy to answer all your questions about PGO!
P.S. It's just an improvement idea for the project. I created the Issue since Discussions are disabled for the repository.

Thanks for the pointers!
Yes, we probably could benefit from PGO, since the IO paths are often performance critical and (somewhat surprisingly) CPU bound. I am especially wondering if PGO will allow us to keep the hot paths optimized for speed while letting the colder paths be optimized for size. Binary size is important to us because in a paravisor configuration, each VM has its own copy of the binary in memory, and with lots of small VMs this can add up.
We found that optimizing the full binary for size reduced the size by a few megabytes, but it also reduced networking performance in our Azure Boost compatibility scenarios by a significant amount. So we're still optimizing the full binary for speed at the moment. Just optimizing specific crates for size didn't seem to help, for reasons I don't fully understand yet. Maybe PGO can help us split the difference.

I am especially wondering if PGO will allow us to keep the hot paths optimized for speed while letting the colder paths be optimized for size. Binary size is important to us because in a paravisor configuration, each VM has its own copy of the binary in memory, and with lots of small VMs this can add up.

Yep, PGO definitely can help with that! Actually, it's the main benefit of PGO: optimizing hot paths for speed (the most common thing - inline them harder) and optimizing cold paths for size (inline them less frequently).

We found that optimizing the full binary for size reduced the size by a few megabytes, but it also reduced networking performance in our Azure Boost compatibility scenarios by a significant amount. So we're still optimizing the full binary for speed at the moment. Just optimizing specific crates for size didn't seem to help, for reasons I don't fully understand yet. Maybe PGO can help us split the difference.

I am almost sure that the root of such behavior is inlining. Then you optimize for size, and the compiler tries to inline as little as possible. yes, it helps with the binary size optimization but each non-inlined function introduces an additional performance cost for calling such a function (call jump, miss I-cache if the called function is not in the I-cache right now). PGO can help with inlining "right" functions, and Post-Link Optimization (PLO) with tools like LLVM BOLT can help with reducing I-cache misses.


Fix indexer issue

From @jtyoung84: seems like ECS is not configured correctly.

@jtyoung84 The only remaining issue is that the indexer cannot write to aind-open-data. We should check the bucket policies.
dask.multiprocessing.ClientError: An error occurred (AccessDenied) when calling the PutObject operation: Access Denied
dask.multiprocessing.ClientError: An error occurred (AccessDenied) when calling the CopyObject operation: Access Denied

AWS docs:

https://docs.aws.amazon.com/AmazonS3/latest/userguide/example-walkthroughs-managing-access-example2.html
https://repost.aws/knowledge-center/s3-troubleshoot-copy-between-buckets
If the buckets are in different accounts, then set these permissions with both the bucket policy and your IAM identity's policies.
To copy objects that have object tags, your IAM identity must have s3:GetObjectTagging and s3:PutObjectTagging permissions.

@yosefmaru

Indexer permissions issue is now fixed.


[CLI] rancher 2 CLI select project by name at login, non interactive

Rancher versions:
Rancher CLI 2
Rancher 2.0.4
Setup details: (single node rancher vs. HA rancher, internal DB vs. external DB)
HA with multiple projects
Steps to Reproduce:
when trying to login on rancher, when there are multiple projects, the CLI ask us to enter, interactively, the project:
$ rancher login https://orchestrator.example.com -t token
NUMBER    CLUSTER NAME    PROJECT ID        PROJECT NAME   PROJECT DESCRIPTION
1         example-inc   c-kmxs4:p-np8qm   default
2         example-inc   c-kmxs4:p-w246f   another
Select a Project:

We can only select project using that number index. Trying to use the name or project ID fails.
There is no non-interactive way to setup the project.
Within a CI, where new environment is created on each run, we always do "first login" because we have no cli2.json file when booting environment. We tried the context flag, with no success:
$ rancher login https://orchestrator.example.com -t token --context another
FATA[0000] no configuration found, run `login`

$ rancher login https://orchestrator.example.com -t token --context c-kmxs4:p-w246f
FATA[0000] no configuration found, run `login`

So I guess the context flag is not usable at first login.
Problem
The fact is it prevents us to create a CD using the CLI because we have no way to provide the answer through CI runners. We could do echo 1 | rancher login ... but doing so we have to know the index instead of project name/id.
Knowing the index, instead of name/ID is really a bad thing, since adding more projects can make the index change. So it's not reliable. And even if the project name remains the same, we would have to reconfigure our CI variables with new index each time a project is added.
Is there any way to provide the project as an argument directly winting the login command, non-interactively and using name/id of the project we want to use?
Or even better, allow us, at project selection, to enter the project id or name.

I ran in the same problem. But it is possible to create the cli2.json itself programmatically which did the trick for me:
`#/bin/bash
mkdir ~/.rancher
echo "{
"Servers":
{
"rancherDefault":
{
"accessKey":"$ACCESS_KEY",
"secretKey":"$SECRET_KEY",
"tokenKey":"$ACCESS_KEY:$SECRET_KEY",
"url":"$ENDPOINT",
"project":"$PROJECT_ID",
"cacert":""
}
},
"CurrentServer":"rancherDefault"
}" > ~/.rancher/cli2.json
`
You still need the context for the login, but then it worked for me.
Though it would be really great to have a real fix for this.

Hi @n3or,
Thanks for the great solution. I thing writing the cli2.json file is actually a very clean solution. I put this into a separate image so it will not clutter up the CI file so much: https://github.com/ambient-innovation/rancher2-upgrade
In case of gitlab CI it can look like this:
deploy:
  stage: deploy
  image: ambientinnovation/rancher2-upgrade:v1.0.0
  variables:
    GIT_STRATEGY: none
  only:
    - develop
  script:
    - /usr/local/bin/docker-entrypoint.sh # Creates the cli2.json with authentication data
    - /usr/local/bin/upgrade.sh default website # Triggers the actual upgrade

I am glad for all annotations or contributions to this. Thanks again for pointing to this solution.

Available with v2.0.4-rc2

Thanks @deniseschannon will give it a try today!

Tested using CLI rancher-v2.0.4-rc2 on master. The setup had two clusters.
Selecting the project using --context project id during login works .
rancher-v2.0.4-rc2 soumya$ ./rancher login https://<IP_ADDRESS>/ --token token-wsw6j:h9cx6xlswt2s8kw7nhlxlpr28wcsslj67x7xvlt927dszmv7pzp9b8 --context c-9d2g8:p-nltqt

Accessing resources(nodes/workloads) from the project was done correctly.
Selecting the project using project id does not work, which is tracked here:
https://github.com/rancher/rancher/issues/14897

Hi @soumyalj
when I try your piece of code I'll always get this error:
time="2018-11-08T07:49:41Z" level=fatal msg="no configuration found, run login"
Any ideas what I might be doing wrong?
Best

When is it planned to get the version 2.0.4 to dockerhub? Thanks :)


Proper way to test python code in docstrings?

I use python built-in doctest module, which works with the following format
>>> 1 + 2
3

To make this work with mkdocs, I need to coonvert this example into
```python
>>> 1 + 2
3

```

note that besides triple quotes I need to add an empty line.

So long as the fenced_code extension is enabled, I don't see any problems here, with or without the blank line.
>>> import markdown
>>> src = '''
... ```python
... >>> 1  + 2
... 3
... ```
... '''
>>> print(markdown.markdown(src, extensions=['fenced_code']))

>>> 1  + 2
3

Could you please provide the HTML you are getting and the HTML you are expecting?

Here is an example:
mod.py
def f():
       '''
       This is a test function. In python you use doctests to test fragments of code in strings.
       This example works and checked:
       >>> 1 + 2
       3

       We use mkdocs to generate documentation (so we use fences for code). Maybe that's not the right way,
       but I didn't find a better way

       We will also use doctests to test code in the documentation.
       All examples below fails because ``` is considered a part of output

       ```python
       >>> 1 + 2
       ```

       ```python
       >>> 1 + 2
       3
       ```

       ```python
       >>> x = "this code outputs nothing, just an example"
       ```

       '''
       pass

test.py
import doctest

import mod
doctest.testmod(mod)

After python test.py you will see
python test.py
**********************************************************************
File "/Users/axelr/Downloads/example_doctest/mod.py", line 16, in mod.f
Failed example:
    1 + 2
Expected:
    ```
Got:
    3
**********************************************************************
File "/Users/axelr/Downloads/example_doctest/mod.py", line 20, in mod.f
Failed example:
    1 + 2
Expected:
    3
    ```
Got:
    3
**********************************************************************
File "/Users/axelr/Downloads/example_doctest/mod.py", line 25, in mod.f
Failed example:
    x = "this code outputs nothing, just an example"
Expected:
    ```
Got nothing
**********************************************************************
1 items had failures:
   3 of   4 in mod.f
***Test Failed*** 3 failures.

While rendering is correct, I don't see a way to use it (as a part of mkdocs) with testing. Ideas?

I'm sorry, but I thought you were reporting a rendering error by Markdown. Testing your own code is out-of-scope for discussion here. I would suggest asking on a general purpose forum.


[SPARK-30103][SQL] Consolidate Schema merge logic

While working at https://github.com/apache/spark/pull/26644 I've noticed something strange in behavior.
https://github.com/apache/spark/pull/26644 focusses on merging UserDefinedTypes into Spark's native types. Delta checks if the schema is still compatible, so as an integration test I tried to union two DF's, where one has a UserDefinedTypes, which should then be merged into a native type. To mimic this, I've used an union there, because we don't have the Delta extension, and Spark does not check schema compatibility on write, so it is impossible to reproduce the situation that we've observed with Delta.
However, when Delta checks compatibility, it merges the schema using the StructType.merge(), and when Spark checks compatibility, it uses the TypeCoercion:
https://github.com/apache/spark/blob/master/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/CheckAnalysis.scala#L314-L323
Since this is complex code, I think we should merge these two to get similar behavior. Curious what your opinion is on this, and why these so similar functions are kept separately.
https://jira.apache.org/jira/browse/SPARK-30103
What changes were proposed in this pull request?
Removing the StructType.merge(), and use TypeCoercion.findTightestCommonType() instead. The one in TypeCoercion looks more complete.

Why are the changes needed?
To simplify the codebase, and consolidate the behavior of merging schemas.

Does this PR introduce any user-facing change?
Not in UI/Console, possibly in behavior.

How was this patch tested?
Existing unit tests,

Can one of the admins verify this patch?

Can one of the admins verify this patch?

I found the difference, the .merge() will actually take the union of the schema's, while the TypeCoercion.findTightestCommonType() will only modify the types.


koord-descheduler: fix descheduler log

Ⅰ. Describe what this PR does
fix descheduler prod usage log
Ⅱ. Does this pull request fix one issue?
Ⅲ. Describe how to verify it
Ⅳ. Special notes for reviews
V. Checklist

[ ] I have written necessary docs and comments
[ ] I have added necessary unit tests and integration tests
[ ] All checks passed in make test

/lgtm
@hormes PTAL


Using custom identity claim for authorization fails to retrieve related objects.

Before opening, please confirm:

[X] I have searched for duplicate or closed issues and discussions.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.

JavaScript Framework
Vue
Amplify APIs
GraphQL API
Amplify Version
v6
Amplify Categories
api
Backend
Amplify Gen 2 (Preview)
Environment information

System:
    OS: Linux 6.8 Ubuntu 24.04.1 LTS 24.04.1 LTS (Noble Numbat)
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 21.85 GB / 31.18 GB
    Container: Yes
    Shell: 5.2.21 - /bin/bash
  Binaries:
    Node: 20.17.0 - ~/.nvm/versions/node/v20.17.0/bin/node
    Yarn: 1.22.22 - ~/.nvm/versions/node/v20.17.0/bin/yarn
    npm: 10.8.2 - ~/.nvm/versions/node/v20.17.0/bin/npm
  Browsers:
    Brave Browser: <IP_ADDRESS>
  npmGlobalPackages:
    corepack: 0.29.3
    http-server: 14.1.1
    npm: 10.8.2
    ts-node: 10.9.2
    typescript: 5.6.2
    uuid: 10.0.0
    yarn: 1.22.22

Describe the bug
Using custom identity claim for authorization fails to retrieve related objects.
https://docs.amplify.aws/vue/build-a-backend/data/customize-authz/configure-custom-identity-and-group-claim/
When calling API for each separate everything works as expected, but when I query
await client.models.Class.list({
  selectionSet: ["id", "name", "school.*"],
})

API returns  "Not Authorized to access school on type Class.".
When authenticated user is teacher it works as expected and school object is returned
Expected behavior
return related object
Reproduction steps

Setup relation between models
Add authorization with custom identity claim
Query with relation

Code Snippet
School: a
.model({
  name: a.string().required(),
  teachers: a.id().array(),
  classes: a.hasMany("Class", "schoolId"),
})
.authorization((allow) => [
  allow.groupDefinedIn("id").withClaimIn("read_schools"),
  allow.ownersDefinedIn("teachers"),
]),
Class: a
.model({
  schoolId: a.id().required(),
  name: a.string().required(),
  teacher: a.id().required(),
  school: a.belongsTo("School", "schoolId"),
})
.authorization((allow) => [
  allow.groupDefinedIn("schoolId").withClaimIn("read_schools"),
  allow.ownerDefinedIn("teacher"),
]),

.....
export const data = defineData({
  name: "schools",
  schema,
  authorizationModes: {
    defaultAuthorizationMode: "userPool",
  },
});

Log output

// Put your logs below this line

aws-exports.js
No response
Manual configuration
No response
Additional configuration
No response
Mobile Device
No response
Mobile Operating System
No response
Mobile Browser
No response
Mobile Browser Version
No response
Additional information and screenshots
No response

Hi @masarliev 👋 thanks for raising this issue. After reproducing, it seems to be an issue with the way the VTL resolver is generated. I've transferred this to the amplify-category-api repo for better support.

Could you also share an example of what the claim looks like on the token? Just want to be certain whether read_schools is a string with a single value or an array of values.

I don't have the code now, but read_schools is array of school ID

@masarliev after discussing with the team, it seems this issue might be related to a known issue with the way values are parsed from claims.
Can you take a look at this and see if it fits the behavior you're observing?
https://github.com/aws-amplify/amplify-category-api/issues/65#issuecomment-1129352104

It seems to be same issue,  but I don't receive null value, but error. I also noticed that it's the same with groups and I suspect the problem is only when primary key is used as groupDefinedIn. If I use dedicated field ( let's say tenantId) it works as expected


Why aren't the tests picking up errors that are introduced by the latest @angular/*?

I'm submitting a ...  (check one with "x")
[x ] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see use [gitter](https://gitter.im/mgechev/angular2-seed) or [stackoverflow](https://stackoverflow.com/questions/tagged/angular2)

Current behavior

Clone repo and run npm run build.prod
Expected behavior

The project Would build Just fine
Minimal reproduction of the problem with instructions

What is the motivation / use case for changing the behavior?

Please tell us about your environment:

Windows 10, Vscode

Angular Seed Version: 2.0.X

Node: node --version =

What errors should the build pick?

What I mean is that because angular 2.1.1 was causing errors, at least from what I gathered.  Shouldn't these have been picked up by the builds. Unless the dependencies were cached meaning that the version on angular was the previous one, which worked just fine.  Sorry for the long explanation.

The errors with the AoT compiler are fixed now so the problems are no longer reproducible :-).

I was thinking that this would be a preventive measure to catch regressions in the future.

A good way to prevent them is to change Angular's version to a specific version (i.e. 2.1.1 instead of ~2.1.1) and on each release run a set of tests. This seems to work so I'll consider it for future versions.


Trigger for one of the warnings seems to be misconfigured

Hi,
One of the warnings in the latest Shift Selector version seems to be too sensitive.
Here is the code fragment that I'm talking about:
useEffect(() => {
    if (shiftValues.length && shiftOptions?.options && !closedAlerts.includes(1)) {
      const shiftGroupUUIDs: { [key: string]: number } = shiftValues.reduce((res: any, { text }: { text: string }) => {
        const [, shiftGroupUUID] = text.split('|');
        return {
          ...res,
          [shiftGroupUUID]: res[shiftGroupUUID] ? ++res[shiftGroupUUID] : 1,
        };
      }, {});
      const shiftOptionsCount = Object.values(shiftGroupUUIDs).reduce((acc: number, d: number): number => acc + d, 0);

      if (shiftOptionsCount !== shiftOptions.options.length) {
        if (shiftOptions.options.length > 1) {
          return setAlertHandler({
            id: 1,
            type: 'brandWarning',
            text:
              'Warning! You are missing shifts because some shiftnames are not unique. Please make sure all shifts have unique names!',
          });
        } else {
          return setAlertHandler({
            id: 1,
            type: 'brandWarning',
            text: 'Warning! No shifts available. Please check your shift options variable.',
          });
        }
      }

      if (alerts.find(({ id }) => id === 1)) {
        resetAlert(1);
      }
    }
  }, [closedAlerts, alerts, shiftOptions, shiftValues, resetAlert, setAlertHandler]);

Let's focus on the first "if" condition. In case of more than one shift group configured in the database, this warning triggers all the time. For example, I have more than one instance of Grafana with completely different shiftGroupUUID's. For each shiftGroupUUID I have 3 shifts configured with the name e.g. "morning", "afternoon", "night". Of course, there should be something that will secure us from duplicating shift names in the same shiftGroupUUID (that's important), but for me there is a big discrepancy between the description of this warning and the condition that must be met.
There should be some function/effect that will check whether shift names are unique in the same shiftGroupUUID. For now, this "if" condition checks if there is more than one shiftGroupUUID (if I understand this code fragment correctly) and then if it meets the condition in which there is more than one - warning is triggered with a description, which for me doesn't indicate the checked condition.

Hi @mazurp03, I tested it with the following data. Are you getting this issue with the latest 0.1.4 release? I'm asking because I am not getting any warnings about duplicate shifts in different shift groups.

{
    "static": {
        "shifts": [
            {
                "group": "Group 1 eg. Summer",
                "group_uuid": "uuid_1",
                "uuid": "shift_uuid_11",
                "label": "Morning Custom",
                "startTime": "06:01:00",
                "endTime": "14:00:00",
                "order": 1
            },
            {
                "group": "Group 1 eg. Summer",
                "group_uuid": "uuid_1",
                "uuid": "shift_uuid_12",
                "label": "Afternoon Custom",
                "startTime": "14:01:00",
                "endTime": "19:37:00",
                "order": 2
            },
            {
                "group": "Group 1 eg. Summer",
                "group_uuid": "uuid_1",
                "uuid": "shift_uuid_13",
                "label": "Night Custom",
                "startTime": "19:38:00",
                "endTime": "06:00:00",
                "order": 3
            },
            {
                "group": "Group 2 eg. Winter",
                "group_uuid": "uuid_2",
                "uuid": "shift_uuid_21",
                "label": "Morning Custom",
                "startTime": "06:01:00",
                "endTime": "14:00:00",
                "order": 1
            },
            {
                "group": "Group 2 eg. Winter",
                "group_uuid": "uuid_2",
                "uuid": "shift_uuid_22",
                "label": "Afternoon Custom",
                "startTime": "14:01:00",
                "endTime": "19:37:00",
                "order": 2
            },
            {
                "group": "Group 2 eg. Winter",
                "group_uuid": "uuid_2",
                "uuid": "shift_uuid_23",
                "label": "Night Custom",
                "startTime": "19:38:00",
                "endTime": "06:00:00",
                "order": 3
            }
        ]
    }
}

Hi @isaozler ,
To jump on this, got the same warning. Using the Filter setup. When a line is selected the actual data returns a unique dataset. But without it there is indeed multiple values with the same name.
The validation appears to not take the filter into account correctly?

Hi @isaozler ,
To jump on this, got the same warning. Using the Filter setup. When a line is selected the actual data returns a unique dataset. But without it there is indeed multiple values with the same name.
The validation appears to not take the filter into account correctly?

I see, will check this 👍

@isaozler Found something already?

@mazurp03 Could you check this branch to see if this fixes your issue?
https://github.com/isaozler/grafana-shift-selector/tree/fix/v10

With the release of 0.1.6, you can retrieve all shifts without being filtered by Grafana.
Firstly, you should concatenate the shift labels with the shift group.
https://github.com/isaozler/grafana-shift-selector/assets/1378630/5c4204a3-ef6c-40d5-b5a3-73eba997d5b5
Secondly, the trim feature should be enabled in the data mapper props panel.
https://github.com/isaozler/grafana-shift-selector/assets/1378630/ebfeeeee-91a5-4245-97a5-107abc865aa3

Hi Isa,
I've tested your solution and for more than one shift group it works fine, but in case of extracting one shift group from all available ones, the problem still occurs.
Before extraction:

Query:

And SS settings:

After extraction:

Query (added "where" clause to extract one uuid that I'm interested in):

And SS settings are exactly the same as before extraction.

Thanks, @mazurp03. I will have a look at it. These settings will be much easier to configure in the new major update.


pyusb dependency failing

Hi,
I've had some reports that the pyusb dependency is failing to install on Linux (Ubuntu 14.04.2 LTS, pip 1.5.6, python 2.7.6)
 Could not find a version that satisfies the requirement pyusb (from pyOCD>=0.3,<1.0->valinor>=0.0.0,<1.0->yotta) (from versions: 1.0.0a2, 1.0.0a2, 1.0.0a3, 1.0.0a3, 1.0.0b1, 1.0.0b2)
  Some externally hosted files were ignored (use --allow-external to allow).

It isn't obvious to me why this is. It's possible that pip isn't liking the non-semantic versions that pyusb has. pip does seem to be extremely old on this system...

Hi @autopulated , I had this same problem.  Even with an updated version of pip, the command "pip install pyusb" fails on Ubuntu.  I was able to get pyusb to install by specifying the version explicitly " pip install pyusb==1.0.0b2".

This should be resolved in the v0.5.x.


WIP: Feature/ssh server config

WIP: for reference only, omnect-device-service repo path is not correct yet.

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


Update to 3.3.5

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

LGTM. Any other thoughts?

LGTM also, merging.

Also would be happy to have you on board if you wish to be a maintainer, @jschueller . 😉

@jakirkham https://github.com/conda-forge/fftw-feedstock/pull/15


Alarm composite rule not working

Please answer these questions before submitting your issue.

Why do you submit this issue?
[ X] Question or discussion
[ ] Bug
[ ] Requirement
[ ] Feature or performance improvement

Question
Sorry for repeated question , was trying so many combinations to get it working. But there is some problem and not getting the composite alarms. ( Tried with only-as-condition: true)
Configuration File skywalking 8.3
rules:
Rule unique name, must be ended with _rule.
service_instance_resp_time_rule:
metrics-name: service_instance_resp_time
op: ">"
threshold: 10
period: 3
count: 1
only-as-condition: false
message: service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1
service_instance_jvm_cpu_alert_rule:
metrics-name: instance_jvm_cpu
op: ">"
threshold: 10
period: 3
count: 1
only-as-condition: false
message: service_instance_jvm_cpu is more than 20% in 1 time  in last 3  minutes Message2
composite-rules:
comp_rule:
expression: service_instance_resp_time && service_instance_jvm_cpu_alert_rule
message: Both Service Response and Cpu are high Message4
Individual Alert -
On service_instance_resp_time  for Period: 3 count: 1
| name                                | start_time    | alarm_message                                                                                | time_bucket    |
+-------------------------------------+---------------+----------------------------------------------------------------------------------------------+----------------+
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>431 | service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1 |<PHONE_NUMBER>1237 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1 |<PHONE_NUMBER>1617 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1 |<PHONE_NUMBER>2017 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1 |<PHONE_NUMBER>2417 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_resp_time time is more than 10ms in 1  minutes of last   3 minutes Message1 |<PHONE_NUMBER>2817 |
On JVM CPU
mysql> select name , start_time , alarm_message , time_bucket from alarm_record where name like '%core_perf.service%' and alarm_message like '%Message2%';
+-------------------------------------+---------------+----------------------------------------------------------------------------------+----------------+
| name                                | start_time    | alarm_message                                                                    | time_bucket    |
+-------------------------------------+---------------+----------------------------------------------------------------------------------+----------------+
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_jvm_cpu is more than 20% in 1 time  in last 3  minutes Message2 |<PHONE_NUMBER>1417 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_jvm_cpu is more than 20% in 1 time  in last 3  minutes Message2 |<PHONE_NUMBER>1817 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_jvm_cpu is more than 20% in 1 time  in last 3  minutes Message2 |<PHONE_NUMBER>2217 |
| "CORE SERVICE" of core_perf.service |<PHONE_NUMBER>428 | service_instance_jvm_cpu is more than 20% in 1 time  in last 3  minutes Message2 |<PHONE_NUMBER>2617 |
+-------------------------------------+---------------+----------------------------------------------------------------------------------+----------------+
But I am not getting the composite alarm
Both Service Response and CPU are high Message4.  if you need more information I will provide other combinations also.
Kindly help.
Thanks and Regards,
Jayesh Muley

Please don't report the duplicated issue,  you could continue your question on https://github.com/apache/skywalking/issues/6370


use Lorenz example for unit tests

Since the example using the Lorenz system in examples.py has reference values for all major nolds algorithms, it would be great to use those in the unit tests.
To-Do

[x] Add Lorenz test for sampen.
[x] Add Lorenz test for corr_dim.
[x] Add Lorenz test for lyap_r.
[x] Add Lorenz test for lyap_e.
[x] Add Lorenz test for hurst_rs.
[x] Add Lorenz test for dfa.

This is done, save for a bit of documentation.


pandas-profiling Profile Report

I've been getting an error with 1-data_loading_cleanup_processing.ipynb:
In:
profile = ProfileReport(df.copy(), title='Pandas Profiling Report of Cp dataset', html={'style':{'full_width':True}})
profile.to_widgets()

Out:
KeyError: 'Requested level (var1) does not match index name (None)'

Upgrading the pandas-profiling version to 2.8.0 via pip install pandas-profiling --upgrade seems to have fixed this.
Note: before upgrading, pip freeze gives pandas-profiling==2.4.0.
Full trace:
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-5-1fa856a2164e> in <module>
----> 1 profile = ProfileReport(df.copy(), title='Pandas Profiling Report of Cp dataset', html={'style':{'full_width':True}})
      2 profile.to_widgets()

~\anaconda3\envs\bestpractices\lib\site-packages\pandas_profiling\__init__.py in __init__(self, df, minimal, config_file, **kwargs)
     67
     68         # Get dataset statistics
---> 69         description_set = describe_df(df)
     70
     71         # Build report structure

~\anaconda3\envs\bestpractices\lib\site-packages\pandas_profiling\model\describe.py in describe(df)
    535
    536     # Get correlations
--> 537     correlations = calculate_correlations(df, variables)
    538
    539     # Transform the series_description in a DataFrame

~\anaconda3\envs\bestpractices\lib\site-packages\pandas_profiling\model\correlations.py in calculate_correlations(df, variables)
    191                     # Get the Phi_k sorted order
    192                     current_order = (
--> 193                         correlations["phi_k"].index.get_level_values("var1").tolist()
    194                     )
    195

~\anaconda3\envs\bestpractices\lib\site-packages\pandas\core\indexes\base.py in _get_level_values(self, level)
   1477         Index(['a', 'b', 'c'], dtype='object')
   1478         """
-> 1479         self._validate_index_level(level)
   1480         return self
   1481

~\anaconda3\envs\bestpractices\lib\site-packages\pandas\core\indexes\base.py in _validate_index_level(self, level)
   1414         elif level != self.name:
   1415             raise KeyError(
-> 1416                 f"Requested level ({level}) does not match index name ({self.name})"
   1417             )
   1418

KeyError: 'Requested level (var1) does not match index name (None)'

Hey @sgbaird, thanks for noticing this, and sorry for the late response!
I will look into this, and if necessary I will update the environment file 🙂

I just took a look, and it worked for me from a fresh pull of the master branch:
print(pandas_profiling.__version__)

2.4.0
Did you create your Python environment using anaconda and the steps as described in readme? Or did you use pip? @sgbaird

It's been a month and I haven't gotten a response regarding this issue. So I'll close this issue for now. Let me know if you still face the problem! @sgbaird


Ammonite-REPL doesn't work on Windows

In my Windows 8.1 VM, compiling causes scalac to StackOverflow without any useful error message.
Trying to run the pre-compiled executable results in a "missing class java.lang.Object in mirror..." crash, indicating a classpath problem.

Would be nice if someone with a real windows machine/experience could dig into these and fix them

Apparently it's giving problems in cygwin too
$ curl -L -o amm https://git.io/vO6Lo; chmod +x amm; ./amm
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
100   406    0   406    0     0    401      0 --:--:--  0:00:01 --:--:--   401
100 29.3M  100 29.3M    0     0   444k      0  0:01:07  0:01:07 --:--:--  570k
Loading Ammonite Repl...
Exception in thread "main" scala.reflect.internal.MissingRequirementError: object java.lang.Object in compiler mirror not found.
        at scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
        at scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
        at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
        at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
        at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:45)
        at scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:66)
        at scala.reflect.internal.Mirrors$RootsBase.getClassByName(Mirrors.scala:102)
        at scala.reflect.internal.Mirrors$RootsBase.getRequiredClass(Mirrors.scala:105)
        at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass$lzycompute(Definitions.scala:257)
        at scala.reflect.internal.Definitions$DefinitionsClass.ObjectClass(Definitions.scala:257)
        at scala.reflect.internal.Definitions$DefinitionsClass.init(Definitions.scala:1394)
        at scala.tools.nsc.Global$Run.<init>(Global.scala:1215)
        at ammonite.repl.interp.Compiler$$anon$4.<init>(Compiler.scala:142)
        at ammonite.repl.interp.Compiler$.apply(Compiler.scala:120)
        at ammonite.repl.interp.Interpreter.init(Interpreter.scala:225)
        at ammonite.repl.interp.Interpreter.<init>(Interpreter.scala:265)
        at ammonite.repl.Repl.<init>(Repl.scala:28)
        at ammonite.repl.Repl$.repl$1(Repl.scala:138)
        at ammonite.repl.Repl$.run(Repl.scala:146)
        at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:130)
        at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:130)
        at scala.Option.foreach(Option.scala:257)
        at ammonite.repl.Repl$.main(Repl.scala:130)
        at ammonite.repl.Repl.main(Repl.scala)

I get the identical problem above on two different machines that have Cygwin

Strange thing is it worked on cygwin last I tried; I really need to set up CI for this =/ otherwise I'll keep breaking it

Setting up appveyor is quite straightforward, see https://github.com/sbt/sbt-native-packager/blob/master/appveyor.yml or https://github.com/alexarchambault/coursier/blob/master/appveyor.yml.
(I would have liked to help on this issue, but I don't have anymore access to the Windows machines I was using :-|)

@alexarchambault thanks for the pointers to the examples! I spent about an hour fiddling with it before giving up last time, will give it a shot

@lihaoyi Just struck me: I solved that at some point (a long time ago), I had to use File.pathSeparator here, instead of a hardcoded ":" :-)

Ahhh cool! I'll do that and try it in my ModernIE VM to see if it goes away.
I remember you told me the exact same thing before, and I thought I fixed it, but I guess I didn't

Did I? I must have forgotten that too then :-)

I pushed a fix so trunk at least runs, and works great with colors turned off:

repl.colors() = ammonite.repl.Colors.BlackWhite

repl.frontEnd() = ammonite.repl.frontend.FrontEnd.JLineWindows

implicit val pprintConfig = pprint.Config.Defaults.PPrintConfig

Still some funniness around the terminals unfortunately =/ Probably will need a real windows user to put in the effort to make this works for reals

As of ammonite 0.4.7, it crashes on my machine with
Loading...
Welcome to the Ammonite Repl 0.4.7
(Scala 2.11.7 Java 1.8.0_51)
bash: /dev/tty: No such device or address
bash: /dev/tty: No such device or address
Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 1
        at scala.sys.package$.error(package.scala:27)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
        at ammonite.terminal.TTY$.stty(Utils.scala:78)
        at ammonite.terminal.TTY$.init(Utils.scala:57)
        at ammonite.terminal.TermCore$.x$6$lzycompute$1(TermCore.scala:230)
        at ammonite.terminal.TermCore$.x$6$1(TermCore.scala:230)
        at ammonite.terminal.TermCore$.initialConfig$lzycompute$1(TermCore.scala:230)
        at ammonite.terminal.TermCore$.initialConfig$1(TermCore.scala:230)
        at ammonite.terminal.TermCore$.readLine(TermCore.scala:240)
        at ammonite.repl.frontend.AmmoniteFrontEnd.readLine(AmmoniteFrontEnd.scala:114)
        at ammonite.repl.frontend.AmmoniteFrontEnd.action(AmmoniteFrontEnd.scala:25)
        at ammonite.repl.Repl.action(Repl.scala:45)
        at ammonite.repl.Repl.loop$1(Repl.scala:78)
        at ammonite.repl.Repl.run(Repl.scala:96)
        at ammonite.repl.Repl$.run(Repl.scala:195)
        at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:159)
        at ammonite.repl.Repl$$anonfun$main$1.apply(Repl.scala:158)
        at scala.Option.foreach(Option.scala:257)
        at ammonite.repl.Repl$.main(Repl.scala:158)
        at ammonite.repl.Repl.main(Repl.scala)

After replacing default front end to FrontEnd.JLineWindows in Repl.scala it works properly within sbt repl/run
Arrow keys work in stand-alone ammonite repl if you use jline.AnsiWindowsTerminal in JLineWindows frontend. However escape characters are displayed instead of some colors.
I'm using windows 7 64 bit, java8u51. I've tested this inside native windows console (cmd.exe). I also have cygwin installed.

Just tried 0.5.1 in Cygwin (64-bit)
Loading...
Welcome to the Ammonite Repl 0.5.1
(Scala 2.11.7 Java 1.8.0_66)
bash: /dev/tty: No such device or address
bash: /dev/tty: No such device or address
Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 1
        at scala.sys.package$.error(package.scala:27)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
        at ammonite.terminal.TTY$.stty(Utils.scala:85)
        at ammonite.terminal.TTY$.init(Utils.scala:64)
        at ammonite.terminal.TermCore$.x$6$lzycompute$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.x$6$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.initialConfig$lzycompute$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.initialConfig$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.readLine(TermCore.scala:254)
        at ammonite.repl.frontend.AmmoniteFrontEnd.readLine(AmmoniteFrontEnd.scala:110)
        at ammonite.repl.frontend.AmmoniteFrontEnd.action(AmmoniteFrontEnd.scala:25)
        at ammonite.repl.Repl.action(Repl.scala:46)
        at ammonite.repl.Repl.loop$1(Repl.scala:79)
        at ammonite.repl.Repl.run(Repl.scala:97)
        at ammonite.repl.Main$.run(Main.scala:135)
        at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:82)
        at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:81)
        at scala.Option.foreach(Option.scala:257)
        at ammonite.repl.Main$.main(Main.scala:81)
        at ammonite.repl.Main.main(Main.scala)

This is unfortunate, I really wanted to try this :disappointed:.
My error output looks a bit different (mingw):
Loading...
Welcome to the Ammonite Repl 0.5.2
(Scala 2.11.7 Java 1.8.0_60)
Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 127
        at scala.sys.package$.error(package.scala:27)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
        at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
        at ammonite.terminal.TTY$.consoleDim(Utils.scala:61)
        at ammonite.terminal.TTY$.init(Utils.scala:66)
        at ammonite.terminal.TermCore$.x$6$lzycompute$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.x$6$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.initialConfig$lzycompute$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.initialConfig$1(TermCore.scala:244)
        at ammonite.terminal.TermCore$.readLine(TermCore.scala:254)
        at ammonite.repl.frontend.AmmoniteFrontEnd.readLine(AmmoniteFrontEnd.scala:110)
        at ammonite.repl.frontend.AmmoniteFrontEnd.action(AmmoniteFrontEnd.scala:25)
        at ammonite.repl.Repl.action(Repl.scala:46)
        at ammonite.repl.Repl.loop$1(Repl.scala:79)
        at ammonite.repl.Repl.run(Repl.scala:97)
        at ammonite.repl.Main$.run(Main.scala:135)
        at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:82)
        at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:81)
        at scala.Option.foreach(Option.scala:257)
        at ammonite.repl.Main$.main(Main.scala:81)
        at ammonite.repl.Main.main(Main.scala)

consoleDim?

@avakhrenev @mnn you need to tweak your predef as I described on Aug 16, 2015 (see above) to make this stand a chance of working at all. Note that it's still buggy, and is not in CI so is probably broken by now, but at least last I tried ~6 months ago it made something work without immediately crashing due to the error messages you two are seeing

@lihaoyi After changing the predef REPL started alright ^_^. But you are right, it's a bit buggy. For example ls! seems to be crashing on same issue REPL did before the change.
c:\Users\xxx\amm>java -jar amm
Loading...
Welcome to the Ammonite Repl 0.5.2
(Scala 2.11.7 Java 1.8.0_60)
xxx-amm@ ls!
res0: LsSeq =
java.lang.RuntimeException: Nonzero exit value: 127
        scala.sys.package$.error(package.scala:27)
        scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
        scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
        ammonite.terminal.TTY$.consoleDim(Utils.scala:61)
        ammonite.repl.frontend.FrontEndUtils$.width(FrontEndUtils.scala:13)
        ammonite.shell.PPrints$$anonfun$lsSeqRepr$1$$anonfun$apply$1.apply(ShellSession.scala:43)
        ammonite.shell.PPrints$$anonfun$lsSeqRepr$1$$anonfun$apply$1.apply(ShellSession.scala:43)
        scala.collection.Iterator$JoinIterator.rhs$lzycompute(Iterator.scala:192)
        scala.collection.Iterator$JoinIterator.rhs(Iterator.scala:192)
        scala.collection.Iterator$JoinIterator.hasNext(Iterator.scala:193)
        scala.collection.Iterator$JoinIterator.hasNext(Iterator.scala:193)
        scala.collection.Iterator$JoinIterator.hasNext(Iterator.scala:193)
        scala.collection.Iterator$$anon$12.hasNext(Iterator.scala:396)
        scala.collection.Iterator$class.foreach(Iterator.scala:742)
        scala.collection.AbstractIterator.foreach(Iterator.scala:1194)
        ammonite.repl.Repl$$anonfun$action$4$$anonfun$apply$2$$anonfun$apply$3.apply(Repl.scala:60)
        ammonite.repl.Repl$$anonfun$action$4$$anonfun$apply$2$$anonfun$apply$3.apply(Repl.scala:60)
        ammonite.repl.interp.Evaluator$$anon$1$$anonfun$processLine$1$$anonfun$apply$10$$anonfun$apply$13$$anonfun$apply$15$$anonfun$apply$16$$anonfun$apply$1.apply$mcV$sp(Evaluator.scala:235)

xxx-amm@

It seems there's only a problem with output, after converting it to a List it gives right results.
xxx-amm@ (ls!).toList
res17: List[Path] = List(root/'Users/'xxx/'amm/'amm, root/'Users/'xxx/'amm/'hello, root/'Users/'xxx/'amm/'test)

I have tested everything in Shell Basics section and only LsSeq seems to be broken.

I'd guess the tabulate function that LsSeq uses is making use of shell-primitives to get the width and adjust the tabulation accordingly. That will need to be stubbed out. I'm surprised the other stuff actually worked!
There's a lot of hidden dependencies on the POSIX/Bash/Unix shell scattered throughout the program. Solving this would involve extracting them into a single place and letting us swap in Windows versions of all the functionality.
More important, I think, would be for someone to set up Windows CI so we can make sure any fixes don't regress as @mnn was (rightly) worried about

Ammonite-Ops now works on Windows, so that's one step forward. I also set up Windows CI in https://ci.appveyor.com/project/lihaoyi/ammonite
If anyone wants to take a crack at this, I'd be glad to walk you through

If the new Windows 10 Ubuntu stuff turns out well we may not have to do this at all!

Have the same issue on WIn7 and Cygwin
      C:\Users\yuri.zelikov\devroot>java -jar amm
 Loading...
 Welcome to the Ammonite Repl 0.5.7
 (Scala 2.11.8 Java 1.8.0_77)
 /usr/bin/bash: /dev/tty: No such device or address
 /usr/bin/bash: /dev/tty: No such device or address
 Exception in thread "main" java.lang.RuntimeException: Nonzero exit value: 1
 at scala.sys.package$.error(package.scala:27)
 at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
 at scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
 at ammonite.terminal.TTY$.stty(Utils.scala:118)
 at ammonite.terminal.TTY$.init(Utils.scala:97)
 at ammonite.terminal.Terminal$.x$7$lzycompute$1(Terminal.scala:299)
 at ammonite.terminal.Terminal$.x$7$1(Terminal.scala:299)
 at ammonite.terminal.Terminal$.initialConfig$lzycompute$1(Terminal.scala:299)
 at ammonite.terminal.Terminal$.initialConfig$1(Terminal.scala:299)
 at ammonite.terminal.Terminal$.readLine(Terminal.scala:309)
 at ammonite.repl.frontend.AmmoniteFrontEnd.readLine(AmmoniteFrontEnd.scala:117)
 at ammonite.repl.frontend.AmmoniteFrontEnd.action(AmmoniteFrontEnd.scala:27)
 at ammonite.repl.Repl.action(Repl.scala:55)
 at ammonite.repl.Repl.loop$1(Repl.scala:88)
 at ammonite.repl.Repl.run(Repl.scala:106)
 at ammonite.repl.Main$.run(Main.scala:136)
 at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:87)
 at ammonite.repl.Main$$anonfun$main$2.apply(Main.scala:85)
 at scala.Option.foreach(Option.scala:257)
 at ammonite.repl.Main$.main(Main.scala:85)
 at ammonite.repl.Main.main(Main.scala)

 C:\Users\yuri.zelikov\devroot>

There is a workaround.
Add this to your build.sbt
{
  if (OS.isWindows)
    initialCommands in (Test, console) += s"""ammonite.repl.Repl.run("repl.frontEnd() = ammonite.repl.frontend.FrontEnd.JLineWindows");"""
  else if (OS.isLinux)
    initialCommands in (Test, console) += s"""ammonite.repl.Repl.run("");"""
  else
    initialCommands in (Test, console) += s""""""
}

OS.isWindows and OS.isLinux is a method writing by yourself.

FWIW, if you want to check mac windows there's scala.util.Properties.isMac scala.util.Properties.isWin
There doesn't appear to be one for Linux, I guess that's just the "everything else" case :P

Thanks to @coderabhishek's efforts, the vast bulk of Ammonite's tests are now passing in our Windows CI in the latest published snapshot artifact. http://www.lihaoyi.com/Ammonite/master/#Ammonite-REPL. If you want to run scripts using Ammonite's script-running functionality on windows, it should just work.
The last stretch is getting some semblance of the REPL working automatically on windows. This can be done in two steps:

Make windows default to the JLineFrontEnd and Colors.BlackWhite; if we can't make the fancy stuff work, at least the non-fancy stuff should still be there. There are probably some bugs that will need to be fixed to make it work flawlessly, but I doubt it'll be a lot of work

Make the fancy AmmoniteFrontEnd work on windows, possibly using Jansi or similar to translate the color codes over

I don't have the time to work on either of these myself, but if someone wants to take up this cup I'll gladly help.

I've tried ammonite repl on windows at MSYS2+ConEmu. Colors works fine (no need for setting Collors.BlackWhite). We still has problems with stty+/dev/tty, but that need to be fixed either via migrating to the jline3 or using something like jansi/lanterna/...

The shell works correctly on the latest  Windows Subsystem for Linux (WSL) , tested with oracle-java8 and Scala 2.11.8. It's not too bad, although the limitations of WSL make it a bit less then optimal ( you can't run windows binaries directly from there, but there are workarounds)

Any idea when the general public will see this version of WSL?

@mslinn  I'm not sure what are thinking of, This is what's publicly available, all you have to do is to switch windows to developer mode (settings -> update & security -> for developers -> developer mode) and then in the "turn Windows features on or off" select "Windows subsystem for Linux (beta)" and then you can use it, it will install a native "bash.exe", that will start this subsystem.

Multiple versions of WSL exist, depending on what kind of developer you are.
https://www.neowin.net/news/windows-10-slow-ring-or-fast-ring-most-users-go-slow
https://www.cnet.com/how-to/change-to-the-fast-ring-for-more-frequent-windows-10-preview-updates/

I'm using the default settings for Windows 10 Pro, not the insider or preview builds, and i don't defer updates. I guess that's the latest stable version.

This code works fine on Linux, but on Windows Subsystem for Linux it never gives the REPL prompt:
def localRepl(replArgs: Seq[Bind[_]]=Nil): Any = {
    val jLine = if (scala.util.Properties.isWin) "JLineWindows" else "JLineUnix"
    Future { // TODO does running the REPL on another thread cause problems with out-of-date values?
      while (true) {
        ammonite.Main(
          predef = s"""//repl.frontEnd() = ammonite.repl.FrontEnd.$jLine
                      |def stop(): Unit = System.exit(0)
                      |println(Console.RED + "Type stop, wait a second, then Control-C to terminate this program" + Console.RESET)
                      |""".stripMargin
        ).instantiateRepl(replArgs).run()
        println("Restarting REPL.")
      }
    }
  }

I am trying to use ammonite on Windows. Principally it seems to works but there is one ugly bug that hurts a lot: The key for the square closing bracket ']' does not work. Also copying from the clipboard swallows some characters. Is there a workaround?
Thanks for this very nice REPL, lihaoyi !

just to confirm. Ammonite seems to work very well on latest version of Windows WSL. But, we found that the openjdk had problems with the threadPool. Where we asked in to create 50 max it only ever created 2.  Installing the Oracle JDK solved that problem. We followed the instructions here:
https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-debian-8

Yes, I also find that Ammonite works fine with WSL and Oracle JDK

I'm still testing, but I just got Ammonite to work on Windows with colors using the standard "amm" download (no tweaking source or compiling).  No Cygwin or git bash, just "Cmder" terminal.  At least one problem remains (see below).
There are two keys to this solution:

using "Cmder" terminal (conemu) which can handle xterm type sequences while still being a windows terminal.
simply passing in the JLineWindows terminal type while starting Ammonite.  There is no command line option for that, so I send in a command to programmatically set it inside of Ammonite.

Here is breakdown:

running on Windows 8.1
using Oracle java version "1.8.0_141"
download ammonite REPL (http://ammonite.io/#Ammonite-REPL)

select the version of ammonite (stable, latest) and grab the URL that looks like: https://git.io/vQEhd
in browser, paste the URL and save the file - it will have a name like "2.12-1.0.0"

rename file to something like "amm-2.12-1.0.0.jar"  (prepend "amm-", and append ".jar")
move file to somewhere appropriate (d:\tools\ammonite\amm-2.12-1.0.0.jar)
start Cmder terminal (http://cmder.net/)
java -Xmx500m -XX:+UseG1GC  -jar d:\tools\ammonite\amm-2.12-1.0.0.jar  --predef-code "repl.frontEnd() = ammonite.repl.FrontEnd.JLineWindows"

The "-X" parameters came from looking at the first line of the downloaded file.  In a Unix environment, it would use that first line to know how to start java.  In Windows we have to explicitly start Java, so we add these parameters to keep the behavior as similar as possible.
One issue is that editing a multi-line command doesn't work quite right when trying to edit previous lines.
I hope this will save someone the hours of agony that I went through.
Dan

Trying to run it from cmd with java -jar file just print this exception over and over:
java.lang.RuntimeException: Nonzero exit value: -1
  scala.sys.package$.error(package.scala:27)
  scala.sys.process.ProcessBuilderImpl$AbstractBuilder.slurp(ProcessBuilderImpl.scala:132)
  scala.sys.process.ProcessBuilderImpl$AbstractBuilder.$bang$bang(ProcessBuilderImpl.scala:102)
  ammonite.terminal.TTY$.stty(Utils.scala:118)
  ammonite.terminal.TTY$.init(Utils.scala:97)
  ammonite.terminal.Terminal$.x$1$lzycompute$1(Terminal.scala:41)
  ammonite.terminal.Terminal$.x$1$1(Terminal.scala:41)
  ammonite.terminal.Terminal$.initialConfig$lzycompute$1(Terminal.scala:41)
  ammonite.terminal.Terminal$.initialConfig$1(Terminal.scala:41)
  ammonite.terminal.Terminal$.readLine(Terminal.scala:52)
  ammonite.repl.AmmoniteFrontEnd.readLine(AmmoniteFrontEnd.scala:113)
  ammonite.repl.AmmoniteFrontEnd.action(AmmoniteFrontEnd.scala:25)
  ammonite.repl.Repl$$anonfun$action$2.apply(Repl.scala:140)
  ammonite.repl.Repl$$anonfun$action$2.apply(Repl.scala:132)
  ammonite.util.Catching.flatMap(Res.scala:109)
  ammonite.repl.Repl.action(Repl.scala:132)
  ammonite.repl.Repl.loop$1(Repl.scala:172)
  ammonite.repl.Repl.run(Repl.scala:188)
  ammonite.Main$$anonfun$run$2.apply(Main.scala:191)
  ammonite.Main$$anonfun$run$2.apply(Main.scala:178)
  scala.Option.getOrElse(Option.scala:121)
  ammonite.Main.run(Main.scala:178)
  ammonite.MainRunner$$anonfun$runRepl$1.apply(Main.scala:355)
  ammonite.MainRunner$$anonfun$runRepl$1.apply(Main.scala:355)
  ammonite.MainRunner.watchLoop(Main.scala:336)
  ammonite.MainRunner.runRepl(Main.scala:355)
  ammonite.Main$.main0(Main.scala:277)
  ammonite.Main$.main(Main.scala:241)
  ammonite.Main.main(Main.scala)

Running it from bash (WSL) however actually starts the REPL correctly; alas, many shell operations don't work (moving between words, selecting, etc), and the time it takes to evaluate expressions is extremely slow.
I'm running the latest version (2.12-1.0.1) on Windows 10 with Oracle JDK 1.8.0_144.
This kind of makes the tool unusable to me as a Windows user.

Additional problem on Windows: "object ? is not a member of package cats" after import "cats._"
I run Ammonite on Windows with cmder by this instruction: https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-317468917
After I import "cats._" any of the following commands lead to "Compilation Failed" error.
Welcome to the Ammonite Repl 1.0.2
(Scala 2.12.3 Java 1.8.0_144)
If you like Ammonite, please support our development at www.patreon.com/lihaoyi
@ import $ivy.`org.typelevel::cats-core:1.0.0-MF`
import $ivy.$

@ import cats._
import cats._

@ exit
cmd2.sc:63: object ? is not a member of package cats
import _root_.cats.{
       ^
Compilation Failed

I have managed to make Ammonite 1.0.3 mostly functional under Cygwin. The changes I made can be found at:
https://github.com/Axiometry/Ammonite-Cygwin/commit/14a1bf9724c80df817da79d61cb3b1a710c24f39
The changes are:

Set the frontend to JLineWindows (this can be done in the predef)
Convert the path to amm in the prepended script to Windows via cygpath -w
Switch to sbt-assembly 0.14.6 due to sbt/sbt-assembly#209 (make sure you sbt clean after switching)
Don't write err to /dev/tty in TTY.consoleDim

Most of these are hacks and need proper workarounds. Just leaving this here for anyone looking to use Ammonite with Cygwin.

Thanks @Axiometry I just bought a windows box so I'll try it out when I have it set up. (I needed windows for work.)
Apropos of nothing, I noticed a map of pre-Mosaic times showing the Amorites just west of the Ammonites. In case there's ever a need to name a flavor of Ammonite, Amorite is available, with the suggestion of Amor from Latin.

In case you're not aware, Windows (10) now has built-in bash via Ubuntu.
After many years, I've finally switched off Cygwin.
On Wed, Dec 6, 2017 at 12:11 AM, som-snytt<EMAIL_ADDRESS>wrote:

Thanks @Axiometry https://github.com/axiometry I just bought a windows
box so I'll try it out when I have it set up. (I needed windows for work.)
Apropos of nothing, I noticed a map of pre-Mosaic times showing the
Amorites just west of the Ammonites. In case there's ever a need to name a
flavor of Ammonite, Amorite is available, with the suggestion of Amor from
Latin.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/lihaoyi/Ammonite/issues/119#issuecomment-349545445,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAEkWzJdZih3_UF0lm_p2TkTx--RcSo5ks5s9jASgaJpZM4Ffv59
.

@robby-phd can we close this?

In case you're not aware, Windows (10) now has built-in bash via Ubuntu.
After many years, I've finally switched off Cygwin.

Do note that it is only available for Pro versions of Windows 10 (not Home) and requires a manual installation procedure (quite short, but still).

Ammonite now supports Windows (both batch or sh environments), though support for MSYS2 subsystem needs to wait until the next jline3 release.
@lihaoyi When the next stable version is released, the installation instructions for stable releases should be changed similar to what is in the unstable section.

Do note that it is only available for Pro versions of Windows 10 (not Home) and requires a manual installation procedure (quite short, but still).

This isn't true - the WSL is supported on Windows 10 home edition, too. Installation is fairly straightforward.

So, what's the installation process to use Ammonite on Windows 10 Professional?

The following steps seemed to work for me.

https://stackoverflow.com/questions/51680709/colored-text-output-in-powershell-console-using-ansi-vt100-codes

Download the linux ammonite release. Change the extension to be .bat

Start in powershell...

Was pretty quick, seemed to work fine.

Can confirm, I got ammonite runnning with syntax highlighting in 2 minutes thanks to those instructions.
I hate to bump old closed issues, but there were no Windows instructions, so for those running Windows 10 64 bit and Scala 2.13 @Quafadas instructions should get you going quick.

FYI, running Ammonite via coursier works fine out-of-the box in the Windows command terminal, thanks to the setup it does via windows-ansi:
> cs launch Ammonite
…
@ …

We could even call windows-ansi from Ammonite itself, and have its launchers work out-of-the-box too.


Priority scheduling is broken

Describe the bug
After activating priority scheduling, errors show up in multiple contexts.
To Reproduce
First Activating priority mode.
Then multiple things leads to an error window.
Opening the organizer. The organizer doesn't open after closing the error window
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: Incremental Reading v4115 unofficial clone

Caught exception:
Traceback (most recent call last):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/schedule.py", line 65, in showDialog
    if not self._getCardInfo(self._deckId):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/schedule.py", line 298, in _getCardInfo
    prio = note[self._settings['prioField']]
  File "/usr/lib/python3.10/site-packages/anki/notes.py", line 159, in __getitem__
    return self.fields[self._field_index(key)]
TypeError: list indices must be integers or slices, not NoneType

Importing a webpage and setting a priority. No card is created after closing the error window
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: Incremental Reading v4115 unofficial clone

Caught exception:
Traceback (most recent call last):
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/importer.py", line 140, in importWebpage
    deck = self._createNote(webpage.title.string, body, source, priority)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/importer.py", line 99, in _createNote
    setField(note, self._settings['prioField'], priority)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/util.py", line 105, in setField
    note.fields[index] = value
TypeError: list indices must be integers or slices, not NoneType

Trying to open Browse for an IR3 card that was already added. The card cannot be edited after closing the error window
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55

Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/progress.py", line 118, in handler
    func()
  File "/usr/lib/python3.10/site-packages/aqt/utils.py", line 1188, in <lambda>
    self.editor.call_after_note_saved(lambda: func(self, *args, **kwargs))
  File "/usr/lib/python3.10/site-packages/aqt/browser/browser.py", line 549, in on_all_or_selected_rows_changed
    self.editor.set_note(self.card.note(), focusTo=self.focusTo)
  File "/usr/lib/python3.10/site-packages/aqt/editor.py", line 487, in set_note
    self.loadNote(focusTo=focusTo)
  File "/usr/lib/python3.10/site-packages/aqt/editor.py", line 500, in loadNote
    for fld, val in self.note.items()
  File "/usr/lib/python3.10/site-packages/anki/notes.py", line 150, in items
    return [(f["name"], self.fields[ord]) for ord, f in sorted(self._fmap.values())]
TypeError: '<' not supported between instances of 'NoneType' and 'int'

Trying to extract a text when reviewing a card. No card is created after closing the error window
Error
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue to the add-on author.
Debug info:
Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
Flags: frz=False ao=True sv=3
Add-ons, last update check: 2023-02-23 22:27:55
Add-ons possibly involved: Incremental Reading v4115 unofficial clone

Caught exception:
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/aqt/webview.py", line 604, in handler
    cb(val)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/text.py", line 78, in <lambda>
    'getHtmlText()', lambda text: self.create(text, settings)
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/text.py", line 132, in create
    getField(currentNote, settings['prioField']),
  File "/home/pierre/.var/app/net.ankiweb.Anki/data/Anki2/addons21/999215520/util.py", line 98, in getField
    return note.fields[index]
TypeError: list indices must be integers or slices, not NoneType

Expected behavior
No error should show up and the card should be created.
Specs

OS: Manjaro Linux. Kernel 5.15
Anki Version : 2.1.60 (but also present in 2.1.58). Both from the AUR
Incremental Reading Version : v4.11.15

Anki debug info

    Anki 2.1.60 (76d88073) Python 3.10.9 Qt 6.4.2 PyQt 6.4.2
    Platform: Linux-5.15.94-1-MANJARO-x86_64-with-glibc2.37
    Flags: frz=False ao=True sv=3
    Add-ons, last update check: 2023-02-23 22:27:55

    ===Add-ons (active)===
    (add-on provided name [Add-on folder, installed at, version, is config changed])
    AnkiConnect ['2055492159', 2022-09-19T02:11, 'None', mod]
    Incremental Reading v4115 unofficial clone ['999215520', 2023-02-20T21:57, 'None', '']

    ===IDs of active AnkiWeb add-ons===
<PHONE_NUMBER> 999215520

Posted the first message by error so I forgot to say that I am incredibly thankful that you are keeping this add-on alive. Manual scheduling is not the best solution, but at least it works and I can use IR.
So really thank you

Hi,
Thank you for reporting the issue! I might have broken something while making other changes.
I'll try to get to this within the next week (and try add some tests to prevent regressions).

Fixed in v4.11.6.


Improper intrinsic track sizing for multi-line Text

This widget is extremely powerful and very handy, thank you!
Imagine you have a vertical CustomScrollView with a SliverFillRemaining sliver (hasScrollBody=false) that contains a container with a minimum height set to 300px that contains a LayoutGrid with a single column and 2 rows:

A flex row that expands to whatever free space is remaining
A row that contains a Text that is long enough to wrap across multiple lines

Yes, this is a complicated layout! Essentially, it's a simplified example of an application that has a lot of vertically expanding content that is intrinsically sized, and then needs one row in a grid that is normally sized to fit the rest of the viewport, but if that content is longer than the height of the viewport it will then be able to scroll to see everything.
The bug in this situation is that in the first pass Flutter will call computeMaxIntrinsicHeight on the RenderLayoutGrid renderbox (because it's in a context where the cross-axis (horizontal) is fixed and it wants to know how high the widget can go for a given width), and flutter passes the fixed cross-axis width. The code is currently specifying a constraint of a minimum width for the given width passed to _computeIntrinsicSize:
  @override
  double computeMaxIntrinsicHeight(double width) =>
      _computeIntrinsicSize(BoxConstraints(minWidth: width)).maxTracksHeight;

_computeIntrinsicSize then calls computeGridSize passing the constraints, but leaving the child constraints set to null. Then the child constraints land up getting inflated to infinity.
This is a problem because when it's computing the row track height, even with a grid fit of passthrough, the childConstraints has a min width of the defined amount but a max width of infinity. The max width of infinity gets translated into a crossAxisSize=0 when minIntrinsicSize is finally called. And because crossAxisSize=0, then the Text widget computes a height of like 3000 pixels (exact number depends on how much text is passed) because the Text RenderBox is asked what it's intrinsic height would be with a zero width, and because Text will wrap it creates one line of text per word making it very big. This leads to a very large max intrinsic height of thousands of pixels. Then flutter calls the layout itself, and now it passes the constraint with the height set to 3000+ pixels. The width is now set in this second computation, and the computeGridSize call this time only needs a few lines of text (for example). This leaves the flex row expanding to be thousands of pixels in size unnecessarily.
Here is the debug track layout print output with some extra stuff added showing the problem (in this case there is a single column with 3 rows, row 0 and row 2 are intrinsically sized, and row 2 has the multi-line text widget):

Debug Log Showing Problem
DEBUG: ============= computeMaxIntrinsicHeight(579) =========
DEBUG: ------------------------- computeGridSize(gridFit=GridFit.passthrough, gridConstraints=BoxConstraints(579.0<=w<=Infinity, 0.0<=h<=Infinity), childConstraints=null)
DEBUG: ------------------------- computeGridSize updated childConstraints=BoxConstraints(579.0<=w<=Infinity, 0.0<=h<=Infinity)
DEBUG COLUMN tracks with a maximum free space of 0, isAxisUpperBound=false
min-max: 0.0->0.0 (same)
free space: 0
DEBUG ROW tracks with a maximum free space of 0, isAxisUpperBound=false
Resolving intrinsic row heights [tracks [0,2]] with constraints BoxConstraints(579.0<=w<=Infinity, 0.0<=h<=Infinity)
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=0
  min size of track 0 = 56
  distributing 56 across track 0 on min
  max size of track 0 = 56
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=0
  min size of track 2 = 3902
  distributing 3902 across track 2 on min
  max size of track 2 = 3902
  update track 0 = 56.0
  update track 2 = 3902.0
min-max: 3958.0->3958.0 (same)
free space: -3958
DEBUG ================= Starting grid layout for constraints BoxConstraints(w=579.0, h=3958.0), child constraints BoxConstraints(w=579.0, h=3958.0)
DEBUG: ------------------------- computeGridSize(gridFit=GridFit.passthrough, gridConstraints=BoxConstraints(w=579.0, h=3958.0), childConstraints=null)
DEBUG: ------------------------- computeGridSize updated childConstraints=BoxConstraints(w=579.0, h=3958.0)
DEBUG COLUMN tracks with a maximum free space of 579, isAxisUpperBound=true
min-max: 0.0->0.0 (same)
free space: 579
DEBUG ROW tracks with a maximum free space of 3958, isAxisUpperBound=true
Resolving intrinsic row heights [tracks [0,2]] with constraints BoxConstraints(w=579.0, h=3958.0)
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 0 = 56
  distributing 56 across track 0 on min
  max size of track 0 = 56
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 2 = 94
  distributing 94 across track 2 on min
  max size of track 2 = 94
  update track 0 = 56.0
  update track 2 = 94.0
min-max: 150.0->150.0 (same)
free space: 3808
Determined track sizes:
  column 0: 579
  row 0: 56
  row 1: 3808
  row 2: 94
Finished track sizing

The solution is pretty simple, when computing the max intrinsic width or max intrinsic height, instead of setting a minHeight or minWidth constraint, set a maxHeight or maxWidth constraint:
  @override
  double computeMaxIntrinsicWidth(double height) =>
      _computeIntrinsicSize(BoxConstraints(maxHeight: height)).maxTracksWidth;

  @override
  double computeMaxIntrinsicHeight(double width) =>
      _computeIntrinsicSize(BoxConstraints(maxWidth: width)).maxTracksHeight;

This logic follows by reading the doc comments where it talks about width-in-height-out layout algorithms (e.g., which is what the Text widget is with line wrapping).
With this fix in place, the layout works exactly as desired, with no extra space in the flex widget. Here is the debug layout log with the fix in place:

Debug Log With Fix In Place
DEBUG: ============= computeMaxIntrinsicHeight(579) =========
DEBUG: ------------------------- computeGridSize(gridFit=GridFit.passthrough, gridConstraints=BoxConstraints(0.0<=w<=579.0, 0.0<=h<=Infinity), childConstraints=null)
DEBUG: ------------------------- computeGridSize updated childConstraints=BoxConstraints(0.0<=w<=579.0, 0.0<=h<=Infinity)
DEBUG COLUMN tracks with a maximum free space of 579, isAxisUpperBound=true
min-max: 0.0->0.0 (same)
free space: 579
DEBUG ROW tracks with a maximum free space of 0, isAxisUpperBound=false
Resolving intrinsic row heights [tracks [0,2]] with constraints BoxConstraints(0.0<=w<=579.0, 0.0<=h<=Infinity)
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 0 = 56
  distributing 56 across track 0 on min
  max size of track 0 = 56
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 2 = 94
  distributing 94 across track 2 on min
  max size of track 2 = 94
  update track 0 = 56.0
  update track 2 = 94.0
min-max: 150.0->150.0 (same)
free space: -150
DEBUG ================= Starting grid layout for constraints BoxConstraints(w=579.0, h=469.0), child constraints BoxConstraints(w=579.0, h=469.0)
DEBUG: ------------------------- computeGridSize(gridFit=GridFit.passthrough, gridConstraints=BoxConstraints(w=579.0, h=469.0), childConstraints=null)
DEBUG: ------------------------- computeGridSize updated childConstraints=BoxConstraints(w=579.0, h=469.0)
DEBUG COLUMN tracks with a maximum free space of 579, isAxisUpperBound=true
min-max: 0.0->0.0 (same)
free space: 579
DEBUG ROW tracks with a maximum free space of 469, isAxisUpperBound=true
Resolving intrinsic row heights [tracks [0,2]] with constraints BoxConstraints(w=579.0, h=469.0)
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 0 = 56
  distributing 56 across track 0 on min
  max size of track 0 = 56
DEBUG: measuring minIntrinsicSize for 1 items...
DEBUG: measuring min intrinsic item size on axis Axis.vertical with crossAxisSize=579
  min size of track 2 = 94
  distributing 94 across track 2 on min
  max size of track 2 = 94
  update track 0 = 56.0
  update track 2 = 94.0
min-max: 150.0->150.0 (same)
free space: 319
Determined track sizes:
  column 0: 579
  row 0: 56
  row 1: 319
  row 2: 94
Finished track sizing

I'm pretty sure the changes to computeMaxIntrinsicWidth and computeMaxIntrinsicHeight are correct in all cases, but you could also choose to only use the new behavior based on a new flag to the LayoutGrid.

Upon further experimentation, these changes do change the visual appearance of the Periodic Table example. I'll submit a PR for review shortly that adds flags to the widget that will allow activation of a "width-in-height-out" or "height-in-width-out" layout approach (both defaulting to false, to use the previous behavior).

Wow! Thanks for being so detailed. I'm just going to need a couple more days to give this the attention it deserves.
What is it that you're building, if you're willing to share?

Thanks @shyndman -- the changes in PR #77 have been working out nicely so far to fix the issue. Hopefully should be enough to fix the issue without introducing any new ones.
I've found this grid is really handy for building responsive layouts. When the viewport is smaller than a given width, I have it lay out three rows in one column:

The first and third rows are intrinsically sized, and the second row is a flex row. The third row is the one whose intrinsic height changes with the content. For example, if the detail text is longer, it wraps and takes up more vertical space. And if the height of the viewport is not large enough, it will have a vertical scroll bar. In this case, the fluent_ui treeview list has a minimum height and will start to scroll if it can't contain all items, and then if the 3 rows themselves all can't fit within the viewport, the viewport itself starts to show a vertical scrollbar (note the two vertical scrollbars in this example):

Alternatively, if the viewport is wide enough, then it switches to a mode with two rows -- the first row spans two columns, and then the second row has a different widget in each column (first column is fixed-width, the second column flexes to fit to size of viewport)

I like the approach of this package vs some others that implement the "bootstrap" layout model. Using ASCII art to show where you want rows/columns to go is really intuitive, and there is more precise control over width/height (with bootstrap all elements will "expand" proportionally as window expands, but in this case the left pane is more of a side bar and better to stay (mostly) fixed width while the right pane expands to fit (for example).

Looks great! I use the grid for exactly the same purpose.
I went over the issue, and I agree with your fix. I left one nit on the PR — add the comment and I'll merge.
Now I'm wondering if this is a breaking change or not. What do you think?

It seems like it could be breaking, but IMO only in a good way. The behavior before wouldn't really be desirable if you were trying to use in conjunction with a widget that determined it's height dynamically based on a fixed width (like Wrap or Text). On the other hand, no one has complained before. So it could be safer to bump the major version in pub.dev package just in case?

Yeah, agreed. Safer. Give me a few and I'll get this published.

Published as v2.0.0.
Thanks for the help.

@shyndman - Perfect, thank you!