Generic DecoderAndEncorder Example / Issue, Generic[T] Decoder[T], Generic[T] Encoder[T]

Hello @travisbrown,
How are you? Greetings for the day.
I have things set up correctly. Data comes properly. However, I am having issues with generic types. As I am completely new to scala, probably I am missing something.  However, I have read in the StackOverflow articles that circle doesn't support conversion of Any, Object (which makes sense). However, I want to make a generic one where I have a [T] and that [T] transforms into something that can be convertible to JSON. Probably there is a boundary (I am unaware of) that can be a help.
Main Goal
Make circle JSON encode/decode on the abstract class level. Just like NewtonJson (https://www.newtonsoft.com/json)
Versions (Scala 2.13.1, Circle: 0.12.3)
lazy val scalaVersionF = "2.13.1"
lazy val circeVersion = "0.12.3"

  "io.circe" %% "circe-core" % circeVersion,
  "io.circe" %% "circe-generic" % circeVersion,
  "io.circe" %% "circe-parser" % circeVersion,
  "de.heikoseeberger" %% "akka-http-circe" % "1.31.0",

Issue Summary
Things work fine when the actual type is given, however, it doesn't work when generics are used.
AnyVal JSON Add
Reference: https://www.programcreek.com/scala/io.circe.Decoder
import io.circe.{Decoder, Encoder}
import shapeless.Unwrapped

trait AnyValCirceEncoding {
  implicit def anyValEncoder[V, U](implicit ev: V <:< AnyVal,
    V: Unwrapped.Aux[V, U],
    encoder: Encoder[U]): Encoder[V] = {
    val _ = ev
    encoder.contramap(V.unwrap)
  }

  implicit def anyValDecoder[V, U](implicit ev: V <:< AnyVal,
    V: Unwrapped.Aux[V, U],
    decoder: Decoder[U]): Decoder[V] = {
    val _ = ev
    decoder.map(V.wrap)
  }
}

object AnyValCirceEncoding extends AnyValCirceEncoding
trait CircleJsonSupport extends de.heikoseeberger.akkahttpcirce.FailFastCirceSupport
  with AnyValCirceEncoding

Examples
Abstract API Sample, CircleJsonSupport integrated
trait RestWebApiContracts[TTable, TRow, TKey]
  extends
    RestWebApi[TTable, TRow, TKey] with
    RestWebApiBodyProcessor[TTable, TRow, TKey] with
    RestWebApiMessages[TTable, TRow, TKey] with
    RestWebApiJson[TTable, TRow, TKey] with
    RestWebApiEntityJsonAdapter[TTable, TRow, TKey] with
    CircleJsonSupport // has the support for the Circle any value type

Build fails
abstract class AbstractRestWebApi[TTable, TRow, TKey]
(components : ControllerComponents)
  extends
    AbstractController(components) with
    RestWebApiContracts[TTable, TRow, TKey] {
  val service : AbstractBasicPersistentService[TTable, TRow, TKey]

  def getAll : Action[AnyContent] = Action { implicit request =>
      // cannot create for List[TRow]
      implicit val listEncoder: Encoder.AsObject[List[TRow]] = deriveEncoder[List[TRow]]
      val records : List[TRow] = service.getAll
      val json = records.asJson(listEncoder).space2
      Ok(json)
    }
}

Build Success and works fine if the same code is written in the actual class
class CampaignsApiController @Inject()(
  campaignService : CampaignService,
  components      : ControllerComponents)
  extends AbstractRestWebApi[Campaign, CampaignRow, Int](components) {
    override def getAll : Action[AnyContent] = Action { implicit request : Request[AnyContent] =>
      val campaigns: List[CampaignRow] = campaignService.getAll
      val json = campaigns.asJson.spaces2
      Ok(json) // works perfect and returns json array
    }
}

Build Success and works fine if casting happens properly
abstract class AbstractRestWebApi[TTable, TRow, TKey]
(components : ControllerComponents)
  extends
    AbstractController(components) with
    RestWebApiContracts[TTable, TRow, TKey] {
  val service : AbstractBasicPersistentService[TTable, TRow, TKey]

  def getAll : Action[AnyContent] = Action { implicit request =>
      // cannot create for List[TRow]
      implicitvallistEncoder:Encoder[List[CampaignRow]]=deriveEncoder[List[CampaignRow]]
      val campaigns=service.getAll
      val json =campaigns.asInstanceOf[List[CampaignRow]].asJson(listEncoder).spaces2
      Ok(json) // perfectly
    }
}

Implicts failed
Base Class
  lazy implicit val listEncoder : Encoder[List[TRow]] = Encoder[List[TRow]]
  lazy implicit val encoder : Encoder[TRow] = Encoder[TRow]
  lazy implicit val decoder : Decoder[TRow] = Decoder[TRow]
  lazy implicit val listDecoder : Decoder[List[TRow]] = Decoder[List[TRow]]

Concreate class Class
  override implicit val listEncoder : Encoder[List[CampaignRow]] = Encoder[List[CampaignRow]]
  override implicit val encoder : Encoder[CampaignRow] = Encoder[CampaignRow]
  override implicit val decoder : Decoder[CampaignRow] = Decoder[CampaignRow]
  override implicit val listDecoder : Decoder[List[CampaignRow]] = Decoder[List[CampaignRow]]

Also doesn't help
Case Class for CampaignRow (Slick Class)
case class CampaignRow(campaignid: Int, campaignname: String, contentcategoryid: String, totalbudgetcpm: Double = 0.0, spendalready: Double = 0.0, remainingamount: Double = 0.0, startdate: Option[Double] = Some(0.0), enddate: Option[Double] = Some(0.0), impressioncount: Int = 0, demandsideplatformid: Int, isrunning: Int = 0, priority: Int = 999, isretricttousergender: Int = 0, expectedusergender: Option[String], publisherid: Option[Int])

Build errors faced during
- could not find implicit value for parameter encoder: io.circe.Encoder[List[TRow]]
- could not find Lazy implicit value of type io.circe.generic.encoding.DerivedAsObjectEncoder[List[TRow]]
      implicit val listEncoder: Encoder.AsObject[List[TRow]] = deriveEncoder[List[TRow]]

@aukgit I'm not sure I understand the exact issue, but here are some examples that I hope might help.
First, if you have CampaignRow defined as above, you can use generic derivation to define instances like this:
import io.circe.{Decoder, Encoder}, io.circe.generic.semiauto._

implicit val encodeCampaignRow: Encoder[CampaignRow] = deriveEncoder
implicit val decodeCampaignRow: Decoder[CampaignRow] = deriveDecoder

And then:
scala> import io.circe.syntax._
import io.circe.syntax._

scala> CampaignRow(1, "abc", "def", demandsideplatformid = 0, expectedusergender = None, publisherid = None).asJson
res3: io.circe.Json =
{
  "campaignid" : 1,
  "campaignname" : "abc",
  "contentcategoryid" : "def",
  "totalbudgetcpm" : 0.0,
  "spendalready" : 0.0,
  "remainingamount" : 0.0,
  "startdate" : 0.0,
  "enddate" : 0.0,
  "impressioncount" : 0,
  "demandsideplatformid" : 0,
  "isrunning" : 0,
  "priority" : 999,
  "isretricttousergender" : 0,
  "expectedusergender" : null,
  "publisherid" : null
}

Once you have that, you should never explicitly need to define a List[CampaignRow], since Circe automatically provides e.g. Encoder[List[SomeType]] for any concrete SomeType with an implicit Encoder instance in scope. Calling deriveEncoder[List[CampaignRow]] is almost certainly not doing what you want—it will derive an encoder for the List ADT, which will produce JSON like {"::": [...]}, not an ordinary JSON array.
So you should just make sure you have an encoder in scope for CampaignRow and then call asJson on the list of CampaignRow values, and it should just work.
If you're working with a generic type instead of a concrete class like CampaignRow, you'll need an Encoder constraint on the generic type. That should look something like this:
abstract class AbstractRestWebApi[TTable, TRow: Encoder, TKey]
(components : ControllerComponents)
  extends
    AbstractController(components) with
    RestWebApiContracts[TTable, TRow, TKey] {
  val service : AbstractBasicPersistentService[TTable, TRow, TKey]

  def getAll : Action[AnyContent] = Action { implicit request =>
      val records : List[TRow] = service.getAll
      val json = records.asJson.space2
      Ok(json)
    }
}

Which is syntactic sugar for the following:
abstract class AbstractRestWebApi[TTable, TRow, TKey]
(components : ControllerComponents)
(implicit encodeTRow: Encoder[TRow])
  extends
    AbstractController(components) with
    RestWebApiContracts[TTable, TRow, TKey] {
  val service : AbstractBasicPersistentService[TTable, TRow, TKey]

  def getAll : Action[AnyContent] = Action { implicit request =>
      val records : List[TRow] = service.getAll
      val json = records.asJson(encodeTRow).space2
      Ok(json)
    }
}

You'd have to include this constraint on any methods or other classes that instantiate this class with a generic type, all the way up to the point where there's a concrete type.
Hope that helps!

Thank you @travisbrown for the quick help.
I will give this (implicit encodeTRow: Encoder[TRow]) a TRY
For now, I have found a workaround using def, instead of val.
As I mentioned before, these below ones failed:
Failed Example

// abstract class
  lazy implicit val listEncoder : Encoder[List[TRow]] = Encoder[List[TRow]]
  lazy implicit val encoder : Encoder[TRow] = Encoder[TRow]
  lazy implicit val decoder : Decoder[TRow] = Decoder[TRow]
  lazy implicit val listDecoder : Decoder[List[TRow]] = Decoder[List[TRow]]

// Concreate class
  override implicit val listEncoder : Encoder[List[CampaignRow]] = Encoder[List[CampaignRow]]
  override implicit val encoder : Encoder[CampaignRow] = Encoder[CampaignRow]
  override implicit val decoder : Decoder[CampaignRow] = Decoder[CampaignRow]
  override implicit val listDecoder : Decoder[List[CampaignRow]] = Decoder[List[CampaignRow]

Success Example

// abstract class
  def listEncoder : Encoder[List[TRow]]
  def encoder : Encoder[TRow]
  def  decoder : Decoder[TRow]
  def listDecoder : Decoder[List[TRow]]

// Concreate class
  override def listEncoder : Encoder[List[CampaignRow]] = Encoder[List[CampaignRow]]

  override def encoder : Encoder[CampaignRow] = Encoder[CampaignRow]

  override def decoder : Decoder[CampaignRow] = Decoder[CampaignRow]

  override def listDecoder : Decoder[List[CampaignRow]] = Decoder[List[CampaignRow]]

Probably I will use an Encoder encapsulate class to solve this issue.
class GenericCodec[TRow : Encoder] {
  def listEncoder : Encoder[List[TRow]] = Encoder[List[TRow]]
  def encoder : Encoder[TRow] = Encoder[TRow]
  def decoder : Decoder[TRow] = Decoder[TRow]
  def listDecoder : Decoder[List[TRow]] = Decoder[List[TRow]]
}

val genericCodec = new GenericCodec[CampaignRow]

Hello @travisbrown ,
I have one more question, probably a silly one, however, I couldn't find a good answer yet.
For generics what is the difference amount these below categories
category1: class Generic[+A] vs class Generic[A]
category2: class Generic[-A] vs class Generic[A])

@travisbrown
In the future can we make dynamic decoders and encoders which may fail in runtime if not successful
Proposal,
implicit val dynamicCodec: DynamicCodeRuntimeCodec[T] = new DynamicCodeRuntimeCodec[T]
May fail on run time if cannot parse to T

@aukgit There's no reason you couldn't have a decoder that relied on runtime reflection to decode an arbitrary type (although you'd probably need an implicit ClassTag[T]). I think I've written an example of this before, although I can't find it at the moment. It's pretty far from the spirit of this kind of type-ful programming, though, and I don't know of anyone who actually does this.

Will you please kindly point me to that?

Sorry, as I said I can't find it at the moment. IIRC it was something I posted in a Gist or Stack Overflow or somewhere like that, but searching for variations of "manifest classtag circe scala" doesn't turn it up. There's a similar example in this old blog post of mine. In any case I definitely don't recommend it, and especially if you're just getting started with Scala I'd recommend steering clear of runtime reflection for as long as you can.

Hi @travisbrown
Thank you for taking your valuable time and replying.
Here is what I tried and having some issues.

package shared.io.traits.jsonParse

import io.circe.generic.codec.DerivedAsObjectCodec
import io.circe.generic.decoding.DerivedDecoder
import shapeless.{Lazy, tag}

class JsonDecoders[T]
(implicit decode : Lazy[DerivedDecoder[T]], decodeCodec : DerivedAsObjectCodec[T])
{

  import io.circe._
  import io.circe.generic.semiauto._

  def defaultDecoder() : Decoder[T] = deriveDecoder[T]

  def codec : Codec.AsObject[T] = deriveCodec[T](decodeCodec)
}

object WApp extends App {

  import shared.com.ortb.persistent.schema.Tables._

  val re = new JsonDecoders[AuctionRow] // Works fine, gets compiled.
  val re2 = new JsonDecoders[List[AuctionRow]] // fails to compiled
  /**
Error:(30, 13) could not find Lazy implicit value of type io.circe.generic.decoding.DerivedDecoder[List[shared.com.ortb.persistent.schema.Tables.AuctionRow]]
  val re2 = new JsonDecoders[List[AuctionRow]]
**/
}

My question of how to create the List or Iterable type of T for that JsonDecoder class.
Or,
Probably using reflection.??

Things gets fixed if I import all these
import io.circe.generic.semiauto._
import io.circe._
import io.circe.generic.auto._
import io.circe.parser._
import io.circe.generic.auto._
import io.circe.generic.encoding.DerivedAsObjectEncoder
import io.circe.generic.encoding._
import io.circe.{ Decoder, Encoder }, io.circe.generic.semiauto._
import io.circe.{Decoder, Encoder}
import io.circe.generic.semiauto._
import io.circe.syntax._
import io.circe.Decoder.AccumulatingResult
import io.circe.generic.JsonCodec
import io.circe.{Decoder, _}
import io.circe.generic.codec.DerivedAsObjectCodec
import io.circe.generic.decoding.DerivedDecoder
import io.circe.generic.semiauto.{deriveDecoder, _}
import shapeless.Lazy
import shared.com.ortb.implicits.implementations.CirceJsonSupport

Which one to keep as organize import also fails to build again.

import io.circe.generic.auto._ this one fixes it.

For anyone who is going to use the generic version of decoders, codecs for T and List[T]
Example Code : https://bit.ly/2RXr7gT
package shared.io.traits.jsonParse
import io.circe.generic.auto._
import io.circe.generic.codec.DerivedAsObjectCodec
import io.circe.generic.decoding.DerivedDecoder
import io.circe.generic.encoding.DerivedAsObjectEncoder
import io.circe.generic.semiauto.{deriveDecoder, _}
import io.circe.{Decoder, Encoder, _}
import shapeless.Lazy
import shared.com.ortb.implicits.implementations.CirceJsonSupport

class JsonCodec[T](
  implicit val decodeCodec : DerivedAsObjectCodec[T],
  val decodeListCodec : DerivedAsObjectCodec[List[T]])
  extends CirceJsonSupport {

  implicit def defaultCodec : Codec.AsObject[T] = deriveCodec[T](decodeCodec)

  implicit def defaultListCodec : Codec.AsObject[List[T]] =
    deriveCodec[List[T]](decodeListCodec)
}

class JsonDecoders[T]
(implicit val decoder : Lazy[DerivedDecoder[T]])
  extends CirceJsonSupport {

  implicit def defaultDecoder : Decoder[T] = deriveDecoder[T]

  implicit def defaultListDecoder : Decoder[List[T]] = deriveDecoder[List[T]]
}

class JsonEncoders[T]
(implicit val encoder : Lazy[DerivedAsObjectEncoder[T]])
  extends CirceJsonSupport {

  implicit def defaultDecoder : Encoder[T] = deriveEncoder[T]

  implicit def defaultListDecoder : Encoder[List[T]] = deriveEncoder[List[T]]
}

class JsonCirceEncoder[T]
(
  implicit val decodeCodec : DerivedAsObjectCodec[T],
  implicit val decoder : Lazy[DerivedDecoder[T]],
  val encoder : Lazy[DerivedAsObjectEncoder[T]],
  val decodeListCodec : DerivedAsObjectCodec[List[T]]){
  implicit def defaultCodec : Codec.AsObject[T] = deriveCodec[T](decodeCodec)

  implicit def defaultListCodec : Codec.AsObject[List[T]] =
    deriveCodec[List[T]](decodeListCodec)

  implicit def defaultDecoder : Decoder[T] = deriveDecoder[T]

  implicit def defaultListDecoder : Decoder[List[T]] = deriveDecoder[List[T]]

  implicit def defaultEncoder : Encoder[T] = deriveEncoder[T]

  implicit def defaultListEncoder : Encoder[List[T]] = deriveEncoder[List[T]]

  // implicit defaultDecoder = decoders.defaultDecoder
}

object WApp extends App with CirceJsonSupport {

  import shared.com.ortb.persistent.schema.Tables._

  val re = new JsonCirceEncoder[AuctionRow]
  //  val re3 = new JsonDecoders[Seq[AuctionRow]]

}


Didn't find op for builtin opcode 'CONV_2D' version '3'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model?

I am trying to run the Mini speech commands example and am facing the error Didn't find op for builtin opcode 'CONV_2D' version '3'. An older version of this builtin might be supported. Are you using an old TFLite binary with a newer model? at setup() and then error tflite micro requested feature data size 536907080 doesn't match 1960 in loop().
I trained my model following the example : https://colab.research.google.com/github/tensorflow/tflite-micro/blob/main/tensorflow/lite/micro/examples/micro_speech/train/train_micro_speech_model.ipynb#scrollTo=rNQdAplJV1fz
with the only change of WANTED_WORDS = "on,off,stop,go"
TFLite micro example: only changed the g_model[] with the model generated after training using the above notebook, and the kCategoryLabels values as "on, off, stop, go"
Tensorflow version : 2.15.0
Board: Arduino BLE sense Nano

I had exactly the same problems, and can now offer some help. Firstly, on the opcode front, you're using tensorflow 2.15 (I used 2.16 cos that's what I had locally). You need 1.x - and yeah, Colab says "colab doesn't like tensorflow 1, use tensorflow 2" really unhelpfully. However, this was someone else's experience: https://discuss.tinyml.seas.harvard.edu/t/micro-speech-example-from-tensorflow-on-an-esp32/376/7
Tensorflow 1 worked for them since TF 2 uses a Conv2d instead of a DWConv. I'm going to give that a go and see if I can get this working. Ideally I keep this tab open and report back with my experience, but if this is my final answer since I forgot, apologies to all future readers. Also, I hope tflite-micro updates with tf 2 opcodes cos that's going to get annoying for other models
As for the feature data size error, I also encountered this - this was so confusing! Is that memory getting stomped on or something? Never figured out if this was the case, but the example creates the feature_provider as a global pointer, and then makes a static instance of the object in setup() and redirects the global pointer to this. I made a global object instead of a global pointer and this avoided the problem.
It's worth noting that when I compiled and ran the example, this did not happen, only when I added my own model. My guess is that since the size of my own model changed, there is a memory clobbering happening in heap and by putting it on stack this bypassed the problem?

I was able to run the example by locally setting up Python 3.6 and Tensorflow version 1.15 to train the model. Could you share the code where you have modified the feature provider to make it an global object instead. Thanks in advance.
Also for training the model in python instead of using the example train.py have you had any success in generating your own model and running it using tensorflow lite? I tried creating a model by extracting the Spectogram features and then MFCC from the audio wav files and training the a conv2D model similar to how its implemented in the train.py example but wasn't able to run the inference using tf lite micro library. Any suggestions/help would be really appreciated.

i don't have the code on me now but it was just making the global pointer a global object and then creating it before setup(), like
`
FeatureProvider f;
// the line that creates the buffer here
f = FeatureProvider(kFeatureSize, theBufferArgItNeeds);
void setup()
{
// ... etc
`
and then in the two other references i think you just change -> to . of course
The only customisations I made to the model were changing the words detected, nothing actually structural, so can't help there sorry. Cheers for the version suggestions, going to try that.

For posterity I used Tensorflow 1.15 and managed to retrain the model and get this working on my arduino as well, same setup as rishita-asl. Note that tensorflow 1.15 doesn't like any python above 3.7, so you probably need a pyenv with just 3.6. If you are unfamiliar, use conda like I did cos it made this super easy


Implement auto-assignment for newly created issues.

Implement auto-assignment for issues and PRs, Currently assigning all the issues and prs to:

tilakrayal

Accidentally merged -- please create a CL for the change instead, since the source of truth is google3.


feat: Add Angular example.

This pull request adds an Angular example to showcase Blendy's framework-agnostic capabilities in an Angular context. The new example demonstrates how to integrate Blendy seamlessly into an Angular application, providing developers with a clear reference for implementation.
Changes

Created a new Angular example directory
Added a comprehensive example that illustrates:

Basic Blendy element transition
Component-level integration
Responsive transition configuration

Thanks for your PR. But could you please update it to not include all the project's files? You can follow the other examples I have here: https://github.com/TahaSh/blendy/tree/main/examples.


Fix for #742

Hi, @A-Aravindhan  @jmini to be able to merge this PR, can you please integrate your changes into one PR? Thanks!

I am not maintainer of this project, I can not update it: I do not have write permissions on A-Aravindhan:v2.0.1 branch.

@gracekarina:
Performing a quick API call on this PR, I see that you have the permission: maintainer_can_modify: true
You need to add both forks as remote (assuming you work with ssh on GitHub). This should do it:
$ git remote add jmini git@github.com:jmini/swagger-parser.git
$ git remote add A-Aravindhan git@github.com:A-Aravindhan/swagger-parser.git
$ git fetch jmini pr754
$ git push A-Aravindhan jmini/pr754:v2.0.1

Let me know if it does not work.
Thank you in advance.

@gracekarina : I have opened a replacement PR that contains all the changes discussed here => #773

Hi, I just merged the #773 PR. Thanks for your contributions.


Wrap gRPC Exceptions

Depending on whether or not the client is async, it returns entirely different exception types: RpcError and AioRpcError respectively.
The grpcutil module should have an exception type that can be used to catch both of these and handle them equivalently.

Just leaving a comment that with the new SyncClient and AsyncClient it might be okay to just leave the exceptions as different. My guess is most clients will be one or the other and not mixing behavior


App exits when pressing the camera button

iOS 9.3.5 - iPhone5C
App exits when pressing the camera button to start recording no matter if 5 or 8Mega pixels.
App not swithing to landscape mode in Map view.

@andreimagic Please try again now. The release that fixed this problem was sent to iTunes on 26.08.2016 but not approved until <IP_ADDRESS>6.
Note: Because of a bug #15  For the first time, before you try to record your tracks, please go to Settings -> Resolution and select the only option there 2MP.  Now the app should no longer crash.


Add compiler option to parse in strict mode

See #9449 and #10755 for reference.
The ts code base is not modules, so it is not implicitly parsed in strict mode. we would like it to be. options either 1. put "use strict" at the top of every file, and make the emitter remove the duplicate ones when it merges the output. or 2. add a compiler flag that would force the compiler to parse the files in strict mode.

Hi,
for a software product at work, we currently use a fork of TypeScript that has a --forceStrictMode compiler option which forces the compiler to parse in strict mode, without affecting the emit. The use case is a similar one:

The use case for this is that some JS Runtimes like Jurassic (which allows to run JavaScripts in a .NET environment) have an option to enable strict mode even if the JS did not declare a strict mode directive, and enabling strict mode slightly inproves performance (and changes some semantics). Then, if you present an editor like Monaco to the user where he can edit TypeScripts that are to be run on such a JS Runtime later with strict mode, the editor's TypeScript Language Service can correctly identify syntax errors in strict mode even if the script does not contain the strict mode directive.

Note that enabling this option will not have any impact on the output, so if the TS file did not contain "use strict";, neither will the JS output file. It will only have an impact on the compiler during syntax check (to emit errors e.g. like using reserved words as identifiers, using the delete operator on identifiers, using old-style octal literals etc).

If this is integrated directly into the TS repo, we could abandon the fork and use the original TS Services lib instead.
Thank you!

:+1: I would really like to see "use strict"; emitted

Accepting PRs for a new flag/setting --alwaysStrict (perhaps open to bikeshedding on this point) which:

Always parses all files in the "strict" context (as if you had written "use strict;" at the top of the file)
Always emits "use strict;" at the top of output files which don't already include it at the top

@T18970237136  perhaps you could turn your fork into a PR?

Note, that a feature request for the same behavior (compiler option that parses in strict mode and also emits "use strict";) was already declined some time ago: #7209 (Suggestion: Add a "forceStrictMode" compiler option)  :wink:

👎 write "use strict"; yourself + TSLint if appropriate

@RyanCavanaugh Note that my fork currently only implements the first part: parse source files in strict mode. It does not affect the emit, so it will not emit "use strict"; on file which did not have this directive. (This is because in our use case the "use strict"; was not needed, and unfortunately I have no knowledge about the new transormation-based emitter, and how to ensure "use strict" is always emitted.)
Thanks!

thanks @slawomir!

The new option is --alwaysStrict should be available in typescript@next later tonight.


Geomagnetic Reference System

Although many geospatial systems use territorial north, planes and ships use magnetic north as their point of reference for direction, heading, etc. This is a terms proposal for the Information Entity Ontology:
cco:InternationalGeomagneticReferenceField rdf:type owl:NamedIndividual ;
                                           rdf:type cco:GeospatialCoordinateReferenceSystem ;
                                           rdfs:label "International Geomagnetic Reference Field" ;
                                           rdfs:comment "This global main field model provides magnetic field values for any location on Earth, e.g. for  navigational purposes (declination) or as a standard for core field subtraction for aeromagnetic surveys. An updated version is adopted by International Association of Geomagnetism and Aeronomy (IAGA) every 5 years)."
                                           rdfs:seeAlso "https://www.iaga-aiga.org/" .

Although using 'field' breaks the convention of using 'system,' I think it makes sense here since it's already an instance of a system and this is the officially recognized subject-matter-expert label. There is a paper which discusses the most recent adoption of the field, https://earth-planets-space.springeropen.com/articles/10.1186/s40623-020-01288-x

@cameronmore What CCO class is this an instance of? Also, you may want to include the parenthetical source in the comment as a separate annotation. Not a def_source, but maybe a see_also. Or something like that

@cameronmore This makes sense to me. In your PR, can I also recommend we list the paper you provide some as an additional citation for the instance? I'll mark this for 1.6 but if we can't get to it it can be relabeled for 2.0. thanks!

Addressed by https://github.com/CommonCoreOntology/CommonCoreOntologies/pull/383/files


openwsman: cmake: pull libxml2 definitions

LibXML2 defines LIBXML_STATIC if compiled statically.
Allow OpenWsman to build with static LibXML2 by pulling
compile flags from LibXML2 package config.
Signed-off-by: Alexander Usyskin<EMAIL_ADDRESS>

lgtm, thanks !


The created log analytics workspace id and name are not exported in the module output

The created log analytics workspace id and name are not exported in the module output
PR #243 Fixes this trivial issue.

Since #243 fixed this issue I'm closing it now.


Remove leading slash from user input when creating a blob

Fixes #970
These changes do two things:
1. Support creating blobs that have unnamed directories in their paths.
Yes this is actually allowed by Azure and is even displayed on the Portal.
The result of creating /a/b/c/test.txt:

2. Strip any leading slash from user input so that it doesn't create an unnamed directories because that behavior is so weird.
I wanted to still add support for creating unnamed directories in case we allow this down the road for some reason.

Yes this is actually allowed by Azure

🤮

Yes this is actually allowed by Azure

🤮

🤮 indeed. I was so surprised when it allowed me to create and it actually displayed in the portal.

We could have caught this with an eslint rule... but this rule is really annoying.
rules: {
        "@typescript-eslint/strict-boolean-expressions": [
            2,
            {
                allowString: false
            }
        ]
    }


Question: How to I use the kwargs handler to pass DDP params?

I would like to set broacast_buffers=False when wrapping DDP.
The documentation suggests using a kwargs handler class, but I have no idea how to pass it to Accelerator.
This is how I imagined it:
import copy
from dataclasses import dataclass

class KwargsHandler:

    def to_dict(self):
        return copy.deepcopy(self.__dict__)

    def to_kwargs(self):
        default_dict = self.__class__().to_dict()
        this_dict = self.to_dict()
        return {k: v for k, v in this_dict.items() if default_dict[k] != v}

@dataclass
class DistributedDataParallelKwargs(KwargsHandler):

    broadcast_buffers: bool = False

# Here I create an instance of KwargsHandler
kw = DistributedDataParallelKwargs()

# But passing it like this throws an error
accelerator = Accelerator(kwargs_handlers=kw)

Any help would be much appreciated!

You need to use the kwarg handles in the library:
from accelerate import Accelerator
from accelerate.utils import DistributedDataParallelKwargs

accelerator = Accelerator(kwargs_handlers=[DistributedDataParallelKwargs(broadcast_buffers=False)])

Many thanks, @sgugger !

@antopost alright if I reopen this and flag docs so I can improve it? 😄

You're very welcome to do so ^^

@sgugger
Actually, when I try instantiate accelerator using more than one gpu, I get the following error:

  File "train.py", line 46, in __init__
    self.accelerator = Accelerator(gradient_accumulation_steps=self.gas,
  File "/opt/conda/lib/python3.8/site-packages/accelerate/accelerator.py", line 227, in __init__
    assert isinstance(handler, KwargsHandler), f"Unsupported kwargs handler passed: {handler}."
AssertionError: Unsupported kwargs handler passed: DistributedDataParallelKwargs(broadcast_buffers=False).
Traceback (most recent call last):
  File "train.py", line 645, in <module>
    main(config, output_dir, args)
  File "train.py", line 610, in main
    TA = TrainAgent(config, output_dir, args)
  File "train.py", line 46, in __init__
    self.accelerator = Accelerator(gradient_accumulation_steps=self.gas,
  File "/opt/conda/lib/python3.8/site-packages/accelerate/accelerator.py", line 227, in __init__
    assert isinstance(handler, KwargsHandler), f"Unsupported kwargs handler passed: {handler}."
AssertionError: Unsupported kwargs handler passed: DistributedDataParallelKwargs(broadcast_buffers=False).
ERROR:torch.distributed.elastic.multiprocessing.api:failed (exitcode: 1) local_rank: 0 (pid: 2190) of binary: /opt/conda/bin/python

Could it be due to using the nightly version of accelerate?
- `Accelerate` version: 0.14.0.dev0
- Platform: Linux-5.4.0-128-generic-x86_64-with-glibc2.17
- Python version: 3.8.12
- Numpy version: 1.21.5
- PyTorch version (GPU?): 1.12.1+cu113 (True)
- `Accelerate` default config:
        - compute_environment: LOCAL_MACHINE
        - distributed_type: MULTI_GPU
        - mixed_precision: no
        - use_cpu: False
        - num_processes: 2
        - machine_rank: 0
        - num_machines: 1
        - gpu_ids: all
        - main_process_ip: None
        - main_process_port: None
        - rdzv_backend: static
        - same_network: True
        - main_training_function: main
        - deepspeed_config: {}
        - fsdp_config: {}
        - downcast_bf16: no

Will look into this and improve the docs

@antopost are you sure you're using the Accelerate kwarg handler class? As that's very important. This works for me:
from accelerate import Accelerator
from accelerate.utils import DistributedDataParallelKwargs

def main():
  kwarg_handler = DistributedDataParallelKwargs(broadcast_buffers=False)
  accelerator = Accelerator(kwargs_handlers=[kwarg_handler])

if __name__ == "__main__":
  main()

This was ran on two GPUs

@muellerzr Yes, it works for me now. My I forgot to delete some code that broke the kwarghandler class. I'll make my edit a bit clearer.

hello @muellerzr, is there a way to do this with accelerate config file directly


Show stable/beta symbols based on installed app

So I feel silly, but I just realized I have to be a maintainer of the raycast/extensions repo (or have push access) in order to push changes directly to your branch, so I’m making a PR on your PR branch :P


Optimize MasterWorkerInfo memory usage by introducing fastutil Set

What changes are proposed in this pull request?
Introduce the HashSet from fastutil (https://fastutil.di.unimi.it/) to replace the current java HashSet in MasterWorkerInfo
Why are the changes needed?
MasterWorkerInfo persisted in heap, has become a bottleneck for persisting more metadata in alluxio masters. This is mainly because it contains a block id set. If there are too many workers and too many blocks, this set will exhaust the memory.
A Long object in a java HashSet will take about 64 bytes memory. However, there are some third party collection libraries for primitive types. By getting rid of the boxing and unboxing, tons of memories can be saved and we can also achieve some performance boost.
By using the LongOpenHashSet, we cut down the size of the hash map to a quarter and save 75% memory.
Fastutil is one of the most used java alternatives .
There are a couple of benchmarks shows the collection components outperformance the java native one and the size of the collection components are also significantly smaller.
A couple of benchmarks
https://collection-libs-comparison.develar.org/
https://github.com/Speiger/Primitive-Collections-Benchmarks/blob/master/BENCHMARKS.md
I tested it locally too and I got the same result. Memory size is 75% smaller. Read is 2x faster, write is 3-5x faster depending on the operations (put/remove) while the performance of getSize() is almost on par.
Does this PR introduce any user facing changes?
N/A

The performance number is interesting,
https://github.com/Speiger/Primitive-Collections-Benchmarks/blob/master/BENCHMARKS.md#hashset
Not sure what it looks like at the number of our scale? For example, 1 Billion blocks.

LGTM, is it possible to share your numbers regarding memory and perf improvements?

Memory: save 75%
Performance: read 2x, write 3-5x

Very good!
Thanks very much!


[ROCm] Enable ROCm support for "softsign_op"

This PR enables ROCm support for the "softsign_op".
PR #26457 is a pre-req for this PR, and hence this PR includes commits from that PR.
Only the last commit in this PR  should be reviewed here (as all others will be reviewed as part of PR #26457 )
The change for this PR is rather trivial :)

@tatianashp @whchung : just FYI.

Hi @rthadur, I'm not familiar with this, would you help to find someone else?
Thanks.

Hi @rthadur, I'm not familiar with this, would you help to find someone else?
Thanks.
Sure

@tatianashp please advise the next step ASAP. I don’t think I have permission to approve this PR as I’m part of the contributor, but it seems no one at google would like to review this PR?

Also @chsigg

@chsigg
rebased this PR, since PR #26457 has been merged...now this PR is truly trivial :)

rebased to remove merge conflicts

@chsigg , this PR should be good to go...please approve.  thanks.


Document changes to VS IVsPackageInstallerServices APIs

PR https://github.com/NuGet/NuGet.Client/pull/4814 changed the XMLDoc.
Maybe it's worthwhile adding some explanation about the async nature of CPS PackageReference projects to https://learn.microsoft.com/en-us/nuget/visual-studio-extensibility/nuget-api-in-visual-studio

Fixed in https://github.com/NuGet/docs.microsoft.com-nuget/pull/2929


[kitware-staging] Fix deployment

Forgot to push this commit in #3961

Self merging to fix the deployment


TypeError: csv_to_table() missing 1 required positional argument: 'delimiter'

Hi, I am using latest released csvtomd, v. 0.2.0 from pypi on OS X with Python 3.5.2:
$ pip show csvtomd
Name: csvtomd
Version: 0.2.0
Summary: Convert your CSV files into Markdown tables.
Home-page: https://github.com/mplewis/csvtomd
Author: Matthew Lewis
Author-email<EMAIL_ADDRESS>License: MIT
Location: /usr/local/lib/python3.5/site-packages
Requires:

$ which csvtomd
/usr/local/bin/csvtomd

$ head -n1 /usr/local/bin/csvtomd
#!/usr/local/opt/python3/bin/python3.5

$ /usr/local/opt/python3/bin/python3.5 --version
Python 3.5.2

..and it breaks when trying to use with:
$ csvtomd input.csv
Traceback (most recent call last):
  File "/usr/local/bin/csvtomd", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.5/site-packages/csvtomd/csvtomd.py", line 136, in main
    table = csv_to_table(f)
TypeError: csv_to_table() missing 1 required positional argument: 'delimiter'

Please help.

Sorry about that. Missed it when I was testing.
I've added a smoke test that would have caught that bug – check it out on CircleCI.

Release 0.2.1 has been pushed – update using pip and let me know if you have any issues. Thanks!


updated Network.js

Reindented

Hi @smcgregor ,
Please see to this.

@smcgregor Yep. The method already exists in the JavaScript Bridge.

I'll make a few modifications and merge.


[Snyk] Upgrade gatsby from 5.11.0 to 5.12.12

This PR was automatically created by Snyk using the credentials of a real user.Snyk has created this PR to upgrade gatsby from 5.11.0 to 5.12.12.
:information_source: Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.

The recommended version is 15 versions ahead of your current version.
The recommended version was released a month ago, on 2023-12-07.

The recommended version fixes:

Severity
Issue
PriorityScore (*)
Exploit Maturity

Denial of Service (DoS) SNYK-JS-GRAPHQL-5905181
372/1000  Why? Proof of Concept exploit, CVSS 5.3
Proof of Concept

Denial of Service (DoS) SNYK-JS-MSGPACKR-6140431
372/1000  Why? Proof of Concept exploit, CVSS 5.3
No Known Exploit

Heap-based Buffer Overflow SNYK-JS-SHARP-5922108
372/1000  Why? Proof of Concept exploit, CVSS 5.3
Mature

Denial of Service (DoS) SNYK-JS-SOCKETIOPARSER-5596892
372/1000  Why? Proof of Concept exploit, CVSS 5.3
No Known Exploit

(*) Note that the real score may have changed since the PR was raised.

Release notes

Package name: gatsby

5.12.12 - 2023-12-07

5.12.11 - 2023-11-22

5.12.10 - 2023-11-21

5.12.9 - 2023-10-26

5.12.8 - 2023-10-20

5.12.7 - 2023-10-17

5.12.6 - 2023-10-09

5.12.5 - 2023-09-27

5.12.4 - 2023-09-05

5.12.3 - 2023-08-28

5.12.2 - 2023-08-28

5.12.1 - 2023-08-24

5.12.0 - 2023-08-24

5.12.0-next.1 - 2023-07-03

5.12.0-next.0 - 2023-06-15

5.11.0 - 2023-06-15

    from gatsby GitHub release notes

Commit messages

Package name: gatsby

8919f51 chore(release): Publish
bba81d6 chore: update gatsby-adapter-netlify version manifest (#38745) (#38746)
04030d1 chore(release): Publish
3380c59 fix(gatsby-source-contentful): don't apply parent node links to child nodes (#38728) (#38730)
4d78fba chore(release): Publish
f713e59 fix: re-install lmdb when detecting the absence of @ LMDB prebuilt packages (#38691) (#38707)
c5ec678 chore(release): Publish
1090558 feat(gatsby,gatsby-adapter-netlify): support pathPrefix and trailingSlash options (#38666) (#38701)
3ce63a4 chore(release): Publish
8ae5702 fix(gatsby-adapter-netlify): adapter use headerRoutes (#38652) (#38674)
8ae8281 chore(release): Publish
c43080f fix: respect 'force' and 'conditions' properties on redirects (#38657) (#38664)
4bf84f0 test(adapters-e2e): deploy to platform instead of ntl serve (#38643) (#38662)
67c8832 test: bump node version for pnp tests (#38656) (#38663)
6869562 fix(gatsby): Adapter header rules (#38644) (#38661)
4a76878 chore: added logging for cache handling (#38654) (#38660)
470d182 chore(release): Publish
02e925a fix(gatsby): support multiple instances of same variable in gatsbyImage placeholderUrl (#38626) (#38647)
8302bc8 fix(gatsby): don't force leading slash for external paths in routes manifest (#38639) (#38646)
39d2fd8 chore(release): Publish
acb8799 fix(gatsby): open lmdb instances in writeable locations in generated ssr/dsg function (#38631) (#38638)
1e8748c chore(release): Publish
f1a4107 chore(deps): upgrade sharp to latest v0.32.6 (#38374) (#38617)
4dc464b chore(source-npm-package-search): bespoke treatment for `plugin-gatsby-cloud` and `source-contentful` (#38619) (#38622)

Compare

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information:
🧐 View latest project report
🛠 Adjust upgrade PR settings
🔕 Ignore this dependency or unsubscribe from future upgrade PRs

👷 Deploy Preview for sage-dragon-9196d9 processing.

Name
Link

🔨 Latest commit
801343b9a6cdbd1026f7833bf1d910a45ce6ab56

🔍 Latest deploy log
https://app.netlify.com/sites/sage-dragon-9196d9/deploys/6594f2c9176c7a00081a36a5


[WIP] fix: re-enable _doc_id filter optimisation path

wip fix for #1737 just to see how CI likes this, initial comments welcome

Could use a test case so we don't regress on this again.

@wohali you mean when we add another clustering later? ;D
This needs conceptual approval before moving on.
Should this approach be acceptable, I'd also re-enable the design doc filter optimisation  the same way.

@janl Elixir now tests against a cluster, so, yes, we have the infrastructure in place :)

@wohali tried to make a joke, got foiled by a typo, nvm :/

cleaned up and ready for review

Holding for 2.3.0 per @rnewson. Thanks Bob!


Add --verbose option Closes #338

Sample output when launched from NEURON:
Starting CoreNEURON data generation
Starting CoreNEURON simulation
 Additional mechanisms from files
 Ca.mod CaDynamics_DC0.mod CaDynamics_E2.mod Ca_HVA.mod Ca_HVA2.mod Ca_LVAst.mod CoreConfig.mod Ih.mod Im.mod K_Pst.mod K_Tst.mod KdShu2007.mod NaTa_t.mod NaTg.mod NaTs2_t.mod Nap_Et2.mod ProbAMPANMDA_EMS.mod ProbGABAAB_EMS.mod ProfileHelper.mod SK_E2.mod SKv3_1.mod TTXDynamicsSwitch.mod VecStim.mod cacumm.mod cacummb.mod cagk.mod cal2.mod can2.mod cat.mod gap.mod h.mod halfgap.mod kadist.mod kaprox.mod kca.mod kd.mod kd2.mod kdb.mod kdrbca1.mod kdrca1.mod km.mod kmb.mod na3n.mod naxn.mod netstim_inhpoisson.mod new_calcium_channels.mod

 WARNING: nrn_nrn_wrote_conc support on GPU need to validate!

 psolve |========================================================| t: 50.00  ETA: 0h00m20s

Solver Time : 19.8974

@pramodk I would still keep the mechanisms (as they could be different ones?) and solver information.

@pramodk I would still keep the mechanisms (as they could be different ones?) and solver information.

sorry for delay here. In case of none, there should be really no output from coreneuron.

@pramodk I would still keep the mechanisms (as they could be different ones?) and solver information.

sorry for delay here. In case of none, there should be really no output from coreneuron.


Docker Hub latest image out-of-date

Describe the bug
The image tagged "latest" on Docker Hub (link) was last updated 9 months ago. There was a release 22 days ago. I see the image tagged "latestRelease-auto-setup" was updated at that time but the "latest" image was not. Should the "latest" tag not be used?
To Reproduce
Is the issue reproducible?

Yes

Steps to reproduce the behavior:
Go to here and it shows latest was last updated 9 months ago.
Expected behavior
The image tagged "latest" is kept up-to-date with Cadence releases.

For now, we only maintain "latestRelease-auto-setup" for each release. Please use that tag if possible.
(we don't maintain "latest" tag anymore because of multiple reason, such as confusion and it is reserved for other purpose in docker)

Understood. Thanks for the info.


Forge test works without via-ir but coverage does not.

Component
Forge
Have you ensured that all of these are up to date?

[X] Foundry
[X] Foundryup

What version of Foundry are you on?
forge 0.2.0 (ea3ba89 2024-09-05T00:28:03.529093300Z)
What command(s) is the bug in?
No response
Operating System
Windows
Describe the bug
The codebase does not have viaIR enabled.

forge compile -> works
forge test -> works - all tests pass
forge coverage -> fails (error below)
forge coverage --ir-minimum -> works but tests fail

Error: (forge coverage)
[⠊] Compiling...
[⠆] Compiling 141 files with Solc 0.8.25
[⠒] Solc 0.8.25 finished in 8.17s
Error:
Compiler run failed:
Error: Compiler error (C:\Users\circleci\project\libyul\backends\evm\AsmCodeGen.cpp:67):Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.
CompilerError: Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables. When compiling inline assembly: Variable headStart is 1 slot(s) too deep inside the stack. Stack too deep. Try compiling with `--via-ir` (cli) or the equivalent `viaIR: true` (standard JSON) while enabling the optimizer. Otherwise, try removing local variables.

This is super confusing given that just running the tests is fine but running with coverage doesn't compile and when you enable ir the tests themselves break.

Please check discussions in https://github.com/foundry-rs/foundry/issues/8695 and limitations when using such

@grandizzy That issue only talks about the via-ir part, but doesn't answer why forge coverage isn't working without ir when forge test works fine.

The difference is that forge coverage disables any optimization, ir-minimum is an option but is not reliable

Yeah that's also ok, @grandizzy! The codebase compiles and runs through the tests without any optimizations as well. Coverage should also just work but it doesn't.

Interesting, can you share code to reproduce and debug locally?

ah, too bad. Don't think would help, but at least the foundry.toml to check settings then?

Here's the foundry.toml, extremely barebones.
[profile.default]
  # Directory Setup
  src = "contracts"
  script = "script"
  test = "test"

  # Compiler Options
  solc_version = "0.8.25"
  evm_version = "shanghai"

  # Permissions
  fs_permissions = [{ access = "read-write", path = "./" }]

forge compile -> works
forge test -> works - all tests pass
forge coverage -> fails

Also, related question, would you know why with forge test all tests pass but with forge coverage --ir-minimum the tests don't pass? (Don't care about source maps here, but ir seems to change test outcome?)

re settings, just a try, if you set optimizer = false dies compile still work?
Re tests not passing, there are several things that could go wrong, one of them being related to block.timestamp / skip / warp, e.g. https://github.com/foundry-rs/foundry/issues/8756#issuecomment-2313199258

Oof, explicitly setting optimizer = false does not work (1 slot too deep, doesn't tell me which file), which explains a lot actually.
Thanks for the insights on ir stuff, so it does seem like ir changes the test outcome if there's any time related action (and possibly more).  Although I see that most of the tickets linking to solc directly have been closed, I wonder if anything has changed.
This would really suck if this is a compiler issue in the end.

yeah, not sure there's anything we could do at the moment but exploring other paths

context:

forge build has optimizer set to true by default
forge coverage runs forge build with optimizer disabled, hence the inconsistency

our proposal would be to add a WARN when forge coverage is called to make this explicit, though as of now we will not be able to provide a fix for that

same happened for me, forge coverage changes the out folder and without noticing it, we tried to deploy the unoptimized contract and failed because of contract size.
That took us quite a bit of time to trace the issue.
@jenpaff
my proposal is that, forge coverage shall either save the artifacts in system's temp folder, or leave the them in memory


Writing virtual references into Icechunk from VirtualiZarr

I would like to be able to write virtual references contained in virtualizarr.ManifestArray objects to an Icechunk store.
The user API would be something like
import virtualizarr as vz

vds = open_virtual_dataset('file.nc')

vds.virtualize.to_icechunk(icechunkstore)
icechunkstore.commit('<todays-date>')

but this requires me to write a virtualizarr writer, following the same general idea of the prototype zarr chunk manifest writer. So I guess I want an API something like:
icechunkstore[<array-name>] = manifestarray

In general I will want to write an entire virtual dataset (or even virtual datatree) in at once, so that that can be committed as a new snapshot. That means writing virtual references for many arrays, for many groups, and group-level attributes, all in that one virtualizarr method call.
(I know the rust implementation for this is being worked on actively in #85, but this can be closed once there is corresponding python API available that I can use in virtualizarr.)

See https://github.com/zarr-developers/VirtualiZarr/pull/256

Closed by https://github.com/zarr-developers/VirtualiZarr/pull/256 being merged and released!
I'll open a new issue if any bugs / performance problems are found.


Issue in the code

There is an issue in the code, causing the application not to run properly

Fixed


404 issue with _next/static/chunks/*.js

@mlynch
It appears that the capacitorjs cannot recall script files located in this path when the folder depth is greater than 3. How can i solve this problem when i distribute it to Android?

Can you try adding this line in your app/build.gradle? https://github.com/ionic-team/capacitor/blob/main/android-template/app/build.gradle#L15

I'm sorry for the late reply. It works perfectly.
I don't know the details of this option, but all the problems have been resolved. Thank you.

You're saying my suggestion and adding that line fixed it @hm-lee?


allow setting hostname for a pod

/kind feature
Description
When I run podman play kube pod.yaml to create a pod, the hostname is the last container's container-id.
My application is highly reply on hostname, is it possible to add a feature to podman pod to allow customizing the hostname? Or set the pod name as hostname?
Kubernetes Pod has a field hostname, it is better to use this as hostname.
Additional information you deem important (e.g. issue happens only occasionally):
Output of podman version:
host:
  BuildahVersion: 1.9.0
  Conmon:
    package: podman-1.4.4-2.el7.centos.x86_64
    path: /usr/libexec/podman/conmon
    version: 'conmon version 0.3.0, commit: unknown'
  Distribution:
    distribution: '"centos"'
    version: "7"
  MemFree: 15667200
  MemTotal: 521199616
  OCIRuntime:
    package: runc-1.0.0-64.rc8.el7.centos.x86_64
    path: /usr/bin/runc
    version: 'runc version spec: 1.0.1-dev'
  SwapFree: 138407936
  SwapTotal: 138407936
  arch: amd64
  cpus: 1
  hostname: host.localdomain
  kernel: 4.19.8-1.el7.elrepo.x86_64
  os: linux
  rootless: false
  uptime: 6h 25m 36.48s (Approximately 0.25 days)
registries:
  blocked: null
  insecure: null
  search:
  - registry.access.redhat.com
  - docker.io
  - registry.fedoraproject.org
  - quay.io
  - registry.centos.org
store:
  ConfigFile: /etc/containers/storage.conf
  ContainerStore:
    number: 3
  GraphDriverName: overlay
  GraphOptions: null
  GraphRoot: /var/lib/containers/storage
  GraphStatus:
    Backing Filesystem: extfs
    Native Overlay Diff: "true"
    Supports d_type: "true"
    Using metacopy: "false"
  ImageStore:
    number: 4
  RunRoot: /var/run/containers/storage
  VolumePath: /var/lib/containers/storage/volumes

Output of podman info --debug:
(paste your output here)

Additional environment details (AWS, VirtualBox, physical, etc.):

@haircommander @QiWang19 Can you guys look into this?

Ah I think this revealed a bug too, if a container is in a pod that shares a uts namespace, shouldn't all containers in the pod share the hostname of the infra container? cc @mheon

Yes.


add support for latest version (invokeai 2.1)

todo

[ ] check what has changed in the web api
[ ] update plugin to use new webapi
[ ] check if can add option to use new api (so then can support both versions/installations)

New web api seems quite different:
https://github.com/invoke-ai/InvokeAI/issues/866#issuecomment-1276859788
pr for legacy POST request https://github.com/invoke-ai/InvokeAI/pull/1070

Hi @unitycoder ,
We (InvokeAI) are currently on an interim web API - mostly socket.io - and will be moving do a more traditional API as the next major effort on the web side. The upcoming API is mostly HTTP with socket.io for signaling.
Are you able to use socket.io for this Unity plugin? If not, what about plain websockets?

@psychedelicious oh nice! yeah both are available, so that will work.
some examples:
https://github.com/endel/NativeWebSocket
https://github.com/itisnajim/SocketIOUnity

found some info here about socket api?
https://gist.github.com/ausbitbank/925aed0ebd5093353f76f6a58c1def5d

That's ancient and no longer correct for the latest release. The socket api is not documented you'll need to look at the source code if you want to use it.


Logging from sst_importer is noisy

Bug Report
What version of TiKV are you using?

TiKV
Release Version:   6.5.0
Edition:           Community
Git Commit Hash:   47b81680f75adc4b7200480cea5dbe46ae07c4b5
Git Commit Branch: heads/refs/tags/v6.5.0
UTC Build Time:    2022-12-21 09:03:22
Rust Version:      rustc 1.67.0-nightly (96ddd32c4 2022-11-14)
Enable Features:   pprof-fp jemalloc mem-profiling portable sse test-engine-kv-rocksdb test-engine-raft-raft-engine cloud-aws cloud-gcp cloud-azure
Profile:           dist_release

What operating system and CPU are you using?
Fedora 37, Linux 6.0.12, Intel Core i7
Steps to reproduce
Run a TiDB Playground
What did you expect?
No noisy logging with the default loglevel
What did happened?
[2022/12/30 09:12:51.255 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:01.257 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:11.258 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:21.259 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:31.260 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:41.261 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:13:51.262 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:14:01.264 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]
[2022/12/30 09:14:11.266 +01:00] [INFO] [sst_importer.rs:442] ["shrink cache by tick"] ["retain size"=0] ["shrink size"=0]

This is not very informative to a TiKV user, it might be useful to a TiKV developer.

Possible solutions:

Change the loglevel for this message to debug. Maybe also do the same for the "shrink space by tick" message.
Change the loglevel and/or message depending on the size of shrink_buff_size and retain_buff_size.

Possible patch:
diff --git a/components/sst_importer/src/sst_importer.rs b/components/sst_importer/src/sst_importer.rs
index 3e06eb768..9f757594f 100644
--- a/components/sst_importer/src/sst_importer.rs
+++ b/components/sst_importer/src/sst_importer.rs
@@ -439,7 +439,7 @@ impl SstImporter {
             }
             shrink_file_count
         } else {
-            info!("shrink cache by tick"; "shrink size" => shrink_buff_size, "retain size" => retain_buff_size);
+            debug!("shrink cache by tick"; "shrink size" => shrink_buff_size, "retain size" => retain_buff_size);
             self.dec_mem(shrink_buff_size as _);
             shrink_buff_size
         }
@@ -1733,7 +1733,7 @@ mod tests {

         assert_eq!(CacheKvFile::Mem(Arc::new(buff.clone())), output);

-        // Do not shrint nothing.
+        // Do not shrink nothing.
         let shrink_size = importer.shrink_by_tick();
         assert_eq!(shrink_size, 0);
         assert_eq!(importer.file_locks.len(), 1);


Ramdomized tests that discard values can fail even when correct

(subjectId > 0) ==> constraints like this one can discard too many values and fail even when everything works correctly:
[INFO] - should assign triples with the same subject to the same node *** FAILED ***
[INFO]   Gave up after 0 successful property evaluations. 11 evaluations were discarded.

Fixed by https://github.com/uzh/triplerush/commit/eb3d05a8f3c62eb9fbbcbcd380bb56d8cca2fca3


Error using Popen in debug mode but no error executing normally

I'm using this library successfully to fill in PDF form values when I execute my program normally (not in debug mode). However, if I execute my application in debug mode inside of my IDE (PyCharm), I get the following stack trace:
File "/Users/me/work/server/venv/lib/python2.7/site-packages/pdfjinja.py", line 220, in __call__   filled = PdfFileReader(self.exec_pdftk(self.rendered)) File "/Users/me/work/server/venv/lib/python2.7/site-packages/pdfjinja.py", line 194, in exec_pdftk   p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__   errread, errwrite) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child   raise child_exception OSError: [Errno 2] No such file or directory
It appears as though the snippet of code in question is inside pdfjinja.py at line 194:
        p = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE)
        stdout, stderr = p.communicate(fdf)

I've done some googling that points to PIPE being a potential problem with Popen. Here is the blog article:
http://thraxil.org/users/anders/posts/2008/03/13/Subprocess-Hanging-PIPE-is-your-enemy/
Would it be possible to update the exec_pdftk function so that it addresses this?
Again, this only seems to be a problem when running my code inside my IDE in debug mode. Normal execution works just fine. Therefore, this might not be a high priority issue but I thought I'd report it anyway.
Thanks for providing this tool!

Thanks for the bug report. The error message:
... OSError: [Errno 2] No such file or directory

refers to the pdftk program. it sounds like the IDE is changing your environment variables such that the pdftk executable cannot be found. You can fix this by configuring the PATH environment variable in your IDE settings. Set its value to the folder that contains the pdftk.exe file. See: http://stackoverflow.com/a/22899916
I'm closing this issue for now since it is related to IDE configuration and not the package itself., but feel free to respond to this if you're still having problems.

THANK YOU!
Really appreciate the quick reply. You also were bang on with your
suggestion. I added the PATH to my debug configuration and now it works!
The strange thing is that I can run it in normal mode inside PyCharm with
configuring PATH. Weird...
Anyway, I just wanted to say thanks again. Appreciate it.
Have a great day!
-- J
On Wed, Nov 18, 2015 at 9:49 AM, Ram<EMAIL_ADDRESS>wrote:

Thanks for the bug report. The error message:
... OSError: [Errno 2] No such file or directory
refers to the pdftk program. it sounds like the IDE is changing your
environment variables such that the pdftk executable cannot be found. You
can fix this by configuring the PATH environment variable in your IDE
settings. Set its value to the folder that contains the pdftk.exe file.
See: http://stackoverflow.com/a/22899916
I'm closing this issue for now since it is related to IDE configuration
and not the package itself., but feel free to respond to this if you're
still having problems.
—
Reply to this email directly or view it on GitHub
https://github.com/rammie/pdfjinja/issues/1#issuecomment-157737356.

--
Judem: +1<PHONE_NUMBER>e<EMAIL_ADDRESS><EMAIL_ADDRESS>

@tryjude having the exact same issue with pycharm

This is an issue with you enviroment. Please ensure that pdftk is on the PATH in PyCharm.

I came to a similar issue, without environment issue, just from terminal on OSX 10.13.3.
Issue was a bad-built pdftk, now working fine -> https://stackoverflow.com/questions/39750883/pdftk-hanging-on-macos-sierra


Carousel View Problem

When i have itemsource 2 stacklayouts....it will work fine in all versions except the android oreo...
The two stacklayouts are overlapped and when the orientation is changed its fine..it works properly..
Can you please help ma???

@shirish8 Hi )
https://github.com/AndreiMisiukevich/CardView
Try this plugin (should work properly)

@AndreiMisiukevich
Thank you for the suggestion...
But its not taking list of stacklayouts as its itemssource...can you help me??

@AndreiMisiukevich  and Its not taking MicroCharts aswell...

@shirish8
<cards:CarouselView.ItemsSource>
            <x:Array Type="{x:Type View}">
                <ContentView>
                    <Image Source="yourImage.png"/>
                </ContentView>
                <RelativeLayout>
                    <Button Text="Click" />
                </RelativeLayout>
                <StackLayout>
                    <Label Text="any text"/>
                </StackLayout>
            </x:Array>
    </cards:CarouselView.ItemsSource>

@AndreiMisiukevich

            </StackLayout>

I want to add this two stacklayouts in the Carousel View...

@shirish8
cards:CarouselView.ItemsSource
<x:Array Type="{x:Type View}">

</x:Array>
</cards:CarouselView.ItemsSource>

@AndreiMisiukevich  Thank You...can you tell me about how to put the Indicators as well???

@AndreiMisiukevich
Thank you....Could you be more specific and explain a bit more about Indicators???

@shirish8 just open my GitHub readme or docs .
Everything is explained there :)

@AndreiMisiukevich
Thank you very much :D.

@AndreiMisiukevich
i am having trouble using SelectedIndicatorStyle and UnSelectedIndicatorStyle properties...need your help??
any suggestions??

I AM BACK.
Will take a look.

@shirish8 do you mean 2 StackLayout in the same page/ItemTemplate?

I can't reproduce this.

I am getting close to release date. Please submit a demo reproducing the issue if you want a fix to be included. Thanks


Proposal: apply action.List.Selector in secrets.impl.List

Helm List procedure:

Use k8s client to download secrets, filtered by lable owner

https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/action/list.go#L161-L168
https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/storage/driver/secrets.go#L81-L88
https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/action/lazyclient.go#L99-L104

Decode(decode base64 string and unzip if compressed)

https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/storage/driver/secrets.go#L94-L95
https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/storage/driver/util.go#L58-L67

Filter releases(Latest, StateMask, Selector)

https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/action/list.go#L181-L194
And if we have large amount of releases, then helm list will be very slow. Because helm must download releases first and then apply filters.
Note that, the release.Labels comes from this release's Secret
https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/storage/driver/secrets.go#L101
And the Secret of this release also has a lable status:

So why not add action.List.Selector for gaining higher performance
https://github.com/helm/helm/blob/3d1bc72827e4edef273fb3d8d8ded2a25fa6f39d/pkg/storage/driver/secrets.go#L85
If helm add more labels(Uninstalled, Superseded, Uninstalling, Deployed, Failed, Pending) like action.List definition, then we are able to apply State filter before download.
What's more, if helm install and helm upgrade could set customer labels to the helm release then users can group/search their releases as they want.
ConfigMap Driver is simillar to Secret Driver.

@mtt0 You're asking a good question. I'll try to add some context here.
First, I would love for this to be more performant. So, I am open to suggestions and ideas on doing that.
Second, in addition to the secrets and configmap mechanism for storage there are the memory and SQL storage backends. Both are in use and both would need to be modified for a new mechanism which should be possible.
Third, the APIs as they are today would not work. Instead of a filter function we would need to pass the details to the driver so it could use them appropriately.
Fourth, the release records would need to be updated to have the metadata needed. This is possible to do in a backwards compatible manner. Backwards compatibility is a major thing. That means that older Helm clients can use the newer records and newer helm clients can work with the older records. Across all the drivers.
I think all of this is possible in Helm v3 but it's a bit of work and no one has signed up to do it. I would likely need to start with a Helm Improvement Proposal. Someone would need to be interested in carrying this to completion on the code side.


MVC5 ReadMe.html icon not found

Right after main "jumbotron" div, missing image at https://github.com/RehanSaeed/ASP.NET-MVC-Boilerplate/raw/master/Images/Technology%20Map.png

Thanks I'll check it out and get it fixed in the next update.


Multi-Row Insert Support In Vtgate V3

This request is to support multi-row insert from VTGate V3
Ex.: insert into test_table(pk, shard_key, msg) values (1, 999, 'abc'), (2, 999, 'xyz')
There are 4 cases

Same shard key value in all rows
Different shard key value having same keyspace id
Different shard key value pointing to same shard range
Different shard key value pointing to different shard range

In addition to these, it has to handle auto increment keys

On column other than shard key
On shard key column
This is called out, as currently insert id returned is integer and not integer array.

As per the discussion with @sougou
insert.go in vtgate/planner will be extended to take care of multi-row insert and single row insert will be treated as special case.
router.go will be changed to handle and validate the multi-row insert as currently it is doing for single row insert

The first two cases for Multi Row Insert have been implemented in this PR https://github.com/youtube/vitess/pull/1843
As per the discussion, to implement Different shard key value pointing to same shard range, we need to make the following changes:

Check if Min and Max keyspace_id is in the range of a single shard or not?
Append all the keyspace_id's as comma separated list eg: INSERT INTO table VALUES ((xxx), (yyy)) /* id: 1, 2 */
Change in bin-log filtered replication to split the query and send it to two different shards based on the keyspace_id ranges.

I'd rephrase the first action item to: Split the insert statement according to the target shards.

This Changes have been merged to master in the following Commits:
VTGate Changes: https://github.com/youtube/vitess/commit/71979f13f228e1829f6dfd1aa36f43ea50ee7d93
Filtered Replication: https://github.com/youtube/vitess/commit/1109ce0fadb7e8553491c0ed7b4775741c37b69f


M1 VSCode can't debugger in arm64 arch

OS: Monterey 12.2
VSCode version:
版本: 1.69.0 (Universal)
提交: 92d25e35d9bf1a6b16f7d0758f25d48ace11e5b9
日期: 2022-07-07T05:28:41.511Z
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: <IP_ADDRESS>-electron.0
OS: Darwin arm64 21.3.0
CodeLLDB version:  v1.7.0
Compiler: Apple clang version 13.1.6 (clang-13<IP_ADDRESS>.5)
Debuggee:  arm64 binary executable program
my situation

I compile my project on terminal in debug mode by cmake. and it can debugger normally in terminal with lldb exe_program
my vscode configuration is workable in my old MacOS with x86_64 arch.
using the same setting with above 2, it tells: the platform is not currently connected

my launch.json contents
{
    // Use IntelliSense to learn about possible attributes.
    // Hover to view descriptions of existing attributes.
    // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
    "version": "0.2.0",
    "configurations": [
        {
            "name": "test",
            "type": "lldb",
            "request": "launch",
            "program": "/Users/cxt/Reposities/Ccode_test/test_arch/build/test",
            "args": [],
            "stopOnEntry": false,
            // "cwd": "${workspaceFolder}",
            // "environment": [],
            "env": {},
            // "externalConsole": false,
            "terminal": "console",
            // "MIMode": "lldb",
            "preLaunchTask": "build MNN on MacOS",
        }
    ]
}

test code as below:
#include <iostream>
int main() {
  std::cout << "hello world, M1 !!!" << std::endl;
  return 0;
}

Can you please attach a verbose log?

the info as belows when i press Fn + F5 to debugger the program

Please set "lldb.verboseLogging":true in extension settings, then attach the log from VSCode's Output/LLDB panel (see linked wiki page for instructions).

Thanks, the log as belows. And i check the liblldb arch by lipo -info /Users/cxt/.vscode/extensions/vadimcn.vscode-lldb-1.7.0/lldb/lib/liblldb.dylib, it shows liblldb.dylib is x86_64 arch. how can i udpate it to arm arch ? By the way, i had try to uninstall lldb and reinstall it in my M1, to ensure lldb extentions is arm64, but it seems not work.
configuration: {
  name: 'test',
  type: 'lldb',
  request: 'launch',
  program: '/Users/cxt/Reposities/Ccode_test/test_arch/build/test',
  args: [],
  stopOnEntry: false,
  env: {},
  terminal: 'console',
  preLaunchTask: 'build MNN on MacOS',
  __configurationTarget: 5,
  relativePathBase: '/Users/cxt/Reposities/Ccode_test/test_arch'
}
liblldb: /Users/cxt/.vscode/extensions/vadimcn.vscode-lldb-1.7.0/lldb/lib/liblldb.dylib
environment: {}
params: { evaluateForHovers: true, commandCompletions: true }
[2022-07-12T06:03:41.682Z DEBUG codelldb] New debug session
INFO(Python) 14:03:41 formatters: Initializing
INFO(Python) 14:03:41 formatters.rust: Initializing
[2022-07-12T06:03:41.852Z DEBUG codelldb::dap_codec] --> {"command":"initialize","arguments":{"clientID":"vscode","clientName":"Visual Studio Code","adapterID":"lldb","pathFormat":"path","linesStartAt1":true,"columnsStartAt1":true,"supportsVariableType":true,"supportsVariablePaging":true,"supportsRunInTerminalRequest":true,"locale":"zh-cn","supportsProgressReporting":true,"supportsInvalidatedEvent":true,"supportsMemoryReferences":true},"type":"request","seq":1}
[2022-07-12T06:03:41.854Z DEBUG codelldb::dap_codec] <-- {"seq":1,"type":"response","request_seq":1,"success":true,"command":"initialize","body":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw"},{"default":false,"filter":"cpp_catch","label":"C++: on catch"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsWriteMemoryRequest":true}}
[2022-07-12T06:03:41.860Z DEBUG codelldb::dap_codec] --> {"command":"launch","arguments":{"name":"test","type":"lldb","request":"launch","program":"/Users/cxt/Reposities/Ccode_test/test_arch/build/test","args":[],"stopOnEntry":false,"env":{},"terminal":"console","preLaunchTask":"build MNN on MacOS","__configurationTarget":5,"relativePathBase":"/Users/cxt/Reposities/Ccode_test/test_arch","_adapterSettings":{"displayFormat":"auto","showDisassembly":"auto","dereferencePointers":true,"suppressMissingSourceFiles":true,"evaluationTimeout":5,"consoleMode":"commands","sourceLanguages":null,"terminalPromptClear":null,"evaluateForHovers":true,"commandCompletions":true,"reproducer":false},"__sessionId":"84a42a8e-e905-480c-ae0a-fd88932c4991"},"type":"request","seq":2}
[2022-07-12T06:03:41.860Z DEBUG codelldb::dap_codec] <-- {"seq":2,"type":"event","event":"capabilities","body":{"capabilities":{"exceptionBreakpointFilters":[{"default":true,"filter":"cpp_throw","label":"C++: on throw"},{"default":false,"filter":"cpp_catch","label":"C++: on catch"}],"supportTerminateDebuggee":true,"supportsCancelRequest":true,"supportsCompletionsRequest":true,"supportsConditionalBreakpoints":true,"supportsConfigurationDoneRequest":true,"supportsDataBreakpoints":true,"supportsDelayedStackTraceLoading":true,"supportsEvaluateForHovers":true,"supportsFunctionBreakpoints":true,"supportsGotoTargetsRequest":true,"supportsHitConditionalBreakpoints":true,"supportsLogPoints":true,"supportsReadMemoryRequest":true,"supportsRestartFrame":true,"supportsSetVariable":true,"supportsWriteMemoryRequest":true}}}
[2022-07-12T06:03:41.860Z DEBUG codelldb::dap_codec] <-- {"seq":3,"type":"event","event":"output","body":{"output":"Console is in 'commands' mode, prefix expressions with '?'.\n"}}
[2022-07-12T06:03:41.892Z DEBUG codelldb::dap_codec] <-- {"seq":4,"type":"event","event":"initialized"}
[2022-07-12T06:03:41.892Z DEBUG codelldb::debug_session] Debug event: 0x7ff61f11b518 Event: broadcaster = 0x7ff62087b840 (lldb.target), type = 0x00000002 (modules-loaded), data = {test}
[2022-07-12T06:03:41.893Z DEBUG codelldb::dap_codec] <-- {"seq":5,"type":"event","event":"module","body":{"module":{"addressRange":"FFFFFFFFFFFFFFFF","id":"FFFFFFFFFFFFFFFF","name":"test","path":"/Users/cxt/Reposities/Ccode_test/test_arch/build/test","symbolFilePath":"/Users/cxt/Reposities/Ccode_test/test_arch/build/test","symbolStatus":"Symbols loaded."},"reason":"new"}}
[2022-07-12T06:03:41.895Z DEBUG codelldb::dap_codec] --> {"command":"setFunctionBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":3}
[2022-07-12T06:03:41.895Z DEBUG codelldb::dap_codec] <-- {"seq":6,"type":"response","request_seq":3,"success":true,"command":"setFunctionBreakpoints","body":{"breakpoints":[]}}
[2022-07-12T06:03:41.900Z DEBUG codelldb::dap_codec] --> {"command":"setDataBreakpoints","arguments":{"breakpoints":[]},"type":"request","seq":4}
[2022-07-12T06:03:41.900Z DEBUG codelldb::dap_codec] <-- {"seq":7,"type":"response","request_seq":4,"success":true,"command":"setDataBreakpoints","body":{"breakpoints":[]}}
[2022-07-12T06:03:41.905Z DEBUG codelldb::dap_codec] --> {"command":"setExceptionBreakpoints","arguments":{"filters":["cpp_throw"]},"type":"request","seq":5}
[2022-07-12T06:03:41.906Z DEBUG codelldb::dap_codec] <-- {"seq":8,"type":"response","request_seq":5,"success":true,"command":"setExceptionBreakpoints"}
[2022-07-12T06:03:41.906Z DEBUG codelldb::debug_session] Debug event: 0x7ff61e7a8608 Event: broadcaster = 0x7ff62087b840 (lldb.target), type = 0x00000001 (breakpoint-changed), data = {}
[2022-07-12T06:03:41.907Z DEBUG codelldb::dap_codec] --> {"command":"configurationDone","type":"request","seq":6}
[2022-07-12T06:03:41.908Z DEBUG codelldb::dap_codec] <-- {"seq":9,"type":"event","event":"output","body":{"output":"Launching: /Users/cxt/Reposities/Ccode_test/test_arch/build/test\n"}}
[2022-07-12T06:03:41.908Z ERROR codelldb::debug_session] the platform is not currently connected
[2022-07-12T06:03:41.908Z DEBUG codelldb::dap_codec] <-- {"seq":10,"type":"response","request_seq":2,"success":false,"command":"","message":"the platform is not currently connected","show_user":true}
[2022-07-12T06:03:41.908Z DEBUG codelldb::dap_codec] <-- {"seq":11,"type":"response","request_seq":6,"success":true,"command":"configurationDone"}
[2022-07-12T06:03:41.921Z DEBUG codelldb::dap_codec] --> {"command":"disconnect","arguments":{"restart":false},"type":"request","seq":7}
[2022-07-12T06:03:41.922Z DEBUG codelldb::dap_codec] <-- {"seq":12,"type":"response","request_seq":7,"success":true,"command":"disconnect"}
[2022-07-12T06:03:42.431Z DEBUG codelldb::dap_session] Client has disconnected
[2022-07-12T06:03:42.431Z DEBUG codelldb::debug_session] End of the requests stream
[2022-07-12T06:03:42.431Z DEBUG codelldb::debug_session] DebugSession::drop()
[2022-07-12T06:03:42.432Z DEBUG codelldb] End of debug session
[2022-07-12T06:03:42.442Z DEBUG codelldb] Exiting
Debug adapter exit code=0, signal=null.

info in lldb extention
I check the lldb directory in extentions which path is ~/.vscode/extensions/vadimcn.vscode-lldb-1.7.0/lldb, it has bin and lib dir. And files in bin as belows:
-rwxr-xr-x  1 cxt  staff   4.5M  3 14 10:08 debugserver
-rwxr-xr-x  1 cxt  staff   251K  3 14 10:08 lldb
-rwxr-xr-x  1 cxt  staff    90K  3 14 10:08 lldb-argdumper

files in lib as belows:
-rwxr-xr-x    1 cxt  staff    78M  3 14 10:08 liblldb.dylib
-rwxr-xr-x    1 cxt  staff    10M  3 14 10:08 libpython39.dylib
drwxr-xr-x    4 cxt  staff   128B  3 14 10:08 lldb-python
drwxr-xr-x  200 cxt  staff   6.3K  3 23 15:57 python3.9

info in System
there is lldb in /usr/bin/lldb, launch debugger in terminal by lldb test is work.

i remove the old lldb extention dir .vscode/extensions/vadimcn.vscode-lldb-1.7.0 and reinstall the CodeLLDB extention， check the lldb arch is arm64, and it can debugger normally. thanks for you notices.

In order to debug on arm64 Mac, you'll need to have downloaded the arm64 version of CodeLLDB platform package (also for debugging x64 code).  The extension tries to make sure this happens automatically, even if one uses x64 VSCode.
However it looks like you've ended up with x64 CodeLLDB.  Any idea how that happened?   Did you install from VSCode Marketplace or manually from github releases?

i do this by below steps:

Copying the whole system in old x86 mac to the M1 by migration assistant.
delete the old vscode and install the newer vscode which supprot M1.(seems like the old extentions(x86) still existed.)
due to can't debugger, uninstall CodeLLDB and re-iinstall it. but it seems like haven't update lldb bin/lib with arm64, still use the x86 bin/lib.

Copying the whole system in old x86 mac to the M1 by migration assistant.

Ah, okay, that would explain it.

uninstall CodeLLDB and re-iinstall it. but it seems like haven't update lldb bin/lib with arm64, still use the x86 bin/lib.

This one is weird, perhaps VSCode caches the extension directory even if you uninstall it?


Link on /community/ page to 'mailing list' results in error...

The link at https://www.opencontainers.org/community to the first (dev) mailing list is broken:
https://groups.google.com/a/opencontainers.org/forum/#!forum/dev is the actual link, but it should be:
https://groups.google.com/a/opencontainers.org/forum/#!forum/dev
This results in a, "The group name is invalid.", error at Google.

Fixed now, thanks for the bug report :)


AlertDialogAction should not override className of child

<AlertDialogAction asChild>
  <Button
    disabled={ctx.alertMutation.isLoading}
    className="mr-auto"
    // Specifying asChild and using this variant does not appear to be
    // working for some reason...
    onClick={(e) => {
      ctx.alertMutation.mutate()
      // Prevent closing dialog until mutation finishes
      e.preventDefault()
    }}
    variant={'destructive'}>
    {ctx.alertMutation.isLoading && (
      <Loader2 className="mr-2 h-4 w-4 animate-spin" />
    )}
    {ctx.alertDialogState.confirmText ?? 'Confirm'}
  </Button>
</AlertDialogAction>

The above code won't work, button will show up as default variant even though it is explicitly specified as destructive.
I modified AlertDialogAction to be the following. It works but would love some feedback on whether this is expected behavior.
const AlertDialogAction = React.forwardRef<
  React.ElementRef<typeof AlertDialogPrimitive.Action>,
  React.ComponentPropsWithoutRef<typeof AlertDialogPrimitive.Action>
>(({className, ...props}, ref) => (
  <AlertDialogPrimitive.Action
    ref={ref}
    // When rendering asChild, we don't want to apply buttonVariants
    // because that would override child variants
    className={cn(!props.asChild && buttonVariants(), className)}
    {...props}
  />
))

I have same problem https://github.com/shadcn/ui/issues/494

By the way, to prevent the window from closing before the asynchronous operations are finished, you can declare a state inside the component with the window and control the window based on this state.
To learn more, read the API here https://www.radix-ui.com/docs/primitives/components/alert-dialog#root

This issue has been automatically closed because it received no activity for a while. If you think it was closed by accident, please leave a comment. Thank you.

I can confirm that the issue still exists. Alert's Action overrides styles and properties explicitly set to a child Button.


Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/network-media-library-master/network-media-library.php on line 355

I installed the plugin to share the gallery from the main site to all the sites in the network.
Setting the variable site_id to 1, the secondary site with id 2 works correctly, while the dashboard of the main site displays the following error:
Notice: Trying to get property 'post_type' of non-object in /var/www/html/wp-content/plugins/network-media-library-master/network-media-library.php on line 355
I consulted the issues opened by other users, but no solution worked for me.

Although I'm commenting 30 days after you, I'm seeing the same issue.  We have a main site with subfolder sites for different languages.
Same exact error.

Also seeing this. No resolution yet.

Same issue here. needed to maka a clone/local copy in the project and change this part in the function, https://github.com/humanmade/network-media-library/blob/master/network-media-library.php#L357-L365
with the code below. Then it works :)
if ( 'edit_post' === $cap ) {
	$content = get_post( $args[0] );
	// Start: Fix, since $content can be null.
	if( ! $content instanceof \WP_Post ) {
		return $caps;
	}
	// End: Fix, since $content can be null.
	if ( 'attachment' !== $content->post_type ) {
		return $caps;
	}

	// Substitute edit_post because the attachment exists only on the network media site.
	$cap = get_post_type_object( $content->post_type )->cap->create_posts;
}


[EMM-1480] UI text improvements

Reference: https://wso2.org/jira/browse/EMM-1480

This is already fixed.


VS code accessing reminder data on Mac OS Sonoma

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

VS Code Version:
OS Version:

Steps to Reproduce:
Running vs code on Sonomo 14.0 keeps generating security requests to access, "from other apps", then "data from iCloud" and finally data from "reminder". Why does vs code need to access reminders? Anyway I can see what it's trying to access and why?

run vs code on Mac
get this

Can you close all running instances and launch with code --user-data-dir /tmp/vscode-test --disable-extensions, confirm if the permission dialog shows up.

@deepak1556 doesn't come up, so one of the extensions is causing it? Any quick way to see what each extension is doing without disabling each one and going through?

You can use our extension bisect utility https://code.visualstudio.com/blogs/2021/02/16/extension-bisect#_welcome-extension-bisect

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.
Happy Coding!


Removes unwanted tradfri battery sensor

Breaking Change:
This removes the battery sensor that was created for the signal repeater.
The sensor would never have a state, and after some inspection, it does not look like that device present any valuable metrics.
Description:
Adds a condition so signal repeaters are not added as battery sensors.
Requires 6.4.0 of pytradfri, keeping this as a draft PR until that is released.
Version bump of the pyradfri lib will happen in #28180 if that is not accepted I will update this PR with it before removing the draft status.
Related issue (if applicable): fixes #27923
Checklist:

[x] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass
[x] There is no commented out code in this PR.
[x] I have followed the development checklist

Filtering like this has worked before so it looks OK


Changelog generation inserts entries for new release under the heading of the last release (so it reads: 1.3.0 -> 1.4.0)

Affected Packages
In this monorepo, only one releaseable package is present: https://github.com/CrowdStrike/ember-headless-table/blob/main/ember-headless-table/
Problem
When the changelog is updated, the "new entry" content is immediately under the heading of the previous release.
For example:

https://github.com/CrowdStrike/ember-headless-table/pull/109 (automated PR opened by Changeset)

minor and patches appear twice in the PR description
1.4.0 is inserted under 1.3.0:

Proposed solution
prepend to the top of the file instead of appending under the most recent version.
I have (just now, as I write this), noticed that other projects have the project name as the first heading:

https://github.com/statelyai/xstate/blob/main/packages/core/CHANGELOG.md
https://github.com/pnpm/pnpm/blob/main/pnpm/CHANGELOG.md

So maybe the Changelog generation could detect if the package name is missing or not? or see if the top heading matches a version?
It seems that changelog insertion is always under the top-most heading (so I think I have a work-around for now (adding the package name to the top of the changelog))

prepend to the top of the file instead of appending under the most recent version.

The problem with this is that then we'd insert the new content above the "title".

So maybe the Changelog generation could detect if the package name is missing or not? or see if the top heading matches a version?

This sounds like a plausible solution.

It seems that changelog insertion is always under the top-most heading (so I think I have a work-around for now (adding the package name to the top of the changelog))

Yeah, this is a good solution to the problem.


I found a more serious problem

UICollectionView 900 pictures when the sliding speed will cause UICollectionView reuse problems, leading to the use of the entire project to YLImageView controls are problems currently found in high-speed sliding reuse problem occurs, exit the view controller, dealloc this function has not been called

    dispatch_async ( dispatch_get_global_queue ( DISPATCH_QUEUE_PRIORITY_DEFAULT , 0 ), ^{
        Byte *imageBuffer = (Byte*)malloc([set  defaultRepresentation].size);
            NSUInteger bufferSize = [[set  defaultRepresentation] getBytes:imageBuffer fromOffset:0.0 length:[set  defaultRepresentation].size error:nil];
            NSData *data = [NSData dataWithBytesNoCopy:imageBuffer length:bufferSize freeWhenDone:YES];
        dispatch_async(dispatch_get_main_queue(), ^{
                cell.imageView.image =[YLGIFImage imageWithData:data];

});
});