Build scripts

Main changes
The main changes done are the modularization (and readability) of the script. To do that, functions and variables (local and global) were created. The local variables increases the reliability of the script. Another advantage of creating a main function for the script is that adds a protection to the script against corruption (e.g., if it is not properly downloaded, the script won't run).
Added checks
There are some checks that were implemented to improve user experience and debugging.
build_app

_app_check: checks if the application argument passed to the script exists in the Application folder.
_docker_check: checks if Docker is installed and configured. Although docker is not used in this script (it is used in docker_build_image), the script that uses it is later called. I see two options: make docker a requirement now (thus the check) or decouple docker from the script (docker_build_image).
_reboot: if docker is installed, but not configured, _docker_check will configure it. This makes a reboot needed for the changes to take effect. This function asks if the user wants to reboot or not.
_root_user: checks if there is a root user. This is necessary to properly configure docker and to reboot the system.

build_image

_folder_check: check if a folder exists. It is used in the _bin_check, which checks if the bin folder exists, otherwise create it.
_bin_check: checks if the bin folder exists, otherwise create it.
_file_exists: check if a file exists. It is used to check if the binary files do exist or not. It is a dependency of _output_file.

docker_build_image

Check if the build_image script exist before proceeding.
Check if the docker command exist. Even though this is tested in the build_app script, the docker_build_image script can be called independently.

clean

_root_user; check for the root user in order to remove files.

@ogtomi tested it. Merged. @gcdani thanks for that contribution.


Time log based on new update

Time log is added that record the time for creating a network, forcing, run time, data assimilation and at the end output the results.
Additions

Removals

Changes

Testing

Screenshots
Notes

Todos

Checklist

[ ] PR has an informative and human-readable title
[ ] Changes are limited to a single goal (no scope creep)
[ ] Code can be automatically merged (no conflicts)
[ ] Code follows project standards (link if applicable)
[ ] Passes all existing automated tests
[ ] Any change in functionality is tested
[ ] New functions are documented (with a description, list of inputs, and expected output)
[ ] Placeholder code is flagged / future todos are captured in comments
[ ] Visually tested in supported browsers and devices (see checklist below :point_down:)
[ ] Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
[ ] Reviewers requested with the Reviewers tool :arrow_right:

Testing checklist
Target Environment support

[ ] Windows
[ ] Linux
[ ] Browser

Accessibility

[ ] Keyboard friendly
[ ] Screen reader friendly

Other

[ ] Is useable without CSS
[ ] Is useable without JS
[ ] Flexible from small to large screens
[ ] No linting errors or warnings
[ ] JavaScript tests are passing

@AminTorabi-NOAA It looks like this new version is missing self._log_parameters as an output from _read_config_file(bmi_cfg_file)

@AminTorabi-NOAA I forget if we were going to add a 'print timing' option in the finalize() function of bmi_troute.py?

@shorvath-noaa Yes, that was my understanding since other functions might be used in a loop, we can't simply add a print statement at the end of that function. Let me know if you want me to change the structure

@AminTorabi-NOAA It looks like this new version is missing self._log_parameters as an output from _read_config_file(bmi_cfg_file)

Oh thanks, I missed that. Let me know if there is any other comments. I'll address all together.

@AminTorabi-NOAA Can you make those two changes to start with, particularly the _log_parameters? I can't test the rest of it until that is fixed. It would also be nice to go ahead an incorporate the edit to the finalize() function in bmi_troute.py


HTTP request should not be failed when UPGRADE_SUCCESSFUL is received

According to  https://github.com/netty/netty/issues/14339
In an async situation, for HttpClientUpgradeHandler, since we first fire the UPGRADE_SUCCESSFUL event and then call removeThisHandler, once we receive the event and send the request, we may still encounter the "trying to write the HTTP request that is being upgraded" situation.
Can we trigger this event at the very end

or do we need to introduce another "final event" in HttpClientUpgradeHandler?
@normanmaurer what's your opinion?

I think I might have a better idea... gimme a few minutes

Check https://github.com/netty/netty/pull/14362

Check #14362

well done, buddy, we are waiting for 4.1.114.Final to go prod;
can you take a snapshot to oss-sonatype? We want to do a comprehensive test before the official version;

@linking12 will be deployed once merged

@dpy1123 @linking12 snapshot should be deployed

@dpy1123 @linking12 snapshot should be deployed

👍， thanks

@linking12 let me know how it goes

hi @normanmaurer this fix works well, and now we're taking a whole regression test.
If all goes well, we'll update the results here.

@normanmaurer
our regression test has been completed. there are no Leak any more, everything is going as expected;
using adaptive and asynchronous upgrade of h2c, our throughput has increased by 13%. Thank you very much for your support.
Just wondering when 4.1.114.Final will be released?

@linking12 end of this week is the plan

@linking12 end of this week is the plan

@normanmaurer  Will plan change? 🤣

@linking12 I am fairly surprised about the performance increase here - is it a stack based on webflux or just some custom Netty alone, if I may ask? And is JVM mode or using native image?
Is it mostly event loop allocation heavy or via external executors?
It is very rare to meet allocation-limited scenarios (to me at least) - and happy that the job made by @normanmaurer and @chrisvest has paid off

@linking12 I am fairly surprised about the performance increase here - is it a stack based on webflux or just some custom Netty alone, if I may ask? And is JVM mode or using native image? Is it mostly event loop allocation heavy or via external executors? It is very rare to meet allocation-limited scenarios (to me at least) - and happy that the job made by @normanmaurer and @chrisvest has paid off

@franz1981  Thank you for your attention, we just use Netty alone, do not use webflux&native image;
Let me clarify some of the changes we made when upgrading to version 4.1.114.Final. Strictly speaking, they are some changes to the thread model and memory optimization:
First of all, we are a gateway application, just like zuul2, divided into 3 roles:
NettyServer, NettyClient, UpstreamService;
1: NettyServer receives the request
2: Get a NettyClient object from the UpstreamService Pool
3: If no connection is made, we will create a new connection and then do an H2C upgrade
4: Write the request to UpstreamService
Before this, our third step was synchronous, which means it would block the thread. Now we have changed it;
New connections and H2C upgrades are asynchronous and do not block threads. This change should solve the problem of IO thread stuck as you said;
In addition:
1: We also used adaptive because we have a Java Agent (pinpoint) uses gRPC to transmit data. We found that this change makes gRPC very optimized, with less memory allocation, basically half of the original, which is also a factor in performance improvement;
2: We also use caffeine for caching internally, but found that caffeine has a great impact on GC overhead, so we made a secondary cache, caffeine (heap cache)-> OHC (offheap cache)-> redis
The above are some of the changes we made this time, and the overall performance improvement is very significant;


Migrate scraper job to the cloud

We currently have a scraper that scrapes job postings from GT On Campus Job websites in a manually managed cron-job. Let's find a way to use Google Cloud Platform to host this scraper job on the cloud

Factors to assess (including but not limited to):

Does GCP have a way to run a function that's relatively lightweight at a scheduled time?
What would the cost be from GCP to run such a function
What's the work involved in doing that? How can we test that the scraper job works?


Automated cherry pick of #10388

Cherry pick of #10388 on release-7.0.
/cc  @pvev
NONE

Will try to auto merge this PR once all tests and checks are passing. This might take up to an hour.

Trying to auto merge this PR.

Pull Request successfully merged
SHA: c0b51ef182cab229537841768264ecfe814689df


reason: CUDNN_STATUS_NOT_SUPPORTED

face_recognition version: 1.3.0
Dlib 19.21.1
Python version: 3.6
Operating System: Ubuntu 18.04
RTX 3090, 24GB GPU Memory
Tensorflow tf-nightly-gpu            2.5.0.dev20201207

Description
Running Darknet, Deepsort, Face_Recognition
When the image_size is bigger than 240 * 240, getting this error.
    face_locations = face_recognition.face_locations(frame, model="cnn")
  File "/home/troica/anaconda3/envs/test_36/lib/python3.6/site-packages/face_recognition/api.py", line 119, in face_locations
    return [_trim_css_to_bounds(_rect_to_css(face.rect), img.shape) for face in _raw_face_locations(img, number_of_times_to_upsample, "cnn")]
  File "/home/troica/anaconda3/envs/test_36/lib/python3.6/site-packages/face_recognition/api.py", line 103, in _raw_face_locations
    return cnn_face_detector(img, number_of_times_to_upsample)
RuntimeError: Error while calling cudnnGetConvolutionForwardWorkspaceSize( context(), descriptor(data), (const cudnnFilterDescriptor_t)filter_handle, (const cudnnConvolutionDescriptor_t)conv_handle, descriptor(dest_desc), (cudnnConvolutionFwdAlgo_t)forward_algo, &forward_workspace_size_in_bytes) in file /tmp/pip-install-p7ke4hs2/dlib_5e1a223c72b742d8a632bfbb7f0f2e5a/dlib/cuda/cudnn_dlibapi.cpp:1026. code: 9, reason: CUDNN_STATUS_NOT_SUPPORTED

As the GPU memory size is 24GB, i think it is enough to run Yolov4 and Face_Recognition..
I am not sure why getting this error.

I reduce the allocated GPU memory size by Tensorflow like this.
        gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.2)
        self.session = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(gpu_options=gpu_options))

But I am still getting above CUDNN_STATUS_NOT_SUPPORTED error.

I reduce the allocated GPU memory size by Tensorflow like this.
        gpu_options = tf.compat.v1.GPUOptions(per_process_gpu_memory_fraction=0.2)
        self.session = tf.compat.v1.Session(config=tf.compat.v1.ConfigProto(gpu_options=gpu_options))

But I am still getting above CUDNN_STATUS_NOT_SUPPORTED error.

Were you able to resolve this issue? Im getting the same error on a similar rtx3090 build.

Turns out in my case it was due to cuda out of memory. I reduced the batch size and it worked.

Turns out in my case it was due to cuda out of memory. I reduced the batch size and it worked.

where is the location in code file? Could you please tell me? many thanks

I also have this error on my colab (GPU)... .
How can we solve it!?

I found this:
Link
Is it helpful?

Can someonne help me please??
I am stuck with this error since one week :(


Different accounts with same username not working (steam deck)

I have two steam decks with username "deck" that cannot be changed.
When adding these to timekpr-next-remote (same username, different ip) it is loading the unused/used times forever without visible error. It works if I just add one of the decks.

Thanks for filing the ticket @frizzle0815 ! I'll have some time this week (possibly today) to dig into this.

Hey @frizzle0815  - my first step was to try and reproduce your problem and I was unable to :(  Details about my tests below.  I will say I should likely add a feature like "Display name" vs "Auth name" so you can have two identical auth names but have them show up as different names in the web GUI :sweat_smile:
To help you though, can you answer some questions in hopes of uncovering the error?

Can you share your config.py?  Please change the ssh_password if it is not the default one from the repo - I don't want to know your secrets!
Can you verify if you enable only deck(1) in the config it works to add and remove time?  And then can you confirm if you enable only deck(2) in the config it works to add and remove time?
Can you take a screen recording of the error and share it?
Can you confirm you can manually SSH to both steam decks using the timekpr-next-remote user  and the ssh_password you have in the timekpr-next remote config?

Test steps

create two LXD Ubuntu 22 containers
add two users both named deck to the containers
install timekpr-next on the both using the PPA, configured the deck user to have 1hr for every day of the week per the dev steps
add the timekpr-next-remote user with the default password of Predict Plaything Unbiased Grappling
download a copy of the repo: git clone https://github.com/mrjones-plip/timekpr-next-remote.git
cd into timekpr-next-remote directory, copy the config cp  conf.example.py conf.py and the edit it to look like this:

 trackme = {
     '<IP_ADDRESS>': ["deck"],
     '<IP_ADDRESS>': ["deck"],
 }
 ssh_user = 'timekpr-next-remote'
 ssh_password = 'Predict Plaything Unbiased Grappling'
 ssh_timekpra_bin = '/usr/bin/timekpra'
 ssh_key = './id_timekpr'

start the docker server with docker compose up  (note I actually use a different binary called docker-compose in the recording - this doesn't affect the running of the app)
Load the web GUI and try giving both deck users some time

Here's the video of me testing:
https://github.com/mrjones-plip/timekpr-next-remote/assets/8253488/a28438e3-f594-4f29-a95b-1542149125f1


Integration to Bosch Compress 7001i Ground Heatpump

As of now I can only get the current integration to work via IVT XMPP - not with any of the other methods. That generate an "Unknown error".
I'm only getting a read on the heatpump idle temp and the water temp - which I can adjust and it will change the idle temp/ water temp accordintly.
The different Modes of the water temp is not alligned with the modes in the heatpump btw.
I'd like to get more info included in the integration - like fwd/return temp - floor heat, current modulation %, energy consumption in Kw(h), Watts etc.
I was also wondering if there are any options for modbus tcp integration, where you could control start up/run of the heat pump. (alternatively I could use the heat setting to start/stop the modulation)

Sorry Pszafer - tried to follow the guide: github.com/bosch-thermostat/home-assistant-bosch-custom-component/wiki/Dev-Raw-Scan-for-the-Bosch-Devices
I've made the Scan, selected one of the Bosch entities (water_heater is 1 of 2 that is available), but the json file show no findings.
Maybe you can guide me here - where am I doing something wrong?
bosch_scan_water_heater.dhw1.zip

That's weird. Maybe restart HA and retry (wait for about 5-10 minutes to finish, look into logs for link of the scan).
Or maybe try with docker: https://github.com/bosch-thermostat/home-assistant-bosch-custom-component/wiki/Dev-Run-lib-with-Docker

Hi Pszafer,
I finally think I got a useful scan.
Please try to have a look and let me know if I can be at any help.
Thank you in advance.
bosch_scan_22020131.zip

It's much better now, but it is missing main part of device info /system/.
My component is relying on information fetched from that uri to recognize what kind of device it is dealing with.
Can you contact me on discord?

Hi Pawel - sure. I’m at +01.00 CET and is available  from 19.00 onwards.
Let me know your Discord Name /Channel - then I’ll be on tonight for some hours.
Thanks alot again :)
Hent Outlook til iOShttps://aka.ms/o0ukef

Fra: Pawel @.>
Sendt: Tuesday, February 1, 2022 9:18:37 AM
Til: bosch-thermostat/home-assistant-bosch-custom-component @.>
Cc: PRebs64 @.>; Author @.>
Emne: Re: [bosch-thermostat/home-assistant-bosch-custom-component] Integration to Bosch Compress 7001i Ground Heatpump (Issue #126)
It's much better now, but it is missing main part of device info /system/.
My component is relying on information fetched from that uri to recognize what kind of device it is dealing with.
Can you contact me on discord?
—
Reply to this email directly, view it on GitHubhttps://github.com/bosch-thermostat/home-assistant-bosch-custom-component/issues/126#issuecomment-1026579409, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATTOCIN36OWGDD3EBLTCUD3UY6JN3ANCNFSM5LUOEQDA.
Triage notifications on the go with GitHub Mobile for iOShttps://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Androidhttps://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you authored the thread.Message ID: @.***>

https://github.com/bosch-thermostat/home-assistant-bosch-custom-component#first-config-help-needed

Alot was available just by enabling the pre-disabled sensors.
Thank you for the help :)


0 kotlin files were analyzed Android Setup.

I'm trying to setup Detekt for one of Android-Kotlin based project. But it always end up success build with message "0 kotlin files were analyzed."
Following setup I'm using
plugins {
    id "io.gitlab.arturbosch.detekt" version "1.0.0.RC6-3"
}

detekt {
    version = "1.0.0.RC6-3"
    profile("main") {
        input = "$projectDir/app"
        config = "$projectDir/detekt.yml"
        filters = ".*/test/.*,.*/resources/.*,.*/build/.*"
        //filters = ".*test.*,.*/resources/.*,.*/tmp/.*"
        baseline = "$input/reports/baseline.xml"
        parallel = true
    }
    profile("test") {
        filters = ".*/src/main/kotlin/.*,.*/build/.*,.*/resources/.*"
        configResource = "$projectDir/detekt.yml"
        config = null
    }
}

Any suggestion what I'm missing.

Is your project somewhere online?
In which gradle file did you declare the detekt extension?

Closing as no feedback was given. You can reopen the issueagain if you need help.


UI - error report

Error messages should show clearly in the UI window (not only the exe window) which file is having the problem, and if a problem with one row: Record errors in the UI, even if directing to log file rather than reporting whole error.

Errors are shown in the log window as well as being written to the runner-error.log file


chore: update lnd version to v0.17.3-beta

release notes https://github.com/lightningnetwork/lnd/blob/v0.17.3-beta/docs/release-notes/release-notes-0.17.3.md

https://github.com/lightningnetwork/lnd/blob/v0.17.2-beta/docs/release-notes/release-notes-0.17.2.md is also relevant.
Very small changes overall which likely don't affect us at all.


JSDoc: integer type replaced by number

Hello,
I'm using Phaser with Haxe (it's a statically typed language that compiles to Javascript (and potentially other languages)). I made a script to generate Haxe bindings with Phaser source code (using jsdoc). It's possible thanks to the jsdoc hints of each methods / attributes. (It's awesome that all methods / attributes has a jsdoc associated)
When I tried to generate 3.50 bindings, I had an issue, because all integer types has been changed to number type. In Haxe, Int type is different than the Float type (unlike in Javascript), so this information was important for me. I saw this commit https://github.com/photonstorm/phaser/commit/02c34cd64e0751414d0e62acc0f0d02a2589cffe so this change is intentional.
As this change is intentional, I can't say this is a bug and it should be changed, but I created this issue, first to ask why this change have been made ?
And second, I wanted to signal that this "feature" (precise if a number is a integer or not in jsdoc) was useful, at least for me. So, of course, if it has downsides, it's normal to delete it, but if not, I would be happy if this feature "come back" in Phaser 4 ;-).
Have a nice day, and thank you for Phaser !

I changed them all to number because integer isn't a valid data-type in JSDoc / JavaScript / TypeScript, which are of course our primary dev targets.
It could possibly come back in v4, but we'd have to use a custom type to enforce it, as TypeScript (which we're building v4 in) doesn't support integer natively, so you have to 'hack' it in via something like export type Int = number & { __int__: void }; which is a bit of a pain tbh.


Reset queued streams on recv_err

See https://github.com/carllerche/h2/pull/258#issuecomment-381768145 --- the same changes made in recv_reset in #258 should also probably be made in recv_err.

LocallyReset is when we are telling the remote about a RST_STREAM. The reason to remember that we sent the reset is so that if we receive any frames shortly after having sent the RST_STREAM, we want to just discard them, instead of sending a GOAWAY, because the frames may have already been en-route.
I understand recv_err is called when we are decoding a frame, or after decoding and trying to assign it to an active stream, and find an error. We're going to be sending the RST_STREAM, so I think it's right that we should store LocallyReset in the cause.

If #261 is merged, it would also fix the issue this PR is trying to fix.
(though, a test would still be 👍 )

@carllerche et al, I think moving forward with #261 is the correct way to solve this issue, which is why I haven't touched this PR since that branch opened.

Ok, #261 was merged. As described there, the failure case is not easy to write up in a test and any attempt would be very brittle as it relies on a particular sequence of ready / not ready results from write. The fuzzer catches the case pretty quickly, so I would say that no explicit test is required.


[Castle Falkenstein] Add Translation Strings and translation.json

Submission Checklist
Required

[x] The pull request title clearly contains the name of the sheet I am editing.
[ ] The pull request title clearly states the type of change I am submitting (New Sheet/New Feature/Bugfix/etc.).
[ ] The pull request makes changes to files in only one sub-folder.
[ ] The pull request does not contain changes to any json files in the translations folder (translation.json is permitted)

Changes / Description

Add translation strings and translation.json

Character Sheet Info Roll20 Internal Use only.


Can I have multiple time stamps?

As counterintuitive for a TSDB as this may sound, can I have multiple time series in the DB?
Example:

one time stamp is date of arrival
one time stamp is date for which the data is relevant for

I understand that one of these can be as a value field in the data, but is this the best way to implement?
Thanks!
URL for relevant page?
None.
What products and version are you using?
Influx DB 1.7
Where did you look before opening the issue?
Documentation

You cannot.  I believe what you are after is support for a datetime type.  There is only one of those allowed at present which you can set to one of these values.
However, you can create a field with either a string which captures this information or a field as an integer offset value -- this might allow you to then manipulate the other data in your application?

@snenkov I think that @timhallinflux answered your question.
@timhallinflux I'm assigning this to @kelseiv to see if we can add anything relevant to the docs based on your suggestion.

@snenkov -- any other questions?

No, thank you very much! :)


OPenAI API integration fails

Hello ,
I was following  all the exercises related to TS and UI5 and it was really a very . I was able to quickly understand . However, when I am trying to apply few variations to the provided exercises especially ex4 I was trying to make use of third-party API of openai  in my application and followed the steps to include UI5 tooling , and also by enhancing the ui5.yaml file by adding custom task and custom middleware.  However, when I executed the locahost:8080/resources/core.js it says couldn't find the provided resource.  Below  is the sample code

Error

Can some one help me here
Thanks
Pavan

Hi Pavan,
the openai library is not made for the browser. It requires a lot of Node.js related dependencies which cannot be polyfilled for the browser. You should see the errors in the log which states it cannot bundle node:stream.
But there is an alternative made for the browser: https://github.com/Azure/azure-sdk-for-js/tree/main/sdk/openai/openai => @azure/openai. I did a quick test and this library can be used in UI5 apps:
sap.ui.define(["@azure/openai"], function(OpenAI) {
	"use strict";

	console.log(OpenAI);

	const { OpenAIClient, AzureKeyCredential } = OpenAI;

	const client = new OpenAIClient(
		"https://<resource name>.openai.azure.com/",
		new AzureKeyCredential("<Azure API key>")
	);
	client.getCompletions("<deployment ID>", ["YOUR PROMPT HERE"]).then(({ id, created, choices, usage }) => {

	});

It fails as I just copy and pasted the code from the Azure OpenAI page but the JS code is loaded and the classes are accessible...
HTH

Hey Peter thanks for  the help. Ill go through content suggested by you


Rails 5: undefined method `fuzzily_searchable'

Trying to see if I can wire this up to a rails 5 api-only application, I've got the trigram model and migration set up correctly, but in my AR model when I include fuzzily_searchable :name (yes its actually called :name in my model) I get the undefined method fuzzily_searchable error.

I've run into the same issue on a rails 4.2 project. All the fuzzily methods work correctly on the console and in my tests, but l get an undefined method error when they are called from the AR model.

I have had the same issue with a Rails 4.2.4 project. I'd love to hear from anyone who has been able to resolve this issue.

The issue is in /lib/fuzzily/searchable.rb, it has a case that includes the fuzzily_searchable methods, adding a 'when 5' fixes this problem:
    def self.included(by)
      case ActiveRecord::VERSION::MAJOR
      when 2 then by.extend Rails2ClassMethods
      when 3 then by.extend Rails3ClassMethods
      when 4 then by.extend Rails4ClassMethods
      when 5 then by.extend Rails4ClassMethods
      end
    end

panna theriyalanga puriyira mathiru poduppa ...

@samuelgiles do you have a fix PR?

Also having this issue, any progress on a solution?

There's are at least two PRs for this, but the repo hasn't received a commit in over a year (Aug 2015), so it seems dead (or just sleeping?).
At any rate, a workaround for this issue in Rails 5 applications is extending ActiveRecord::Base with the appropriate methods:
# config/initializers/fuzzily.rb:
ActiveRecord::Base.extend(Fuzzily::Searchable::Rails4ClassMethods)

I'm pretty sure it's dead. Also, the current version does not work on 5.2 because of changes in callbacks between 5.0 and 5.2 (trigrams are no longer updated on name changes or creating new records).
I've been using a fork from cardillomarcelo up to now but it's disappeared (he probably gave up on this gem), but since I still need it, I created a fork that fixes this. It's provided only on a "works for me" basis (but feel free to send in PR's).

Oh no, I guess I have to fork. I'm upgrade to rails 5, one of my applications. Is there a lead fork, that is maintained now?

Oh no, I guess I have to fork. I'm upgrade to rails 5, one of my applications. Is there a lead fork, that is maintained now?


Alignment of top section on drop page

the profile picture with the name should have the same margin left as the other content
@newraina wanna pick up? 👀

👋🏻 I thought I fixed it 😅

👋🏻


Sync Api handles Errors on last line differently from other lines

In csv-parse release 2.0.4
Passing
headerA, headerB
A1, B1
A2, B2, C2, D2

to the sync parser returns [{headerA: "A1", headerB: "B1"}], whereas:
headerA, headerB
A1, B1, C2, D2
A2, B2

throws an Error('Number of columns on line 2 does not match header').
This seems to be caused by the lack of a callback on line 38 (parser._flush((function() {}));) of csv-parse/lib/sync.js

Thank you, will be published soon (today)

That was quick!  Thanks.


Align colour names between light and dark mode

https://www.figma.com/file/2ksP8FU7CQImGOgatEhWp3/?node-id=2%3A522
You can find a start with an overview of today's colors and the naming in this folder.

  I have dug further and find only two groups that have components that are 1: 1 – color tokens. All the others have deviations in the background colors, text colors, borders, color of icon etc.

Closed as this will be resolved in EDS 2.0


PR 5749 followup

Remove obsolete CPOW code from PdfjsContentUtils.jsm (PR 5749 followup)This code is unused since PR 5749, and according to https://github.com/mozilla/pdf.js/pull/5749#discussion_r25931841 it should be removed.

Remove unused |getChromeWindow| function from PdfStreamConverter.jsm

/botio-windows preview

Thank you


xenon-testapi + xenon-docgenerator artifacts not on jcenter

The main xenon artifact is on jcenter as compile 'nl.esciencecenter.xenon:xenon:3.0.0', but the other artifacts are not install-able for example integrationTestImplementation group: 'nl.esciencecenter.xenon', name: 'xenon-testapi', version: '3.0.0' fails with could not find error.

The other artifacts are published inside https://bintray.com/nlesc/xenon/xenon/3.0.0#files/nl/esciencecenter/xenon .
So a workaround is to add
repositories {
   ... other repositories ...
    maven {
            url 'https://dl.bintray.com/nlesc/xenon' // xenon-testapi is published on bintray, not on jcenter
    }
}

Then integrationTestImplementation group: 'nl.esciencecenter.xenon', name: 'xenon-testapi', version: '3.0.0' will be found.

The xenon-testapi artifacts where removed from xenon package and a xenon-testapi package was created.
Waiting for approval in jcenter.

Also moved docgenerator to own package on bintray.

Fixed in 4c1dee0d43b048ae7fb95e58524d677ba19956e5

Sorry, they packages are not yet on jcenter, so extra bintray repo is still required


UI: Start of front-end styling

This PR adds some basic CSS, as well as roughing out support for future static pages. Right now it only "prettifies" the login and registration forms. More work will come in the future.

Coverage remained the same at 85.221% when pulling fde46f4e97a293a4ecee5fd2ebd1b526b2003a7b on sylae:master into 48e6fb32f9b20406f58fb2f9cf37727e2a440e84 on skairunner:master.


Update refined, refined-cats to 0.9.25

Updates

eu.timepit:refined
eu.timepit:refined-cats

from 0.9.0 to 0.9.25.
GitHub Release Notes - Version Diff
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

Files still referring to the old version number
The following files still refer to the old version number (0.9.0).
You might want to review and update them manually.
project/plugins.sbt

Ignore future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "eu.timepit" } ]

labels: library-update, semver-patch, old-version-remains

Superseded by #128.


Substream failed

20/11/2022, 23:15:27

ERROR

Subgraph failed with non-deterministic error: Failed to transact block operations: subgraph writer poisoned by previous error, retry_delay_s: 1800, attempt: 116

20/11/2022, 23:15:27

DEBUG

1 candidate trigger in this block, block_hash: 0xc5e1b7effa3d0a8c4d2bd2631d3b37c46b7ec20c59194e4bd5636525838dd082, block_number: 12287508

20/11/2022, 23:15:26

INFO

Blockstreams connected, component: SubstreamsBlockStream

20/11/2022, 23:15:26

INFO

Blockstreams disconnected, connecting, cursor: 8mpdkyxbzQ0fquuHrDolBaWwLpc_DFttVwPiLxFGj46k9nLAi8vzCWYgbRWDlqz3iUHoQ1Kkjd_MEC9_9ZYG6tHixu5n6CdpEy99kY66rrDpffr2aw0acO8zXePbY9DRWj7Vag3-erYK5YfhOvaPMRc7ZZIjJDW1ijgE9oZceKtCuXIxkjj6JZmE0POTp4FE-bNwELWjkn_2AzN4JUsIOs2DM6OdtmkhbQ==, start_block: 12287507, endpoint_uri: mainnet-substreams-0-0, component: SubstreamsBlockStream

20/11/2022, 23:15:26

DEBUG

Starting block stream

Replicate:
cargo run -p graph-node -- --config ~/git/graph-node-dev/config/eth-mainnet-substreams.toml --ipfs https://api.thegraph.com/ipfs/ --start-block 0x02f994fd308229a46c09127837764dfdfb4e025ee4cecd1d92a02f54f07a0330:12777423 --subgraph QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA

Output

Nov 21 22:02:15.691 INFO Blockstreams connected, sgd: 1, subgraph_id: QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA, component: SubstreamsBlockStream
[chain/substreams/src/mapper.rs:63] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:63] "received block {}" = "received block {}"
[chain/substreams/src/mapper.rs:63] number = 12287507
[chain/substreams/src/mapper.rs:73] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:73] "block has {} entity changes" = "block has {} entity changes"
[chain/substreams/src/mapper.rs:73] changes.entity_changes.len() = 0
[chain/substreams/src/mapper.rs:63] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:63] "received block {}" = "received block {}"
[chain/substreams/src/mapper.rs:63] number = 12287508
[chain/substreams/src/mapper.rs:73] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:73] "block has {} entity changes" = "block has {} entity changes"
[chain/substreams/src/mapper.rs:73] changes.entity_changes.len() = 0
[chain/substreams/src/mapper.rs:63] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:63] "received block {}" = "received block {}"
[chain/substreams/src/mapper.rs:63] number = 12287509
[chain/substreams/src/mapper.rs:73] &logger = Logger(component, sgd, subgraph_id)
[chain/substreams/src/mapper.rs:73] "block has {} entity changes" = "block has {} entity changes"
[chain/substreams/src/mapper.rs:73] changes.entity_changes.len() = 0
Nov 21 22:02:16.133 DEBG 1 candidate trigger in this block, block_hash: 0x5b605ffe97e58c657dd3888c014a47fff085f356aeda27de46594b711da29e18, block_number: 12287507, sgd: 1, subgraph_id: QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA, component: SubgraphInstanceManager
Nov 21 22:02:16.156 ERRO Subgraph failed with non-deterministic error: Failed to transact block operations: subgraph `QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA` has already processed block `12287507`; there are most likely two (or more) nodes indexing this subgraph, retry_delay_s: 120, attempt: 0, sgd: 1, subgraph_id: QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA, component: SubgraphInstanceManager

More logs: https://thegraph.grafana.net/explore?left={"datasource":"EykLyXuMz","queries":[{"expr":"{cluster%3D\"hosted-service-staging\",app%3D\"index-node\", deployment%3D\"QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA\"}","queryType":"randomWalk","datasource":"Graph Logs","refId":"A","editorMode":"code"}],"range":{"from":"1668219269327","to":"1668824069327"}}&orgId=1

Running your command with those two flags:
--start-block 0x02f994fd308229a46c09127837764dfdfb4e025ee4cecd1d92a02f54f07a0330:12777423 --subgraph QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA
I see this:
...
Nov 22 13:33:05.870 INFO Blockstreams disconnected, connecting, cursor: , start_block: 12287507, endpoint_uri: substreams-provider-mainnet-0, sgd: 1, subgraph_id: QmVDT9fsWF3nBez71RjRBTRGVH7mDxSoZQem7Fbc6QDdDA, component: SubstreamsBlockStream```

It seems that the graph-node connects to the firehose while asking for block 12287507 instead of the specified block..

Yeah, for this test you need to change the manifest. This is something I noticed as well, graph-node is ignoring --start-block in favour of the substream defined initial block

Ok, I see where (and why) we ignored that flag -> the cursor should have precedence, BUT we did not consider the case where it is set manually for some reason (either from the command-line or because of a "rewind")


Tags with Spaces

Currently tags require no spaces and pressing space adds a new tag.
My current use requires tags with spaces - is there a configuration which would allow the "add tag" keys to be defined?

Closing due to this library no longer being supported. Sad news :(


Add require-dir

require-dir/require-dir.d.ts
check list

[ ] is collect naming convention?

https://www.npmjs.com/package/require-dir
http://bower.io/search/?q=require-dir
others?

[ ] has a test file? (require-dir/require-dir-tests.ts or others)
[ ] pass the Travic-CI test?

Hello and thank you for your contribution!
Due to an excessively long queue of pull requests that have become stale, we are "declaring bankruptcy" and closing all PRs opened before May 1, 2016. If you'd still like to merge this code in, please open a new PR that has been merged and rebased with the master branch.
Going forward, we are committing to review or merge all PRs on a regular basis so this bankruptcy will not occur again. We apologize for the incovenience and hope you will continue to contribute to DefinitelyTyped in the future.
Thanks
The TypeScript and DefinitelyTyped teams


API review: IServiceCollection changes

[ ] Make the interface implement IList instead of ICollection. IList matches ordered
[ ] Remove IServiceCollection Add(IServiceDescriptor descriptor) method to avoid conflict with IList.add

The Add(IServiceDescriptor descriptor) method doesn't conflict with anything, and a lot of code uses that method. Can we keep it?

The downside to having Add(ServiceDescriptor) : IServiceCollection as a proper interface method is that you can't simply new up a List<ServiceDescriptor> and cast it to the IServiceCollection interface. If this were instead an extension method then this scenario would just work.

Ok, I'll make it an extension method if people are ok with that.


update approvers

added jboyd01, kibbles-n-bytes, nilebox, staebler

/lgtm
will it automatically put the label on?

Can we put people in more specific places? It'd be nice to have experts on the specific areas vs "WHOLE REPO".
Lately I don't see a lot of reviews happening from most of these people.

To clarify, in historical relevance these people are all great. We have to realize that putting them in this list means they're going to be called by the bot to do things. So if they're not doing things now, what goal are we trying to achieve? I'd be more accepting of this if there were more OWNERS on sub-directories.

@MHBauer  You raise a good point about the bot using the names to assign people for review.  With this update I was approaching it from we want these developers to be able to approve PRs when they do make time to work on Catalog, not necessarily be assigned to review work.
Let's say we have a developer who is a Service Catalog veteran and long proven code submitter & approver but currently is focused on other work and only occasionally has time to work on Catalog.  If they aren't an approver in OWNERS, prow will not use their /LGTM to move the PR forward, right?  If they manually add a LGTM1 or LGTM2 label will that satisfy the prow workflow?  My point here is it would be a shame to turn our back on qualified reviewers when they do have time to participate.  If the labels still work, I'm all for leaving them out of OWNERS and documenting how they must interact with the workflow.

I would like to add people who should be able to perform the new prow actions so that they aren't accidentally locked out as Jay said.
I would also like to see us get more sub-owners defined in directories because right now people who aren't the right reviewers are being autoassigned by prow and it's really annoying.
I'm going to merge this and then do a follow-up PR to try to fix point #2.

/approve


qwel's hackpad

had an amazing time building this :)

Hey! Great work, but the case needs a little work!

Have updated the case but for some reason not able to export as .step can you check once

Alright, great job! I see you haven't requested screws in your BOM, if you would like them, there is a box for you to fill out on the form. Get your hackpad here: https://forms.hackclub.com/hackpad

🚀


No outline theme for AutoCompleteBox (working code provided)

Usage Information
3.5.0 / 11.0.10 / Desktop (Mac)
Description
There is no outline theme for AutoCompleteBox
Reproduction Steps
There is no theme defined in https://github.com/AvaloniaCommunity/Material.Avalonia/blob/master/Material.Styles/Resources/Themes/AutoCompleteBox.axaml
Expected Behavior
An outline theme to exist for AutoCompleteBox. I find the default Material underline style unsatisfactory.
Actual Behavior
It doesn't exist
Regression?
no
Known Workarounds
none known
Anything else?
I have created a repository
https://github.com/buzzware/AutoCompleteBoxPlay
demonstrating  my own attempt at an outline theme by smooshing together the ComboBox outline and default AutoCompleteBox themes, but I have very little experience with WPF or Avalonia, and I have spent too much time already getting this to work well enough for my project.
I hope someone more familiar and experienced with best practices to implement it properly.
Could you help with a pull-request?
No
Is there an existing issue for this?

[X] I have searched the existing issues

Should be covered with #327 when it will be done. (idk how long it takes)

Also, you can probably try to change the theme for PART_TextBox in AutoCompleteBox.axaml and copy the styles to your own project.


Add flag for defining if prereleases should be exported or not

Similar to the existing -t, -tagName flag it would be nice to have a flag allowing to define if prereleases should be exported or not, corresponding to the prerelease flag of the GitHub API.

@pascalberger can you elaborate on this?  Do you have a repository as as example of what you would expect to be exported?  I am assuming that this would only apply when exporting multiple releases, right?  So essentially a filter?


Increase api field length

There are few apis which consists of long query params like
{{protocol}}://{{base_url}}/api/v1/configurations/area-templates/?search=searchstring&service=6&sub_location=9&sub_location=8&sub_location=7&fields=name,id&service_location=2&service_location=3&section=1&section=2&section=3&section=4&section=5&section=6&section=7&section=8&section=9&section=10&section=11&section=12&section=13&section=14&section=15&section=16&section=17&section=18&section=19&section=20&section=21&section=22&no_page
but according to the model field, this can only save 512 chars and raise
*** django.db.utils.DataError: value too long for type character varying(512)
class APILogsModel(BaseModel):
    api = models.CharField(max_length=512, help_text='API URL')

@vishalanandl177 Please look into this. thanks

Hi @jatindergit.
This will be fixed in the upcoming new version.

Thanks @vishalanandl177
btw, when you are going to release it?

In 1 to 2 days, depending on the testing process.

Please install version 1.0.9


use (much!) newer MiMa (and sbt & Travis while we're at it)

review by @adriaanm
(we should really be using latest MiMa on the modules)

LGTM


Update equation formatting in markdown files under component_models

Describe the bug
When viewing markdown files using the "preview" feature in VSCode, some equations format correctly and some do not. This is observed in avr.md, converter.md, filters.md, freq_esti.md, inner_control.md, loads.md, machines.md, outer_control.md, pss.md, shafts.md, and turbine_gov.md
Screenshots

Desktop (please complete the following information):

OS: macOS 11.7.4
Browser: safari
Version: 16.3.1

Additional context
Math+Markdown installed and 'julia' used as the delimiter setting. Using VSCode version 1.77.1.

I'm not familiar with how VSCode handles the mathematical expressions, but I think this is related with the mathengine being used in VSCode preview.
When we built the docs we need to select MathJax as mathengine (see here: https://github.com/NREL-SIIP/PowerSimulationsDynamics.jl/blob/21fe4bad736d908fc1c76e2a2e91dae972a56f51/docs/make.jl#L5).
This is mentioned in the past here: https://stackoverflow.com/questions/67562772/vscode-markdown-preview-not-supporting-some-math-commands. It may be that installing some extensions like Markdown Enhanced could make it work, but I'm not sure. I'll leave the issue open for now, and let me know if you can find some solution on your side.
In any case, you can always check the docs online to get the equations working properly: https://nrel-siip.github.io/PowerSimulationsDynamics.jl/stable/component_models/avr/

Just to close this issue for now. I've been looking around and it seems that align is particularly an issue when using this and it is somewhat recommended using the environment aligned instead of align.
I may take a look in the future of replacing our docs to use aligned.


provide option in terraformboot to cleanup workspace after deployment

Provide a new configurable option to delete workspaces after the deployment is done.
By default the flag must be set to true.

I will take it


Dashboard's Update pages has been moved, and now link is still unchanged and get 404

The update pages has been moved from backup section of System and Settings of Dashboard to Updates. But some links URL was left unchanged, now some users are claiming that they're getting 404 error.
I've done quick search of
[concrete5]/index.php/dashboard/system/backup/update
and changed them to
[concrete5]/index.php/dashboard/system/update/update

@katzueno
Thank you for catching my mistake.

@MrKarlDilkington no a Japanese user did. 👍


luci-app-fwknopd: add support for ENABLE_CMD_EXEC

Add support for execution commands on the fwknopd server.

cc @oldium


Cleanup how to add target specific partials for kickstart

Adding partials for specific target can be cleaned up, see https://github.com/ManageIQ/manageiq-appliance-build/pull/150#discussion_r75921955
Also blank lines added for each tag in output can be removed by adding trim mode for better readability.

@simaishi does this issue still need to stay open?

We have to keep a list of target that has target specific erb (so it will fail if file is missing), so it's probably best to keep this as is.


Sending appHash to signIn for twilio based phone login.

Feature request
I am using react-native-otp-verify package for automatic sms verification. I need to pass the app hash for it to work for twilio based on the documentation here https://www.twilio.com/docs/verify/api/verification.
Describe the solution you'd like
Adding appHash parameter along with  phone in signIn method for twilio.

Duplicate of #357


Fixed type references in K8s for subject, daemonSet and cronjob

Thank you! At some point, it became a copy-paste job. 😃


[SDO-2349] Update app image version to 1325

https://cloudhealthtech.atlassian.net/browse/SDO-2349

Did we stop creating and checking in the cloudhealth-collector-x.x.x.tgz file?


Spelling

Generated by https://github.com/jsoref/spelling f; to maintain your repo, please consider fchurn

Generated by https://github.com/jsoref/spelling f; to maintain your repo, please consider fchurn

How does the fchurn option work? How does your spelling tool know when it was run last?

@gr2m : https://github.com/jsoref/spelling/blob/master/fchurn is very simple:

it generates a file (e.g. probot.words)
the next time it runs, it renames that file (to, e.g. probot.old) and generates a new file
it diffs them

The end result is that it should only show newly introduced potential misspellings.

Thanks for the explanation @jsoref. This is a great tool ✨ Personally I'd prefer the f method, to avoid having to commit another tool-specific file to the project. @gr2m - if you're also 👍, I'll go ahead and merge this PR 😊

@JasonEtco: Yeah, fchurn is really a bit of spaghetti in that it pulls in a couple of others. w is the core -- f just gathers files to consider (skipping files that are usually not worth looking at) -- in fact, you could just use w if you have a sense of which files to parse.

avoid having to commit another tool-specific file to the project

Yes please 🙏

@gr2m - if you're also 👍, I'll go ahead and merge this PR 😊

Fwiw, I'm finally working on making an Action out of this adventure:
https://github.com/jsoref/test-test/actions?query=workflow%3A"Spell+checking"
At some point, I'd probably be grateful to get some help with it. -- I'm still working on the formatting (right now there's some escaping that's misbehaving in one of the suggestion flavors). And eventually, I should probably see about teaching it to talk to the checks API.


Drag and drop doesn't work in Firefox

I haven't analysed your source code yet, but it doesn't work in Firefox (I have 62.0.3). It works in Chrome and Edge.
I understand that it is only a demo for drag and drop but be careful with static data in Blazor server side application. Your static data is the same for all users of your application. Open your demo app in two different browsers, drag one item in the first browser and refresh page in the second browser to see the effect.

I appreciate your feedback.
This demo is intended to show the possibility to realize drag an drop in a Web App with Blazor. I took it from a Web App I'm working on the last weeks. I stripped it down to demonstrate a simple and minimalistic code sample.
In real-world applications the drag item could be bound to a data context so there would be no problem with static instances. But you are right, it could lead to an issue if other developers are simply copy&pasting the code.
I will investigate the Firefox issue. I never tested with FF. In our Intranet we only need support for IE11/Edge and Chrome.

Currently it seems impossible to fix the drag and drop for Firefox. FF needs to set event data along with the dragstart event (see example here.
But I need to use the dragstart event in Blazor with C# to track the drag item. Today, it's impossible to attach a JS event to both a C# method and a JS method call. Event with using JsInterop there is no way to call ev.dataTransfer.setData(…)  because of missing interoperability between Blazor and JS (setData is undefined).
I will leave this issue open and check again in the next months when the JS bridge in Blazor evolves.

Please check this links to see how drag and drop works in blazor, including firefox.
https://github.com/Lupusa87/BlazorDragAndDrop
https://lupblazordraganddrop.z20.web.core.windows.net/

@Lupusa87
Maybe in the meantime with Blazor 0.8 things changed and it is possible now also in Firefox. I didn't look into this for a while because currently I'm focusing on an Intranet application mainly targeting IE11 and Chrome.

Unfortunately it is not yet possible to avoid js completely.
Thank you too for your work which helped me to achieve my goal.
I use drag and drop in my virtual grid component's columns manager and not having it working in Firefox would be bigger problem than using some js :)


Subtraction, the - operator, with a bool tensor is not supported

Subtraction, the - operator, with a bool tensor is not supported. If you are trying to invert a mask, use the ~ or bitwise_not() operator instead. What and where is this error coming from when training?

Are you using Pytroch 1.2? You might want to downgrade to 1.1.0 to avoid this error, this resolved it for me.
Additional info:
https://github.com/OpenNMT/OpenNMT-py/issues/1525
https://github.com/OpenNMT/OpenNMT-py/issues/1524

This worked. Thank you.

pytorch:1.2.0
CUDA:10.0
Is there any other way to  solve it? I don't want to downgrade pytorch.


Atom plugin cannot find shared libraries

I installed the atom package, and tried using the atom-typescript plugin that I installed through the executable (plugins are not packaged separately as far as I can tell).
Now the plugin is failing, and opening the Developer Console (Ctrl+Shift+I), it seems that it fails at opening libgtk-x11-2.0.so.0:
CHILD ERR STDERR /nix/store/f8b67[...]7p-atom-1.0.4/share/atom/atom: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object files: No such file or directory
The rest of the editor works fine.
Looking at
https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/atom/default.nix
it seems like the proper path for the lib is there ${atomEnv}/lib.
I am not familiar with how plugins run so I'm not sure what else to add to this report.
System: NixOS 15.09
Steps to reproduce:
$ nix-env -i atom
$ apm install atom-typescript
$ atom
Within atom, you can do Edit > Preferences > Packages to see the atom-typescript package. Whenever you enable it, the console (Ctrl+Shift+I) will complain about the shared library.

We currently use debian package and just provide our libraries to it. See https://github.com/NixOS/nixpkgs/blob/master/pkgs/applications/editors/atom/default.nix#L10
Not sure what package libgtk-x11 is coming from

@domenkozar I thought libgtk-x11 was actually part of the gtk package, which is why the error was surprising to me.
I wonder whether atom somehow alters the environment for some of its subprocesses.

For anyone with this issue, as a temporary workaround, one can disable asynchronous processing in atom-typescript by editing debugSync to true in lib/worker/debug.ts.
This makes the plugin usable, but it would still be interesting to fix the spawning environment so that it is properly nix-wrapped.

This was indeed an atom-typescript issue, fixed by https://github.com/TypeStrong/atom-typescript/commit/516374197f4642ec56ff87958dbb2620ebc4f761


Handle surrogate pairs in RenderEditable

Description
The arrow key and delete handling in RenderEditable was using single
index values, which made it possible to move the cursor into the middle
of a surrogate pair (allowing things like adding text at that insertion
point), or to delete half of a surrogate pair. Since unpaired surrogate
pairs aren't valid UTF-16, doing so would cause assertions in the text
field.
This makes the arrow key and delete key handling surrogate-aware
(although not grapheme-cluster-aware, which is a larger fix that is out
of scope here).
Related Issues
Framework part of #55014
Tests
I added the following tests: Simple arrow key and delete key handling tests. (Neither have any existing tests, other than that web ignores arrow keys; I didn't backfill a complete test suite, just coverage of the specific changes here).
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes ([x]). This will ensure a smooth and quick review process.

[x] I read the Contributor Guide and followed the process outlined there for submitting PRs.
[x] I signed the CLA.
[x] I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
[x] I read the Tree Hygiene wiki page, which explains my responsibilities.
[x] I updated/added relevant documentation (doc comments with ///).
[ ] All existing and new tests are passing.
[x] The analyzer (flutter analyze --flutter-repo) does not report any problems on my PR.
[x] I am willing to follow-up on review comments in a timely manner.

Breaking Change
Did any tests fail when you ran them? Please read Handling breaking changes.

[x] No, no existing tests failed, so this is not a breaking change.
[ ] Yes, this is a breaking change.

The delete tests (even the ASCII one) don't work. I haven't had a chance to debug why yet; maybe it'll be obvious to you. If not I'll take another look tomorrow.

@stuartmorgan I took a look at it: for the ASCII one, the 'est' expectation for the test is wrong: it should be 'test', since you start off at zero, move to one, back to zero, and then hit delete: you're at the beginning of the string when you hit delete.
However, even if you fixed that, it wouldn't work, because you're using a fake TextSelectionDelegate that the editable code tries to manipulate, but can't because it's a fake that doesn't keep any real state.
Try this test file, I added a variable to keep state, and added a move to the right before the delete so it'll delete a character.

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter/services.dart';
import 'package:flutter_test/flutter_test.dart';
import '../rendering/mock_canvas.dart';
import '../rendering/recording_canvas.dart';
import 'rendering_tester.dart';
class FakeEditableTextState with TextSelectionDelegate {
@override
TextEditingValue textEditingValue = const TextEditingValue();
@override
void hideToolbar() { }
@override
void bringIntoView(TextPosition position) { }
}
void main() {
test('editable intrinsics', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
text: const TextSpan(
style: TextStyle(height: 1.0, fontSize: 10.0, fontFamily: 'Ahem'),
text: '12345',
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
textAlign: TextAlign.start,
textDirection: TextDirection.ltr,
locale: const Locale('ja', 'JP'),
offset: ViewportOffset.zero(),
textSelectionDelegate: delegate,
);
expect(editable.getMinIntrinsicWidth(double.infinity), 50.0);
// The width includes the width of the cursor (1.0).
expect(editable.getMaxIntrinsicWidth(double.infinity), 51.0);
expect(editable.getMinIntrinsicHeight(double.infinity), 10.0);
expect(editable.getMaxIntrinsicHeight(double.infinity), 10.0);
expect(
  editable.toStringDeep(minLevel: DiagnosticLevel.info),
  equalsIgnoringHashCodes(
    'RenderEditable#00000 NEEDS-LAYOUT NEEDS-PAINT DETACHED\n'
    ' │ parentData: MISSING\n'
    ' │ constraints: MISSING\n'
    ' │ size: MISSING\n'
    ' │ cursorColor: null\n'
    ' │ showCursor: ValueNotifier<bool>#00000(false)\n'
    ' │ maxLines: 1\n'
    ' │ minLines: null\n'
    ' │ selectionColor: null\n'
    ' │ textScaleFactor: 1.0\n'
    ' │ locale: ja_JP\n'
    ' │ selection: null\n'
    ' │ offset: _FixedViewportOffset#00000(offset: 0.0)\n'
    ' ╘═╦══ text ═══\n'
    '   ║ TextSpan:\n'
    '   ║   inherit: true\n'
    '   ║   family: Ahem\n'
    '   ║   size: 10.0\n'
    '   ║   height: 1.0x\n'
    '   ║   "12345"\n'
    '   ╚═══════════\n'
  ),
);

}, skip: isBrowser);
// Test that clipping will be used even when the text fits within the visible
// region if the start position of the text is offset (e.g. during scrolling
// animation).
test('correct clipping', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
text: const TextSpan(
style: TextStyle(height: 1.0, fontSize: 10.0, fontFamily: 'Ahem'),
text: 'A',
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
textAlign: TextAlign.start,
textDirection: TextDirection.ltr,
locale: const Locale('en', 'US'),
offset: ViewportOffset.fixed(10.0),
textSelectionDelegate: delegate,
selection: const TextSelection.collapsed(
offset: 0,
),
);
editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
expect(
(Canvas canvas) => editable.paint(TestRecordingPaintingContext(canvas), Offset.zero),
paints..clipRect(rect: const Rect.fromLTRB(0.0, 0.0, 1000.0, 10.0)),
);
});
test('Can change cursor color, radius, visibility', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ValueNotifier showCursor = ValueNotifier(true);
EditableText.debugDeterministicCursor = true;
final RenderEditable editable = RenderEditable(
  backgroundCursorColor: Colors.grey,
  textDirection: TextDirection.ltr,
  cursorColor: const Color.fromARGB(0xFF, 0xFF, 0x00, 0x00),
  offset: ViewportOffset.zero(),
  textSelectionDelegate: delegate,
  text: const TextSpan(
    text: 'test',
    style: TextStyle(
      height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
    ),
  ),
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
  selection: const TextSelection.collapsed(
    offset: 4,
    affinity: TextAffinity.upstream,
  ),
);

layout(editable);

editable.layout(BoxConstraints.loose(const Size(100, 100)));
expect(
  editable,
  // Draw no cursor by default.
  paintsExactlyCountTimes(#drawRect, 0),
);

editable.showCursor = showCursor;
pumpFrame();

expect(editable, paints..rect(
  color: const Color.fromARGB(0xFF, 0xFF, 0x00, 0x00),
  rect: const Rect.fromLTWH(40, 0, 1, 10),
));

// Now change to a rounded caret.
editable.cursorColor = const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF);
editable.cursorWidth = 4;
editable.cursorRadius = const Radius.circular(3);
pumpFrame();

expect(editable, paints..rrect(
  color: const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF),
  rrect: RRect.fromRectAndRadius(
    const Rect.fromLTWH(40, 0, 4, 10),
    const Radius.circular(3),
  ),
));

editable.textScaleFactor = 2;
pumpFrame();

// Now the caret height is much bigger due to the bigger font scale.
expect(editable, paints..rrect(
  color: const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF),
  rrect: RRect.fromRectAndRadius(
    const Rect.fromLTWH(80, 0, 4, 20),
    const Radius.circular(3),
  ),
));

// Can turn off caret.
showCursor.value = false;
pumpFrame();

expect(editable, paintsExactlyCountTimes(#drawRRect, 0));

}, skip: isBrowser);
test('Can change textAlign', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
  textAlign: TextAlign.start,
  textDirection: TextDirection.ltr,
  offset: ViewportOffset.zero(),
  textSelectionDelegate: delegate,
  text: const TextSpan(text: 'test'),
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
);

layout(editable);

editable.layout(BoxConstraints.loose(const Size(100, 100)));
expect(editable.textAlign, TextAlign.start);
expect(editable.debugNeedsLayout, isFalse);

editable.textAlign = TextAlign.center;
expect(editable.textAlign, TextAlign.center);
expect(editable.debugNeedsLayout, isTrue);

});
test('Cursor with ideographic script', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ValueNotifier showCursor = ValueNotifier(true);
EditableText.debugDeterministicCursor = true;
final RenderEditable editable = RenderEditable(
  backgroundCursorColor: Colors.grey,
  textDirection: TextDirection.ltr,
  cursorColor: const Color.fromARGB(0xFF, 0xFF, 0x00, 0x00),
  offset: ViewportOffset.zero(),
  textSelectionDelegate: delegate,
  text: const TextSpan(
    text: '中文测试文本是否正确',
    style: TextStyle(
      height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
    ),
  ),
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
  selection: const TextSelection.collapsed(
    offset: 4,
    affinity: TextAffinity.upstream,
  ),
);

layout(editable);

editable.layout(BoxConstraints.loose(const Size(100, 100)));
expect(
  editable,
  // Draw no cursor by default.
  paintsExactlyCountTimes(#drawRect, 0),
);

editable.showCursor = showCursor;
pumpFrame();

expect(editable, paints..rect(
  color: const Color.fromARGB(0xFF, 0xFF, 0x00, 0x00),
  rect: const Rect.fromLTWH(40, 0, 1, 10),
));

// Now change to a rounded caret.
editable.cursorColor = const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF);
editable.cursorWidth = 4;
editable.cursorRadius = const Radius.circular(3);
pumpFrame();

expect(editable, paints..rrect(
  color: const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF),
  rrect: RRect.fromRectAndRadius(
    const Rect.fromLTWH(40, 0, 4, 10),
    const Radius.circular(3),
  ),
));

editable.textScaleFactor = 2;
pumpFrame();

// Now the caret height is much bigger due to the bigger font scale.
expect(editable, paints..rrect(
  color: const Color.fromARGB(0xFF, 0x00, 0x00, 0xFF),
  rrect: RRect.fromRectAndRadius(
    const Rect.fromLTWH(80, 0, 4, 20),
    const Radius.circular(3),
  ),
));

// Can turn off caret.
showCursor.value = false;
pumpFrame();

expect(editable, paintsExactlyCountTimes(#drawRRect, 0));

}, skip: isBrowser);
test('text is painted above selection', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: ViewportOffset.zero(),
textSelectionDelegate: delegate,
text: const TextSpan(
text: 'test',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
selection: const TextSelection(
baseOffset: 0,
extentOffset: 3,
affinity: TextAffinity.upstream,
),
);
layout(editable);

expect(
  editable,
  paints
    // Check that it's the black selection box, not the red cursor.
    ..rect(color: Colors.black)
    ..paragraph(),
);

// There is exactly one rect paint (1 selection, 0 cursor).
expect(editable, paintsExactlyCountTimes(#drawRect, 1));

});
test('cursor can paint above or below the text', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ValueNotifier showCursor = ValueNotifier(true);
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
paintCursorAboveText: true,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
showCursor: showCursor,
offset: ViewportOffset.zero(),
textSelectionDelegate: delegate,
text: const TextSpan(
text: 'test',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
selection: const TextSelection.collapsed(
offset: 2,
affinity: TextAffinity.upstream,
),
);
layout(editable);

expect(
  editable,
  paints
    ..paragraph()
    // Red collapsed cursor is painted, not a selection box.
    ..rect(color: Colors.red[500]),
);

// There is exactly one rect paint (0 selection, 1 cursor).
expect(editable, paintsExactlyCountTimes(#drawRect, 1));

editable.paintCursorAboveText = false;
pumpFrame();

expect(
  editable,
  // The paint order is now flipped.
  paints
    ..rect(color: Colors.red[500])
    ..paragraph(),
);
expect(editable, paintsExactlyCountTimes(#drawRect, 1));

}, skip: isBrowser);
test('ignore key event from web platform', () async {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ViewportOffset viewportOffset = ViewportOffset.zero();
TextSelection currentSelection;
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: viewportOffset,
// This makes the scroll axis vertical.
maxLines: 2,
textSelectionDelegate: delegate,
onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
currentSelection = selection;
},
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
text: const TextSpan(
text: 'test\ntest',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
selection: const TextSelection.collapsed(
offset: 4,
),
);
layout(editable);
editable.hasFocus = true;

expect(
  editable,
  paints..paragraph(offset: Offset.zero),
);

editable.selectPositionAt(from: const Offset(0, 0), cause: SelectionChangedCause.tap);
editable.selection = const TextSelection.collapsed(offset: 0);
pumpFrame();

if(kIsWeb) {
  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'web');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 0);
} else {
  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 1);
}

});
test('selects correct place with offsets', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ViewportOffset viewportOffset = ViewportOffset.zero();
TextSelection currentSelection;
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: viewportOffset,
// This makes the scroll axis vertical.
maxLines: 2,
textSelectionDelegate: delegate,
onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
currentSelection = selection;
},
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
text: const TextSpan(
text: 'test\ntest',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
selection: const TextSelection.collapsed(
offset: 4,
),
);
layout(editable);

expect(
  editable,
  paints..paragraph(offset: Offset.zero),
);

editable.selectPositionAt(from: const Offset(0, 2), cause: SelectionChangedCause.tap);
pumpFrame();

expect(currentSelection.isCollapsed, true);
expect(currentSelection.baseOffset, 0);

viewportOffset.correctBy(10);

pumpFrame();

expect(
  editable,
  paints..paragraph(offset: const Offset(0, -10)),
);

// Tap the same place. But because the offset is scrolled up, the second line
// gets tapped instead.
editable.selectPositionAt(from: const Offset(0, 2), cause: SelectionChangedCause.tap);
pumpFrame();

expect(currentSelection.isCollapsed, true);
expect(currentSelection.baseOffset, 5);

// Test the other selection methods.
// Move over by one character.
editable.handleTapDown(TapDownDetails(globalPosition: const Offset(10, 2)));
pumpFrame();
editable.selectPosition(cause:SelectionChangedCause.tap);
pumpFrame();
expect(currentSelection.isCollapsed, true);
expect(currentSelection.baseOffset, 6);

editable.handleTapDown(TapDownDetails(globalPosition: const Offset(20, 2)));
pumpFrame();
editable.selectWord(cause:SelectionChangedCause.longPress);
pumpFrame();
expect(currentSelection.isCollapsed, false);
expect(currentSelection.baseOffset, 5);
expect(currentSelection.extentOffset, 9);

// Select one more character down but since it's still part of the same
// word, the same word is selected.
editable.selectWordsInRange(from: const Offset(30, 2), cause:SelectionChangedCause.longPress);
pumpFrame();
expect(currentSelection.isCollapsed, false);
expect(currentSelection.baseOffset, 5);
expect(currentSelection.extentOffset, 9);

}, skip: isBrowser);
test('selects correct place when offsets are flipped', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ViewportOffset viewportOffset = ViewportOffset.zero();
TextSelection currentSelection;
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: viewportOffset,
textSelectionDelegate: delegate,
onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
currentSelection = selection;
},
text: const TextSpan(
text: 'abc def ghi',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
);
layout(editable);

editable.selectPositionAt(from: const Offset(30, 2), to: const Offset(10, 2), cause: SelectionChangedCause.drag);
pumpFrame();

expect(currentSelection.isCollapsed, isFalse);
expect(currentSelection.baseOffset, 1);
expect(currentSelection.extentOffset, 3);

}, skip: isBrowser);
test('selection does not flicker as user is dragging', () {
int selectionChangedCount = 0;
TextSelection updatedSelection;
final TextSelectionDelegate delegate = FakeEditableTextState();
const TextSpan text = TextSpan(
text: 'abc def ghi',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
);
final RenderEditable editable1 = RenderEditable(
  textSelectionDelegate: delegate,
  textDirection: TextDirection.ltr,
  offset: ViewportOffset.zero(),
  selection: const TextSelection(baseOffset: 3, extentOffset: 4),
  onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
    selectionChangedCount++;
    updatedSelection = selection;
  },
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
  text: text,
);

layout(editable1);

// Shouldn't cause a selection change.
editable1.selectPositionAt(from: const Offset(30, 2), to: const Offset(42, 2), cause: SelectionChangedCause.drag);
pumpFrame();

expect(updatedSelection, isNull);
expect(selectionChangedCount, 0);

final RenderEditable editable2 = RenderEditable(
  textSelectionDelegate: delegate,
  textDirection: TextDirection.ltr,
  offset: ViewportOffset.zero(),
  selection: const TextSelection(baseOffset: 3, extentOffset: 4),
  onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
    selectionChangedCount++;
    updatedSelection = selection;
  },
  text: text,
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
);

layout(editable2);

// Now this should cause a selection change.
editable2.selectPositionAt(from: const Offset(30, 2), to: const Offset(48, 2), cause: SelectionChangedCause.drag);
pumpFrame();

expect(updatedSelection.baseOffset, 3);
expect(updatedSelection.extentOffset, 5);
expect(selectionChangedCount, 1);

}, skip: isBrowser);
test('promptRect disappears when promptRectColor is set to null', () {
const Color promptRectColor = Color(0x12345678);
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
text: const TextSpan(
style: TextStyle(height: 1.0, fontSize: 10.0, fontFamily: 'Ahem'),
text: 'ABCDEFG',
),
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
textAlign: TextAlign.start,
textDirection: TextDirection.ltr,
locale: const Locale('en', 'US'),
offset: ViewportOffset.fixed(10.0),
textSelectionDelegate: delegate,
selection: const TextSelection.collapsed(offset: 0),
promptRectColor: promptRectColor,
promptRectRange: const TextRange(start: 0, end: 1),
);
editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
expect(
  (Canvas canvas) => editable.paint(TestRecordingPaintingContext(canvas), Offset.zero),
  paints..rect(color: promptRectColor),
);

editable.promptRectColor = null;

editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
pumpFrame();

expect(editable.promptRectColor, promptRectColor);
expect(
  (Canvas canvas) => editable.paint(TestRecordingPaintingContext(canvas), Offset.zero),
  isNot(paints..rect(color: promptRectColor)),
);

});
test('editable hasFocus correctly initialized', () {
// Regression test for https://github.com/flutter/flutter/issues/21640
final TextSelectionDelegate delegate = FakeEditableTextState();
final RenderEditable editable = RenderEditable(
text: const TextSpan(
style: TextStyle(height: 1.0, fontSize: 10.0, fontFamily: 'Ahem'),
text: '12345',
),
textAlign: TextAlign.start,
textDirection: TextDirection.ltr,
locale: const Locale('en', 'US'),
offset: ViewportOffset.zero(),
textSelectionDelegate: delegate,
hasFocus: true,
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
);
expect(editable.hasFocus, true);
editable.hasFocus = false;
expect(editable.hasFocus, false);

});
test('has correct maxScrollExtent', () {
final TextSelectionDelegate delegate = FakeEditableTextState();
EditableText.debugDeterministicCursor = true;
final RenderEditable editable = RenderEditable(
  maxLines: 2,
  backgroundCursorColor: Colors.grey,
  textDirection: TextDirection.ltr,
  cursorColor: const Color.fromARGB(0xFF, 0xFF, 0x00, 0x00),
  offset: ViewportOffset.zero(),
  textSelectionDelegate: delegate,
  text: const TextSpan(
    text: '撒地方加咖啡哈金凤凰卡号方式剪坏算法发挥福建垃\nasfjafjajfjaslfjaskjflasjfksajf撒分开建安路口附近拉设\n计费可使肌肤撒附近埃里克圾房卡设计费"',
    style: TextStyle(
      height: 1.0, fontSize: 10.0, fontFamily: 'Roboto',
    ),
  ),
  startHandleLayerLink: LayerLink(),
  endHandleLayerLink: LayerLink(),
  selection: const TextSelection.collapsed(
    offset: 4,
    affinity: TextAffinity.upstream,
  ),
);

editable.layout(BoxConstraints.loose(const Size(100.0, 1000.0)));
expect(editable.size, equals(const Size(100, 20)));
expect(editable.maxLines, equals(2));
expect(editable.maxScrollExtent, equals(90));

editable.layout(BoxConstraints.loose(const Size(150.0, 1000.0)));
expect(editable.maxScrollExtent, equals(50));

editable.layout(BoxConstraints.loose(const Size(200.0, 1000.0)));
expect(editable.maxScrollExtent, equals(40));

editable.layout(BoxConstraints.loose(const Size(500.0, 1000.0)));
expect(editable.maxScrollExtent, equals(10));

editable.layout(BoxConstraints.loose(const Size(1000.0, 1000.0)));
expect(editable.maxScrollExtent, equals(10));

}, skip: isBrowser); // TODO(yjbanov): https://github.com/flutter/flutter/issues/42772
test('arrow keys and delete handle simple text correctly', () async {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ViewportOffset viewportOffset = ViewportOffset.zero();
TextSelection currentSelection;
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: viewportOffset,
textSelectionDelegate: delegate,
onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
currentSelection = selection;
},
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
text: const TextSpan(
text: 'test',
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
selection: const TextSelection.collapsed(
offset: 0,
),
);
layout(editable);
editable.hasFocus = true;

editable.selectPositionAt(from: const Offset(0, 0), cause: SelectionChangedCause.tap);
editable.selection = const TextSelection.collapsed(offset: 0);
pumpFrame();

if (!kIsWeb) {
  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 1);

  await simulateKeyDownEvent(LogicalKeyboardKey.arrowLeft, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowLeft, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 0);

  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 1);

  await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
  expect(delegate.textEditingValue.text, 'est');
}

});
test('arrow keys and delete handle surrogate pairs correctly', () async {
final TextSelectionDelegate delegate = FakeEditableTextState();
final ViewportOffset viewportOffset = ViewportOffset.zero();
TextSelection currentSelection;
final RenderEditable editable = RenderEditable(
backgroundCursorColor: Colors.grey,
selectionColor: Colors.black,
textDirection: TextDirection.ltr,
cursorColor: Colors.red,
offset: viewportOffset,
textSelectionDelegate: delegate,
onSelectionChanged: (TextSelection selection, RenderEditable renderObject, SelectionChangedCause cause) {
currentSelection = selection;
},
startHandleLayerLink: LayerLink(),
endHandleLayerLink: LayerLink(),
text: const TextSpan(
text: '\u{1F44D}',  // Thumbs up
style: TextStyle(
height: 1.0, fontSize: 10.0, fontFamily: 'Ahem',
),
),
selection: const TextSelection.collapsed(
offset: 0,
),
);
layout(editable);
editable.hasFocus = true;

editable.selectPositionAt(from: const Offset(0, 0), cause: SelectionChangedCause.tap);
editable.selection = const TextSelection.collapsed(offset: 0);
pumpFrame();

if (!kIsWeb) {
  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 2);

  await simulateKeyDownEvent(LogicalKeyboardKey.arrowLeft, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowLeft, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 0);

  await simulateKeyDownEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.arrowRight, platform: 'android');
  expect(currentSelection.isCollapsed, true);
  expect(currentSelection.baseOffset, 2);

  await simulateKeyDownEvent(LogicalKeyboardKey.delete, platform: 'android');
  await simulateKeyUpEvent(LogicalKeyboardKey.delete, platform: 'android');
  expect(delegate.textEditingValue.text, '');
}

});
}

Also, in the widget code, it moves the text value from the textEditingValue into the _Editable's TextSpan text member via a complex route through the text editing controller and rebuilding the text span, so instead of emulating that, I think it's fine to just check the textEditingValue in the fake.

@stuartmorgan I took a look at it: for the ASCII one, the 'est' expectation for the test is wrong: it should be 'test', since you start off at zero, move to one, back to zero, and then hit delete: you're at the beginning of the string when you hit delete.

Ah, but you're thinking of backspace. This is delete, good sir! It deletes forward!
Thus the thing a little while back where I had to revert the addition of "backspace" to the list of delete keys, because it made backspace on desktop do forward delete.
Now the fascinating question: why does this code handle delete, which is rarely used, but not backspace, which is used all the time? 🤷 . I looked at the blame, but the PR adding a bunch of shortcuts including delete doesn't explain why.

However, even if you fixed that, it wouldn't work, because you're using a fake TextSelectionDelegate that the editable code tries to manipulate, but can't because it's a fake that doesn't keep any real state.

Thanks, I figured it was something to do with my cargo-culting the setup from the others tests without looking too much at the details :)

Try this test file, I added a variable to keep state

👍

and added a move to the right before the delete so it'll delete a character.

Entertainingly it passes either with or without it, which really confused me until I realized that the selection delegate hijacking means that the actual selection in the internal model never changes, so it's always (0, 0) when processing the delete regardless of the arrow keys. But I removed the added move-right since that makes it less confusing (given that it's forward delete).
Thanks for the test assist! It's now ready for review.

Oh!  You are so right.  I think my problem is that when I implemented it, the key on my mac keyboard says "delete", which is really backspace on most keyboards.

/cc @justinmc Does your PR moving us over to use the characters package handle this case?

/cc @justinmc Does your PR moving us over to use the characters package handle this case?

This is explicitly a short-term immediate fix for an incredibly broken desktop experience until that work lands.

I agree we should handle this with the characters package when I finish that work, but no I haven't written than yet.  I just made a comment on the PR about this to remind myself.
Actually I opened a separate PR for a similar thing with the software keyboard arrow keys in the engine: https://github.com/flutter/engine/pull/17420.
I think this PR is a good solution in the meantime 👍


Pressable Button pulse effect unexpected behavior

Describe the bug
Regression: Sometimes, PressableButtonHoloLens2 prefabs show static pulse effect without animation. This could be related to #5962
To reproduce
HandInteractionExample scene
Interact with HoloLens2 buttons
Screenshots

Duplicate of #5962


Error encountered resolving symbol values statically.

Do you want to request a feature or report a bug?
Reporting a bug
(If this is a usage question, please do not post it here—post it on forum.sentry.io instead. If this is not a “feature” or a “bug”, or the phrase “How do I...?” applies, then it's probably a usage question.)
What is the current behavior?
Application will not compile with ngc once Sentry is added.
[16:17:08]  ionic-app-script task: "build"
[16:17:08]  Error: Error encountered resolving symbol values statically. Reference to a non-exported class
            RavenExceptionHandler. Consider exporting the class (position 85:1 in the original .ts file), resolving
            symbol AppModule in /home/devbox/code/app/src/app/app.module.ts

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem via https://jsfiddle.net or similar.
What is the expected behavior?
Application will run and then compile for distribution.
Which versions of Raven.js, 3.15.0 and which browser and OS none are affected by this issue? Did this work in previous versions of Raven.js? did not attempt Are you using the CDN (http://ravenjs.com)? no Are you using hosted Sentry yes or on-premises? no  If on-premises, which version (e.g. 8.7.0)? N/A
3.15.0
Browser and OS irrelevant.  This is a build in ionic-cli for distribution as a native app.  The build is happening in Ubuntu Server 16.04.
  "dependencies": {
    "@agm/core": "^1.0.0-beta.0",
    "@angular/common": "4.0.2",
    "@angular/compiler": "4.0.2",
    "@angular/compiler-cli": "4.0.2",
    "@angular/core": "4.0.2",
    "@angular/forms": "4.0.2",
    "@angular/http": "4.0.2",
    "@angular/platform-browser": "4.0.2",
    "@angular/platform-browser-dynamic": "4.0.2",
    "@ionic-native/app-version": "^3.6.1",
    "@ionic-native/core": "^3.6.1",
    "@ionic-native/geolocation": "^3.6.1",
    "@ionic-native/splash-screen": "^3.6.1",
    "@ionic-native/status-bar": "^3.6.1",
    "@ionic/storage": "^2.0.1",
    "ionic-angular": "^3.1.1",
    "ionicons": "^3.0.0",
    "raven-js": "^3.15.0",
    "rxjs": "5.1.1",
    "sw-toolbox": "^3.6.0",
    "zone.js": "^0.8.10"
  },
  "devDependencies": {
    "@ionic/app-scripts": "^1.3.6",
    "typescript": "^2.2.1"
  },

Pretty sure the root cause has to do with why I cannot use
import { Raven } from 'raven-js';

and instead have to use
import Raven from 'raven-js';

Every other import in the entire project uses the braces, and doesn't have this error.

Uninstalling raven

It's supposed to be import Raven = require('raven-js')

That instead raises
Typescript Error
Import assignment cannot be used when targeting ECMAScript 2015 modules. Consider using 'import * as ns from "mod"', 'import {a} from "mod"', 'import d from "mod"', or another module format instead.

It sounds like the problem then is Raven.js is not exported as a proper ES6 module.  Maybe I can't use Sentry at all then and should change brands?

This came from https://docs.sentry.io/clients/javascript/integrations/angular/

Maybe I can't use Sentry at all then and should change brands?

Could be. Plenty of people are using these modules successfully and have contributed TypeScript language updates to continue working with them. Unfortunately, I'm not a TypeScript expert and it's tough for me to understand why this works for one person and not another. It may depend on how you're configuring tsc.

Can we get a basic test suite for the TypeScript bits in, so we at least know if it is or isnt broken? Theres not much point in having it at all if its not maintained.

Can we get a basic test suite for the TypeScript bits in

There is.

I got it to work with
import * as Raven from 'raven-js';

// ...

Raven
  .config('semi-secret stuff')
  .install();

export class RavenErrorHandler implements IonicErrorHandler {
  handleError(err:any) : void {
    Raven.captureException(err);
  }
}

// ...

@NgModule({

// ...

  providers: [
    {provide: ErrorHandler, useClass: RavenErrorHandler},

Which is slightly different than the instructions say

originally there was
{provide: ErrorHandler, useClass: IonicErrorHandler},

Also I had to use Raven.captureException(err); instead of Raven.captureException(err.originalError);

Also I had to use Raven.captureException(err); instead of Raven.captureException(err.originalError);

Thanks. I'll update the docs.


SIGINT-1713: Jenkins break build and support for customized build status UNSTABLE, FAILURE or SUCCESS if issues are found

Added new parameter mark_build_if_issues_are_present for all Job types
Added new input field for parameter mark_build_if_issues_are_present for FreeStyle UI and Pipeline Syntax
For return_status, plugin will always return a status and by default, for non-zero exit codes both stage and build will be failed
If no issues are found mark_build_if_issues_are_present will be ignored and if issues are found then stage and build will be marked as FAILURE/UNSTABLE/SUCCESS corresponding to the input for mark_build_if_issues_are_present.
Added unit test

Also, update the PR description according to the exposed parameter!


Build failure: for python3.11-gssapi-1.8.3 failed with exit code 1;

Steps To Reproduce
Steps to reproduce the behavior:

nix-build /nix/store/jq61lcii5v6ajrl65hf8agqi0b08218x-python3.11-gssapi-1.8.3.drv

Failure during a system update
 darwin-rebuild switch --flake .
Build log
error: builder for '/nix/store/jq61lcii5v6ajrl65hf8agqi0b08218x-python3.11-gssapi-1.8.3.drv' failed with exit code 1;
       last 10 log lines:
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_basic_verify_mic_iov - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_basic_wrap_unwrap - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_get_mic - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_get_mic_iov - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_get_mic_iov_length - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_import_export_sec_context - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_verify_mic_iov_bad_mic_raises_error - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > FAILED tests/test_raw.py::TestWrapUnwrap::test_wrap_size_limit - gssapi.raw.exceptions.MissingCredentialsError: Major (458752):  No credenti...
       > ================== 51 failed, 117 passed, 31 skipped in 3.85s ==================
       > /nix/store/q2sr9a4likgf0c0ib3zxxy63vr0dr0w9-stdenv-darwin/setup: line 1588: pop_var_context: head of shell_variables not a function context
       For full logs, run 'nix log /nix/store/jq61lcii5v6ajrl65hf8agqi0b08218x-python3.11-gssapi-1.8.3.drv'.

Full log at
Additional context
build running on MacOs M1 Darwin
Notify maintainers

Metadata
nix-shell -p nix-info --run "nix-info -m"

 - system: `"aarch64-darwin"`
 - host os: `Darwin 23.5.0, macOS 14.5`
 - multi-user?: `yes`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.18.2`
 - channels(root): `"nixpkgs"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixpkgs`

Add a :+1: reaction to issues you find important.

seems issue disappeared can't reproduce anymore

I see this on nixpkgs 24.05 on Darwin as well, seems like this package is trying to run some tests and shouldn't be?

Fixed in #316413


Update raycast-ollama extension

Description

Fixed Error keep alive, error missing unit in duration: unit is now required for negative or zero duration time. Use -1s for persistent model on memory or 0s for free up memory immediately.

Checklist

[x] I read the extension guidelines
[x] I read the documentation about publishing
[x] I ran npm run build and tested this distribution build in Raycast
[x] I checked that files in the assets folder are used by the extension itself
[x] I checked that assets used by the README are placed outside of the metadata folder

Approved ✅


Installation Failed

Not allowing me to install, something to do with symphony/console already being installed...
→ composer global require tightenco/jigsaw
Changed current directory to /Users/Andrew/.composer
Using version ^0.5.0 for tightenco/jigsaw
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for tightenco/jigsaw ^0.5.0 -> satisfiable by tightenco/jigsaw[v0.5.0].
    - Conclusion: remove symfony/console v3.0.4
    - Conclusion: don't install symfony/console v3.0.4
    - tightenco/jigsaw v0.5.0 requires symfony/console ^2.5 -> satisfiable by symfony/console[v2.5.0, v2.5.1, v2.5.10, v2.5.11, v2.5.12, v2.5.2, v2.5.3, v2.5.4, v2.5.5, v2.5.6, v2.5.7, v2.5.8, v2.5.9, v2.6.0, v2.6.1, v2.6.10, v2.6.11, v2.6.12, v2.6.13, v2.6.2, v2.6.3, v2.6.4, v2.6.5, v2.6.6, v2.6.7, v2.6.8, v2.6.9, v2.7.0, v2.7.1, v2.7.10, v2.7.11, v2.7.2, v2.7.3, v2.7.4, v2.7.5, v2.7.6, v2.7.7, v2.7.8, v2.7.9, v2.8.0, v2.8.1, v2.8.2, v2.8.3, v2.8.4].
    - Can only install one of: symfony/console[v2.5.0, v3.0.4].
    - Can only install one of: symfony/console[v2.5.1, v3.0.4].
    - Can only install one of: symfony/console[v2.5.10, v3.0.4].
    - Can only install one of: symfony/console[v2.5.11, v3.0.4].
    - Can only install one of: symfony/console[v2.5.12, v3.0.4].
    - Can only install one of: symfony/console[v2.5.2, v3.0.4].
    - Can only install one of: symfony/console[v2.5.3, v3.0.4].
    - Can only install one of: symfony/console[v2.5.4, v3.0.4].
    - Can only install one of: symfony/console[v2.5.5, v3.0.4].
    - Can only install one of: symfony/console[v2.5.6, v3.0.4].
    - Can only install one of: symfony/console[v2.5.7, v3.0.4].
    - Can only install one of: symfony/console[v2.5.8, v3.0.4].
    - Can only install one of: symfony/console[v2.5.9, v3.0.4].
    - Can only install one of: symfony/console[v2.6.0, v3.0.4].
    - Can only install one of: symfony/console[v2.6.1, v3.0.4].
    - Can only install one of: symfony/console[v2.6.10, v3.0.4].
    - Can only install one of: symfony/console[v2.6.11, v3.0.4].
    - Can only install one of: symfony/console[v2.6.12, v3.0.4].
    - Can only install one of: symfony/console[v2.6.13, v3.0.4].
    - Can only install one of: symfony/console[v2.6.2, v3.0.4].
    - Can only install one of: symfony/console[v2.6.3, v3.0.4].
    - Can only install one of: symfony/console[v2.6.4, v3.0.4].
    - Can only install one of: symfony/console[v2.6.5, v3.0.4].
    - Can only install one of: symfony/console[v2.6.6, v3.0.4].
    - Can only install one of: symfony/console[v2.6.7, v3.0.4].
    - Can only install one of: symfony/console[v2.6.8, v3.0.4].
    - Can only install one of: symfony/console[v2.6.9, v3.0.4].
    - Can only install one of: symfony/console[v2.7.0, v3.0.4].
    - Can only install one of: symfony/console[v2.7.1, v3.0.4].
    - Can only install one of: symfony/console[v2.7.10, v3.0.4].
    - Can only install one of: symfony/console[v2.7.11, v3.0.4].
    - Can only install one of: symfony/console[v2.7.2, v3.0.4].
    - Can only install one of: symfony/console[v2.7.3, v3.0.4].
    - Can only install one of: symfony/console[v2.7.4, v3.0.4].
    - Can only install one of: symfony/console[v2.7.5, v3.0.4].
    - Can only install one of: symfony/console[v2.7.6, v3.0.4].
    - Can only install one of: symfony/console[v2.7.7, v3.0.4].
    - Can only install one of: symfony/console[v2.7.8, v3.0.4].
    - Can only install one of: symfony/console[v2.7.9, v3.0.4].
    - Can only install one of: symfony/console[v2.8.0, v3.0.4].
    - Can only install one of: symfony/console[v2.8.1, v3.0.4].
    - Can only install one of: symfony/console[v2.8.2, v3.0.4].
    - Can only install one of: symfony/console[v2.8.3, v3.0.4].
    - Can only install one of: symfony/console[v2.8.4, v3.0.4].
    - Installation request for symfony/console == <IP_ADDRESS> -> satisfiable by symfony/console[v3.0.4].

Installation failed, reverting ./composer.json to its original content.

Any ideas on how to fix?

Sounds like you have some existing globally installed Composer packages that have a conflicting dependency. The annoying thing with globally installed Composer packages is they all live in the same composer.json, so it's very easy to run into conflicts.
The best solution in your case would be to install Jigsaw locally per project to avoid conflicts.
You can do that by creating a new directory for your project and changing to it:
mkdir my-jigsaw-site && cd my-jigsaw-site
...then using Composer to install Jigsaw locally to that folder:
composer require tightenco/jigsaw
Finally, initialize the default project structure:
./vendor/bin/jigsaw init
We've got documentation for this situation on the installation page, under the "Installing Locally" heading:
http://jigsaw.tighten.co/docs/installation/

I had the latest version on symfony/console (v3.0.4) already installed.
Fixed by adding "tightenco/jigsaw": "^0.5.0" to my global composer.json and running composer global update.
Possible fix to the jigsaw composer.json by allowing a range of versions up to 3.0.4, if indeed that version of symphony/console fits the requirements?

Yeah I don't know for sure that symfony/console: ^3.0 is compatible with Jigsaw unfortunately, will have to see what the breaking changes were.
I'm surprised that fixed it, it must have uninstalled the old version of symfony/console when you did the global update? Must not have actually needed ^3.0 for whatever else you had :+1:

Yeah it did, the only other thing was Laravel installer which is 2.3 and up.
Just had a play around with Jigsaw, it's brilliant. Good work.

Awesome! Thanks @andrewhaining :)


DO NOT MERGE Fix #2680: Use Symbols for the private fields of JS classes.

Based on #3814. Only the last commit belongs to this PR.

Any encoding of field names as identifiers that we could come up would inevitably be prone to clashes, as we can never know which fields would be declared in superclasses, or worse, in subclasses.
Therefore, we now create one Symbol for each private field declaration, and we use that. When Symbols are not supported by the engine, we dynamically generate random names that have the same entropy as UUIDs. This does not guarantee that there will never be any clash, but it makes the likelihood close to zero.
There is no additional test, because there is no way to write a test that would have failed before this commit, and would still be relevant after this commit, given that the compilation has completely changed. Even removing the constraint that a test would need to fail before the commit, I cannot think of any test that would be relevant for this commit.

Rebased and addressed the nit.