Error msg for rename failure from extension disappears after a while

The Go extension registers a rename provider which sends a rejected promise when there is an error in renaming. See https://github.com/Microsoft/vscode-go/blob/0.6.65/src/goRename.ts#L46
VS Code shows this message as a warning followed by a general msg about rename failure as an error

After a while, the warning (which is the actual error message from the extension) disappears, the error with the general message remains.
Shouldnt the message from the extension stay around until user closes it

Shouldnt the message from the extension stay around until user closes it

Yes, but this is an error message from the core (the rename-feature). For extensions we have enforced that they don't auto-dispose and add the close-button everywhere.
@bpasero Unsure what the rule in the workspace is? Do we hide error messages after timeout or do we keep them?

@jrieken it looks like today we are not removing messages that either have severity ERROR or carry actions with them for the user to pick (here).
Now, it looks like when an extension runs showInformationMessage we are actually adding a "Close" action and as such none of the extension messages are ever closed (I think we have this behaviour since quite some time).
I am not sure where the message is created that originates from the rejected promise, but if that one has a "Close" action too it would stay open.
Note: we add a "Close" action automatically to each message that does not come with an action itself. So in general it would not be needed, however, not providing any actions results in the automated removal after N seconds.

With https://github.com/Microsoft/vscode/commit/dbe0f89264dc6e9d38cf8723e358741ce9e8a131, rejected rename promise from extension was made to get rejected as Error instead of string
Only if the rename promise was rejected using string, the message would show up as error due to https://github.com/Microsoft/vscode/blob/release/1.16/src/vs/editor/contrib/rename/browser/rename.ts#L162
At present, we always end up in the else block.
Thus showing a standard localized "Sorry, rename failed to execute." message.
Since a wrapped error as promise is being returned again from the else block, that results in the warning that disappears after N seconds.
I propose this: https://github.com/Microsoft/vscode/commit/281c9386e241c9e9076ac50aad6c99160b9e69bd


add non-portable linux pthread initializers to layout sanity check

Also, turns out we can enable all pthread tests on Solarish.

@bors r+

:pushpin: Commit 0164fa82ac2943571c068e6a0b30d3e51629ae50 has been approved by RalfJung
It is now in the queue for this repository.

:hourglass: Testing commit 0164fa82ac2943571c068e6a0b30d3e51629ae50 with merge c0fb1a78868654f8899cb4f4dc3cd8b62230e71e...

:sunny: Test successful - checks-actions
Approved by: RalfJung
Pushing c0fb1a78868654f8899cb4f4dc3cd8b62230e71e to master...


unmanaged views handled better

unmanaged views handled better depending on type.
OVERRIDE_REDIRECT takes focus (for example dmenu) but only if UNMANAGED bit is unset (firefox typing popup is both)
might need to look more into the other combinations and how to deal with them.

Thanks.


Updates samples to v1.1.0

Resolves
Fixes #298
Description
Updated and simplified samples using v1.1.0

This is ready for a review!


Black Screen after running recomended settings + enable win11 old right click and set screen to performance

So after running the normal tweaks "i always use recomended" i got Black Screen. During post and boot if fine, but on windows no image, if i use a 2nd monitor i have image, only the laptop one doesnt have after boot

Have you check out the monitor settings? Probably one of the monitor is disabled.


Adding troubleshooting guidance for VMs from DevTest Labs

I was having trouble connecting to my DevTest Lab VM on Linux and found this supporting article but there was no mention of how to troubleshoot for a DevTest Lab VM, which does not show the full options of the VM like a regular resource https://docs.microsoft.com/en-us/troubleshoot/azure/virtual-machines/connect-linux-vm-sshconnection

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

ID: 1b1f172d-5ace-c96c-bd08-cdcb49ab30e6
Version Independent ID: 947423a3-3a61-399f-c0b2-df58aaf7a70a
Content: Can't connect a Linux VM using SSH connection - Virtual Machines
Content Source: support/azure/virtual-machines/connect-linux-vm-sshconnection.md
Service: virtual-machines
GitHub Login: @genlin
Microsoft Alias: genli

@misolori To troubleshoot the connection issue with a DevTest Lab VM, you can contact the Azure experts on Microsoft Q&A or Stackoverflow. You also contact Azure support to resolve the issue quickly: Go to the Azure support and select Help + support.


Ground Markers in the same region are not saved when modified by multiple clients

Type
Crash or hang
Operating System
None
OS Version
No response
Bug description
Log in with 2 clients both using "profileA".
Mark 1 tile on client1 and label it "client1".
Mark a different tile on client 2 and label it "client2".
Close client 1.
Close client 2.
Restart them both and only client2's tile will still be marked.
Note this only happens when the two tiles marked are in the same region.
Screenshots or videos
No response
RuneLite version
RuneLite version: <IP_ADDRESS>
Launcher version: 2.6.3
Logs
No response

This sounds like normal behavior - there is no merging of changes to profiles when multiple clients modify the same profile. The last client to close will save its settings over the other client. This is also how it worked prior to profiles.

Changes are merged if they are for different keys. Since ground markers are saved with one key per region this results in very confusing situation for end users. If two tiles are marked in different regions by two open clients, both are saved. Its only when the marking is done within a single region that data is lost. This situation is at the very least confusing to end users, especially when the size and locations of regions are not well known to players.


LimeTabularExplainer gives an unexpected explanation

Inspired by this tutorial I've been trying to explain the results produced by a classification model that analyses network traffic. The model uses the "KDD Cup 99 data 10 %" data set, which is available here. It contains a mix of numerical and categorical features. Each row in the data set contains information about network connections. The last column contains a label that indicates whether the connection was normal or an attack. Examples of attack types include smurf(a kind of DoS attack), buffer_overflow. and many more. As an example, two samples are shown below (a smurf attack and a normal connection):
0,icmp,ecr_i,SF,1032,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,511,511,0.00,0.00,0.00,0.00,1.00,0.00,0.00,255,255,1.00,0.00,1.00,0.00,0.00,0.00,0.00,0.00,smurf.
0,tcp,http,SF,181,5450,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,8,8,0.00,0.00,0.00,0.00,1.00,0.00,0.00,9,9,1.00,0.00,0.11,0.00,0.00,0.00,0.00,0.00,normal.

The problem is that I get unexpected explanations when I use the the LimeTabularExplainer to explain predictions. For example, when the model predicts that a given connection is a smurf attack, the explanation is based on some other attack (buffer_overflow). The following figure shows an example of this.

In particular, I'm wondering why the explanation uses "NOT buffer_overflow" and "buffer_overflow" for the chart in the middle.
I was wondering whether this has sometimes to do with the order of the class names passed to the LimeTabularExplainer. In particular the documentation says "class_names – list of class names, ordered according to whatever the classifier is using. If not present, class names will be ‘0’, ‘1’, ..." but it is unclear to me how I find out what the order is.
Any help is appreciated. Thanks in advance!
The complete code is available below:
import sklearn
import sklearn.datasets
import sklearn.ensemble
import numpy as np
import lime
import lime.lime_tabular

feature_names = [
    "duration",  # continuous.
    "protocol_type",  # symbolic.
    "service",  # symbolic.
    "flag",  # symbolic.
    "src_bytes",  # continuous.
    "dst_bytes",  # continuous.
    "land",  # symbolic.
    "wrong_fragment",  # continuous.
    "urgent",  # continuous.
    "hot",  # continuous.
    "num_failed_logins",  # continuous.
    "logged_in",  # symbolic.
    "num_compromised",  # continuous.
    "root_shell",  # continuous.
    "su_attempted",  # continuous.
    "num_root",  # continuous.
    "num_file_creations",  # continuous.
    "num_shells",  # continuous.
    "num_access_files",  # continuous.
    "num_outbound_cmds",  # continuous.
    "is_host_login",  # symbolic.
    "is_guest_login",  # symbolic.
    "count",  # continuous.
    "srv_count",  # continuous.
    "serror_rate",  # continuous.
    "srv_serror_rate",  # continuous.
    "rerror_rate",  # continuous.
    "srv_rerror_rate",  # continuous.
    "same_srv_rate",  # continuous.
    "diff_srv_rate",  # continuous.
    "srv_diff_host_rate",  # continuous.
    "dst_host_count",  # continuous.
    "dst_host_srv_count",  # continuous.
    "dst_host_same_srv_rate",  # continuous.
    "dst_host_diff_srv_rate",  # continuous.
    "dst_host_same_src_port_rate",  # continuous.
    "dst_host_srv_diff_host_rate",  # continuous.
    "dst_host_serror_rate",  # continuous.
    "dst_host_srv_serror_rate",  # continuous.
    "dst_host_rerror_rate",  # continuous.
    "dst_host_srv_rerror_rate"  # continuous.
]

data = np.genfromtxt(
    '/path/to/kddcup.data_10_percent_corrected',
    delimiter=',',
    dtype=str)
labels = data[:, -1]
le = sklearn.preprocessing.LabelEncoder()
le.fit(labels)
labels = le.transform(labels)
class_names = le.classes_
data = data[:, :-1]

categorical_features = [1, 2, 3, 6, 11, 20, 21]

categorical_names = {}
for feature in categorical_features:
    le = sklearn.preprocessing.LabelEncoder()
    le.fit(data[:, feature])
    data[:, feature] = le.transform(data[:, feature])
    categorical_names[feature] = le.classes_

data = data.astype(float)

encoder = sklearn.preprocessing.OneHotEncoder(
    categorical_features=categorical_features)

np.random.seed(1)
train, test, labels_train, labels_test = sklearn.model_selection.train_test_split(
    data, labels, train_size=0.80)

encoder.fit(data)
encoded_train = encoder.transform(train)

rf = sklearn.ensemble.RandomForestClassifier(n_estimators=10)
rf.fit(encoded_train, labels_train)

sklearn.metrics.accuracy_score(labels_test, rf.predict(encoder.transform(test)))

predict_fn = lambda x: rf.predict_proba(encoder.transform(x))

explainer = lime.lime_tabular.LimeTabularExplainer(
    train,
    feature_names=feature_names,
    class_names=class_names,
    categorical_features=categorical_features,
    categorical_names=categorical_names,
    kernel_width=3)

np.random.seed(1)
i = 1653
exp = explainer.explain_instance(test[i], predict_fn, num_features=5)
exp.save_to_file('/path/to/explanation.html')

Explicitly setting top_labels to 1 seem to solve the problem:
exp = explainer.explain_instance(test[i], predict_fn, num_features=41, top_labels=1)

Sorry for the delay in responding. explainer.explain_instance has a parameter called labels, which specifies for which labels you want explanations. The default value is 1, which is what makes sense for binary classification. top_labels is an alternative that gets explanations for the top predicted labels, which is why that solves your problem. We should make top_labels be the default when the number of classes is > 2.

We should make top_labels be the default when the number of classes is > 2.

Yes, I agree. Many thanks for explaining this.


Login feature in flipkart clone

The flipkart clone can be improvised by adding a login page with the login credentials of users stored in a secure database.

I would like to work on this issue

Sure , I will look into the labels and grading system and then assign you .

Hi  @lonlander  you can add your role in the excel sheet and start working on this issue


[FEATURE] Toggle checks on/off

Description
Some repos may not want certain checks, for example releases - they should be able to toggle this on/off

check list in config
settings for repo to toggle individual checks on/off
on results page display turned off checks in grey

Screenshots
No response
Additional information
No response

Settings page for the repo has been added


Vaadin + Quarkus @Push does not work - always DISABLED

Describe the bug
I am getting this error on the frontend using vaadin with quarkus:
https://<IP_ADDRESS>/VAADIN/static/push/vaadinPush.js could not be loaded. Push will not work.
Looks like this:

Push does not work at all.
Logs show this:
io.package.website.configuration.VaadinAppShell' is not a CDI bean. Falling back to default instantiation.
Currently push works only when there is a user interaction with the frontend - for example a usern needs to click a button to force changes to the frontend.
#Gradle properties
quarkusPluginId=io.quarkus
quarkusPluginVersion=3.12.0
quarkusPlatformGroupId=io.quarkus.platform
quarkusPlatformArtifactId=quarkus-bom
quarkusPlatformVersion=3.12.0
vaadinVersion=24.4.4
vaadinPluginVersion=24.4.4
kotlinVersion=2.0.0
build.gradle:
`plugins {
id "java"
id "application"
id 'org.jetbrains.kotlin.jvm' version "${kotlinVersion}"
id 'org.jetbrains.kotlin.kapt' version "${kotlinVersion}"
id "org.jetbrains.kotlin.plugin.allopen" version "${kotlinVersion}"
id 'org.jetbrains.kotlin.plugin.jpa' version "${kotlinVersion}"
id 'com.github.gmazzo.buildconfig' version '5.3.5'
id "com.vaadin" version "${vaadinPluginVersion}"
id 'io.quarkus'
}
apply plugin: 'kotlin'
repositories {
mavenCentral()
maven {
url = uri("https://plugins.gradle.org/m2/")
}
maven {
url "https://maven.vaadin.com/vaadin-addons"
}
google()
gradlePluginPortal()
}
dependencies {
implementation enforcedPlatform("${quarkusPlatformGroupId}:${quarkusPlatformArtifactId}:${quarkusPlatformVersion}")
implementation "com.vaadin:vaadin-bom:${vaadinVersion}"
implementation "com.vaadin:vaadin-jandex:${vaadinVersion}"

//    implementation "com.vaadin:vaadin-core:${vaadinVersion}"
implementation "com.vaadin:vaadin-quarkus-extension:${vaadinVersion}"
implementation "io.quarkus:quarkus-hibernate-orm"
implementation "io.quarkus:quarkus-jdbc-h2"
implementation "io.quarkus:quarkus-hibernate-validator"

implementation "io.quarkus:quarkus-kotlin"

implementation "io.quarkiverse.bucket4j:quarkus-bucket4j:1.0.3"
implementation "io.quarkus:quarkus-jdbc-postgresql"
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
implementation "io.quarkus:quarkus-arc"
implementation "io.quarkus:quarkus-rest"
implementation "io.quarkus:quarkus-rest-jackson"

implementation("io.quarkus:quarkus-smallrye-jwt")
implementation("io.quarkus:quarkus-smallrye-jwt-build")
implementation "io.quarkus:quarkus-mutiny:3.11.2"
implementation "io.smallrye.reactive:mutiny-kotlin:2.6.0"
implementation("io.quarkus:quarkus-undertow")
implementation("io.quarkus:quarkus-websockets")

implementation "org.apache.tika:tika-core:2.9.2"
implementation("org.apache.commons:commons-text:1.11.0")
implementation("org.apache.syncope.common:syncope-common-lib:2.1.14")
implementation "org.apache.commons:commons-lang3:3.14.0"
implementation "commons-codec:commons-codec:1.17.0"
implementation "commons-io:commons-io:2.16.1"
implementation("com.google.guava:guava:33.2.1-jre")

implementation "net.java.dev.jna:jna:5.14.0"

runtimeOnly "com.h2database:h2:2.2.224"

implementation "org.bouncycastle:bcprov-jdk15to18:1.78"
implementation "org.bouncycastle:bcjmail-lts8on:2.73.6"

implementation "org.jboss.logmanager:jboss-logmanager:3.0.6.Final"

testImplementation "io.quarkus:quarkus-junit5"
testImplementation "io.rest-assured:rest-assured"
testImplementation "io.quarkus:quarkus-jdbc-postgresql"
testImplementation "io.quarkus:quarkus-jdbc-h2"
testImplementation "org.jboss.logmanager:jboss-logmanager:3.0.6.Final"

}
def props = new Properties()
props.load(new FileInputStream(new File("src/main/resources/application.properties")))
group 'io.package'
version '1.0.0-SNAPSHOT'
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}
test {
systemProperty "java.util.logging.manager", "org.jboss.logmanager.LogManager"
}
allOpen {
annotation("jakarta.ws.rs.Path")
annotation("jakarta.enterprise.context.ApplicationScoped")
annotation("jakarta.persistence.Entity")
annotation("io.quarkus.test.junit.QuarkusTest")
}
compileKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21
kotlinOptions.javaParameters = true
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.ExperimentalStdlibApi"
}
}
compileTestKotlin {
kotlinOptions.jvmTarget = JavaVersion.VERSION_21
kotlinOptions.javaParameters = true
kotlinOptions {
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ExperimentalCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlinx.coroutines.ObsoleteCoroutinesApi"
freeCompilerArgs += "-opt-in=kotlin.RequiresOptIn"
freeCompilerArgs += "-opt-in=kotlin.ExperimentalStdlibApi"
}
}
application {
mainClass.set("io.minifyimage.website.App")
}
jar {
zip64 = true
exclude 'META-INF/.RSA', 'META-INF/.SF', 'META-INF/*.DSA'
duplicatesStrategy(DuplicatesStrategy.EXCLUDE)
from {
configurations.runtimeClasspath.collect {
it.isDirectory() ? it : zipTree(it)
}
}
}
`
Expected behavior
Push should work.
Actual behavior
Push does not work which means that the website contents does not change.
How to Reproduce?
Steps:

Create project with vaadin + quarkus using examples (gradle)
Add class which extends: AppShellConfigurator with annotation: "@Push(PushMode.AUTOMATIC,transport = Transport.WEBSOCKET)" or just @Push
Create class for website page with annotation @UIScoped
Make a viewModel for the page with which repeats sending same update to the page every X seconds.

Output of uname -a or ver
Darwin MacBook-Air.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May  1 20:14:59 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8122 arm64
Output of java -version
OpenJDK Runtime Environment Zulu22.30+13-CA (build 22.0.1+8) OpenJDK 64-Bit Server VM Zulu22.30+13-CA (build 22.0.1+8, mixed mode, sharing)
Quarkus version or git rev
3.12.0
Build tool (ie. output of mvnw --version or gradlew --version)
8.7
Additional information
No response
Expected-behavior
Push should work.
Reproduction
Steps:

Create project with vaadin + quarkus using examples (gradle)
Add class which extends: AppShellConfigurator with annotation: "@Push(PushMode.AUTOMATIC,transport = Transport.WEBSOCKET)" or just @Push
3/ Create class for website page with annotation @UIScoped
4/ Make a viewModel for the page with which repeats sending same update to the page every X seconds.

System Info
Darwin MacBook-Air.local 23.5.0 Darwin Kernel Version 23.5.0: Wed May 1 20:14:59 PDT 2024; root:xnu-10063.121.3~5/RELEASE_ARM64_T8122 arm64
OpenJDK Runtime Environment Zulu22.30+13-CA (build 22.0.1+8) OpenJDK 64-Bit Server VM Zulu22.30+13-CA (build 22.0.1+8, mixed mode, sharing)
Quarkus version: 3.12.0
Gradle wrapper: 8.7

I tried a similar setup based on the Vaadin Quarkus maven starter and cannot reproduce, neither in dev nor in production mode.
Push script is loaded correctly and updates happen correctly without user interaction.
@JasonTheDynamite could you please share a full project that reproduces the issue as a GitHub project or attach a zip file to this issue?
Also, is the application behind some reverse-proxy that might block resources from being served to the client?

This "https://<IP_ADDRESS>/VAADIN/static/push/vaadinPush.js could not be loaded. Push will not work." is visible when I use the websiite with ssl (https). Without SSL this message is not being displayed. Push stil is DISABLED

@mcollovati ok I will look into it.
Then why there is this error message

when ssl is enabled ?

Ok, I managed to start the application with SSL. What I can see is that with SSL enabled, the push script is downloaded as a binary file instead of a JavaScript resource.
The culprit seems to be this setting quarkus.http.enable-compression=true in application.properties
If I remove it, the Vaadin PUSH script is downloaded correctly and there is no error message.

@mcollovati ok so how to use compression if using it crashes push ?

Push script is added with a standard <script> tag, so I don't know why it is not working with compression. Other javascript resources are working fine (e.g. index-xxxxx.js).
I wonder if it is something specific to Quarkus and SSL.

@mcollovati  so it seems I did found a bug 🙂

I wonder if it is a problem of double compression. Flow already provides compressed version of several resources.
Maybe Quarkus does not detect that the resource is already compressed and it does an additional compression.
It can be tested by downloading vaadinPush.js

It might be this way. I cant test this - javascript is something I am not familiar with

I can confirm that the vaadinPush.js is compressed twice. It looks like a Quarkus issue

Hmm so now I should be waiting for a fix ? 🙂
@mcollovati I am very grateful for your help with this 🙏

@mcollovati so I checked everything and it seems that disabling compression helps bu still the UI is not getting updated 😢

Unfortunately, I cannot help with Kotlin, but I tried to add the following to the HomePage.onAttach(...) method and I can see the UI updated every second
        val service = Executors.newScheduledThreadPool(1)
        val ui = attachEvent!!.ui
        service.scheduleAtFixedRate({
            ui.access {
                counterSpan.text = LocalTime.now().toString()
            }
        }, 1, 1 , TimeUnit.SECONDS)

So, I suppose that there might be some issue in your code that prevents viewModel?.getCounterValueList()?collectLatest() callback being executed.
I hope @mvysny could take a look at your code and provide some suggestion.

I did mamy project using vaadin + spring boot and with this combination the same kotlin StateFlow with collect() or collectLatest() works. It does not work with vaadin + quarkus combination

@JasonTheDynamite regarding Kotlin Coroutines, it's very important to use the correct coroutine dispatcher which calls ui.access(). Please see https://github.com/mvysny/vaadin-coroutines-demo for an example.


fix(deps): update images to latest

This PR contains the following updates:

Package
Type
Update
Change

icr.io/ibm-iac-charts/sysdig-deploy
helm_release
minor
1.45.2 -> 1.46.1

icr.io/ibm-iac/agent-kmodule

patch
13.0.1 -> 13.0.2

icr.io/ibm-iac/agent-slim

patch
13.0.1 -> 13.0.2

icr.io/ibm-iac/image-sbom-extractor

patch
0.6.4 -> 0.6.6

icr.io/ibm-iac/kspm-analyzer

patch
1.42.3 -> 1.42.4

icr.io/ibm-iac/runtime-status-integrator

patch
0.6.4 -> 0.6.6

icr.io/ibm-iac/vuln-host-scanner

minor
0.7.5 -> 0.8.0

Configuration
📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
👻 Immortal: This PR will be recreated if closed unmerged. Get config help if that's undesired.

[ ] If you want to rebase/retry this PR, check this box

This PR has been generated by Renovate Bot.

/run pipeline

:tada: This PR is included in version 1.1.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


InsertDate don't use system tzdata

InsertDate plugin keeps the required pytz package in installed directory. Therefore that not affected on updating the system timezones. For example, my country changed transition but the plugin was not affected.
My workaround for this reason:
cp /usr/share/zoneinfo/Turkey ~/.config/sublime-text-3/Packages/pytz/all/pytz/zoneinfo/Europe/Istanbul
cp /usr/share/zoneinfo/Turkey ~/.config/sublime-text-3/Packages/pytz/all/pytz/zoneinfo/Asia/Istanbul
cp /usr/share/zoneinfo/Turkey ~/.config/sublime-text-3/Packages/pytz/all/pytz/zoneinfo/Turkey

I solved this by updating https://github.com/packagecontrol/pytz from 2015.4 to 2016.7. Running "Package Control: Satisfy Dependencies" in about an hour and restarting ST should fix it for you.


Could not load type 'Wkhtmltopdf.NetCore.HtmlAsPdf'

After install Wkhtmltopdf.NetCore version 3.0.2 to using an project that depend of Wkhtmltopdf.NetCore version 1.1.3 the error happens below.
An exception of type 'System.TypeLoadException' occurred in BankSlip.Api.dll but was not handled in user code: 'Could not load type 'Wkhtmltopdf.NetCore.HtmlAsPdf' from assembly 'Wkhtmltopdf.NetCore, Version=<IP_ADDRESS>, Culture=neutral, PublicKeyToken=null'

Hi! @jlfjunior yeah, that class do not exist anymore.
Since version 2.0 now works like a service, so you have to inject it, you could take a look at the example project https://github.com/fpanaccia/Wkhtmltopdf.NetCore.Example
TL;DR
In the startup.cs you have to remove this -> Wkhtmltopdf.NetCore.RotativaConfiguration.Setup();
And add this -> services.AddWkhtmltopdf();
Then in the controller/service that you are using the HtmlAsPdf, you have to inject this interface IGeneratePdf like this
readonly IGeneratePdf _generatePdf;         public TestViewsController(IGeneratePdf generatePdf)         {             _generatePdf = generatePdf;         }
Then where the HtmlAsPdf is used, you could replace it like this
old version ->             var builder = new HtmlAsPdf();             var pdf = builder.GetPDF(html);
new version ->  var pdf = _generatePdf.GetPDF(html);
Let me know if this helps you

after the changes other error is presented:
An exception of type 'System.Exception' occurred in Wkhtmltopdf.NetCore.dll but was not handled in user code
at Wkhtmltopdf.NetCore.WkhtmlDriver.Convert(String wkhtmlPath, String switches, String html)
at Wkhtmltopdf.NetCore.GeneratePdf.GetPDF(String html)
        var html = BankSlip.MontaHtmlEmbedded();
        var pdf = _generatePdf.GetPDF(html);

        return pdf;

could you post the full stack trace?

Yes, follows informations below.
Exception has occurred: CLR/System.Exception
An exception of type 'System.Exception' occurred in Wkhtmltopdf.NetCore.dll but was not handled in user code
at Wkhtmltopdf.NetCore.WkhtmlDriver.Convert(String wkhtmlPath, String switches, String html)
at Wkhtmltopdf.NetCore.GeneratePdf.GetPDF(String html)
at BankSlip.Api.Models.Services.BankSlipService.GeneratePdf(IEnumerable`1 bankSlips, Boolean paymentBooklet) in C:\Users\junior\Documents\PagCerto\BankSlip\src\BankSlip.Api\Models\Services\BankSlipService.cs:line 28
at BankSlip.Api.Controllers.PrintController.GeneratePdf(BankSlipPdfModel model) in C:\Users\junior\Documents\PagCerto\BankSlip\src\BankSlip.Api\Controllers\PrintController.cs:line 26
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

As an clean example, i just did this example project, it does not have the binaries of rotativa because of size restriction in the comments.
WebApplication1.zip

hmm it seems like a problem with the HTML....how were you using it before? the HTML, is a razor view or a "hardcoded" HTML?

I'm using "hardcode" html. when executing the project WebApplication, the same error happens:
Exception has occurred: CLR/System.Exception
An exception of type 'System.Exception' occurred in Wkhtmltopdf.NetCore.dll but was not handled in user code
at Wkhtmltopdf.NetCore.WkhtmlDriver.Convert(String wkhtmlPath, String switches, String html)
at Wkhtmltopdf.NetCore.GeneratePdf.GetPDF(String html)
at WebApplication1.Controllers.TestController.Get() in C:\Users\junior\Downloads\WebApplication1\Controllers\TestController.cs:line 37
at Microsoft.Extensions.Internal.ObjectMethodExecutor.Execute(Object target, Object[] parameters)
at Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor.SyncActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, Object controller, Object[] arguments)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeActionMethodAsync()
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(State& next, Scope& scope, Object& state, Boolean& isCompleted)
at Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.InvokeNextActionFilterAsync()

Have you added the binaries of rotativa, like this?

What version of net core are you running?

Using the same project + the binaries i am running it fine

Yes, I'm using dotnet core 3.1.

are you using omnisharp? i will try it in vscode

I'm using vscode with omnisharp, I thank you.

This is my launch.json
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": ".NET Core Launch (web)",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build",
"program": "${workspaceFolder}/bin/Debug/netcoreapp3.1/WebApplication1.dll",
"args": [],
"cwd": "${workspaceFolder}",
"stopAtEntry": false,
"serverReadyAction": {
"action": "openExternally",
"pattern": "\bNow listening on:\s+(https?://\S+)"
},
"env": {
"ASPNETCORE_ENVIRONMENT": "Development"
},
"sourceFileMap": {
"/Views": "${workspaceFolder}/Views"
}
},
{
"name": ".NET Core Attach",
"type": "coreclr",
"request": "attach",
"processId": "${command:pickProcess}"
}
]
}

i will download the 3.1.7 and try it

When using your launch.json the same problem occur.
PS C:\Users\junior\Downloads\WebApplication1> dotnet --info
.NET Core SDK (reflecting any global.json):
Version:   3.1.401
Commit:    39d17847db
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19041
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.401\
Host (useful for support):
Version: 3.1.7
Commit:  fcfdef8d6b
.NET Core SDKs installed:
2.2.207 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download

my dotnet info, looks like this now
.NET Core SDK (reflecting any global.json):
Version:   3.1.401
Commit:    39d17847db
Runtime Environment:
OS Name:     Windows
OS Version:  10.0.19041
OS Platform: Windows
RID:         win10-x64
Base Path:   C:\Program Files\dotnet\sdk\3.1.401\
Host (useful for support):
Version: 3.1.7
Commit:  fcfdef8d6b
.NET Core SDKs installed:
3.1.100 [C:\Program Files\dotnet\sdk]
3.1.302 [C:\Program Files\dotnet\sdk]
3.1.400-preview-015151 [C:\Program Files\dotnet\sdk]
3.1.401 [C:\Program Files\dotnet\sdk]
.NET Core runtimes installed:
Microsoft.AspNetCore.All 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.All 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.All]
Microsoft.AspNetCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.AspNetCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.AspNetCore.App]
Microsoft.NETCore.App 2.1.16 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.1.20 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 2.2.8 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.NETCore.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.NETCore.App]
Microsoft.WindowsDesktop.App 3.0.3 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.0 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.2 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.6 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
Microsoft.WindowsDesktop.App 3.1.7 [C:\Program Files\dotnet\shared\Microsoft.WindowsDesktop.App]
To install additional .NET Core runtimes or SDKs:
https://aka.ms/dotnet-download
But still is working fine

maybe is the SDK 2.2.207....im gonna try and install it

Even with the SDK 2.2.207 is working, i even tried running it from console...i will try to remove the others SDKs

I deleted all SDKs and runtimes, and still i am unable to reproduce it

Also, this is the version of the c# extension of vscode

if you run with "dotnet run" you have the same problem?

After installing the Visual Studio Community 2019, the problem resolved.
Is there any relationship?

When you install visual studio it install a dotnet sdk  (if you choose the .net core option).
Maybe there was something wrong with your sdk, you can see that now you are running the 3.1.8 version, maybe there was an issue with your installation.


An instance of class __NSCFBackgroundDownloadTask was deallocated while KVO still registered with it

An instance of class __NSCFBackgroundDownloadTask was deallocated while key value observers were still registered with it. Current observation info:  (<NSKeyValueObservance : Observer: , Key path: countOfBytesReceived, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: ><NSKeyValueObservance : Observer: , Key path: countOfBytesExpectedToReceive, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: ><NSKeyValueObservance : Observer: , Key path: countOfBytesSent, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: ><NSKeyValueObservance : Observer: , Key path: countOfBytesExpectedToSend, Options: <New: YES, Old: NO, Prior: NO> Context: 0x0, Property: >)
0 CoreFoundation 0x000000018b9ac1d8  + 148
1 libobjc.A.dylib 0x000000018a3e455c objc_exception_throw + 56
2 CoreFoundation 0x000000018b9ac108  + 0
3 Foundation 0x000000018c3f9df4  + 300
4 libsystem_blocks.dylib 0x000000018a88aa28 _Block_release + 144
5 libdispatch.dylib 0x000000018a8351c0  + 16
6 libdispatch.dylib 0x000000018a843444  + 928
7 libdispatch.dylib 0x000000018a8389a8  + 652
8 libdispatch.dylib 0x000000018a843940  + 360
9 libdispatch.dylib 0x000000018a84538c  + 572
10 libdispatch.dylib 0x000000018a8450ec  + 124
11 libsystem_pthread.dylib 0x000000018aa3d2c8 _pthread_wqthread + 1288
12 libsystem_pthread.dylib 0x000000018aa3cdb4 start_wqthread + 4
I have this problem when using background Fetch and download file from internet.

Probably duplicate of #3681 ?


Show an Alchemy bar on pages if user is logged in

Like wordpress, we should display an Alchemy bar (icon) so the user can easily switch back into admin and has a quick link to edit the current page.

f498db94a0670e5a8410212d87896b619dc7511c


feat: extension events

Description
Adds simple mechanism to hook into Composer events in extensions.
Executes event listeners serially (in order the listener was registered) which allows things like modification to bot assets.
Task Item
#minor
Usage
There is example usage in the sample-ui-plugin that shows how to listen to the project:opened and project:created events.
module.exports = (composer) => {
  composer.context.on("project:opened", async (project) => {
    // do something with the project
  });
};

@a-b-r-o-w-n these event handlers should have access to the authed user if present.

@a-b-r-o-w-n these event handlers should have access to the authed user if present.

@benbrown do you have any suggestions on how to do that?

@benbrown do you have any suggestions on how to do that?


Add ATB initialized callback to ATB plugin, and rename for clarity

Task/Issue URL: https://app.asana.com/0/0/1207965428441026/f
Description

Renames RefreshRetentionAtbPlugin ➡ AtbLifecyclePlugin
Adds atb initialized callback
Makes default implementation of the callbacks no-ops

No other changes in this PR.
Steps to test this PR

[ ] QA-optional

[!WARNING]
This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

#4834
#4850  👈
#4818
develop

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @CDRussell and the rest of your teammates on  Graphite

Merge activity

Aug 5, 11:07 AM EDT: @CDRussell started a stack merge that includes this pull request via Graphite.


UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'service' of 'this._compiler.$tailwind' as it is undefined.

Hi!
I'm just trying to make it work with basic Laravel Mix (webpack warpper) setup and it fails with:
~/P/sample-ui[130]>yarn watch                                                                                323.18s (main|✚) 17:15
yarn               yarn watch                                                                                323.18s (main|✚) 17:15
yarn run v1.22.17
$ mix watch

● Mix █████████████████████████ building (10%) 0/3 entries 2/3 dependencies 0/2 modules 2 active

● Mix █████████████████████████ building (10%) 0/3 entries 5/11 dependencies 0/5 modules 5 active

● Mix █████████████████████████ building (10%) 0/3 entries 16/21 dependencies 2/15 modules 13 active

● Mix █████████████████████████ building (10%) 0/3 entries 28/38 dependencies 3/20 modules 17 active

● Mix █████████████████████████ building (10%) 0/3 entries 30/38 dependencies 4/20 modules 16 active

● Mix █████████████████████████ building (10%) 0/3 entries 46/50 dependencies 12/31 modules 17 active

● Mix █████████████████████████ building (28%) 1/3 entries 202/202 dependencies 66/85 modules 17 active
<EMAIL_ADDRESS>
(node:47002) UnhandledPromiseRejectionWarning: TypeError: Cannot destructure property 'service' of 'this._compiler.$tailwind' as it is undefined.
    at Object.CssLoader (/Users/Silver/Projects/sample-ui/node_modules/tailwindcss-webpack-plugin/dist/loaders/css-loader.js:66:11)
    at LOADER_EXECUTION (/Users/Silver/Projects/sample-ui/node_modules/loader-runner/lib/LoaderRunner.js:132:14)
    at runSyncOrAsync (/Users/Silver/Projects/sample-ui/node_modules/loader-runner/lib/LoaderRunner.js:133:4)
    at iterateNormalLoaders (/Users/Silver/Projects/sample-ui/node_modules/loader-runner/lib/LoaderRunner.js:251:2)
    at /Users/Silver/Projects/sample-ui/node_modules/loader-runner/lib/LoaderRunner.js:224:4
    at /Users/Silver/Projects/sample-ui/node_modules/webpack/lib/NormalModule.js:834:15
    at Array.eval (eval at create (/Users/Silver/Projects/sample-ui/node_modules/tapable/lib/HookCodeFactory.js:33:10), <anonymous>:12:1)
    at runCallbacks (/Users/Silver/Projects/sample-ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:27:15)
    at /Users/Silver/Projects/sample-ui/node_modules/enhanced-resolve/lib/CachedInputFileSystem.js:200:4
    at /Users/Silver/Projects/sample-ui/node_modules/graceful-fs/graceful-fs.js:123:16
(Use `node --trace-warnings ...` to show where the warning was created)
(node:47002) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
^C⏎

hi, thanks for your feedback. Could you please provide a repo to reproduce it, thanks a lot

@await-ovo thanks for response. here it is: https://github.com/pySilver/tailwindcss-webpack-plugin-bug

Hi @pySilver , This should be fixed in<EMAIL_ADDRESS>You can see if there are still problems on your side.

@await-ovo thanks. It is no longer failing during the build, but still not really functional. I guess I'm doing something wrong here. Should I inject app.css from <IP_ADDRESS>:9999 into my root document or default tailwind styles supposed to be shipped automatically? I see some styles being injected directly into a page source but it's rather incomplete: https://share.cleanshot.com/OlEoWR

@await-ovo I was a little too fast. For some reason it wasn't working initially, then it after couple of browser reloads it clicked in but at the end it doesn't work. OK sounds like a mystery. What I'm seeing is bunch of empty classes injected into header. So devtools suggestions works but as classes are empty there is no useful outcome: https://share.cleanshot.com/nk3owO

@await-ovo I was a little too fast. For some reason it wasn't working initially, then it after couple of browser reloads it clicked in but at the end it doesn't work. OK sounds like a mystery. What I'm seeing is bunch of empty classes injected into header. So devtools suggestions works but as classes are empty there is no useful outcome: https://share.cleanshot.com/nk3owO
Yeah, The empty classes is just for auto completion, it should generate a new class on demand when you changing class name in devtools. This is based on webpack HMR.

What I'm confused about is how HMR works in laravel-mix, After run yarn hot, i changed the content of src/js/app.js under the repository you provided, then the browser automatically reload, but the content is not up to date, is this also the case on your end?

Yes. Unfortunately it is. I've followed instructions posted here but still no luck: https://laravel-mix.com/docs/6.0/hot-module-replacement#basic-usage-in-laravel


Update simple.md

Fixes #26332
@Blackclaws please review
Internal review url

@Blackclaws can you review the published doc. If you'd like changes, can you PR it?
At the top right of the article, select the Edit pen icon:

Select the pen icon again. Save.


Setting up rudimentary Autonomous to score Team Prop tasks

The robot needs to drop a purple pixel on the same spike mark as the white pixel/custom team prop. It then needs to put a yellow pixel in the corresponding third of the backdrop.

https://github.com/Brighton-FTC/2024/commit/29e51a85731eafe027d2a46d6376c1fe4088efce
Made the program (hopefully) put the purple pixel on the correct spike mark.
I'll probably work on the yellow pixel thing next.
I don't know if game strategy want the robot to do this even if it is on the opposite side of the stage door to the scoring elements, but I'll try to implement that.
After that it shouldn't be that much harder to park the robot backstage as well.
@12sliu, have you gotten a reply from engineers about if the grabber can hold two pixels at once (and deposit them separately)?

https://github.com/Brighton-FTC/2024/commit/6c91fa522328a4d91360c6b910b8c69591ce727a
Made it (hopefully) put the yellow pixel on the backdrop, and then park.
Right now, the details about the grabber holding two pixels are a bit fuzzy, but once we get details from the engineers I will implement this.
Apart from this, I'll just try to put in general improvements, as well as creating a red and blue specific opmode.

Vaguely the paths that the robot is meant to take:
Key:

Red/blue line: path that the red/blue alliance robot is meant to take
black dot: possible starting position
green dot: end position

https://github.com/Brighton-FTC/2024/commit/878d7d03334bd2b38632e33b830a3c2f87d3cd12
Added red and blue specific opmodes.

https://github.com/Brighton-FTC/2024/commit/bab2d16c8d515b98ceda4c185e649815b423d647
Fixed mistake in the code where the robot would have the white pixel/team prop centered in the screen (and therefore it would always think that it's on the center spike mark.

Was converting code to a linear opmode, but code was messier then before, so decided against keeping the commit.

We will have to convert this to use component classes, but please do this after Operation Valour as it should be very quick and we will have to spend lots of time with the TFOD model before being able to test this.

Ok, I'll do this as soon as the arm component class has been written and reviewed.

https://github.com/Brighton-FTC/2024/commit/54815319cf60136703576813873677f4c3e5a1df
Made autonomous use component classes and made separate copies of the classes which don't use distance sensors.
TODO: merge component classes into the autonomous branch.
I will check with @12sliu whether the distance-sensor-less code needs to be in a separate branch.

Autonomous using RR can be found here.
https://github.com/Brighton-FTC/2024/commit/cda0cacfa82309ea381b58496b586485ec087c79
Refactored code to separate actions better.
https://github.com/Brighton-FTC/2024/commit/7d108e6866fb39d8174872dcdd63727d73942e64
Made basic prototype for autonomous.
https://github.com/Brighton-FTC/2024/commit/8f81c83f26449276ba6ffb7e6b6884d421163384
Added modified versions of components (changes will probably be necessary later), but will try to standardize components later.
N.B.

Uses grabber, and so this will have to be replaced by active intake when code for that is complete.
Will probably have to be changed to be the same as component classes used elsewhere.

Will continue to work on this.
Rudimentary autonomous is practically deprecated now, but there wasn't an issue for the rr one, so am treating this one as a central autonomous issue.

https://github.com/Brighton-FTC/2024/commit/870c81ab7f8a66882036b8b11d99ed746056f239
Refactored to use intake and outtake.


Fix typo on VisualElement

fixes #178

Docs Build status updates of commit 1d5a7f6:
:clock10: Pending: waiting for processors (10 builds ahead of you)
:warning: Docs Build is busy, currently there are 10 builds ahead of this one, for more information you can view the Build queue graph on the Docs Portal.

Docs Build status updates of commit 1d5a7f6:
:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/Xamarin.Forms/VisualElement.xml
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.
For any questions, please:Try searching in the Docs contributor and Admin GuideSee the frequently asked questionsPost your question in the Docs support channel


Fix create group image lost when modify member

@s77rt @MonilBhavsar
Details

Fix avatar image not stored when modifying group member
Fixed Issues

$ https://github.com/Expensify/App/issues/40198
PROPOSAL: https://github.com/Expensify/App/issues/40198#issuecomment-2155822841
Tests

Create a new group chat
Choose a picture for custom avatar
Go back to member invite page
Proceed again
Create chat
Avatar image should be saved.

[x] Verify that no errors appear in the JS console

Offline tests

QA Steps

[x] Verify that no errors appear in the JS console

PR Author Checklist

[x] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[x] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[x] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[x] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[x] I ran the tests on all platforms & verified they passed on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[x] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[x] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] I verified that if a function's arguments changed that all usages have also been updated correctly
[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
https://github.com/Expensify/App/assets/11847279/b66337dc-5d6d-473d-9674-a5b2c6498d6a

Android: mWeb Chrome

https://github.com/Expensify/App/assets/11847279/17749eed-d8b7-4698-b160-5cffadbab80a

iOS: Native

https://github.com/Expensify/App/assets/11847279/8ceae559-f764-4735-8721-aaa379d9525e

iOS: mWeb Safari
https://github.com/Expensify/App/assets/11847279/265b51f1-183f-4b9e-ad82-393cf3eedf5f

MacOS: Chrome / Safari
https://github.com/Expensify/App/assets/11847279/d3e6b111-765d-4231-8776-9d122e4e6aba

MacOS: Desktop
https://github.com/Expensify/App/assets/11847279/578c5602-7e1c-4172-8cc6-7bcbf1d6c5d8

Reviewer Checklist

[X] I have verified the author checklist is complete (all boxes are checked off).
[X] I verified the correct issue is linked in the ### Fixed Issues section above
[X] I verified testing steps are clear and they cover the changes made in this PR

[X] I verified the steps for local testing are in the Tests section
[X] I verified the steps for Staging and/or Production testing are in the QA steps section
[X] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[X] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[X] I checked that screenshots or videos are included for tests on all platforms
[X] I included screenshots or videos for tests on all platforms
[X] I verified tests pass on all platforms & I tested again on:

[X] Android: Native
[X] Android: mWeb Chrome
[X] iOS: Native
[X] iOS: mWeb Safari
[X] MacOS: Chrome / Safari
[X] MacOS: Desktop

[X] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[X] I verified proper code patterns were followed (see Reviewing the code)

[X] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[X] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[X] I verified that comments were added to code that is not self explanatory
[X] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[X] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[X] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[X] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[X] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[X] I verified the JSDocs style guidelines (in STYLE.md) were followed

[X] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[X] I verified that this PR follows the guidelines as stated in the Review Guidelines
[X] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[X] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[X] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[X] If a new component is created I verified that:

[X] A similar component doesn't exist in the codebase
[X] All props are defined accurately and each prop has a /** comment above it */
[X] The file is named correctly
[X] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[X] The only data being stored in the state is data necessary for rendering and nothing else
[X] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[X] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[X] All JSX used for rendering exists in the render method
[X] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[X] If any new file was added I verified that:

[X] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[X] If a new CSS style is added I verified that:

[X] A similar style doesn't already exist
[X] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[X] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[X] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[X] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[X] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[X] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[X] I verified that all the inputs inside a form are aligned with each other.
[X] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[X] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[X] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[X] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

https://github.com/Expensify/App/assets/16493223/eff9955d-8c79-46df-9364-88fa1f0df091

Android: mWeb Chrome

https://github.com/Expensify/App/assets/16493223/78e8b693-d0f4-49c1-baa0-4687d158b51b

iOS: Native

https://github.com/Expensify/App/assets/16493223/cc882f95-50ac-4131-a0a0-4b9214f20ef0

iOS: mWeb Safari

https://github.com/Expensify/App/assets/16493223/14bbe2d3-ed26-408b-9d04-d42fe6b06386

MacOS: Chrome / Safari

https://github.com/Expensify/App/assets/16493223/ba97f088-5187-4fd5-b72e-56262cddcf3f

MacOS: Desktop

https://github.com/Expensify/App/assets/16493223/9e85c00d-e244-465e-a5e4-1cf7910a183b

🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.86-0 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.86-0 🚀

platform
result

🤖 android 🤖
failure ❌

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to staging by https://github.com/marcaaron in version: 1.4.86-0 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅

🚀 Deployed to production by https://github.com/AndrewGable in version: 9.0.0-9 🚀

platform
result

🤖 android 🤖
success ✅

🖥 desktop 🖥
success ✅

🍎 iOS 🍎
success ✅

🕸 web 🕸
success ✅


Updated dependencies. Closes #35

Coverage remained the same at 93.194% when pulling 8f73600062fc5ea6f448da4e492f9a56724365ef on update-deps into ad5c4b3059dcda2c62ce72001782105a3c91d750 on master.


📢 Announcement: aws-activejob-sqs 1.0.0 release and upgrade information 📢

Describe the issue
We're happy to announce the 1.0 release of aws-activejob-sqs with the following new features:

Support polling on multiple queues. (#4)
Support running without Rails. (#5)
Support per queue configuration. (#4)
Support loading global and queue specific configuration from ENV. (#3)
Improved and customizable error handling: Replace retry_standard_errors with poller_error_handler. (#6)

See the updated  README and API documentation for information on using the new features!
Breaking changes and migration guide
The 1.0 release contains a few breaking changes that may require code or configuration changes.  If you are not ready to update, you can pin your version with `gem 'aws-activejob-sqs', '~> 0'.  If you run into issues while upgrading, please feel free to open an issue or respond to this one.
Namespace change: Aws::Rails::SqsActiveJob → Aws::ActiveJob::SQS
The namespace has been changed to reflect the gem name and follow Ruby standards. For most users this should just require changing in code configuration from Aws::Rails::SqsActiveJob.configure to Aws::ActiveJob::SQS.configure.
Poller Executable name change aws_sqs_active_job → aws_active_job_sqs
To better reflect the gem name and the new namespace, we've updated the poller executable's name to aws_active_job_sqs.  Wherever you were starting your poller(s), you'll need to update to use the new name.  Version 0.1.2 has both the old and new executable names to make migration easier.
Default config file name:  aws_sqs_active_job.yml → aws_active_job_sqs.yml
To better reflect the gem name and new namespace, we've updated the default config file name
when using rails to config/aws_active_job_sqs.yml or config/aws_active_job_sqs/<Rails.env>.yml.  You can either rename existing aws_sqs_active_job.yml files or use the AWS_ACTIVE_JOB_SQS_CONFIG_FILE environment variable to specify a different location.
Queue url is now a subkey
With the introduction of queue specific configuration in 1.0, queue url must now be configured as a sub key on the queue:
# config/aws_active_job_sqs.yml
queues:
  default:
    url: 'https://my-queue-url.amazon.aws'

Or in code:
Aws::ActiveJob::SQS.configure do |config|
  config.queues[:default][:url] = 'https://my-queue-url.amazon.aws'
end

Changes in poller error handling: retry_standard_errors replaced with poller_error_handler
With the 1.0 release, error handling in the poller has been updated to be more flexible and to allow user configured error handlers.  The retry_standard_errors configuration (and cli option) have been replaced by the poller_error_handler which allows user a user defined error handler to be called for any StandardErrors produced by job execution.  The default behavior has changed from retrying StandardErrors raised during job execution to leaving the message on the queue and initiating shutdown of the poller.  To change this behavior, configure a poller_error_handler.  For more information about error handling, see: READEME#Retry Behavior and Handling Errors
Other module/class renames

The Lambda handler has been moved to its own module and the entry point is now Aws::ActiveJob::SQS::LambdaHandler.job_handler.
The deduplicate_without method used to configure deduplication keys on jobs has moved to its own module.  You will now need to include Aws::ActiveJob::SQS::Deduplication in jobs that use dedupliate_without.

Links
https://github.com/aws/aws-activejob-sqs-ruby/blob/main/README.md

Thanks! We have this working in our staging environment WITHOUT Rails.
Here's the steps we needed to do the upgrade.

Replace gem require 'aws-activejob-sqs'
Change config. "url:" is now required for queue urls. We didn't have it there before.

Aws::ActiveJob::SQS.configure do |config|
  config.queues = { default: { url: ENV['JOB_AWS_SQS_URL'] } }
end

Change Lambda handler.

Aws::ActiveJob::SQS::LambdaHandler.job_handler(event: event, context: context)

Thank you for writing the migration guide. I have one piece of feedback regarding the poller executable name change.
For my team, it would have been helpful to have a more gradual approach to changing the command name. Specifically, I would have preferred if you:

First released a version that supports both old and new command names (aws_sqs_active_job and aws_active_job_sqs)
Then removed the old command (aws_sqs_active_job) in the major version release

The reason is that we cannot always make the gem update and command name changes atomic in our deployment process. Having both commands available during the transition period would have made the migration smoother and safer.

That's great feedback - thank you.
I can release a new minor version that adds the old binary back to make migration easier. It would still have the changes in arguments, but that still makes an easier/safer upgrade path I think.

What about a patch version to version 0? But it sounds like you've already completed the migration @ohbarye? Sorry about the rough edge. If that's the case, maybe no changes necessary.

This breaking change doesn't seem that rough to me. Couldn't anyone just temporarily copy the executable into their project and name it whatever they want? Maybe I'm missing something.

@alextwoods @mullermp

But it sounds like you've already completed the migration @ohbarye?

Ah, no, our migration has not yet been completed. We're still discussing how to update. I apologize for writing in a way that is difficult to understand.

I can release a new minor version that adds the old binary back to make migration easier.
What about a patch version to version 0?

Thank you for your suggestion! I would appreciate it if you could proceed in that way.

@ckhsponge

Couldn't anyone just temporarily copy the executable into their project and name it whatever they want? Maybe I'm missing something.

Do you mean by creating a binstub of both aws_sqs_active_job and aws_active_job_sqs? I wonder if total cost is lower if upstream temporarily provides compatibility than if all gem users try this kind of workaround.

I was imagining copying the old executable into your project and giving it the new name. Your updated project could have the new executable with the new name. Both versions of your project would then launch from the same name. Hopefully there's a way to deploy your code and the gems they need at the same time. Your project might be more complicated however.

@ohbarye - I've added an executable with the old name in 1.0.1 - hopefully that should help you and others with migration.

I've released a new 0.x patch: 0.1.2 that has both the old and new executable names that should hopefully help make migrations easier.

I'm delighted with that. Thank you!


Assert error : invalid boxes found

I try to train the net on my own dataset. And I got this error in /lib/fast_rcnn/bbox_transform.
image: COCO_train2014_000000120718.jpg
Traceback (most recent call last):
File "/home/slade/anaconda3/envs/py27/lib/python2.7/site-packages/tensorflow/python/ops/script_ops.py", line 85, in call
ret = func(*args)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 78, in proposal_target_layer
rois_per_image, _num_classes)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 182, in _sample_rois
rois[:, 1:5], gt_boxes[gt_assignment[keep_inds], :4], labels)
File "./faster_rcnn/../lib/rpn_msr/proposal_target_layer_tf.py", line 224, in _compute_targets
targets = bbox_transform(ex_rois, gt_rois)
File "./faster_rcnn/../lib/fast_rcnn/bbox_transform.py", line 25, in bbox_transform
format(ex_rois[np.argmin(ex_widths), :], ex_rois[np.argmin(ex_heights), :])
AssertionError: Invalid boxes found: [ 81557.203125<PHONE_NUMBER>4   -285.29534912<PHONE_NUMBER>4] [   1.25  280.     95.    297.5 ]
I compared your work with smallcorgi. Found that you added the assertion in the code.
Any idea why this error occurred？I tried to change the RNG_SEED in config.py, also tried to lower
learning rate. but this error still exist. Looking forward to your answers. Thanks a lot.

Thank you for your feedback.
In practice, I always encountered np.exp(dw) overflow warnings in bbox_transform_inv� the reason of which was rpn_bbox_pred� were too large ( like exp(200) ). Then the network would converge to 'nan'.
This assertion is to help me locate invalid boxes, but I think I should add  np.min(ex_widths) < MAX_SIZE�
The best practice to preventing invalid boxes is to lower down the stddev (from 0.01 to 0.001) when initialize the rpn_bbox_pred layer

Thanks a lot. I'll try to lower down the stddev. By the way, I try padding zero around the training image，and it avoid this problem to some extent.

Tensorflow is new to me and I don't know how to lower down the stddev when initializing the rpn_bbox_pred layer. Can you tell me more details about it? Thanks. @eragonruan  @CharlesShang

how to modify code to down stddev?


Add test and fix broken tests in macro expansion

Coverage remained the same at 93.278% when pulling 48c0b65b7b5d93067a1528f958ee9049365d8028 on fix_macro_tag_tests into e2458c41cc22b4e46932f5feaa1fbd4d255e5039 on macro_system.


Update KTLint

This PR updates the ktlint gradle plugin to the latest version. In doing so, we are also updating ktlint itself to 1.0.0, and there seems to be a lot of changes there.
Right now, I have only updated the plugin and disabled the rules that currently cause it to error, and there's a lot of them. See https://pinterest.github.io/ktlint/latest/rules/standard/.
Note that ktlint_code_style is set to intellij_idea. That was the default style before 1.0 so it should match our current. There is an option for android_studio too.

@mickael-menu @qnga This is ready for review. Simply comment out the rule in .editorconfig and run ktlintCheck to see where the issues still are. I'm surprised that right now it doesn't catch ones like ktlint_standard_no-semi, unless there is some other configuration?

This is ready for review again. The auto-format was run and committed for individual rules, so those can be reverted easily if needed. The only one I'm not sure about that I did run was wrapping. If you don't like those changes, I'll revert that commit. Otherwise, I think everything else looks good.
Note that I left trailing-comma-on-call-site and trailing-comma-on-declaration-site in there as it changes 357 files and 162 files respectively.

Indeed, I would go without the wrapping rule. Constructors look cumbersome with it.

Looking at it again, maybe it's not horrible. Generic type and type parameter each has its own line.
Old
public interface TtsEngine<S : TtsEngine.Settings, P : TtsEngine.Preferences<P>,
    E : TtsEngine.Error, V : TtsEngine.Voice> : Configurable<S, P>, Closeable {

New
public interface TtsEngine<
    S : TtsEngine.Settings,
    P : TtsEngine.Preferences<P>,
    E : TtsEngine.Error,
    V : TtsEngine.Voice
    > : Configurable<S, P>, Closeable {

I think that looks fine but more importantly I prefer sticking to default options unless they are really asinine.

@mickael-menu @qnga here is a full list of the remaining failures. function-naming is one we will want to keep disabled, as Compose functions generally start with an uppercase letter. The rest, you tell me if they should be fixed.
A (block or EOL) comment inside or on same line after a 'value_parameter' is not allowed. It may be placed on a separate line above. (standard:discouraged-comment-location)

ByteArray.kt#L120

A block comment in between other elements on the same line is disallowed (standard:comment-wrapping)

VisualReaderFragment.kt#L11
VisualReaderFragment.kt#L13
R2WebView.kt#L84
R2WebView.kt#L85
R2WebView.kt#L87
ByteArray.kt#L119
ExoPlayerDataSource.kt#L138
TtsSessionAdapter.kt#L141
AudioFocusManager.kt#L143

A comment in a 'type_argument_list' is only allowed when placed on a separate line (standard:discouraged-comment-location)

VisualReaderFragment.kt#L12
VisualReaderFragment.kt#L14

A comment in a 'value_argument_list' is only allowed when placed on a separate line (standard:discouraged-comment-location)

HtmlResourceContentIterator.kt#L106
LinkTest.kt#L122
ExoPlayerDataSource.kt#L139
TtsSessionAdapter.kt#L142

A comment in a 'value_parameter_list' is only allowed when placed on a separate line (standard:discouraged-comment-location)

Properties.kt#L89
Properties.kt#L90
Metadata.kt#L98
Metadata.kt#L99
Metadata.kt#L100
Metadata.kt#L101
Metadata.kt#L102
Metadata.kt#L103
PdfDocument.kt#L108
MediaOverlayNode.kt#L117
MediaOverlayNode.kt#L118

A single line block comment after a code element on the same line must be replaced with an EOL comment (standard:comment-wrapping)

GridAutoFitLayoutManager.kt#L15
GridAutoFitLayoutManager.kt#L16
R2WebView.kt#L86

Class or object name should start with an uppercase letter and use camel case (standard:class-naming)

LicenseValidation.kt#L45
LicenseValidation.kt#L46
LicenseValidation.kt#L47
LicenseValidation.kt#L48
LicenseValidation.kt#L49
LicenseValidation.kt#L50
LicenseValidation.kt#L51
LicenseValidation.kt#L52
LicenseValidation.kt#L53
LicenseValidation.kt#L54
LicenseValidation.kt#L55
LicenseValidation.kt#L56
LicenseValidation.kt#L57
LicenseValidation.kt#L58
LicenseValidation.kt#L59
LicenseValidation.kt#L60
LicenseValidation.kt#L61
LicenseValidation.kt#L62
LicenseValidation.kt#L63
LicenseValidation.kt#L64
LicenseValidation.kt#L65
LicenseValidation.kt#L66
LicenseValidation.kt#L67
LicenseValidation.kt#L68
PropertyDataType.kt#L129

Function name should start with a lowercase letter (except factory methods) and use camel case (standard:function-naming)

UserPreferences.kt#L1
UserPreferences.kt#L2
UserPreferences.kt#L3
UserPreferences.kt#L4
UserPreferences.kt#L5
UserPreferences.kt#L6
UserPreferences.kt#L7
TtsControls.kt#L8
TtsControls.kt#L9
VisualReaderFragment.kt#L10
ToggleButton.kt#L18
ToggleButton.kt#L19
ToggleButton.kt#L20
EmphasisProvider.kt#L21
AppTheme.kt#L22
DropdownMenuButton.kt#L23
ColorPicker.kt#L24
ColorPicker.kt#L25
ColorPicker.kt#L26
ComposeBottomSheetDialogFragment.kt#L27
Group.kt#L28
Preferences.kt#L29
Preferences.kt#L30
Preferences.kt#L31
Preferences.kt#L32
Preferences.kt#L33
Preferences.kt#L34
Preferences.kt#L35
Preferences.kt#L36
Preferences.kt#L37
Preferences.kt#L38
Preferences.kt#L39
Preferences.kt#L40
Preferences.kt#L41
Preferences.kt#L42
AccessibilityAdapter.kt#L126
AccessibilityAdapter.kt#L127
AccessibilityAdapter.kt#L128
FixedWebRendition.kt#L130
ComposableWebView.kt#L131
ComposableWebView.kt#L132
SingleViewportSpread.kt#L133
DoubleViewportSpread.kt#L134
SpreadWebView.kt#L135
NavigatorPager.kt#L137

No comment expected at this location (standard:discouraged-comment-location)

MediaOverlays.kt#L121

Property name should start with a lowercase letter and use camel case (standard:property-naming)

CatalogFeedListFragment.kt#L43
AppDatabase.kt#L44
LcpDecryptor.kt#L69
LcpDecryptor.kt#L70
LcpDatabase.kt#L71
LcpDatabase.kt#L72
R2WebView.kt#L76
R2WebView.kt#L77
R2WebView.kt#L78
R2WebView.kt#L79
R2WebView.kt#L80
R2WebView.kt#L81
R2WebView.kt#L82
R2WebView.kt#L83
R2WebView.kt#L88
PositionsService.kt#L104
PublicationContentIterator.kt#L105
StringSearchService.kt#L107
ContentResource.kt#L109
ContentResource.kt#L110
HttpResource.kt#L111
TransformingResource.kt#L112
FallbackResource.kt#L113
LazyResource.kt#L114
InMemoryResource.kt#L115
Buffering.kt#L116
PdfPositionsService.kt#L123
LcpdfPositionsService.kt#L124
EpubPositionsService.kt#L125

Property name should use the screaming snake case notation when the value can not be changed (standard:property-naming)

GridAutoFitLayoutManager.kt#L17
CRLService.kt#L73
CRLService.kt#L74
CRLService.kt#L75
R2EpubPageFragment.kt#L91
OPDS1Parser.kt#L92
OPDS1Parser.kt#L93
OPDS1Parser.kt#L94
OPDS1Parser.kt#L95
OPDS1Parser.kt#L96
OPDS1Parser.kt#L97
Scrollable2D.kt#L136
PsPdfKitDocumentFragment.kt#L140


Tensorflow does not work with python 3.7 when using Virtualenv

I am not sure where it goes wrong, but after reading tons of posts online I figured the combination tensor flow, Virtualenv en python 3.7 is not valid on Mac OSX.
I use python3.6 now and it is fine.
Sorry I can not provide more info, I'm broken by the struggle and want to sleep and forget about it.

Thank you for your post. We noticed you have not filled out the following field in the issue template. Could you update them if they are relevant in your case, or leave them as N/A? Thanks.
Have I written custom code
OS Platform and Distribution
TensorFlow installed from
TensorFlow version
Bazel version
CUDA/cuDNN version
GPU model and memory
Exact command to reproduce
Mobile device

Virtualenv is a red herring, tensorflow does not yet work with python 3.7
We are waiting for all of our dependencies to merge python 3.7 support.
Closing as duplicate of https://github.com/tensorflow/tensorflow/issues/20517

emm

emm

emm

emm

emm

emm

emm


Make options changeable after codec or (de)muxer has been opened

Overview
Currently, as best I can tell, it is only possible to set options once: when a codec or (de)muxer is opened. There are cases where one might want to change some option afterward. My use case is changing -crf in the libx264 encoder during encoding based on user preference and changing network conditions.
Existing FFmpeg API
The av_opt_set*() in libavutil/opt.h. av_opt_get*() are probably also prudent to implement.
Doxy link: https://ffmpeg.org/doxygen/trunk/group__avoptions.html
Expected PyAV API
The av_opt functions are very generic, so the easiest route would probably be to guarantee that all relevant classes have self.ptr exposed that is guaranteed to be passable to the av_opt functions. This could be hidden from the user so that they only have to pass a CodecContext, OutputContainer or InputContainer.
Example based on aiortc's h264.py:
from av.avutil import av_opt_set_int, av_opt_get_int

class H264Encoder(Encoder):
    # [...]
    def set_crf(self, crf: int)
        av_opt_set_int(self.codec, "crf", crf) # search_flags could be optional, default to 0

    def get_crf(self) -> int:
        return av_opt_get_int(self.codec, "crf")

Errors returned by av_opt_get_int() could be raised as Exceptions, which simplifies the get functions like above.
It would also be useful to expose AV_OPT_SEARCH_* and optionally allow setting them on the set and get calls.

Here's a little proof-of-concept that works well enough for my purposes. In context.pyx:
cdef class CodecContext(object):
    # Default search_flags to AV_OPT_SEARCH_CHILDREN
    def opt_set_int(self, name: str, value: int, search_flags: int = 1):
        ret = lib.av_opt_set_int(self.ptr, name, value, search_flags)
        if ret != 0:
            raise RuntimeError(f'av_opt_set_int() = {ret}')

    def opt_get_int(self, name: str, search_flags: int = 1):
        cdef int64_t val
        ret = lib.av_opt_get_int(self.ptr, name, search_flags, &val)
        if ret != 0:
            raise RuntimeError(f'av_opt_get_int() = {ret}')
        return val

And of course in avutil.pxd right after av_opt_set_int():
    cdef int av_opt_get_int(
        void *obj,
        char *name,
        int search_flags,
        int64_t *out_val
    )

It'd be better if all classes inherited some base class from which void* ptr can be gotten, perhaps via an abstract property or something.


ArcSegment not updating

Discussed in https://github.com/AvaloniaUI/Avalonia/discussions/12037

Originally posted by tbibre July  5, 2023
Hi,
I'm trying to change the length of an ArcSegment (and later, I'll try to use Transitions between its states), but it isn't redrawn when I change the end point.
Here is the xaml:
<Path Stroke="Red"
	  StrokeThickness="24">
	<Path.Data>
		<PathGeometry>
			<PathGeometry.Figures>
				<PathFigure StartPoint="520,230"
							IsClosed="False">
					<PathFigure.Segments>
						<ArcSegment Size="290,290"
									IsLargeArc="True"
									SweepDirection="CounterClockwise"
									Point="{CompiledBinding CircleEndPoint}"/>
					</PathFigure.Segments>
				</PathFigure>
			</PathGeometry.Figures>
		</PathGeometry>
	</Path.Data>
</Path>

And C# (with some harcoded things as I'm still testing)
public Avalonia.Point CircleEndPoint
{
	get
	{
		Avalonia.Point Origin = new Avalonia.Point(520, 520);
		Avalonia.Point Start = new Avalonia.Point(Origin.X, Origin.Y -290);

		double Angle = (360 - (360 * Speed) / 300.0) * (Math.PI / 180.0);

		double XPos = (Start.X - Origin.X) * Math.Cos(-Angle) - (Start.Y - Origin.Y) * Math.Sin(-Angle);
		double YPos = (Start.Y - Origin.Y) * Math.Cos(-Angle) + (Start.X - Origin.X) * Math.Sin(-Angle);

		return new Avalonia.Point(XPos + Origin.X, YPos + Origin.Y);
	}
}

The property changed is send when the Speed changes. If I put a breakpoint there, it is correctly hit when the value change.
The code seems ok, as the Arc has the right shape from whatever the initialization value is.
I've seen some previous issues about this, but it seems to be fixed a long time ago.
https://github.com/AvaloniaUI/Avalonia/issues/3952
/cc @jmacato

Duplicate of #4748


Roll Flutter from 617de911982a to f8f14c38975a (1 revision)

https://github.com/flutter/flutter/compare/617de911982a...f8f14c38975a
2022-02-22<EMAIL_ADDRESS>Roll Plugins from d9fc677ab06f to 6d88e3a2a184 (1 revision) (flutter/flutter#98923)
If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-plugins
Please CC<EMAIL_ADDRESS>on the revert to ensure that a human
is aware of the problem.
To file a bug in Plugins: https://github.com/flutter/flutter/issues/new/choose
To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug
Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md

Commit queue failed; closing this roll.


unshare: unshare failed: Operation not permitted

in my Debian 12
[root@75849523300f tools]$ ./try ls
unshare: unshare failed: Operation not permitted
and ./try any_command, it will show "unshare: unshare failed: Operation not permitted"

Hi, could you see if you will get the same error by running unshare --map-root-user (if it works, then you want to type exit to leave the namespace)
If you got the same operation not permitted, please run this command
sudo sysctl -w kernel.unprivileged_userns_clone=1
You can also make this persistent by appending kernel.unprivileged_userns_clone=1 to /etc/sysctl.conf

Hi, could you see if you will get the same error by running unshare --map-root-user (if it works, then you want to type exit to leave the namespace)
If you got the same operation not permitted, please run this command sudo sysctl -w kernel.unprivileged_userns_clone=1 You can also make this persistent by appending kernel.unprivileged_userns_clone=1 to /etc/sysctl.conf

it may cause of https://serverfault.com/a/939457/354181

Does that solve the issue for you?

Does that solve the issue for you?

no😂, exec "sysctl -w kernel.unprivileged_userns_clone=1" have some error, i'm Google-ing it
[root@75849523300f tools]$ unshare --map-root-user
unshare: unshare failed: Operation not permitted
[root@75849523300f tools]$ sysctl -w kernel.unprivileged_userns_clone=1
sysctl: cannot stat /proc/sys/kernel/unprivileged_userns_clone: No such file or directory

are you in a container already?

are you in a container already?

Yes, but i' have try it in VMware Debian 12, it also the same problem. should i use it only in physical machine?

Try should work on privileged containers. I’m assuming in VMWare you are using a virtualized machine, is it the same error?

Try should work on privileged containers. I’m assuming in VMWare you are using a virtualized machine, is it the same error, did you try the sysctl config

I'm a little confused, thanks for your reply. I'll think it again


[INFO] Decompiling app... [ERROR] .ipa files not implemented yet.��

[INFO] Decompiling app...
[ERROR] .ipa files not implemented yet.��
im used window

It's correct that IPA files are not implemented yet.
I broke my head multiple times thinking on a cross-platform solution to decompile IPA files. Unfortunately, all 64bit apps (which are the big majority of the applications) are encrypted and must be decrypted in runtime (on a running jailbroken device).
It is possible to just unzip the IPA file and go trough the resources, but 90% of the findings will not be found because the actual code can't be scanned.
If someone from the community knows a cross-platform way to face this issue, please let me know!
I will add the tag "help wanted" so we can keep this issue open.

oh thanks


Explore Source Generator Support for Hot Chocolate and Strawberry Shake

https://github.com/dotnet/roslyn/blob/master/docs/features/generators.md

this is now implemented

@michaelstaib is it using the standard System.Text.JSON source generators or something custom?
Will we benefit from the .net 8 improvements?


Newer release broke auth_type edge grid

Hello,
I’ve been encouraging my customers to use HTTPie instead of Curl for interfacing with our APIs - however in order to make the plugin work well I had to override the :/ setup for localhost to use it for the host in the configuration file.  It was working fine with httpie 0.7.0 but has since been broken by your more recent changes.  Would it be possible for you to take a look and see what changed to make this stop working?
def get_auth(self, username, password):
    home = os.environ['HOME']
    rc = EdgeRc("%s/.edgerc" % home)

    if not rc.has_section(username):
        err_msg = "\nERROR: No section named '%s' was found in your .edgerc file\n" % username
        err_msg += "ERROR: Please generate credentials for the script functionality\n"
        err_msg += "ERROR: and run 'python gen_edgerc.py %s' to generate the credential file\n"
        sys.stderr.write(err_msg)
        sys.exit(1)

    host=rc.get(username, 'host')
    host=host.replace("https://", "")
    host= host.replace ("/","")
    host += "/"
    auth = HTTPieEdgeGridAuth(
        hostname = host,
        client_token=rc.get(username, 'client_token'),
        client_secret=rc.get(username, 'client_secret'),
        access_token=rc.get(username, 'access_token'),
        max_body=rc.getint(username, 'max_body')
    )
    return auth

I wonder if this project should start using Bountysource so corporate interests with bugs (like this one) can sponsor the work to fix the bugs that affect them.


Problem in AwqQuantizer.init_quant when using FlashAttention-Llama

System

awq==0.1.5
flash-attn==2.3.3
transformers==4.34.1
python==3.10.13

Let me know if you need to know any other system information.
Problem
I was trying to quantize a version of LeoLM/leo-hessianai-13b-chat which uses "modeling_flash_llama.LlamaForCausalLM". However, in the init_quant-method of the AwqQuantizer I get an AttributeError in line 323 ("AttributeError: 'NoneType' object has no attribute 'to'").
Details
Here is what I believe happens: Most pretrained models when called with attention_mask=None actually set attention_mask to an all-1-tensor before in turn calling their own first decoder-layer (which happens to be modules[0] in the context of the method). The FlashAttention-Version of llama2 does not do this (see here) which is not a problem since the corresponding decoder-layers themselves can handle attention_mask=None. Within the init_quant-method this means that layer_kwargs["attention_mask"] is None and we get the aforementioned AttributeError when we try move it to the GPU.
Possible fix
Since there is no reason to believe the model behaviour will change any time soon (it is not a bug on their side and works as intended) I would suggest replacing lines 322 and 323 in quantizer.py with the following:
if (attention_mask:=layer_kwargs.get("attention_mask")) is not None:
    layer_kwargs["attention_mask"] = attention_mask.to("cuda")

or without the use of a walrus operator (at the cost of one additional dict-lookup):
if layer_kwargs.get("attention_mask") is not None:
    layer_kwargs["attention_mask"] = layer_kwargs["attention_mask"].to("cuda")

Tested this locally and it does not throw any errors further downstream. From my understanding of the method this should be fine, but I did not attempt to go through the whole code to check.

Thank you for a clear explanation. I now see the bug - we are only checking if the attention_mask exists, but not if it is None. Let me fix this.


Update DiskFileItem.java: Avoiding NPE when not explicitely initializ…

…ing the outputstream
When accessing e.g. getSize() on a DiskFileItem before having called getOutputStream() a NullPointerException would be thrown. Consequent use of the "intelligent" getter already in place avoids this issue.

Hi @OleHornischer,

Can you update your patch based on our Git master.
Can you provide a unit test that shows the bug in action before if your patch is not applied.

Gary

Hi @garydgregory
I created a Unit test illustrating the issue. However, since this is my first pull request, I am not sure what you mean by updating the patch. I forked the trunk and changed only the files required for my change.
Do I rather need to create a branch in your repository instead?
Ole

You might have to catch up your fork to the HEAD of the master branch. See https://garygregory.wordpress.com/2016/11/10/how-to-catch-up-my-git-fork-to-master/

Thanks for the tip. I updated my repository in accordance to the script on the linked blog post.
Hope things are in order now.

Don't you still get an NPE if you call DiskFileItem.isInMemory()?
You should really have one @Test method for each DiskFileItem method you modified to show where NPEs have been fixed.

Hi @garydgregory,
yes, that potential NullPointerException I also addressed in my fix, as well as others.
I updated the sources now to handle exceptions and fixed a few compile errors. The test now includes a test for all methods that have been fixed.
Ole


Settings sync appears as first walkthrough step on fresh install

I noticed this:

I was surprised to see that I was landed on the second step of the walkthrough, and that settings sync was listed first.

It sounds like the step ordering change was intentional, but this behavior of skipping step 1 is possibly a bug. @bhavyaus can confirm.

I just noticed that the welcome page is jumping to the second step and settings sync step is not shown. IMO this is worse than before as it will reduce the number of people going to settings sync step. Hence tagging this as candidate.

I can reproduce it consistently. Here are steps:

Open VS Code Insiders using fresh user data dir and extensions dir
🐛 Welcome page jumps to themes

https://github.com/microsoft/vscode/assets/10746682/e1f1f3f4-aa94-4131-8503-cff95596e531

Verified in 1.84.2 release candidate.

Thank you for your support


Tariff: add dynamic/zones charges to ENTSO-e

Fix https://github.com/evcc-io/evcc/issues/12371
Example for BZN|PT domain with feedin and grid:
tariffs:
  feedin:
    type: entsoe
    domain: BZN|PT
    securitytoken: xxxxxx
    charges: 0
    tax: 0
  grid:
    type: entsoe
    domain: BZN|PT
    securitytoken: xxxxxx
    charges: 0
    tax: 0
    formula: (price + 0.004 + 0.0028930 + 0.010)*(1 + 0.16) + 0.005
    zones:
      - days: Sun-Sat
        hours: 0-7
        price: 0.0157
      - days: Sun-Sat
        hours: 8-21
        price: 0.0860
      - days: Sun-Sat
        hours: 22-23
        price: 0.0157

Same code can be added to other tariffs. Once it reaches final version.

@bartashevich thank you for this PR. Unfortunately, we can't implement it this way: your PR largely duplicates the code that we already have in the fixed tariff. Instead, we need to reuse as much as possible, much more if we want to add this to other tariffs.
Also: your example of adding prices for zones is confusing. The price already comes from ENTSO-E, so why would you want to manually define it?

@bartashevich thank you for this PR. Unfortunately, we can't implement it this way: your PR largely duplicates the code that we already have in the fixed tariff. Instead, we need to reuse as much as possible, much more if we want to add this to other tariffs.
Also: your example of adding prices for zones is confusing. The price already comes from ENTSO-E, so why would you want to manually define it?

Fixed zone pricing seems a bit more complex and not easy to adapt for dynamic pricing.
In terms of ENTSO-E, price come in raw and we have a lot of custom taxes to apply. And on top of that, we need to apply zoned pricing.
I wasn't expecting for this PR to be merged right away. I'm happy to keep on working on this until we reach ideal solution.

In terms of ENTSO-E, price come in raw and we have a lot of custom taxes to apply. And on top of that, we need to apply zoned pricing.

It still seems your example is not using the Entso price add all?

Also note https://github.com/evcc-io/evcc/pull/17414 which could be used instead of zones?

Also note #17414 which could be used instead of zones?

Can you provide me an example where I can apply both:

formula: (price + 0.004 + 0.0028930 + 0.010)*(1 + 0.16) + 0.005
"+ (0.0157 if hour < 8 or hour > 23 else 0.0860)"

@andig, What about reusing code from fixed zones by implementing sum of 2 tariffs?
If dynamic tariff have zones, it would create fixed tariff entity and then it would sum to current dynamic tariff.
Do you think that would work?

Can you provide me an example where I can apply both:

How about, instead of adding zones:
charges := 0.0860
if hr := ts.Hour(); hr < 8 || hr >= 23 {
    charges = 0.0157
}
(price + 0.004 + 0.0028930 + 0.010) * 1.16 + 0.005 + charges

/cc @VolkerK62 @naltatis bzgl. Doku

How about, instead of adding zones:

That would be fine, but where can I add that config? It seems that it would need to be added as code.

dismissed in favor of https://github.com/evcc-io/evcc/pull/17414


[5.1] Let \Illuminate\Support\Collection be Macroable

Let \Illuminate\Support\Collection be Macroable.
Still not sure if 5.2 should be targeted instead of 5.1

I'm :-1: here I'm afraid.

OK @GrahamCampbell

Just because I'm :-1:, it doesn't mean Taylor will be. I'm just saying where I am.

Sure - Collections can be extended anyway

Extending is not the same. There are many places where Laravel returns collections, most notably from Eloquent.
Extending the collection class won't help you much there.

I meant extending the collection to use my own Macroable collection, this is what I do ATM.
You can override \Illuminate\Database\Eloquent\Model::newCollection too, in an abstract BaseModel for instance.


In place FWHT

Hi, and thanks for the package.
I think it would be nice to have an in place version of the different functions.
I am not sure to understand how the FFTW library can handle that, but I guess it does somehow. Maybe it's even possible to call the library with Y=X, in which case it would just be a matter of writing a few wrappers ? Or is there something more complex that would make it difficult ?

A natural-order in-place FWHT would be easy to support.  Just define:
function ifwht_natural!(X::StridedArray{<:FFTW.fftwNumber}, region)
    p = Hadamard.Plan_Hadamard(X, X, region, ESTIMATE, NO_TIMELIMIT, false)
    FFTW.unsafe_execute!(p)
    return X
end

For the other orderings it is harder because we don't currently have an in-place implementation of the requisite permutations.

This is perfect, thank you. I actually only need the natural order.