Gradle can’t delete build folders

Current Behavior
I have this problem with my Kotlin project. Gradle sometimes gives me an error when trying to build the project. It says it can’t delete some build folders. I can delete them manually, I also tried to use gradlew --stop command and TASKKILL /F /IM java.exe however none of them did anything. The error persists until I manually delete those folders. Also in my project, I have 1 additional module and a buildSrc module for the Gradle plugin (an error was present before this plugin). I have this error in the build folders of all 3 modules randomly.
Expected Behavior
No errors
Context (optional)
Now I have to delete build folders every time I get the error.
Steps to Reproduce
The structure of my project:

I have 3 modules: main one, buildSrc, and TelegramLib. The error was first seen when I included TelegramLib. Now the problem usually starts in the build folder of buildSrc. Firstly I see the error about buildSrc then I delete the folder, then I see a mistake with TelegramLib where I also need to delete a folder, and finally, the main build folder also needs to be deleted manually. I have not noticed a pattern, so it seems to be random when It gives an error and when it does not.
Here is my gradle.kts file for buildSrc:
plugins {
    kotlin("jvm") version "1.9.22"
    `kotlin-dsl`
}
repositories {
    mavenCentral()
}
dependencies {
    testImplementation(kotlin("test"))
    runtimeOnly(gradleApi())
}
tasks.test {
    useJUnitPlatform()
}
kotlin {
    jvmToolchain(17)
}

gradle.kts file for TelegramLib:
plugins {
    kotlin("jvm")
}
group = "com.github.kotlintelegrambot"
version = "0.0.1"
repositories {
    mavenCentral()
}
dependencies {
    ...
}
tasks.test {
    useJUnitPlatform()
}
kotlin {
    jvmToolchain(17)
    compilerOptions {
        freeCompilerArgs.add("-Xcontext-receivers")
    }
}

gradle.kts file for Main:
plugins {
    kotlin("jvm") version "1.9.23"
    id("io.ktor.plugin") version "2.3.9"
    id("org.jetbrains.kotlin.plugin.serialization") version "1.9.23"
}
apply<CustomPlugin>()

kotlin {
    jvmToolchain(17)
    compilerOptions {
        freeCompilerArgs.add("-Xcontext-receivers")
    }
}
group = "com.bot"
version = "0.0.1"
repositories {
    mavenCentral()
}
dependencies {
    ...
}

Gradle version
Gradle 8.7
Gradle version that used to work

Build scan URL (optional)
https://scans.gradle.com/s/flhksq3rwyziw
Your Environment (optional)
Kotlin:       1.9.22
OS:           Windows 11 10.0 amd64

Thank you for your help! I marked this issue as a regression by mistake.
I tried to use Gradle Project Replicator, however when I try to build my project after I add initscript/init.gradle into my build.gradle.kts it says it "Plugin with id 'com.android.gradle.replicator.ProjectReplicatorPlugin' not found." But, I did run gradlew publishLocal on that plugin and I can see it in m2/repository folder.

I succeded at applying the plugin. Although it was still a bit strange, I had to add implementation("com.android.gradle.replicator:project-replicator:0.2") to my project dependency and use
allprojects {
    apply { plugin(com.android.gradle.replicator.ProjectReplicatorPlugin::class) }
}

I attached the json file.
project-structure.json

@pisfer can you provide the reproducer project, please? Leveraging our reproducer template would be the best option.
Do you have some insights on what process prevents Gradle from deleting a file?

Here is a link for the reproducer project: https://github.com/pisfer/gradle-issue-29011-reproducer
And I tried to check which process holds a lock on those files that gradle can't delete, I did not find any locks.
Also I noticed that a problem disappeared when I removed:
include("TelegramLib") from settings.gradle.kts
And
implementation(project(":TelegramLib")) from build.gradle.kts

I found the problem. It was Google Drive for Desktop that locked those files. Anyway, thank you for your help.
Also, Is it possible to tell Gradle not to recompile the whole project if the buildSrc source code was changed?

It was Google Drive for Desktop that locked those files.

Okay, so the problem was caused by the environment. Closing the issue since it's not something that should be fixed in Gradle.

Also, Is it possible to tell Gradle not to recompile the whole project if the buildSrc source code was changed?

You can refactor your buildSrc login into a plugin and enable the configuration cache. For more details, refer to this doc


ModuleNotFoundError: No module named 'torchvision'

System Info
- `Accelerate` version: 1.0.1
- Platform: Linux-5.4.0-42-generic-x86_64-with-glibc2.31
- `accelerate` bash location: /home/lmh/.local/bin/accelerate
- Python version: 3.10.9
- Numpy version: 1.23.5
- PyTorch version (GPU?): 1.12.1 (False)
- PyTorch XPU available: False
- PyTorch NPU available: False
- PyTorch MLU available: False
- PyTorch MUSA available: False
- System RAM: 503.62 GB

Information

[ ] The official example scripts
[X] My own modified scripts

Tasks

[ ] One of the scripts in the examples/ folder of Accelerate or an officially supported no_trainer script in the examples folder of the transformers repo (such as run_no_trainer_glue.py)
[X] My own task or dataset (give details below)

Reproduction
import torch
import torchvision
print("666")

when I use accelerate to run my code I meet this error.But if I use python test_error.py , it's fine.
How can I use accelerate?
Expected behavior
How can I use accelerate?Please help me

In addition, I have already installed torch and torchvision!


Set all types to False in pick_types

Would it make sense to set all arguments in pick_types to False by default? In other words, currently everything is False except for meg. I know where this is coming from, but for people working with EEG, NIRS, or other non-MEG signals, we always have to include meg=False in addition to e.g. eeg=True.

deprecation cycle will be a huge pain. I feel fully guilty for this but
it's trade off.
If you have only EEG data it's not a pb though no?

+1 for doing it. I wish we had done it 5 (10?) years ago but it still seems worth it in the long run. I don't think actually it will be too terrible for users (many probably will have set it explicitly anyway), but even forcing them to add True/False (when MEG channels are present) will be more explicit in their uses anyway. A potential benefit (aside from consistency) is that it could actually help them uncover some silent bugs in their code.

So then raw.pick_types() with all default arguments would be an error?  Or a raw object with zero channels?  :)

Yeah, I suppose so. Kind of a weird side effect. But if you don't ask to pick anything it's probably better that it throws an error than it silently pick one channel type...

if you don't ask to pick anything it's probably better that it throws an error than it silently pick one channel type...

Agreed. +1 for embarking on the painful deprecation effort.

+1 for this from my end, the current behavior always felt weird to me (an EEG user)

If you have only EEG data it's not a pb though no?

Valid comment though. But since simultaneous recordings with different methods are gaining in popularity, I believe addressing this issue will become more and more important in the future.

Alright, so it looks like we agree that this must be done. I'll submit a PR.

I think this is a good idea. +1 from my side.

before fully diving into this let's have a clear plan as it's a lot of work.
In Master:
If you have EEG/MEG:
raw.pick_types(meg=False, eeg=True) -> EEG only
raw.pick_types() -> MEG only
If you have EEG:
raw.pick_types() -> Error?
If you have MEG:
raw.pick_types() -> MEG only
what behavior do you expect in the next release and the next next one?

The next release (0.21) should behave identically to 0.20, but a DeprecationWarning should be raised (something like "The defaults of pick_types will change in the next release. All signal types will be set to False by default (currently, meg=True by default).").
Release 0.22 should implement the new behavior. Your examples will be:
If you have EEG/MEG:
raw.pick_types(meg=False, eeg=True)  # EEG only, will work as before
raw.pick_types()  # error (no signals picked)
raw.pick_types(eeg=True)  # new option to pick EEG only

If you have EEG:
raw.pick_types()  # error (no signals picked)
raw.pick_types(eeg=True)  # need to select EEG

If you have MEG:
raw.pick_types()  # error (no signals picked)
raw.pick_types(meg=True)  # need to select MEG

I've converted @agramfort's list to a table, which we can potentially amend as the discussion progresses.

Type
pick_types() call
master behavior
proposed new behavior

EEG & MEG
pick_types(meg=False, eeg=True)
EEG only

EEG & MEG
pick_types()
MEG only

EEG
pick_types()
Error?

MEG
pick_types()
MEG only

What is the current behavior when I pick types that don't exist? Does it raise an error? Or pick nothing (i.e. return a zero-channel object)? Or is this a no-op?

Updated table based on @cbrnr's and @agramfort's comments – hope I copied everything correctly.

Type
pick_types() call
master behavior
proposed new behavior

EEG & MEG
pick_types(meg=False, eeg=True)
EEG only

EEG & MEG
pick_types()
MEG only

EEG
pick_types()
Error?

MEG
pick_types()
MEG only

to be tested. I would really start by writing tests here.


Normalize image diff Timezones to PDT

Description
Fix the timezone in screenshot diffs to be static. The recent daylight savings surfaced this issue.
Release notes:
NA - testing
Checklist
General

[x] Added the correct label: < feature | bug | dependencies | infrastructure | ignore-for-release >
[ ] Created tests which fail without the change (if possible)
[ ] Extended the README / documentation, if necessary

User visible changes

[ ] Wrote browser tests using the validateAccessibility method
[ ] Manually tested at 200% size
[ ] Manually evaluated tab order

New Features

[ ] Add new FeatureFlag env vars to server/conf/application.conf
[ ] Conditioned new functionality on a FeatureFlag
[ ] Wrote browser tests with the feature flag off and on, etc.

Issue(s) this completes
Fixes #<issue_number>; Fixes #<issue_number>...

Codecov Report

Merging #3769 (17c2fc8) into main (2a0f76d) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##               main    #3769   +/-   ##
=========================================
  Coverage     80.54%   80.54%
  Complexity     2441     2441
=========================================
  Files           296      296
  Lines          9653     9653
  Branches        660      660
=========================================
  Hits           7775     7775
  Misses         1624     1624
  Partials        254      254

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more


No compatible version found<EMAIL_ADDRESS>

A lot of our builds are seeing this now, just checking if something got unpublished

Appears to be our nexus cache.


terraform apply should be against a saved plan

Our cg-provision pipeline (also aws-broker and maybe others) is configured to run terraform plan, and in a later job run terraform apply.  However, that apply doesn't make use of a saved plan file.  This means infrastructure drift during plan review and before the apply job is triggered can result in unexpected and possibly destructive changes.
Instead, we should save the plan output from the terraform plan job and make use of it in the apply job.

relevant: https://github.com/ljfranklin/terraform-resource

I was possibly bit by this today.  Triggered a concourse build against a commit that had already run, and somehow that build ended up rebuilding a database.  I have no idea what changed, since the apply used -autoapprove.  Maybe it was fine?

Closing in favor of https://github.com/cloud-gov/cg-provision/issues/741


[SPARK-11273][SQL] Move ArrayData/MapData/DataTypeParser to catalyst.util package

cc @cloud-fan

Merged build triggered.

Merged build started.

Test build #44198 has started for PR 9239 at commit dde2dfd.

Logically unsafe data structures(UTF8String, UnsafeArrayMap, etc.) does not belong to type package, either.  But they are public, should we move them too?

Where is UnsafeArrayMap?

Test build #44198 has finished for PR 9239 at commit dde2dfd.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/44198/
Test PASSed.

LGTM

I am trying to build the latest master branch, but I am having compile errors that seemed to be coming from this commit:  cdea0174e32a5f4c28fd59899b2e9774994303d5
$ git blame -L30,31 sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala
cdea0174 (Reynold Xin         2015-10-23 00:00:21 -0700 30) import org.apache.spark.sql.catalyst.util._
67d06880 (Volodymyr Lyubinets 2015-04-10 16:27:56 -0700 31) import org.apache.spark.sql.types._
$ git blame -L25,26 sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala
cdea0174 (Reynold Xin 2015-10-23 00:00:21 -0700 25) import org.apache.spark.sql.catalyst.util._
f9969098 (Reynold Xin 2015-01-13 17:16:41 -0800 26) import org.apache.spark.sql.types._
I appreciate any feedback and guidance you can provide on what I maybe doing wrong.  Thanks!
Compile errors stdout below:
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:154: reference to ArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]       elementType: DataType) extends CatalystTypeConverter[Any, Seq[Any], ArrayData] {
[error]                                                                           ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:196: reference to MapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     extends CatalystTypeConverter[Any, Map[Any, Any], MapData] {
[error]                                                       ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:175: reference to ArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     override def toScala(catalystValue: ArrayData): Seq[Any] = {
[error]                                         ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:231: reference to MapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     override def toScala(catalystValue: MapData): Map[Any, Any] = {
[error]                                         ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:158: reference to ArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     override def toCatalystImpl(scalaValue: Any): ArrayData = {
[error]                                                   ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:161: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]           new GenericArrayData(a.map(elementConverter.toCatalyst))
[error]               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:163: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]           new GenericArrayData(s.map(elementConverter.toCatalyst).toArray)
[error]               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:171: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]           new GenericArrayData(convertedIterable.toArray)
[error]               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:201: reference to MapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     override def toCatalystImpl(scalaValue: Any): MapData = scalaValue match {
[error]                                                   ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:213: reference to ArrayBasedMapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]         ArrayBasedMapData(convertedKeys, convertedValues)
[error]         ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:228: reference to ArrayBasedMapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]         ArrayBasedMapData(convertedKeys, convertedValues)
[error]         ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:431: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     case seq: Seq[Any] => new GenericArrayData(seq.map(convertToCatalyst).toArray)
[error]                               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:433: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     case arr: Array[Any] => new GenericArrayData(arr.map(convertToCatalyst))
[error]                                 ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/CatalystTypeConverters.scala:445: reference to ArrayBasedMapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]       ArrayBasedMapData(convertedKeys, convertedValues)
[error]       ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:373: reference to ArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     buildCast[ArrayData](, array => {
[error]               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:389: reference to MapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types.
[error] and import org.apache.spark.sql.catalyst.util._
[error]     buildCast[MapData](, map => {
[error]               ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:814: reference to GenericArrayData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types.
[error] and import org.apache.spark.sql.catalyst.util._
[error]     val arrayClass = classOf[GenericArrayData].getName
[error]                              ^
[error] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/Cast.scala:851: reference to ArrayBasedMapData is ambiguous;
[error] it is imported twice in the same scope by
[error] import org.apache.spark.sql.types._
[error] and import org.apache.spark.sql.catalyst.util._
[error]     val mapClass = classOf[ArrayBasedMapData].getName
[error]                            ^
[warn] /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/types/StructType.scala:27: imported `DataTypeParser' is permanently hidden by definition of object DataTypeParser in package types
[warn] import org.apache.spark.sql.catalyst.util.DataTypeParser
[warn]                                           ^
[warn] one warning found
[error] 18 errors found
[error] (catalyst/compile:compile) Compilation failed
[error] Total time: 559 s, completed Oct 29, 2015 7:07:47 PM

Are you sure your local master branch is latest and clean? This PR has been merge for a week and everything goes well so far.

Yes, it is clean and pure, up to this commit:  96cf87f66d47245b19e719cb83947042b21546fa
Here are the options I am using with "make-distribution.sh"
--tgz --with-tachyon -Pyarn -Phadoop-2.6 -Phive -Phive-thriftserver -Psparkr -Dhadoop.version=2.6.0 -DskipTests clean package
I am not sure if Jenkins have a build using these combination.

It looks to me that you still have those moved files in /tmp/spark/sql/catalyst/src/main/scala/org/apache/spark/sql/types, can you check that? And can you git clone a new copy of spark code and try again?

Thank you for the helpful tip.  You are correct that there were previous artifacts that were NOT "cleaned" that caused this compile error.  I had to wipe everything and git clone a new copy of spark code to address my issue.  Now I learned that the "clean" option I passed in to "make-distribution.sh" does not really "clean" classes that was moved.  Sorry for the trouble.  Everything is okay now.  Thank you!


Update to 10.1.2

Switch library file paths to relative for easier future updates.
Add dist file for 10.1.2
Signed-off-by: master801<EMAIL_ADDRESS>Closes issue #11

Build looks good. Merging.
Thanks for the contribution ^^


Document usage of chown on /tekton as another cause of error

Changes
In a prior commit we documented reasons that a warning may be
printed while initializing credentials. There is another possible
cause of these warnings that was not included at that time.
This commit adds another possible cause of the warning message
appearing: Steps that chown the contents of /tekton to be a UID
that subsequent Steps are not running as.
/kind documentation
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:

[x] Includes docs (if user facing)
[x] Commit messages follow commit message best practices
[x] Release notes block has been filled in or deleted (only if no user facing changes)

NONE

/approve

/lgtm

/lgtm

/test all


View constraints

This adds schema-overlay storage for unenforced pseudo constraints to make ERMrest pretend that there are uniqueness or foreign key reference constraints not actually present in the database. The REST API uses this to enable constraint management on views. Previously, trying to add a constraint to a view would fail since the DB does not support it.  Currently, real constraints are managed on tables and pseudo constraints are managed on views. The introspection layer would actually allow pseudo constraints on tables as well, but the schema management API does not provide a way to create these.
This update breaks backward-compatibility with existing catalogs. The server schema introspection will fail at startup when accessing existing catalogs created by the older codebase. They need their _ermrest schema updated with two empty tables as per the pseudo-constraint storage DDL in catalog.py.

I've updated the ermrest-db-work maintenance script and I think it works now, but again there aren't really good tests for some of this functionality.  It seems we should merge this into master now as people want to start playing with it on dev systems.


Add automatic deploy for pipelines

PR types

New features

PR changes

APIs

Description

Add automatic deploy for pipelines

Nice Job


sketchpad.readOnly not working

I'm trying to disable the canvas to simulate the 'back' of a sketchbook on which you shouldn't be able to write . An underlying image is swapped to see the back of the drawing pad but after sketchpad.readOnly = true, you can still write on the canvas. I've created a workaround by setting sketchpad.color = 'rgba(255,255,255,0)'; so the pen becomes invisible (thanks to jeanleonino) .
As a test I've created a very minimalistic html source:
<body>
<canvas id="sketchpad"></canvas>
<script>
var sketchpad = new Sketchpad({
  element: '#sketchpad',
  width: 400,
  height: 400
});
sketchpad.readOnly = true;
</script>
</body>

This created a canvas on which you can write. Is my interpretation of readOnly incorrect or is this truly a bug?

Hi, i know i am  two or tree year late but, what if you just put a invisible div  over the sketchpad

im many years late but i solved this by using
pointer-events: none  on div


feat: airwatch support

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


Styling Next.js 13 Link

Subject
Link
Description
There is a section about how to use with Next.js Link,
https://chakra-ui.com/docs/components/link/usage#usage-with-nextjs

With Next.js 13, next/link now outputs the <a> element by default. Because of this, the suggested "Usage with Next.js" is not correct anymore. You can keep the suggestion working by adding legacyBehaviour to the NextLink.
I assume it would probably be preferred to use as={NextLink} if possible, but I can't get that to work.

Is Chakra UI working with the app directory in Next.js 13 now? I couldn't get it to work.

Is Chakra UI working with the app directory in Next.js 13 now? I couldn't get it to work.

https://chakra-ui.com/getting-started/nextjs-guide#nextjs-13


Typo and clarity in doc would be beneficial

Type: resposne
As well, clearly indicate in this doc if the "response" waiting from the backend server is the http response code after processing, or if it's the "initial" handshake/tcp response... Thanks!

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

ID: 66c070b6-1c47-4c7f-b928-317a8c8b452f
Version Independent ID: 903191b7-6a01-1381-bf34-7353c2a8ece6
Content: Troubleshoot Bad Gateway errors - Azure Application Gateway
Content Source: articles/application-gateway/application-gateway-troubleshooting-502.md
Service: application-gateway
GitHub Login: @vhorne
Microsoft Alias: amsriva

@smay2121 I have update dthe typo. Thanks for pointing it out.
Regarding the response time. Since this is about 502 HTTP Error, it is talking about the initial response from the server when referring to Request time-out. Hops this helps.
We will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.


[BUG] Lowering of disk watermark should trigger index allocation

Describe the bug
In the cluster, disk watermark is higher than the high threshold, and the new index1 is created, as it's known, all shards of the index1 will be not assigned. The usage of disk decreased for some reason, now the disk usage is lower than high watermark, higher than low watermark, but the primary shards of index1 are still not be assigned, this is not normal. the result of api _cluster/allocation/explain is as follows:
{
   "index": "index1",
   "shard": 0,
   "primary": true,
   "current_state": "unassigned",
   "unassigned_info": {
      "reason": "INDEX_CREATED",
      "at": "2023-09-08T03:52:14.851Z",
      "last_allocation_status": "no"
   },
   "can_allocate": "yes",
   "allocate_explanation": "Elasticsearch can allocate the shard.",
   "target_node": {
      "id": "VoMSBNvQTyuxjSndDoG0qg",
      "name": "node2",
      "transport_address": "<IP_ADDRESS>:9302",
      "attributes": {
         "xpack.installed": "true"
      }
   },
   "node_allocation_decisions": [
      {
         "node_id": "VoMSBNvQTyuxjSndDoG0qg",
         "node_name": "node2",
         "transport_address": "<IP_ADDRESS>:9302",
         "node_attributes": {
            "xpack.installed": "true"
         },
         "node_decision": "yes",
         "weight_ranking": 1
      }

the explain show that "Elasticsearch can allocate the shard, but shard can't be assigned"
To Reproduce
Steps to reproduce the behavior:
Current disk usage is 50%.

Create the file1 which size is 10Gb.
set the setting cluster.routing.allocation.disk.watermark.high to be 49.999%
create the index1.
delete file1. the disk usage will lower than 49.999%

The index1 will be not assigned.
Expected behavior
We only call reroute when the disk usage is lower than low watermark, we should also call reroute when the disk watermark is lower than high watermark or higher than the low watermark.
https://github.com/opensearch-project/OpenSearch/blob/c99ba635c8a7652cc6618b71e15ddde335008b8b/server/src/main/java/org/opensearch/cluster/routing/allocation/DiskThresholdMonitor.java#L231
Screenshots
[2023-09-03T13:56:40,738+0800][INFO][o.e.c.r.a.AllocationService] [master1] Cluster health status changed from [YELLOW] to [RED] (reason: [index [vecompass-log-time-2023.09.03-000014] created]).
[2023-09-03T13:56:40,773+0800][INFO][c.a.o.i.i.ManagedIndexCoordinator] [master1] Index [vecompass-log-time-2023.09.03-000014] will be managed by policy [vestack-log-ism]
[2023-09-03T13:57:12,303+0800][WARN][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] exceeded on [uslvEQqiSc248VPAPQclEg][master0][/es-data/nodes/0] free: 8.4gb[8.5%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete
......
[2023-09-03T14:01:12,507+0800][WARN][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] exceeded on [m0Sid36tSF-tD_5mC0X8eQ][master2][/es-data/nodes/0] free: 5gb[5.1%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete
[2023-09-03T14:01:12,507+0800][WARN][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] exceeded on [NTM1PxiiQByNGHa13jvJTw][master1][/es-data/nodes/0] free: 7.4gb[7.6%], shards will be relocated away from this node; currently relocating away shards totalling [0] bytes; the node is expected to continue to exceed the high disk watermark when these relocations are complete
[2023-09-03T14:02:12,565+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] no longer exceeded on [uslvEQqiSc248VPAPQclEg][master0][/es-data/nodes/0] free: 14.5gb[14.8%], but low disk watermark [85%] is still exceeded
[2023-09-03T14:02:12,565+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] no longer exceeded on [m0Sid36tSF-tD_5mC0X8eQ][master2][/es-data/nodes/0] free: 11.4gb[11.7%], but low disk watermark [85%] is still exceeded
[2023-09-03T14:02:12,565+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] high disk watermark [90%] no longer exceeded on [NTM1PxiiQByNGHa13jvJTw][master1][/es-data/nodes/0] free: 13.7gb[14%], but low disk watermark [85%] is still exceeded
......
[2023-09-03T15:44:39,081+0800][INFO][o.e.c.s.ClusterSettings] [master1] updating [cluster.routing.allocation.node_concurrent_incoming_recoveries] from [8] to [9]
[2023-09-03T15:44:39,259+0800][INFO][o.e.c.r.a.AllocationService] [master1] Cluster health status changed from [RED] to [YELLOW] (reason: [shards started [[vecompass-log-time-2023.09.03-000014][7]]]).
......
[2023-09-03T15:46:48,354+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] low disk watermark [85%] no longer exceeded on [uslvEQqiSc248VPAPQclEg][master0][/es-data/nodes/0] free: 15.8gb[16.1%]
[2023-09-03T15:46:48,354+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] low disk watermark [85%] no longer exceeded on [NTM1PxiiQByNGHa13jvJTw][master1][/es-data/nodes/0] free: 14.6gb[15%]
[2023-09-03T15:47:18,416+0800][INFO][o.e.c.r.a.DiskThresholdMonitor] [master1] low disk watermark [85%] exceeded on [NTM1PxiiQByNGHa13jvJTw][master1][/es-data/nodes/0] free: 14.3gb[14.6%], replicas will not be assigned to this node

To assign the shard, i change the cluster.routing.allocation.node_concurrent_incoming_recoveries to trigger the reroute.
Host/Environment (please complete the following information):

OS: mac
Version: 7.10.2

@anasalkouz @kotwanikunal can you help confirm it?

@kkewwei Can you help with the initial investigation on this, if this is by design? Feel free to use the thread to discuss/brainstorm ideas and own the issue.
Based on your initial findings we can take a call whether we need a PR with fix or not.
Looking forward to your contributions on this.

@rwali-aws,  thank you for your reply.
It seems that it's not by design, we use diskFreeBytes to represent the disk free bytes:

if diskFreeBytes <  freeBytesThresholdHigh,  the primary and replicas will be not allocated to the node.
if  freeBytesThresholdLow < diskFreeBytes < freeBytesThresholdHigh, the primary can be allocated to the node, but replicas will be not allocated to the node.
diskFreeBytes > freeBytesThresholdLow,  the primary and replicas can be allocated to the node.

Now we call method reroute in the case 1 and 3, but don't call reroute in the case 2, it's a bit unreasonable.
A bit unreasonable


GPU sketching

For sequence reads only

Transpose reads (using openmp), removing any reads with an N. Pad with N to longest read length to make rectangular
Progress counter: sample name, % done, newline
consider saving hashes and processing countmin on CPU at the end (e.g. table per thread which are then summed)


Move away from CppUnitTest.h to a more standard unit testing framework

With calculator nowsoon being halfway cross-platform would you consider moving away from CppUnitTest.h to something more standard, at least for the CalcManager part?
Three frameworks come to my mind:

Google Test
Catch2
Boost Test

I'm sure there are many others as well.

This is your friendly Microsoft Issue Bot. I've seen this issue come in and have gone to tell a human about it.

For now, we plan to stick with Visual Studio's test framework since it works well in our primary environment on Windows.


review: fix CI on windows

Classical first PR trying to fix the CI on Windows.  The problems seems that the filename is simply the absolute path and not the relative path. How on earth this works on Unix is unknown to me.
Fixes #273

We are replacing RuleVerifier with SonarLintEngine in #696 . Once that refactoring PR is done, I think we can work on fixing the CI on Windows.
Moreover, the general way to fix this is to use Path instead of String. See https://github.com/SpoonLabs/sorald/issues/166. I believe this way we shall be able to support Sorald independent of the file system.

@MartinWitt now you may continue to work on this. We have refactored the infrastructure of the project. See #696.

Works 👍
https://github.com/SpoonLabs/sorald/blob/c9db9ffac490b0d72ee13abe6ab1ae1794341fe2/src/main/java/sorald/FileUtils.java#L132 You may want to remove this last artifact of windows, the File API can handle Unix style paths on windows.

You may want to remove this last artefact of windows, the File API can handle Unix style paths on windows.

@MartinWitt It is just not handling path format, but also storing the jar plugin in the conventionally accepted cache directory of Windows which now I realise is not correct. It should be something like this - C:\Users\HP-JVF78\AppData\Local\aman\sorald\Cache\.
I guess we can merge this PR regardless your suggested change?

I am also surprised that the tests pass as is. I wonder why it was disabled before.

I guess we can merge this PR regardless of your suggested change?

Yes absolutely the path is a simple style issue. And as it seems there are more problems, we should split this in a separate PR.

I am also surprised that the tests pass as is. I wonder why it was disabled before.

I was surprised too.

@MartinWitt If we have official support for Windows now, should we also update the README badge?

Yes, the badge and the README text about platform support.

Could you submit a PR for that?

Yes I will create one.


force history limit

As a general suggestion, are you (bws) considering moving most or all of these static settings to a config file? Although this is a simple change (reduces from 100 to 10 the static limit), it forces forking the project solely for changing these static values in case someone is using the project under slightly different assumptions.

Closed in favor of:  https://github.com/bitpay/bitcore-wallet-service/pull/419
@g-p-g thanks for the comment. We have spawned https://github.com/bitpay/bitcore-wallet-service/issues/420 to use config.js params with in server methods


Training continuation with multiple DMatrix objects

Issue
If a training is started with a DMatrix object and continued with another DMatrix object that is identical (same dataset...), I should get the same model as if the training had been done with a single DMatrix object.
In the following C++ code, two models are trained. In the first training, UpdateOneIter is called two times with the same DMatrix. In the second training, the two calls to UpdateOneIter are made with two different DMatrix objects that contain the same dataset. I expect the two model dumps (out_models1 and out_models2) to be the same, but they are different.
#include <xgboost/learner.h>

using namespace xgboost;

void ConfigureBooster(std::shared_ptr<Learner>& booster) {
    std::vector<std::pair<std::string, std::string>> cfg;

    cfg.emplace_back(std::make_pair("tree_method", "hist"));
    cfg.emplace_back(std::make_pair("objective", "binary:logistic"));
    cfg.emplace_back(std::make_pair("subsample", "0.9"));
    cfg.emplace_back(std::make_pair("seed", "42"));
    cfg.emplace_back(std::make_pair("seed_per_iteration", "1"));

    booster->SetParams(cfg);
    booster->Configure();
}

int main(int argc, char** argv) {
    const std::string dataset_path = "../data/census.bin";
    FeatureMap fmap;

    /* Training with 1 DMatrix object */

    std::shared_ptr<DMatrix> dtrain1(DMatrix::Load(dataset_path, true, false));
    std::shared_ptr<Learner> booster1(Learner::Create({dtrain1}));
    ConfigureBooster(booster1);
    booster1->UpdateOneIter(0, dtrain1);
    booster1->UpdateOneIter(1, dtrain1);
    std::vector<std::string> out_models1 = booster1->DumpModel(fmap, true, "text");
    for (std::string out_model : out_models1)
        std::cout << out_model << std::endl;

    /* Training with 2 DMatrix objects (but same dataset!) */

    std::shared_ptr<DMatrix> dtrain2(DMatrix::Load(dataset_path, true, false));
    std::shared_ptr<Learner> booster2(Learner::Create({dtrain2}));
    ConfigureBooster(booster2);
    booster2->UpdateOneIter(0, dtrain2);
    dtrain2.reset(DMatrix::Load(dataset_path, true, false));
    booster2->UpdateOneIter(1, dtrain2);
    std::vector<std::string> out_models2 = booster2->DumpModel(fmap, true, "text");
    for (std::string out_model : out_models2)
        std::cout << out_model << std::endl;

    return 0;
}

XGBoost version: 1.2.0
Fix
I investigated the issue and found that adding the following lines to GHistIndexMatrix::Init solves the issue:
void GHistIndexMatrix::Init(DMatrix* p_fmat, int max_bins) {
  cut.cut_ptrs_.HostVector().clear();
  cut.cut_values_.HostVector().clear();
  cut.min_vals_.HostVector().clear();
  cut.cut_ptrs_.HostVector().emplace_back(0);

  hit_count.clear();
  hit_count_tloc_.clear();

  ...

@ldesreumaux Now that you have a fix, would you like to submit a pull request?

I prefer moving it into DMatrix.  Let's hold on this a little bit.

Actually, this has already been fixed in https://github.com/dmlc/xgboost/pull/7064 .


Check if documentation links in DeltaErrors point to valid URLs

New test suite to test the documentation links in DeltaErrors
DocsPath now has a method generateDocsLink which will be used to create the docs link that is passed to the error message
DeltaErrorsSuiteBase contains a list of all the error message in DeltaErrors that are applicable to Delta. The test accesses each link in each error message and checks to see if the HTTP response is valid for docs.delta.io.{path}

I think this has been fixed. So I am closing this PR.


Only show relevant repositories on explore page

By default on explore pages only show relevant repositories, this means the repo isn't a fork and either has a description or topic.
Ref: https://codeberg.org/Codeberg/Community/issues/575

Codecov Report

:exclamation: No coverage uploaded for pull request base (main@c003491). Click here to learn what that means.
The diff coverage is 51.61%.

@@           Coverage Diff           @@
##             main   #19361   +/-   ##
=======================================
  Coverage        ?   47.38%
=======================================
  Files           ?      949
  Lines           ?   132108
  Branches        ?        0
=======================================
  Hits            ?    62598
  Misses          ?    61979
  Partials        ?     7531

Impacted Files
Coverage Δ

models/repo_list.go
73.00% <16.66%> (ø)

modules/setting/setting.go
45.58% <100.00%> (ø)

routers/web/explore/repo.go
73.33% <100.00%> (ø)

Continue to review full report at Codecov.

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

.


Just warn on lint unicorn/prefer-ternary

To fix https://travis-ci.com/github/zaproxy/zap-hud/jobs/442226410
Not sure why its failing on that PR and not others, but only really want to warn on this anyway..
Signed-off-by: Simon Bennetts<EMAIL_ADDRESS>

This will have to be added in the other PR, it's a new rule.
Why "suppress" instead of changing the code? It would be more clear that's being initialised the variable.

TBH I think:
		if (url.indexOf('://') > -1) {
			hostname = url.split('/')[2];
		} else {
			hostname = url.split('/')[0];
		}

is easier to read than
		let hostname = url.indexOf('://') > -1 ? url.split('/')[2] : hostname = url.split('/')[0];

but happy to change that if I'm in the minoroty...

I prefer the later, but don't mind keeping what we have now. If we don't want the rule it's probably better to just disable than warn.

Closing this one as the change needs to be applied in #840. Could you apply the change there?


Android Gradle Plugin 3.0.0 and Gradle 4.1 JarMerger Class not Found

Hi,
Android Gradle Plugin: 3.0.0
Gradle Version: 4.1
GradleAspectJ-Android: 3.1.1
Task that is failing: transformClassesWithAspectjForDebug
Error:
Caused by: java.lang.ClassNotFoundException: com.android.build.gradle.internal.transforms.JarMerger

The android gradle plugin changed and introduced breaking changes, including a different dsl.
Is there a workaround for this issue?  Is Android plugin 3.0.0 on the road map?
Thanks!

Hi! Thank's for feedback!
Temp workaround: https://github.com/Archinamon/GradleAspectJ-Android/tree/feature/gradleApiBeta_3.0.0-beta7
I'll release new stable for 3.0.0 gradle rc soon :)

Hi,
Thanks for the quick answer and workaround.
I'll close the ticket.


Flow can't distinguish shapes of union types when testing the shapes of properties within the subtypes

You may see this bug in action at https://flow.org/try/#0C4TwDgpgBAYg9nKBeKBvAUFKwAWBLAOwHMAuKAcl0KPIBp0BfAbnXVElgQBtk1MoARtTLkhxOoxZtw0AEIBDAE68MWCAQCuAWxHrtErADd5XDRDLw49Zq3Zz5ALxX89Oiq7pQA9F6gBNCABnWigASSgAawI4AHcoPGByQOwcaED5LQgQgQ1geLzAnDgNLgATKEDgPC4eAWh5AS5oYERgCBqofixunt6fKAAzRTgtFOgwYchFUCgAY1TZiP5jU3NOOC5rKX7QgnitMCbMgmB5KrgCVgGNAlnzvYGCAAowJQyyBWUAHygFBwBKMgAfksfCweAGUBeby0ADoVmZYVRiMgkChKPhxP8wd1FBBgBpFHtXooMvCTGYWFgGPx+HiCUSoJoaiwGEA
Code is here:
type Foo = {
  thing: 'thing',
};

type Fool = {
  bing: 'bing',
};

type Bar = {
  enum: 'enum',
  value: Foo,
};

type Baz = {
  enum: 'enum', // Yes, I know it's the same, but it should still be able to tell
                // from the property check
  value: Fool,
};

// In implementation

function fn(param: Bar | Baz): ?Foo {
  if (param.value.thing === 'thing') {
    return param.value;
  }

  return null;
}

Error:
22: function fn(param: Bar | Baz): ?Foo {
                                    ^ property `thing`. Property not found in
24:     return param.value;
               ^ object type

Hard to explain, but in essence it seems as though when Flow needs to check a property of a subtype of a union in order to determine the subtype, it fails.

The minimal case I could think of that produces this issue is this:
type Cup = {| handle: string |};
type Saucer = {| contents: string |};

type Dish = Cup | Saucer;

function fn(param: Dish): ?Cup {
  if (param.handle != null) {
    return param;
  }
  return;
}

Thanks @bendman

The original issue is capturing what appears to be a real bug, but I think the example is catching an error for a different reason. The situation itself is somewhat convoluted and involves any attempt at refining a disjoint union that is nested within a property of another refined disjoint union. Here is a relatively simple example.
The two examples given so far are failing not due to this bug, but because they are attempting to refine a disjoint union using a property name that is not guaranteed to be available on all union branches. This scenario is outlined in the documentation: "Disjoint unions require you to use a single property to distinguish each object type. You cannot distinguish two different objects by different properties."

@rsolomon what about this workaround from the documentation? It comes right after the section you refer to. It claims that exact object types circumvent this constraint by forcing a property conflict between the disjointed types:

However, to get around this you could use exact object types.

// @flow
type Success = {| success: true, value: boolean |};
type Failed  = {| error: true, message: string |};

type Response = Success | Failed;

function handleResponse(response: Response) {
  if (response.success) { // note that (response.success != null) produces the type error here, why?
    var value: boolean = response.value;
  } else {
    var message: string = response.message;
  }
}

With exact object types, we cannot have additional properties, so the objects conflict with one another and we are able to distinguish which is which.

How is this semantically different from @bendman's case?

@rsolomon sorry, re-reading this thread, i think what we're all saying is:
// @flow
type Success = {| success: true |};
type Failed  = {| error: true |};
type Response = Success | Failed;

function handleResponse(response: Response) {
  if (response.success) // this
  if (response.success != null) // should behave the same as this
  if (response.success != undefined) // should behave the same as this
  if (String(response.success)) // should behave the same as this
  // etc
}

Fair enough, I should have kept reading! I think we are maybe capturing 2 different issues here:

What you are talking about, regarding refinement of a union based on a negative check.

Inability to refine a top level disjoint union when attempting to refine based on a property that is also a disjoint union.

I'm wondering if there's consensus on whether this should be fixed.  It would appear that this reveals many related issues, in that (almost?) any check other than comparing an always true field using if (object.field) will throw an error.
Some examples are below, although there are many more.  I haven't yet looked into the cause of the issues, but I would expect all of these to work:
type Success = {| trueCheck: true, falseCheck: false, boolTypeCheck: boolean |};
type Failed  = {| error: true |};
type Response = Success | Failed;

// Working

function checkForTruthyTrue(response: Response): ?Success {
  if (response.trueCheck) return response;
}

// Failing

function checkForEqualTrue(response: Response): ?Success {
  if (response.trueCheck == true) return response;
}

function checkForExactlyTrue(response: Response): ?Success {
  if (response.trueCheck === true) return response;
}

function checkForExactlyFalse(response: Response): ?Success {
  if (response.falseCheck === false) return response;
}

function checkForType(response: Response): ?Success {
  if (typeof response.boolTypeCheck === 'boolean') return response;
}

One note is that some of this could get into equality oddities, but strict types help minimize those cases.

yeah, is there another open issue about this? i'm shocked if this is the first mention. this kind of checking is the most natural way to handle disparate inputs in js

For the record, the TypeScript version works, but you must explicitly state your types in the conditional, because it doesn't infer anything.
interface Success { trueCheck: true; falseCheck: false; boolTypeCheck: boolean; }
interface Failed { error: true; falseCheck: true; boolTypeCheck: string }
type Resp = Success | Failed;

// Working
function checkForTruthyTrue(response: Resp): Success | undefined {
    if ((<Success>response).trueCheck) return <Success>response;
}

function checkForEqualTrue(response: Resp): Success | undefined {
    if ((<Success>response).trueCheck == true) return <Success>response;
}

function checkForExactlyTrue(response: Resp): Success | undefined {
  if ((<Success>response).trueCheck === true) return <Success>response;
}

function checkForExactlyFalse(response: Resp): Success | undefined {
  if ((<Success>response).falseCheck === false) return <Success>response;
}

function checkForType(response: Resp): Success | undefined {
  if (typeof (<Success>response).boolTypeCheck === 'boolean') return <Success>response;
}

i think the relevant test code is here:
https://github.com/facebook/flow/blob/3ea841038418f680b0985f8a6084e507b04a484f/tests/exact/prop_test.js#L19

i started poking around the hack codebase for these prop checks, but it's a pretty complex system. i think starting on this would require some guidance from a 🐫

So, to clarify things, doing a check for if (object.property) will refine the scope when Exact object types are used.  This seems to serve the same purpose as TypeScript's (<Type>variable) assertions.
@dclowd9901's original issue can be solved in a few equivalent ways:
type Foo = {
  thing: 'thing',
};

type Fool = {|
  bing: 'bing',
|};

type Bar = {
  enum: 'enum',
  value: Foo,
};

type Baz = {
  enum: 'enum',
  // You could also forego the pipes (`|`) in Fool above by using `$Exact<Fool>` here
  value: Fool,
};

// In implementation

function fn(param: Bar | Baz): ?Foo {
  // Note the initial check for `param.value.thing`, refining the type
  if (param.value.thing && param.value.thing === 'thing') {
    return param.value;
  }

  return null;
}

This works in this case (and in the negative) but it wouldn't work for some cases, like typeof checks.

Maybe it belongs in another issue, but I'm seeing that when the distinguishing property is nested, there are errors, but only when you assert the type of the top-level object in the union. Referencing it's child properties is fine. Here's a simple example:
// @flow
type Success = { nested: { success: true, value: boolean } };
type Failed  = { nested: { success: false, error: string } };

type Response = Success | Failed;

function handleResponse(response: Response) {
  if (response.nested && response.nested.success) {
    var value: boolean = response.nested.value; // Works!
  } else {
    var error: string = response.nested.error; // Works!
    acceptFailedNested(response.nested); // Works!
	acceptFailed(response); // Fails :(
  }
}

function acceptFailedNested(failedNested: { success: false, error: string }) {
  console.log(failedNested.error);
}

function acceptFailed(failure: Failed) {
  console.log(failure.nested.error);
}

Try it here
I also tried @bendman's suggestion of using exact types. That did not seem to make any difference.


refactor(nuxt): add link to the changelog on the community releases tab

🔗 Linked issue
#22533

❓ Type of change

[x] 📖 Documentation (updates to the documentation, readme or JSdoc annotations)
[ ] 🐞 Bug fix (a non-breaking change that fixes an issue)
[ ] 👌 Enhancement (improving an existing functionality like performance)
[ ] ✨ New feature (a non-breaking change that adds functionality)
[ ] 🧹 Chore (updates to the build process or auxiliary tools and libraries)
[ ] ⚠ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description
We should add a link to this page
📝 Checklist

[ ] I have linked an issue or discussion.
[ ] I have updated the documentation accordingly.

Thank you for this! I've directly pushed a fix to nuxt/nuxt.com (still private - sorry!) via a routeRule.

Thank you for this! I've directly pushed a fix to nuxt/nuxt.com (still private - sorry!) via a routeRule.

Thanks!


Update Readme.md

#9 Sorry, I forgot to add a Album/List description.

Please close your other pull request if it is no longer needed. Keep in mind you could have simply committed this change to your previous branch and used the same pull request.


Bump lib to 0.45.2

This should be the last change needed for all the latest changes: https://github.com/home-assistant-libs/zwave-js-server-python/pull/567

reopened because this is a feature that is part of the current schema so we should have a release that fixes this


Validate transparent and sapling data of V5 transactions

Motivation
We need some tests in the consensus side for the new sapling data in V5 transactions.
Solution
Add a test that converts the transactions from all test blocks we have(real past blocks from testnet and mainnet) into V5 transactions and validate them.
Also this PR moves the utility functions needed for the transaction conversion so they can be used by zebra-chain and zebra-consensus crates.
The code in this pull request has:

[x] Documentation Comments
[x] Unit Tests

Review
Related Issues
Implement Transparent and Sapling validation for transaction v5 #1981
Hard-coded sapling-only transaction v5 test vectors https://github.com/ZcashFoundation/zebra/issues/2047
Follow Up Work

I pushed a fix that makes the itertools dependency optional, and enables it when proptest-impl is enabled.

I added PRs in your repository with spec updates and refactors:

https://github.com/oxarbitrage/zebra/pull/99
https://github.com/oxarbitrage/zebra/pull/100

Here's what was missing from the PR:

quote the latest consensus rules for each check, and
add Orchard TODOs.

While I was changing that code, I also:

implemented the missing "no PrevOuts" coinbase check, added a few days ago in zcash/zips@10710d9, and
refactored the code to make the checks simpler.


#32 page with data from server

Implements #32.
Note: the page changed is Edit Profile; at this point, the data displayed on that page is read-only.

NOTE: not yet ready for merging; wanted to trigger a Travis build to check it.

@eyko: ready to check now!


Query syntax seems wrong

https://github.com/zotonic/zotonic_example/blob/fc48d8b1485aa611dc846dddee634c656f64660d/apps/example_site/priv/templates/page.category.tpl#L51
This causes the template rendering to fail in zotonic 1.0.
It works when changing the query to what is described in the documentation
       {% with m.search[{ query
                    cat=id
                    sort="-created"
                    pagelen=20
                    page=q.page
                }] as result
        %}

Similar issue seems to be in the page.website.tpl

Which version of Zotonic are you using?

Good one, it should be:
    {% with m.search.query::%{
            cat: id,
            sort: "-created",
            pagelen: 20,
            page: q.page
        } as result
    %}

Should be ok now.
We prefer to use the map syntax going forward, but will keep supporting the property list syntax.

Thanks,
yes it works now. Seems syntax is also relaxed since it works without comma separation.
Just one question about the q.page item, is it safe without escaping?
I just read the security article.
I tried to append the escape filter in the map, but that does not work.

If you echo the q.page in your template then you will always need an escape:
{{ q.page|escape }}

For the query it is safe to use q values directly, they are processed and escaped by the query logic before ending up near the database.

Thanks, Marc.
I feel safe now :-).


SELinux does not update /etc/selinux/config

When using the official SELinux cookbook (managed by Chef - https://supermarket.chef.io/cookbooks/selinux/versions/0.9.0),
including the recipe
selinux_state "SELinux Permissive" do
action :permissive
end
Does NOT update the /etc/selinux/config.  Presumably, according to the SELinux docs, these are the the startup values (https://wiki.gentoo.org/wiki/SELinux/Tutorials/Permissive_versus_enforcing).  Therefore, a would will wipe out the chef configurations, and use the ones in /etc/selinux/config

Is this not an issue that should go against the selinux cookbook itself?

@lamont-granquist , my bad, thought selinux cookbook was managed by chef.  Actually owned by https://github.com/skottler/selinux.  Closing.

(FWIW, even if its owned by chef, this is the wrong repo, this is client-only -- all cookbooks need to have issues cut against their own repos under chef-cookbook/whatever on github...)


Like configuration in rustfmt.tml or a commandline switch?

There isn't, but there should be! It would be easier, and more in the spirit of Cargo, to ignore certain crates. Ignoring modules could be done too as an alternative to rustfmt_skip, but that feels a bit un-Rusty.

FYI:
My usecase is that i had a subdirectory containing another project (rust-peg) which I would like to ignore.  And also my project contains a large generated rust file which I don't want to format.
I would have thought another option in the rustfmt.toml file would be great.. Something akin to a gitignore syntax..
Am 16. Dez. 2015 19:20, um 19:20, Nick Cameron<EMAIL_ADDRESS>schrieb:

There isn't, but there should be! It would be easier, and more in the
spirit of Cargo, to ignore certain crates. Ignoring modules could be
done too as an alternative to rustfmt_skip, but that feels a bit
un-Rusty.

Reply to this email directly or view it on GitHub:
https://github.com/rust-lang-nursery/rustfmt/issues/705#issuecomment-165197515


Another idea... Templated queries

Concept syntax:
```dataview(template="my-query", args=["arg1", "val1", "arg2", "[[val2]]", ...])
```

Config screen then has a section to select a template folder. template is the name of the note in the template folder. That note can contain anything (for descriptive comments, etc) but only the actual query itself is extracted from the template at runtime and executed in the target note. Using named params instead of positional params keeps the calling syntax extensible.
There are certainly other ways to do it as well, this is just a thought.

Yeah, seems useful for common queries like "show all the daily notes for month " or "create a generic index over files tagged #thing". Will see what I can do.

Yep! This would be especially powerful in combination with your existing idea to have a this variable that can pull data from the note containing the query.
Thanks, you are awesome! :heart:

This seems doable via dv.view() at the moment but it's a decent idea.


Fixes front-end console error that blocks deliverable params from loa…

A listener that was watching for the pull-request HTML failed, which blocked deliverable parameters from loading.
The pull-request HTML was commented out prior to this request.

So this was something that should have been commented out before?

So this was something that should have been commented out before?

It should have been, but the code passes compilation, our tests, and there are not any automated front-end tests to detect this. This wouldn't be obvious to a developer unless someone wrote it or spent a good chunk of time in that area developing it.


Rework NuGet Package building process

Remove dependency on separate Packaging process.

For now, it's possible to overwrite the contents of the packages to get a recent build (though this doesn't update the nupkg) using the script in #321. For Windows, you can create a .cmd file with the following (you may need to update paths)
copy .\Bridge\Html5\bin\Debug\*.dll .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net40
copy .\Bridge\Html5\bin\Debug\*.xml .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net40
copy .\Bridge\Html5\bin\Debug\*.pdb .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net40\pdb

copy .\Bridge\Html5\bin\Debug\*.dll .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net45
copy .\Bridge\Html5\bin\Debug\*.xml .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net45
copy .\Bridge\Html5\bin\Debug\*.pdb .\..\MyBridgeProject\packages\Bridge.1.7.0\lib\net45\pdb

copy Builder\Build\bin\Debug\*.dll .\..\MyBridgeProject\packages\Bridge.1.7.0\tools
copy Builder\Build\bin\Debug\*.xml .\..\MyBridgeProject\packages\Bridge.1.7.0\tools
copy Builder\Build\bin\Debug\Bridge.Build.dll .\..\MyBridgeProject\packages\Bridge.1.7.0\tools\Bridge.Builder.dll

now that you mentioned it, we have an issue with the net40 folder logged here: #303. So if you have your project running, you don't really need to mind replacing the files on the net40 folder. :)

NuGet package during Release build has been added.
We're still running some tests, but marking as Closed.


[BUG] glib-macros started regressing with rustc 1.82.0 on 32-bit arches

Bug description
In Debian we enabled rustc to trigger the tests of crates which directly depend on it. glib-macros passed before but has regressed now on all 32-bit arches.
Backtrace
 running 12 tests
379s test derive_enum ... ok
379s test derive_boxed_nullable ... ok
379s test derive_boxed ... ok
379s test attr_flags_with_default ... ok
379s test attr_flags ... ok
379s thread 'boxed_transparent_ptr' panicked at core/src/panicking.rs:221:5:
379s unsafe precondition(s) violated: Layout::from_size_align_unchecked requires that align is a power of 2 and the rounded-up allocation size does not exceed isize::MAX
379s stack backtrace:
379s    0: rust_begin_unwind
379s              at /usr/src/rustc-1.82.0/library/std/src/panicking.rs:662:5
379s    1: core::panicking::panic_nounwind_fmt::runtime
379s              at /usr/src/rustc-1.82.0/library/core/src/panicking.rs:112:18
379s    2: core::panicking::panic_nounwind_fmt
379s              at /usr/src/rustc-1.82.0/library/core/src/panicking.rs:122:5
379s    3: core::panicking::panic_nounwind
379s              at /usr/src/rustc-1.82.0/library/core/src/panicking.rs:221:5
379s    4: core::alloc::layout::Layout::from_size_align_unchecked::precondition_check
379s              at /usr/src/rustc-1.82.0/library/core/src/ub_checks.rs:70:21
379s    5: core::alloc::layout::Layout::from_size_align_unchecked
379s              at /usr/src/rustc-1.82.0/library/core/src/ub_checks.rs:77:17
379s    6: alloc::raw_vec::RawVecInner<A>::current_memory
379s              at /usr/src/rustc-1.82.0/library/alloc/src/raw_vec.rs:534:30
379s    7: alloc::raw_vec::RawVecInner<A>::deallocate
379s              at /usr/src/rustc-1.82.0/library/alloc/src/raw_vec.rs:749:38
379s    8: <alloc::raw_vec::RawVec<T,A> as core::ops::drop::Drop>::drop
379s              at /usr/src/rustc-1.82.0/library/alloc/src/raw_vec.rs:409:18
379s    9: core::ptr::drop_in_place<alloc::raw_vec::RawVec<u8>>
379s              at /usr/src/rustc-1.82.0/library/core/src/ptr/mod.rs:574:1
379s   10: core::ptr::drop_in_place<alloc::vec::Vec<u8>>
379s              at /usr/src/rustc-1.82.0/library/core/src/ptr/mod.rs:574:1
379s   11: core::ptr::drop_in_place<alloc::string::String>
379s              at /usr/src/rustc-1.82.0/library/core/src/ptr/mod.rs:574:1
379s   12: core::ptr::drop_in_place<test::boxed_transparent_ptr::MyBoxed>
379s              at /usr/src/rustc-1.82.0/library/core/src/ptr/mod.rs:574:1
379s   13: <glib::collections::ptr_slice::PtrSlice<T> as core::ops::drop::Drop>::drop
379s              at /usr/share/cargo/registry/glib-0.20.4/src/collections/ptr_slice.rs:88:21
379s   14: core::ptr::drop_in_place<glib::collections::ptr_slice::PtrSlice<test::boxed_transparent_ptr::MyBoxed>>
379s              at /usr/src/rustc-1.82.0/library/core/src/ptr/mod.rs:574:1
379s   15: test::boxed_transparent_ptr
379s              at ./tests/test.rs:201:1
379s   16: test::boxed_transparent_ptr::{{closure}}
379s              at ./tests/test.rs:188:27
379s   17: core::ops::function::FnOnce::call_once
379s              at /usr/src/rustc-1.82.0/library/core/src/ops/function.rs:250:5
379s   18: core::ops::function::FnOnce::call_once
379s              at /usr/src/rustc-1.82.0/library/core/src/ops/function.rs:250:5
379s note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
379s thread caused non-unwinding panic. aborting.
379s error: test failed, to rerun pass `--test test`
379s
379s Caused by:
379s   process didn't exit successfully: `CARGO=/usr/bin/cargo CARGO_MANIFEST_DIR=/usr/share/cargo/registry/glib-macros-0.20.4 CARGO_PKG_AUTHORS='The gtk-rs Project Developers' CARGO_PKG_DESCRIPTION='Rust bindings for the GLib library, proc macros crate' CARGO_PKG_HOMEPAGE='https://gtk-rs.org/' CARGO_PKG_LICENSE=MIT CARGO_PKG_LICENSE_FILE='' CARGO_PKG_NAME=glib-macros CARGO_PKG_README='' CARGO_PKG_REPOSITORY='https://github.com/gtk-rs/gtk-rs-core' CARGO_PKG_RUST_VERSION=1.70 CARGO_PKG_VERSION=0.20.4 CARGO_PKG_VERSION_MAJOR=0 CARGO_PKG_VERSION_MINOR=20 CARGO_PKG_VERSION_PATCH=4 CARGO_PKG_VERSION_PRE='' LD_LIBRARY_PATH='/tmp/tmp.WqOM0yNRWD/target/armv5te-unknown-linux-gnueabi/debug/deps:/tmp/tmp.WqOM0yNRWD/target/armv5te-unknown-linux-gnueabi/debug:/usr/lib/rustlib/armv5te-unknown-linux-gnueabi/lib' /tmp/tmp.WqOM0yNRWD/target/armv5te-unknown-linux-gnueabi/debug/deps/test-24e18340500445a5` (signal: 6, SIGABRT: process abort signal)

Exciting, this only seems to happen on 32 bit ARM or so. Can't reproduce this here. I'll take a look later what could be the problem

@werdahias Does this also happen on other 32 bit architectures, or other 32 bit ARM? This is armv5te which IIRC is armel in Debian terms. How did it behave on armhf?
I can't see anything obviously wrong in the code, so if it only fails on armel it might very well be a toolchain bug.

the test fails on armel, armhf and i386, so it seems very likely that it is 32-bit related: https://ci.debian.net/packages/r/rust-glib-macros/testing/i386/53651276/#L9055
I did a quick manual test and just that test case panics on i386 when executed manually using cargo test. I didn't verify whether it just affects Debian's toolchain, or upstream's 1.82 as well.

Thanks, I'll give that a try on 32 bit x86 later.

Found the problem

84c951ef5a62 was simply wrong. Derived Boxed types are not TransparentPtrType (== equivalent to a pointer of their FFI representation), they're TransparentType (== equivalent to their FFI representation).
See https://github.com/gtk-rs/gtk-rs-core/pull/1559

thanks for the quick fix!
@werdahias I'll do another upload of 1.82 soonish, so the migration age counter will start over anyway, but it would be great if we could get this fixed in Debian quickly as well since it seems to be the main remaining blocker/regression for 1.82 :)

You can also update to 0.20.5 instead of backporting the patch


Add Scala 2.13 support

Required by https://github.com/eed3si9n/sjson-new/issues/89.

Codecov Report

Merging #3 into 1.0.0-M4-fork will decrease coverage by 20.15%.
The diff coverage is n/a.

@@                Coverage Diff                 @@
##           1.0.0-M4-fork       #3       +/-   ##
==================================================
- Coverage          44.68%   24.52%   -20.16%
==================================================
  Files                  5        5
  Lines                687      530      -157
  Branches             133      110       -23
==================================================
- Hits                 307      130      -177
- Misses               380      400       +20

Impacted Files
Coverage Δ

jvm/src/main/scala/scalajson/ast/JValue.scala
0% <0%> (-73.4%)
:arrow_down:

...m/src/main/scala/scalajson/ast/unsafe/JValue.scala
0% <0%> (-59.51%)
:arrow_down:

Continue to review full report at Codecov.

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

@eed3si9n Do you mind doing a backfill release of 1.0.0-M4 for Scala 2.13.0-M2? I need it for https://github.com/eed3si9n/sjson-new/issues/89.

Done:

https://oss.sonatype.org/content/repositories/public/com/eed3si9n/shaded-scalajson_2.13.0-M2/1.0.0-M4/
https://oss.sonatype.org/content/repositories/public/com/eed3si9n/shaded-scalajson_sjs0.6_2.13.0-M2/1.0.0-M4/


python env management UI and env selector popup updates

Introduces Python environment management UI to manage existing environments and create new ones
Create a new Python env by using bundled installer
Create a new Python env by using conda or venv and selecting package list
Python envs install directory config to create new envs under
Update Python environment selection popup, adds filtering support and link to env management dialog

Python env selection popup

Python env selection popup filtered

Manage Python envs UI, list of existing envs

Manage Python envs UI, env menu

Manage Python envs UI, create new using bundled installer

Manage Python envs UI, create new using conda or pip

Manage Python envs UI, settings (server default env moves from settings dialog to here)

@krassowski code is still WIP but could you provide feedback on the design & features?

when I type in something which leads to no match, I cannot remove it (backspaces does not work because the input box becomes inactive):

IMO the restart and copy buttons are a bit confusing.

they represent actions related to current session, but the "x" button nearby represents action on the selector popup
the text says "restart session using a different Python env" but they allow to restart using the same env

Maybe these should be two lines, like:
--------------------------------------------------------------------------------
| Current environment: full path    [restart] [copy]                       [x] |
| [a subtle divider]                                                           |
| Restart session with a different Python environment                          |
| [ Type to filter Python paths ]                                              |
--------------------------------------------------------------------------------

@krassowski I updated the popup as below


question about pharokka_plotter.py and multi-contig .fasta

pharokka version: Pharokka v 1.3.0

The pharokka_plotter.py is a very cool new feature. Since it works for only a single contig, is there a workaround to run this with a multi-contig fasta? Or would you recommend catenating contigs to a single-line fasta before running pharokka? Thank you!

I would also like to ask the same question thanks

pharokka_multiplotter.py should achieve what you want - it will be available in v1.7.0

Thank you very much


i18n(es): update pages

What kind of changes does this PR include?

[ ] Minor content fixes (broken links, typos, etc.)
[x] New or updated content
[x] Translated content
[ ] Changes to the docs site code
[ ] Something else!

Description

Update core-concepts/astro-components.md
Update core-concepts/framework-components.md
Update core-concepts/project-structure.md
Update core-concepts/routing.md
Update editor-setup.md
Update getting-started.md
Update guides/data-fetching.md
Update guides/environment-variables.md
Update guides/imports.md
Update guides/markdown-content.md
Update install/auto.md
Update integrations/integrations.md

To match with the latest changes in #761 (including previous changes).

LGTM!

@delucis 🚀

Wooooo! Thanks @kevinzunigacuellar & @readonlychild.


openai function call not support

error shows as below:
Application error: a client-side exception has occurred (see the browser console for more information).

Related to https://github.com/Helicone/helicone/issues/505


Results of operations in the storage abstraction need fleshing out

This issue is raised against nimbella/storage (TypeScript) but actually applies more generally to the storage abstraction, which is implemented equivalently but differently in other SDKs.   I think the TypeScript implementation in nimbella/storage will serve as the model for what is done in other languages, including for new SDKs.
Is your feature request related to a problem? Please describe.
The current storage abstraction is adequately prescriptive and abstract for the operations and their arguments but tends to leave the semantics of some operation results too vague.   This is an invitation for implementers to leak provider-specific result objects or simply swallow errors.   I will provide specific examples in subsequent comments.
This is going to be difficult to address and I'm really opening this issue as a placeholder for design discussion.  I expect to append some thoughts.   I am not necessarily going to code solutions unless the discussion reaches the threshold for action and I have the time.
Describe the solution you'd like:
The result types of every operation in the abstraction should itself consist of an abstraction which can at least distinguish success from failure and possibly classify some universal likely causes of failure.   A developer can then extract more specific error information which might, in the end, include storage-provider-specific error objects.
Describe alternatives you've considered:
The present situation is livable.  I just think that doing better will enhance usability.

That's definitely some value here in having the common error cases (auth failed, object doesn't exist on delete, etc) handled by an abstraction. We'll have to balance this enviable hypothetical end-goal against the real difficulty in building an abstraction layer that doesn't leak provider details at some level... Would happily look into designs you have and think about including them in the other SDKs.

Thanks, @jthomas.  As it turns out, I am prototyping a possible solution in the context of the Swift SDK (still under construction, see nimbella/nimbella-sdk-swift#1).   I believe it is impossible not to leak provider details at some level and I wouldn't choose that as the goal.  Rather, I think the goals should be

Always distinguish success from failure.
Avoid forcing the developer to reason about provider-specific details in the success case.
Cover the most common errors in a non-provider-specific way.
Let other errors show through, even though they may be provider-specific, in the interest of efficient diagnosis.

Having tried out one design in the context of the Swift SDK, I am starting over there.  I now have a little more insight into the general problem.
I think it is not so hard to abstract successful results, and, actually, the current abstraction layer already does a pretty good job of that.   What needs to be made uniform is (1) distinguishing success from failure and (2) allowing for some routine error handling that does not require provider-specific knowledge.
The underlying provider libraries usually distinguish success from failure by throwing on failure, so that you can assume a normal return means success.   It is much easier to adopt this convention than to fight it and so I think the few cases in which errors can be returned "in line" should be changed into throws, making this convention universal.   For example, in the deleteFiles method, the GCS implementation throws while the S3 one returns error objects in line, at least sometimes.  While it's true that the in line error objects make the result more precise when there can be a mixture of successes and failures, the fact that this can't be achieved by all providers shifts the argument (IMO) in favor of uniformity.
Since errors will be thrown, if you want provider-independent error handling you have to catch the original error, wrap it in something more abstract, and re-throw (embedding the original error for optional inspection).   Since the interfaces are asynchronous, "catching" the error does not necessarily mean a catch block (chaining on a catch() or flatMapErrorThrowing() method to a Promise or EventLoopFuture object would be more typical).
Having gotten to that point, I think doing this is less critical (and perhaps harder) than I originally thought and I may not try to do the whole job, even in Swift.  I'll keep this open, though, because I do think there are a few specific changes I will end up recommending.


fix bug (non-declared variables)

I just realized this is a duplicate of https://github.com/Luuka/GPXParser.js/pull/63


下载200M以上文件概率性卡死

OkDownload Version
v1.0.7
Problem Describe
使用okdownload2的filedownloader下载功能，是使用DEMO示例的 FileDownload的NotificationListener 做监听器，然后测试偶尔正常下载，偶尔异常，下载中直接卡死，测试设备小米 9 ANDROID Q；
卡死后日志一直：task[1] current need fetching block count 5 is not equal to no more stream block count 4这样
Log
2019-12-28 17:22:59.316 E/memtrack: Couldn't load memtrack module
2019-12-28 17:22:59.316 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:22:59.919 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:00.553 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:01.945 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:02.596 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:03.064 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:03.065 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:03.255 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:03.255 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:03.988 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:04.638 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:06.030 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:06.682 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:08.073 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:08.724 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:10.117 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:10.766 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:11.134 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:11.134 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:11.323 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:11.323 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:12.159 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:12.807 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:14.201 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:14.821 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:16.245 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:16.864 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:18.288 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:18.908 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:19.195 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:19.195 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:19.385 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:19.385 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:23:20.311 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:20.951 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:22.316 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:22.995 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:24.360 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:25.038 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:26.403 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:23:27.074 D/MultiPointOutputStream: task[1] current need fetching block count 5 is not equal to no more stream block count 4
2019-12-28 17:23:27.231 E/memtrack: Couldn't load memtrack module
2019-12-28 17:23:27.231 W/android.os.Debug: failed to get memory consumption info: -1

补充刚卡死过程的日志
2019-12-28 17:24:14.561 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 1
2019-12-28 17:24:14.562 D/MultiPointOutputStream: runSync state change isNoMoreStream[false] newNoMoreStreamBlockList[[0]]
2019-12-28 17:24:14.801 D/MultiPointOutputStream: OutputStream sync success (1) block(0)  syncLength(5435772) currentOffset(49335524)
2019-12-28 17:24:14.801 D/MultiPointOutputStream: OutputStream sync success (1) block(3)  syncLength(3932160) currentOffset(46094560)
2019-12-28 17:24:14.802 D/MultiPointOutputStream: OutputStream close task[1] block[0]
2019-12-28 17:24:14.802 D/CallbackDispatcher: fetchEnd: 1
2019-12-28 17:24:14.803 D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadUrlConnection@4d53e1c task[1] block[0]
2019-12-28 17:24:15.162 D/WkSdk: progress_39
2019-12-28 17:24:15.167 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:24:15.392 E/memtrack: Couldn't load memtrack module
2019-12-28 17:24:15.392 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:24:15.567 E/memtrack: Couldn't load memtrack module
2019-12-28 17:24:15.567 W/android.os.Debug: failed to get memory consumption info: -1
2019-12-28 17:24:15.775 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 2
2019-12-28 17:24:15.775 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 2
2019-12-28 17:24:15.776 D/MultiPointOutputStream: runSync state change isNoMoreStream[false] newNoMoreStreamBlockList[[3]]
2019-12-28 17:24:15.811 D/MultiPointOutputStream: OutputStream sync success (1) block(3)  syncLength(3240963) currentOffset(49335523)
2019-12-28 17:24:15.811 D/MultiPointOutputStream: OutputStream close task[1] block[3]
2019-12-28 17:24:15.811 D/CallbackDispatcher: fetchEnd: 1
2019-12-28 17:24:15.812 D/DownloadChain: release connection com.liulishuo.okdownload.core.connection.DownloadUrlConnection@f11a1ab task[1] block[3]
2019-12-28 17:24:17.196 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:24:17.854 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 2
2019-12-28 17:24:19.240 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:24:19.898 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 2
2019-12-28 17:24:21.272 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1
2019-12-28 17:24:21.939 D/MultiPointOutputStream: task[1] current need fetching block count 3 is not equal to no more stream block count 2
2019-12-28 17:24:23.284 D/MultiPointOutputStream: task[2] current need fetching block count 5 is not equal to no more stream block count 1

我也遇到过卡死的问题，请问卡死后你是怎么处理的？

@adasir


Enable MSI authentication for BlockBlobService

Which service(blob, file, queue) does this issue concern?
Blob
Which version of the SDK was used? Please provide the output of pip freeze.
2.1.0
What problem was encountered?
The constructor for the BlockBlobService does not allow the usage of MSI authentication.
It was also requested in here.
Have you found a mitigation/solution?
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

Hi @unloadedroe, thanks for reaching out!
What you are looking for is here.
An OAuth sample is here, you could modify it to use MSI instead.

To be explicit about this, use
def get_token():
    # this url is hard-code and only available to services with identity.
    oauth_token = requests.get(
        'http://<IP_ADDRESS>/metadata/identity/oauth2/token?api-version=2018-02-01&resource=https%3A%2F%2Fmanagement.azure.com%2F',
        headers={'Metadata': True}
    ).json()

    return oauth_token['access_token']

service = BlockBlobService(account, token_credential=get_token())

this can be integrated to a "AutoUpdatedTokenCredential", like @zezha-msft suggested.


Optional Chaining Error with Babel

Version
2.5.17
Reproduction link
https://codesandbox.io/s/m674vkw2j
Steps to reproduce
Use the optional chaining operator in a template:
{{ user?.id }}
What is expected?
Output the users id in the template or blank for undefined
What is actually happening?

invalid expression: Unexpected token . in    "\n                " _s(user?.id) "\n            "  Raw expression: {{ user?.id }}

Optional chaining works just fine in the script section of a SFC Vue component but does not work in the template section.
For reference, this is in an Nuxt.js 2.0 project stock settings with the babel optional chaining plugin
Version is actually 15.4.2 with Vue 2.5.17

Babel is actually not used for in-template strings: See https://github.com/vuejs/vue/issues/6307
Not sure if anything changed regarding this 🤔

@yyx990803 Did you do it? :D


Videos dont play

What steps will reproduce the problem?
click the play button
What is the expected behavior? What do you get instead?
Play video in Grabber
How often does this problem occur?
Every time
What version of the program are you using? On what operating system?
The latest version as of 5/3/17
Please provide any additional information below
The only way I can watch a video is if I double click it and play it in an external video player.

That's by design. There's no video player in Grabber. There used to be one which added a lot of boilerplate, around 25mo of dlls, made the program leak like crazy and didn't support many video types.

ah, You should make it open it in the external player with a single click
then.
On Wed, May 3, 2017 at 8:36 PM, Jack Vasti<EMAIL_ADDRESS>wrote:

That's by design. There's no video player in Grabber. There used to be one
which added a lot of boilerplate, around 25mo of dlls, made the program
leak like crazy and didn't support many video types.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/Bionus/imgbrd-grabber/issues/903#issuecomment-299072856,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AS2t8Ei5GluKJd6F-rR2dvbhvQ6ty8Zrks5r2R2YgaJpZM4NQGXZ
.

if not just go ahead and close this

I don't really want to change the behaviour between videos and images, which is "open in default viewer by double-clicking", and I don't really like the idea of opening VLC by a simple click. I'll close the issue then :smile:


No publicPath option in configuration file

I´ve searched in the source but there´s no way of setting the "publicPath" of my application
It should be inside the webpack output configurations but looking at angualr-cli source it´s not available.
For me it is crucial because I prepend /static/dist/ to load javascript and assets on my app.
I´m using NG version 1.0.0-beta.15
I´m using Django as Server and only doing watch on ng build and Django puts it´s static files in /static/ folder and maps the base URL to a template index.html file so the hrefs in the index files are not relative to the static folder and gets a 404 error.
All of this gets solved if I could add the publicPath configuration in angular-cli.json or environment files

This would be great! My build isn't located on the server's base folder, but in the public folder. So after every build, i have to change the strings in my index.html manually again...

Also, with this integration we can use the standard way of Lazy Loading modules with the router.

Definitely +1 for this config option; our test and production servers use a subdirectory so having publicPath support is necessary for us but we'd only want it to be used when using the --prod flag during build or serve.

You can use the --base-href flag for this: https://github.com/angular/angular-cli#base-tag-handling-in-indexhtml

@filipesilva : This does not solve de problem, the --base-href is only to provide root point for the Angular Route Path, not for the root of static files.

@filipesilva I agree with @manuelcua as this is a separate config option for Webpack.
The publicPath specifies the public URL address of the output files when referenced in a browser. For loaders that embed

Ok, seems I misunderstood it's use. I'd be happy to review a PR for this, but bear in mind it should have a test.

found out that js File loading is depending on browser IE Edge output

As you can see from the screenshot IE trys to load from two places, despite only
one is defined in the index.html
<script type="text/javascript" src="ang/inline.js"></script>
<script type="text/javascript" src="ang/styles.bundle.js"></script>
<script type="text/javascript" src="ang/main.bundle.js"></script>

If I add "apollo" to the path than IE seaches in apollo/apollo/ang/.....
While the other browser search at one place. When I write there   it take the file from there. While IE would make "apollo/apollo/ang/main.bundle.js"
The workaround is to make the index conditional.
The solution could be a templating where the index template is written by the developper and the %bundle% is replaced by angular-cli.

Is there any update on this?

any update on this?

No one has tried to do a PR yet, so no, no update yet.

I'm not experiencing any issues, but I did find this issue looking for an easy setting to separate the bundled files from distribution root folder, a custom task will do for now, fingers crossed for future.

PR created for publicPath support
#3285

How soon to have the PR merged? Need publicPath

I need it as well. We can't store our javascript assets in the root of our server.

Since changeLiuUNSW's PR is still pending, I found a temporary solution in the webpack docs for outputPath. It suggests that you can add __webpack_public_path__ in your app's entry file, which is main.ts for anyone using the cli. So then my entire main.ts looks something like this:
import './polyfills.ts';

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { enableProdMode } from '@angular/core';
import { environment } from './environments/environment';
import { AppModule } from './app';

const __webpack_public_path__ = "https://cdn.somewhe.re/";

if (environment.production) {
    enableProdMode();
}

platformBrowserDynamic().bootstrapModule(AppModule);

I realize this workaround should (hopefully) only be valid until a PR that enables publicPath is merge.

Hi @filoxo , I tried to do the same as above, but still the script tags and link tags in dist/index.html  are not prefixed with the __webpack_public_path__ . Also, noticed that it outputs a warning of somekind while we do ng build --prod. Hence, I decalred the __webpack_public_path__ variable like declare var __webpack_public_path__: any; . Would be good to have your feedback on this.

Not sure why you'd need the public path in index.html if you could serve that from the same origin as your assets (eg. CDN). My use case is that my backend is Java/Spring, but the js/CSS files are served via a CDN. Therefore the initial main.js loads but the additional chunks weren't. Setting the publicPath simply tells webpack's require which origin to request those additional chunks from.
And yes, I did notice the unresolved variable error during the build; probably should have made note of that in my comment too. I chose to ignore it because it still built successfully, but if declaring it resolved the problem with the TypeScript compiler that'd be good you'd solve the error. Again, though this works the real solution is to build the config into the cli. Hence why I noted that it's a temporary solution until #3285 is merged.

Hmm, my use case is because we are trying to serve the dist/ folder using nginx but with a sub-url , the script, link and assets are not prefixed with that sub-url and fails to load.
I checked the the index.html but it doesn't prepend the sub-url even when we do __webpack_public_path__, don't know why.
@filoxo Is your script and link are prefixed with the cdn path correctly ?

I don't use the generated index.html because my backend is Java based. Setting the publicPath would only be used after the index file has been served because it's included within the bundle. That said, I don't think that what you're attempting to accomplish would be achieved by setting the publicPath but I'm no expert with webpack so perhaps I'm wrong.

@filoxo Hmm, I've now also shifted to parsing out index.html to add necessary changes using python and bs4 https://www.crummy.com/software/BeautifulSoup/bs4/doc/ . Not the prettiest but works for now. Looking forward to the inclusion of publicPath in angular-cli

@piyushchauhan2011 are you sure you're not just overlooking setting the baseUrl? What you're attempting to do is unrelated to publicPath.

What's the latest on this issue, any PR yet or a work around?

Nothing change until now :(
I am using the latest Angular CLI :'(

The --deploy-url flag (that does what --public-path does for webpack) has been around for a while: https://github.com/angular/angular-cli/wiki/build

Again, deploy-url doesn’t change static assets paths, which publicPath does.

I just tested --deploy-url to add public/static as a prefix for the src path and it worked as expected.
command:
ng build --deploy-url public/static
output:
`
<!doctype html>

Angular2testapp

    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="icon" type="image/x-icon" href="favicon.ico">
</head>
<body>
    <app-root></app-root>
    <script type="text/javascript" src="public/static/inline.bundle.js"></script>
    <script type="text/javascript" src="public/static/polyfills.bundle.js"></script>
    <script type="text/javascript" src="public/static/styles.bundle.js"></script>
    <script type="text/javascript" src="public/static/vendor.bundle.js"></script>
    <script type="text/javascript" src="public/static/main.bundle.js"></script>
</body>

`

These paths are the main app files, not assets like images referenced in other HTML components.
https://github.com/angular/angular-cli/issues/4517#issuecomment-286238951

We only process images in CSS actually. Images in HTML are not processed. The tracking issue for HTML resource support is https://github.com/angular/angular-cli/issues/3415.

@filipesilva I'm using cli 1.6.0-rc.0, have set deploy-url to 'assets' in both command line and angular-cli.json. The bundles are prefixed with 'assets' in index.html, but bundle files not copied to the deploy-url folder - assets.

Yeah, this fixed my problem. We set output path to 'bundles', and deploy-url to 'bundles' as well. The entry point is MVC action from URL /app/ which loaded view from bundles/index.html, so the actual URL (and base href) should be /app/, while the assets are loaded from /bundles/*.

@filipesilva why do I get following error when I'm setting absolute url (http://...) to deploy-url parameter?

--deploy-url and/or --base-href contain unsupported values for ng serve. default serve path of '/' used. use --serve-path to override.

I need to set absolute path to that parameter to support MVC integration.

@feng-xiao that sounds like a bug. Can you open a new issue for is to look at?

@filipesilva Hi filipesiva, I entered the issues in #8847

@hpjc
Looks like that fix works for me as well, good call!