Elysia schema creates malformed swagger schema

Ola,
I want to make a nice swagger schema view of my api. While the @elysia/swagger plugin gets there half of the way, it seems to struggle with schemas. I've dug through all the examples, but none seem to mix params and responses together, or the examples are outdated. (Like the readme of this repo). I've tried different ways of creating layouts for the schemas, but non of them seem to work properly.

I've got an Elysia route set up like the following:
import { Elysia, t } from "elysia"
import { song } from "../../interfaces";
import { db } from "../..";

export const getSkip = (app: Elysia) => app
  .get("/skip/:id", ({ params }) => {
    return db.query("SELECT user_id, start, end FROM skip WHERE `song_id`=$songId").all({
      $songId: params.id
    }) as song[];
  }, {
    params: t.Object({
      id: t.Number({
        description: "The ID of the song you want to fetch skips from."
      })
    }, {
      description: "Request body to get all skips belonging to a song."
    }),
    response: {
      200: t.Array(
        t.Object({
          user_id: t.Number({
            description: "The Soundcloud id of the uploader.",
            minimum: 0
          }),
          start: t.Number({
            description: "Timestamp where the song skip starts.",
            minimum: 0
          }),
          end: t.Number({
            description: "Timestamp where the song skip ends.",
            minimum: 0
          })
        }), {
        description: "Returns an array of skip items belonging to the song id."
      }
      ),
    },
    type: ["arrayBuffer", "application/json"],
    description: "Gets all skips of a song.",
  })

Then I run the route like this:
new Elysia()
   .use(swagger(swaggerDocs)) //Basic dcoumentation options
    .group("/skip", app => app
      .use(getSkip) //The route from above
    )
   .listen(port, () => console.log(`Listening on port ${port}...`));

My swagger starts up successfully, but some functionality is broken. I can not inspect the schema, and can not log into my oauth.

I threw the generated swagger schema into insomnia to inspect any errors, it came out with the following:
❌ Elysia generated
{
  "openapi": "3.0.3",
  "components": {
    "schemas": {}
  },
  "security": [
    {
      "ApiKeyAuth": [] ❌ <--- Api "security" values must match a scheme defined in the "components.securitySchemes" object
    }
  ],
  "servers": [
    {
      "description": "Local host",
      "url": "http://localhost:3001"
    }
  ],
  "info": {
    "title": "Skipcloud API",
    "description": "API used to upload sections of soundcloud songs to skip over.",
    "version": "0.0.1",
    "contact": {
      "name": "@hang_yourself on discord"
    }
  },
  "paths": {
    "/skip/{id}": {
      "get": {
        "parameters": [
          {
            ❌ <--- "0" property must have required property "schema".
            "description": "The ID of the song you want to fetch skips from.",
            "type": "number",
            "in": "path",
            "name": "id",
            "required": true
          }
        ],
        "responses": {
          "200": {
            "description": "Returns an array of skip items belonging to the song id.",
            "items": { ❌ <--- Property "items" is not expected to be here
              "type": "object",
              "properties": {
                "user_id": {
                  "description": "The Soundcloud id of the uploader.",
                  "minimum": 0,
                  "type": "number"
                },
                "start": {
                  "description": "Timestamp where the song skip starts.",
                  "minimum": 0,
                  "type": "number"
                },
                "end": {
                  "description": "Timestamp where the song skip ends.",
                  "minimum": 0,
                  "type": "number"
                }
              },
              "required": [
                "user_id",
                "start",
                "end"
              ]
            },
            "content": {
              "arrayBuffer": {
                "schema": {
                  "type": "array"
                }
              },
              "application/json": {
                "schema": {
                  "type": "array"
                }
              }
            }
          }
        },
        "operationId": "getSkipById"
      }
    }
  }
}

Fixes
✅ Error 1
I have an API key in my header, I have defined my swagger schema as such:
import { ElysiaSwaggerConfig } from "@elysiajs/swagger/src/types";

export default {
  documentation: {
    components: {
      securitySchemes: {
        ApiKeyAuth: {
          type: "apiKey",
          in: "header",
          name: "Authorization",
          description: "Key used to log into the soundcloud API."
        }
      },
     //... etc
   }
} as ElysiaSwaggerConfig;

This however does not show up in the schema. The schema stays empty.
✅ Error 2
The first error seems to be caused by not putting "type: number" in a schema object:
"parameters": [
  {
    "description": "The ID of the song you want to fetch skips from.",
    "schema": {
       "type": "number"
    },
    "in": "path",
    "name": "id",
    "required": true
  }
],

✅ Error 3
This error seems to be caused by the response schema directly being in the 200 object, instead of inside the content objects.

"responses": {
  "200": {
    "description": "Returns an array of skip items belonging to the song id.",
    "content": {
      "arrayBuffer": {
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "user_id": {
                "description": "The Soundcloud id of the uploader.",
                "minimum": 0,
                "type": "number"
              },
              "start": {
                "description": "Timestamp where the song skip starts.",
                "minimum": 0,
                "type": "number"
              },
              "end": {
                "description": "Timestamp where the song skip ends.",
                "minimum": 0,
                "type": "number"
              }
            },
            "required": [
              "user_id",
              "start",
              "end"
            ]
          }
        }
      },
      "application/json": {
        "schema": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "user_id": {
                "description": "The Soundcloud id of the uploader.",
                "minimum": 0,
                "type": "number"
              },
              "start": {
                "description": "Timestamp where the song skip starts.",
                "minimum": 0,
                "type": "number"
              },
              "end": {
                "description": "Timestamp where the song skip ends.",
                "minimum": 0,
                "type": "number"
              }
            }
          }
        }
      }
    }
  }
}

With these manual fixes, I end up with the schema view that I want:

I hope this post clearly outlines the issues I am facing with the swagger plugin. If there is any context missing, please let me know.
 Since there are no fixes in place yet, how did you manage to manually correct the /swagger/json file? Which seems to be dynamically generated and not a static file.
Thanks in advance!

Hello @SwatDoge,
I opened a PR that I think it address  part of your problem: #14

The issue is still there and it currently stops us from switching to elysia as we have some clients that consume the openapi schema.
const app = new Elysia().post(
    '/test',
    ({ body }) => {
        return body.map(String);
    },
    {
        type: 'json',
        body: t.Array(t.Number()),
        response: t.Array(t.String()),
    },
);

{
    "/test": {
        "post": {
            "parameters": [],
            "responses": {
                "200": {
                    "items": {
                        "type": "string"
                    },
                    "content": {
                        "application/json": {
                            "schema": {
                                "type": "array"
                            }
                        }
                    }
                }
            },
            "operationId": "postTest",
            "requestBody": {
                "content": {
                    "application/json": {
                        "schema": {
                            "type": "array",
                            "items": {
                                "type": "number"
                            }
                        }
                    }
                }
            }
        }
    }
}

@david-plugge you need to declare the response in case of 200.
eg.:
app.get("/api", () => {
  res.send("Hello World!");
},{
  response: {
    200: {
      id: t.Number({
        description: "Unique identifier.",
        default: 666,
      }),
      name: t.String({
        description: "Name of mercenary.",
        default: "John Wick",
      }),
    },
  },
  detail: {
    summary: `Gets details of all available mercenaries.`,
    tags: ["Mercenaries"],
  },
});

@igrschmidt that results in the same incorrect schema

@david-plugge I'm sorry, I gave the wrong example. We need to wrap the schema properties inside the t.Object({})
response: {
  200: t.Object({
    id: t.Number({
      description: "Unique identifier.",
      default: 666,
    }),
    name: t.String({
      description: "Name of mercenary.",
      default: "John Wick",
    }),
  }),
}

This should work now

@igrschmidt that works unless you want to return an array:
response: {
  200: t.Array(
    t.Object({
      id: t.Number({
        description: "Unique identifier.",
        default: 666,
      }),
      name: t.String({
        description: "Name of mercenary.",
        default: "John Wick",
      }),
    }),
  ),
}

@david-plugge indeed! Perhaps open an issue with the specifics?

I created a minimal reproduction so you can check it out. I´d create a PR myself but i´m not familiar with the codebase. But i can take a look if noone has the time to do it

I created a minimal reproduction so you can check it out yourself. I´d create a PR myself to fix the issue, but i don´t know where to find the part that generates the actual schema

Duplicated by: https://github.com/elysiajs/elysia-swagger/issues/28 & https://github.com/elysiajs/elysia-swagger/issues/39
@SaltyAom can this bug please be considered in the next release. The issues tackles a core use case of swagger, there are multiple issues opened and a pull request to fix it is available.

@SaltyAom Please consider this... Arrays are crucial!

@BE-CH, @david-plugge, @KilianB I put together a workaround until the pull request is merged (via https://github.com/elysiajs/elysia-swagger/issues/39)
For someone looking to return an array and to control the response description as well as the other parts of the schema (like marking query parameters as not required), here is an example of my approach:
import { Elysia, t } from 'elysia';

const ItemType = {
  name: t.String(),
};

const ItemResponseType = t.Object(ItemType , { title: 'Item' });
ItemResponseType.description = 'Retrieve a single item';

const ItemsResponseType = t.Array(
  t.Object(ItemType, {
    title: 'Item',
  }), {
  title: 'Items',
});
ItemsResponseType.description = 'Retrieve list of items';

const ItemsQuerySchema = t.Object({
  name: t.String(),
});
ItemsQuerySchema.required = [];

const sampleItem = {
  name: 'My item',
};

export const routes = new Elysia()
  .model({
    itemResponseType: ItemResponseType,
    itemsResponseType: ItemsResponseType
  })
  .get('/items', () => [sampleItem], {
    type: 'application/json',
    response: 'itemsResponseType',
    query: ItemsQuerySchema,
  })
  .get('/items/:id', () => sampleItem, {
    type: 'application/json',
    response: 'itemResponseType'
  })


.lgtm.yml: remove GCC 6 override

This override of the compiler to always use GCC 6 seems to have been copied from an example in the LGTM documentation that was not intended to be used literally. We'll update that example before our next release.
I've tested that the build still works at https://lgtm.com/logs/70c44efba7f75f0134be08b6f7197826a4ba02d6/lang:cpp.

@jbj Thanks! Great to see you guys are on top of all these details!


Plan the Collection Web Dashboard

Per https://github.com/googlefonts/fontbakery/blob/34af3080054d3d332858d65c42486cb5eb2eabc3/BRIEF.md#33-web-dashboard in order to plan the Collection Dashboard, @felipesanches will...

[ ] Write a document proposing the technical approach to testing fonts in each place, and storing the results of the tests from each place
[ ] Propose a new UI for the fontbakery.appspot.com checker

Thanks, @davelab6 !

This is a list of 104 URLs of git repos with font projects that I extracted from the description files on the google/fonts repo. @davelab6, which of these would you like to monitor in a dashboard?
Yes, it could be them all, but let's say, is there a selection of something like 10 of these that you'd like to see in a first prototype of the dashboard?
I'll probably fork them into my own github account so that I can test travis scripts on my forks as if I were the designers.
github.com/10four/Bhavuka
github.com/adobe-fonts/adobe-blank
github.com/adobe/source-serif-pro
github.com/alefalefalef/Varela-Round-Hebrew/
github.com/alexeiva/poiretone
github.com/andrestelex/sarala
github.com/andrew-paglinawan/QuicksandFamily
github.com/anexasajoop/cambay
github.com/antonxheight/Ranga
github.com/appajid/dhurjati
github.com/appajid/gidugu
github.com/appajid/gurajada
github.com/appajid/lakkireddy
github.com/appajid/mallanna
github.com/appajid/mandali
github.com/appajid/nats
github.com/appajid/ntr
github.com/appajid/peddana
github.com/appajid/ponnala
github.com/appajid/ramabhadra
github.com/appajid/ramaraja
github.com/appajid/raviprakash
github.com/appajid/sreekrushnadevaraya
github.com/appajid/suranna
github.com/appajid/suravaram
github.com/appajid/tenaliramakrishna
github.com/appajid/timmana
github.com/cadsondemak/chonburi
github.com/cadsondemak/itim
github.com/cadsondemak/kanit
github.com/cadsondemak/sriracha
github.com/CaroGiovagnoli/sura
github.com/CatharsisFonts/Cormorant
github.com/christiannaths/Redacted-Font
github.com/clauseggers/Inknut-Antiqua
github.com/cyrealtype/Adamina
github.com/cyrealtype/Alike
github.com/cyrealtype/Federant
github.com/cyrealtype/Sumana
github.com/DunwichType/RhodiumLibre
github.com/EbenSorkin/Asar
github.com/EbenSorkin/Atomic-Age
github.com/EbenSorkin/Basic
github.com/EbenSorkin/Dekko
github.com/EbenSorkin/Fruktur
github.com/EbenSorkin/Kavoon
github.com/EbenSorkin/Merriweather-Sans
github.com/EbenSorkin/Varta
github.com/elms-/Dinah
github.com/erinmclaughlin/Khula
github.com/erinmclaughlin/Yantramanav
github.com/etunni/Amita
github.com/etunni/Arya/
github.com/etunni/glegoo
github.com/etunni/kurale
github.com/figs-lab/datalegreya
github.com/girish-dalvi/Baloo
github.com/girish-dalvi/Ek-Mukta
github.com/girish-dalvi/Modak
github.com/googlefonts/Homenaje
github.com/googlefonts/LatoGFVersion
github.com/impallari/Cabin
github.com/impallari/Raleway/
github.com/itfoundry/hind-colombo
github.com/itfoundry/hind-guntur
github.com/itfoundry/hind-jalandhar
github.com/itfoundry/hind-kochi
github.com/itfoundry/hind-madurai
github.com/itfoundry/hind-mysuru
github.com/itfoundry/hind-siliguri
github.com/itfoundry/hind-vadodara
github.com/itfoundry/kalam
github.com/itfoundry/khand
github.com/itfoundry/poppins
github.com/itfoundry/rozhaone
github.com/itfoundry/tillana
github.com/juandelperal/sahitya
github.com/mooniak/abhaya-libre-font
github.com/motaitalic/vesper-libre
github.com/mozilla/Fira
github.com/Neelakash/sitara
github.com/Omnibus-Type
github.com/Omnibus-Type/Jaldi
github.com/Omnibus-Type/PragatiNarrow
github.com/ossobuffo/jura
github.com/rosettatype/Eczar
github.com/s-a/digital-numbers-font
github.com/silnrsi/font-padauk
github.com/simoncozens/silson
github.com/solmatas/Kadwa
github.com/TiroTypeworks/Slabo
github.com/typeoff/biryani
github.com/typeoff/martel
github.com/typeoff/martel_sans
github.com/VanillaandCream/Catamaran
github.com/VanillaandCream/Palanquin
github.com/vernnobile/anaheimFont
github.com/vernnobile/CodaFont
github.com/vernnobile/Cutive
github.com/vernnobile/CutiveFont
github.com/vernnobile/CutiveFont/
github.com/vernnobile/DhyanaFont
github.com/vernnobile/mondaFont
github.com/vernnobile/MondaFont
github.com/vernnobile/TrocchiFont
github.com/weiweihuanghuang/Work-Sans

Also... for now we're only going to be able to deal with repos that host TTF binaries. Picking one at random, like https://github.com/appajid/ntr I can see that it only stores UFOs, so that's not going to be supported.
I can look at each of these one by one and see which ones host TTF binaries. I'm only asking because perhaps you already know the answer by heart.


Failing to compile Showcase app

Describe the problem
We can't build the Showcase app with Sharing feature. A Photo exception is triggered :
Exception: IL2CPP error for method 'System.Void POpusCodec.OpusDecoderAsync`1::DataCallbackStatic(System.IntPtr,System.IntPtr,System.Int32,System.Boolean)' in C:\Users\abirchme\Documents\Unity\azure-remote-rendering\Unity\Showcase\App\Assets\Photon\PhotonVoice\PhotonVoiceApi\Core\POpusCodec\OpusDecoder.cs:155
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.

Any suggestion about what might be the issue would be helpfull.
Provide additional information
All credentials are setup through the arr.account.xml located in the Assets/StreamingAssets.
This is the only change made to the project (except the import of the package through the Script)
Additional context
Unity 2020.3.42f
Photo Voice 2 2.51
PUN 2 - Free 2.41

Hi  @Merichbier.  I am able to reproduce your issue. It seems to be related to the latest Photon version (2.51). The Showcase app was tested and works fine with the previous version (2.50) However since it's not possible to download older assets in Unity I'm looking now into finding a solution.
Just a couple of questions to help diagnose the problem better:

Which visual studio version are you using?
Are you using the latest ARR release (1.3.34)?

Hi @mariambecet,
Thanks for the response ! I indeed tried this morning to downgrade everything to be aligned with your state (Unity 2020.3.13f and Photon Voice 2 2.50) but hit the issue that I couldn't find Photon Voice 2 2.50... So sad I'm sure It would have worked !
Regarding your questions :

Currently using VS 17.4.4. But I couldn't build the project from Unity. The issue arises there. Here is the complete error with stacktrace in the hope that this help :

Exception: IL2CPP error for method 'System.Void POpusCodec.OpusDecoderAsync`1::DataCallbackStatic(System.IntPtr,System.IntPtr,System.Int32,System.Boolean)' in C:\Users\abirchme\Documents\Unity\azure-remote-rendering\Unity\Showcase\App\Assets\Photon\PhotonVoice\PhotonVoiceApi\Core\POpusCodec\OpusDecoder.cs:154
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
  at Mono.Collections.Generic.Collection`1.get_Item(Int32 index)
  at Unity.Cecil.Awesome.TypeResolver.Resolve(TypeReference typeReference, Boolean resolveGenericParameters)
  at Unity.Cecil.Awesome.TypeResolver.Resolve(TypeReference typeReference, Boolean resolveGenericParameters)
  at Unity.IL2CPP.Marshaling.BodyWriters.NativeToManaged.ReversePInvokeMethodBodyWriter.GetInteropMethod(MethodReference method)
  at Unity.IL2CPP.Marshaling.BodyWriters.NativeToManaged.ReversePInvokeMethodBodyWriter.Create(MinimalContext context, MethodReference managedMethod)
  at Unity.IL2CPP.MethodWriter.WriteReversePInvokeMethodDefinition(IGeneratedMethodCodeWriter writer, MethodReference method)
  at Unity.IL2CPP.SourceWriter.WriteMarshalingDefinitions(SourceWritingContext context, IGeneratedMethodCodeWriter writer, TypeReference type)
  at Unity.IL2CPP.SourceWriters.SourceWriterBase`1.WriteItem(StreamWorkItemData`2 data)
  at Unity.IL2CPP.Contexts.Scheduling.Streams.FileLevelParallelStreamManager`2.WorkerWriteItemsToFile(WorkItemData`2 data)
  at Unity.IL2CPP.Contexts.Scheduling.PhaseWorkScheduler`1.WorkerLoop(Object data)
UnityEditorInternal.Runner.RunProgram (UnityEditor.Utils.Program p, System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditorInternal.Runner.RunManagedProgram (System.String exe, System.String args, System.String workingDirectory, UnityEditor.Scripting.Compilers.CompilerOutputParserBase parser, System.Action`1[T] setupStartInfo) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditorInternal.IL2CPPBuilder.RunIl2CppWithArguments (System.Collections.Generic.List`1[T] arguments, System.Action`1[T] setupStartInfo) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditorInternal.IL2CPPBuilder.ConvertPlayerDlltoCpp (UnityEditor.Il2Cpp.Il2CppBuildPipelineData data) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditorInternal.IL2CPPBuilder.Run () (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditorInternal.IL2CPPUtils.RunIl2Cpp (System.String tempFolder, System.String stagingAreaData, UnityEditorInternal.IIl2CppPlatformProvider platformProvider, System.Action`1[T] modifyOutputBeforeCompile, UnityEditor.RuntimeClassRegistry runtimeClassRegistry) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
PostProcessWinRT.RunIL2CPPForProjectBuild () (at C:/build/output/unity/unity/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1910)
PostProcessWinRT.RunIL2CPP () (at C:/build/output/unity/unity/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:1879)
PostProcessWinRT.Process () (at C:/build/output/unity/unity/PlatformDependent/MetroPlayer/Extensions/Managed/PostProcessWinRT.cs:211)
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/build/output/unity/unity/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:86)
Rethrow as BuildFailedException: Exception of type 'UnityEditor.Build.BuildFailedException' was thrown.
UnityEditor.UWP.BuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args) (at C:/build/output/unity/unity/PlatformDependent/MetroPlayer/Extensions/Managed/ExtensionModule.cs:90)
UnityEditor.Modules.DefaultBuildPostprocessor.PostProcess (UnityEditor.Modules.BuildPostProcessArgs args, UnityEditor.BuildProperties& outProperties) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditor.PostprocessBuildPlayer.Postprocess (UnityEditor.BuildTargetGroup targetGroup, UnityEditor.BuildTarget target, System.String installPath, System.String companyName, System.String productName, System.Int32 width, System.Int32 height, UnityEditor.BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.Build.Reporting.BuildReport report) (at <2cd7f07c7b884ea9bf02386eb91a464c>:0)
UnityEditor.DefaultBuildMethods:BuildPlayer(BuildPlayerOptions)
BuildGuard:OnBuildClicked(BuildPlayerOptions) (at Assets/App/Utilities/Editor/BuildGuard.cs:41)
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr, Boolean&)

Yes using the latest ARR release (freshly downloaded the repo at the beginning of the week) 1.3.34

Hi @Merichbier,
Sorry for the delay. There is unfortunately nothing we can do on the ARR side to fix it. I have tried several workarounds, and the one I suggest is to just comment out the functions that are causing the compilation errors in Photon. From what I can tell, these functions are only needed for Webgl platform and commenting them out didn't affect the app on the Hololens or Editor when I tested it.
The lines to comment out are:
In \Showcase\App\Assets\Photon\PhotonVoice\PhotonVoiceApi\Core\POpusCodec\OpusDecoder.cs
comment out the MonoPInvokeAttribute in line 152 & the function implementation (155 to 158)
//[AOT.MonoPInvokeCallbackAttribute(typeof(Action<IntPtr, IntPtr, int, bool>))]
static public void DataCallbackStatic(IntPtr handle, IntPtr p, int count, bool endOfStream)
{
	//if (handles.TryGetValue(handle, out var obj))
	//{
	//    obj.dataCallback(p, count, endOfStream);
	//}
}

In \Showcase\App\Assets\Photon\PhotonVoice\PhotonVoiceApi\Core\POpusCodec\OpusEncoder.cs
comment out the MonoPInvokeAttribute in line 255 & the function implementation (line 258 to 261)
//[AOT.MonoPInvokeCallbackAttribute(typeof(Action<IntPtr, IntPtr, int>))]
static public void DataCallbackStatic(IntPtr handle, IntPtr p, int count)
{
	//if (handles.TryGetValue(handle, out var obj))
	//{
	//    obj.dataCallback(p, count);
	//}
}

Hopefully this compilation issue will be mitigated in future Photon updates, we will also try to reach out to Photon and report it.

Hi @mariambecet,
First thanks a lot for the time you took into investigating this ! I was able to build and deploy the app with your solution. I still need to test that the sharing feature works (will be this week) but I'm confident that everything will be alright :)
I guess we can close this issue as, like you said, this is an issue on Photon side.
Thanks again


service update of array/map types requires repeating the entire set

Issue for #23773
Updating array and mapping types by starting with an empty collection is fine when there are a small number of items, but it becomes a large burden for users if they have many ports, labels, or mounts, and would like to add or remove a single one. The case of adding or removing a single item should be a lot more common than removing everything.
We should design the UX around the more common case.

Notes from a synchronous discussions:
Taking the example on labels, but also is the case for ports, mounts, envs:
We agreed on having service update --label behave as it does today that is replace the entire array/map and to have the explicit flags --label-add and --label-rm in addition that respectively add and remove a label.
Adding existing labels would replace their value, behaving as a set verb.
Args are a somewhat special case in that we don't provide flags to add and remove them, only replacing the entire set: which is consistent with the behavior for other properties.
As a side effect, this decision unblocks docker update --label: https://github.com/docker/docker/pull/18958

For envs, it seems like we would need to add logic that parses the =. Thankfully there is a POSIX standard on how to process that. cc @stevvooe

We already have code in docker which parses envs, it's just a splitN(env, "=", 2).
I'm glad we could agree on --label-add and --label-rm. With these options it seems unnecessary to include --label on update as well. These options wouldn't work together, and in generally aren't really useful.
As long as there is a way to add flags and remove all flags do we actually need a reset as well?

For 1.12.0 let's not implement reset.
For later, we can do either a nice hack --label '' or a --label-reset (or a better verb)

We already have code in docker which parses envs, it's just a splitN(env, "=", 2).

@dnephin For the most part, don't even parse env parameters. Just pass them straight through. Let the OS sort it out.

@stevvooe unfortunately this is not the case for docker. Env vars are always parsed:

--env without a value gets the value from the client shell, so it needs to be parsed on the client to see if it has a value or not (runconfig/opts/opts.go:ValidateEnv)
in service update to remove an environment variable a user shouldn't have to know the value of it.  They should be able to remove it from just the key, which requires parsing them.


evaluator Add Subtract Formula has 4 arguments

when I render preset shape circularArrow to svg, raise exception :
+- xH 0 dxB 0  Evaluator.() takes 4 positional arguments but 5 were given
in formula.py and ecma-376 document(<IP_ADDRESS> gd (Shape Guide))， Add Subtract Formula have 3 arguments, include Evaluator instance self, there should have 4 arguments, bug there have 5 arguments!
I read a lot of documents and search by google, but no solution has been found.
I check presetShapeDefinitions.xml file,  I found circularArrow definition has some tag:
<gd name="xB" fmla="+- xH 0 dxB 0"/>
<gd name="yB" fmla="+- yH 0 dyB 0"/>

so this is a bug or error ?

Hmm, it looks like something's not right in presetShapeDefinitions.xml. That was grabbed from here and came from ISO-IEC-29500-1, with the original here -- they all contain the same (erroneous) definitions.
I wonder if the definitions for xB and yB should read:
<gd name="xB" fmla="+- xH 0 dxB"/>
<gd name="yB" fmla="+- yH 0 dyB"/>

Does this do the right thing for you?
I see that definitions for the other types of circular arrows (left, right, etc) contain the same error.

Actually not, It seems like we're caught in a loop.
I read some people asked MS question, it fixed some preset shape definition error, but not include this.
question url: https://learn.microsoft.com/en-us/answers/...
fixed file download url: https://mailman.vse.cz/pipermail/sc34wg4/2018-November/004555.html
and I not found some <OpenXML Implementation Guide> file.

Thanks for your research -- all should now be well.


Any plans to expand the scope to the tauri event system?

imo it would be nice to get also the event system  typed. Any plans or ideas for that?
At the moment a possible solution is to use specta to create at least the typescript types automatically. But you can still misspell the event identifiers. I also rly like the idea of the .wit files.
Thanks for your great work!

Yeah so the way I plan to bring this to tauri-bindgen is through something completely different: streams.
This is essentially the same as in GRPC if you're familiar with that, if not here's the gist:
interface log {
   func start_logging() -> stream<string>
}

which would translate to something like this for the host
trait Log {
   type StartLoggingStream = Pin<Box<dyn Stream<Item = String> + Send  + 'static>>;

   fn start_logging(&self) -> Result<Self:: StartLoggingStream>
}

Similar to how the tonic crate handles this.
On the guest side this would map to AsyncIterator for JS and SomeSpecificStreamType<String> for Rust probably.
So no events in the classical tauri sense (imo superior though bc it forces cleaner code) but I hope it can fulfill all the use cases.


Domeneshop DynDNS support. Implements #10826

[X] Redmine Issue: https://redmine.pfsense.org/issues/10826
[X] Ready for review

Domeneshop is the largest registrar for .no (Norway) domains with over 40% of all .no domains. Source (in Norwegian): https://domene.shop/about
Their API is already added in ACME
https://api.domeneshop.no/docs/index.html#tag/ddns

that was fast <3

I've got a domain on Domeneshop. How can I help in testing this PR?

I've got a domain on Domeneshop. How can I help in testing this PR?

You can install https://docs.netgate.com/pfsense/en/latest/development/system-patches.html and apply patch https://github.com/pfsense/pfsense/pull/4420/commits/4d6cc22309b4ec2b6cdec7d357507d607a45183a to test

confirmed to be working on latest 2.5 development snapshot

Working (on latest 2.5). It updates the address, but does not give green OK.

Also, If using both "Domeneshop" and "Domeneshop (v6)", the first one is overwritten by the last... :-(

I'm getting similar behaviour:

We should create a bug report on redmine (https://redmine.pfsense.org/) and not continue on this merge request.


Wrong merchant timers on first visit

Merchant timers are wrong if the site is visited for the first time (no LocalStorage data in browser) and the server region is swapped before a server gets selected. The following GIF shows a demonstration with Chromes incognito mode.
In this, I first show the actual state for EUC Asta, afterwards I go to Incognito Mode to open the site again with no cookies/localstorage. I then select a "wrong" region, in this case NA East, then change it to EUC and select Asta server. Now the timers for the upcoming merchants seem to be messed up, I think it applies the wrong region timezone or something. Timers for the active merchants will be wrong aswell.

If the site is refreshed the timers will be correct again, as the LocalStorage is not initialized and the server region and server are saved.
I tried debugging it, but have not found anything yet.

Might explain #50
It looks like SynchronizeServer doesn't account for regional offset changing. Possibly more correct would be for the Region change to call UpdateMerchants with force=true (since it doesn't normally need to happen when server changes, or when re-synchrozing after a reconnect).

Should be fix in the next deploy, though may be a day or two since I want to put some touches on the authorization piece first


update result - addition of specific angle types

Set-up for specific recording of dip, inclination, and azimuth as required for boreholes.
For if/when we migrate any data beyond the simple at-surface borehole azimuth and inclination into geoproperties.

@geoderekh
This is more a set up so we can, rather than a commitment that we will.
As much for ongoing expansion and completeness of the vocabulary for broad usage, as it is to enable GSQ specific usage.
Having the terms defined so users know what type of value they are supplying or consuming is valuable regardless of how our database stores those values, or at what level-of-detail.
The old DB borehole orientation table has surface and subsurface measurements, the decision whether we do migrate those subsurface recordings as a legacy data holding (separate from ongoing modern industry standard practice) is a business decision, but this change enables the ability to do that should we so choose.
This distinction also ensures we can inform industry and internal users of the difference between Dip and Inclination as we define them, lest they be conflated or confused. We will store values as dip or inclination only in the Db, but we may create views using a transformation to suit the different industry groups, and so we should be able to clearly articulate what those values mean without assuming all users are aware of the different measurement types.


fix/fix-broken-edit

In my computer using the last one xcode on a mac os Catalina, I can't use the danger-swift edit because it's generate a wrong swift tools version.
This is because the function resolveSwiftToolsVersion only remove the prefix: "Apple Swift Package Manager - Swift ", but in my computer the command swift package --version get an output:
Swift Package Manager - Swift 5.2.0

Without the "Apple " prefix, because this I got an error like this:
ERROR: commandFailed(command: "<.....>Dangerfile\' is using Swift tools version 0.0.0 which is no longer supported; consider using \'// swift-tools-version:5.2\' to specify the current tools version\n")

Using the new onlyNumbersAndDots extension, it's a more safe form to extract the version of swift package manager.

Warnings

:warning:

Any changes to library code should be reflected in the Changelog.
Please consider adding a note there and adhere to the Changelog Guidelines.

  Generated by :no_entry_sign: Danger Swift against bebc19e4968a346e747cf2adfc3befe17ed8f9a7

Thank you, this is really great, but I have a small suggestion, you could make this a lot more efficient by using a charset.
e.g.
var charset = CharacterSet.decimalDigits
charset.insert(".")

return = String(unicodeScalars.filter(charset.contains))

Great, this is better than an regex check, I have updated the extension, thanks :)

Clever work

For some reason travis is getting:
unable to access 'https://github.com/kareman/SwiftShell/': Failed to connect to github.com port 443: Operation timed

I don't think this is something that I have changed....


Site request: Rotten Tomatoes (rottentomatoes.com)

DO NOT REMOVE OR SKIP THE ISSUE TEMPLATE

[X] I understand that I will be blocked if I intentionally remove or skip any mandatory* field

Checklist

[X] I'm reporting a new site support request
[X] I've verified that I'm running yt-dlp version 2023.03.04 (update instructions) or later (specify commit)
[X] I've checked that all provided URLs are playable in a browser with the same IP and same login details
[X] I've checked that none of provided URLs violate any copyrights or contain any DRM to the best of my knowledge
[X] I've searched known issues and the bugtracker for similar issues including closed ones. DO NOT post duplicates
[X] I've read the guidelines for opening an issue
[ ] I've read about sharing account credentials and am willing to share it if required

Region
worldwide
Example URLs

movie: https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians
television series: https://www.rottentomatoes.com/tv/the_beverly_hillbillies

Provide a description that is worded well enough to be understood
The movie (m) and television (tv) URLs provided include galleries of videos, including trailers, clips, interviews, promotions, etc. There are also celebrity pages, but they don't contain videos to my knowledge.
There doesn't appear to be any easy way to copy the link of a single video using the frontend, but each video does have a unique ID.
Each video's info is inside VideosCarousel__item–class divs, with some generally self-explanatory divs inside that, containing video IDs, a thumbnail, a duration string, and a title.
The video interface uses JW Player. There are several formats for each video. They stream over HLS from "link.theplatform.com".
Provide verbose output that clearly demonstrates the problem

[X] Run your yt-dlp command with -vU flag added (yt-dlp -vU <your command line>)
[ ] If using API, add 'verbose': True to YoutubeDL params instead
[X] Copy the WHOLE output (starting with [debug] Command-line config) and insert it below

Complete Verbose Output
$ yt-dlp https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians -vU
[debug] Command-line config: ['https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians', '-vU']
[debug] Encodings: locale UTF-8, fs utf-8, pref UTF-8, out utf-8, error utf-8, screen utf-8
[debug] yt-dlp version<EMAIL_ADDRESS>[392389b7d] (pip)
[debug] Python 3.8.16 (CPython x86_64 64bit) - CYGWIN_NT-10.0-19044-3.4.6-1.x86_64-x86_64-64bit-WindowsPE (OpenSSL 1.1.1t  7 Feb 2023)
[debug] exe versions: ffmpeg 5.1.2-essentials_build-www.gyan.dev (setts), ffprobe 5.1.2-essentials_build-www.gyan.dev
[debug] Optional libraries: Cryptodome-3.17, brotli-1.0.9, certifi-2021.10.08, mutagen-1.45.1, sqlite3-2.6.0, websockets-11.0.1
[debug] Proxy map: {}
[debug] Loaded 1786 extractors
[debug] Fetching release info: https://api.github.com/repos/yt-dlp/yt-dlp/releases/latest
Available version<EMAIL_ADDRESS>Current version<EMAIL_ADDRESS>yt-dlp is up to date<EMAIL_ADDRESS>[generic] Extracting URL: https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians
[generic] santa_claus_conquers_the_martians: Downloading webpage
WARNING: [generic] Falling back on generic information extractor
[generic] santa_claus_conquers_the_martians: Extracting information
[debug] Looking for embeds
ERROR: Unsupported URL: https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 1518, in wrapper
    return func(self, *args, **kwargs)
  File "/usr/local/lib/python3.8/site-packages/yt_dlp/YoutubeDL.py", line 1594, in __extract_info
    ie_result = ie.extract(url)
  File "/usr/local/lib/python3.8/site-packages/yt_dlp/extractor/common.py", line 694, in extract
    ie_result = self._real_extract(url)
  File "/usr/local/lib/python3.8/site-packages/yt_dlp/extractor/generic.py", line 2510, in _real_extract
    raise UnsupportedError(url)
yt_dlp.utils.UnsupportedError: Unsupported URL: https://www.rottentomatoes.com/m/santa_claus_conquers_the_martians

In the Santa page, find the JSON in this <script> element
 <video-player-overlay-manager>
        <script id="heroVideos" type="application/json">...
</script>
</video-player-overlay-manager>

It looks like this:
[
  {
    'file': 'https://link.theplatform.com/s/NGweTC/media/knQh_gt11TmR?formats=MPEG-DASH+widevine,M3U+appleHlsEncryption,M3U+none,MPEG-DASH+none,MPEG4,MP3',
    'type': 'hls',
    'description': '',
    'image': 'https://statcdn.fandango.com/MPX/image/NBCU_Fandango/532/579/thumb_B0463DF3-9AC4-4A23-87A1-37025CD7AA43.jpg',
    'isRedBand': false,
    'mediaid': '1819476035665',
    'mpxId': '1819476035665',
    'publicId': 'knQh_gt11TmR',
    'title': 'Santa Claus Conquers the Martians: Trailer 1',
    'default': false,
    'label': '0',
    'duration': '1:15',
    'durationInSeconds': '75.576',
    'emsMediaType': 'Movie',
    'emsId': 'fc709dda-6b8d-3f6e-bcf4-3a4a3faa7bb9',
    'publishDate': 'November 13, 2020',
    'overviewPageUrl': '/m/santa_claus_conquers_the_martians',
    'videoPageUrl': '/m/santa_claus_conquers_the_martians/trailers/knQh_gt11TmR',
    'videoType': 'TRAILER',
    'adobeDataLayer': {
      'content': {
        'id': 'rottentomatoes_1819476035665',
        'length': '75.576',
        'type': 'vod',
        'player_name': 'jw',
        'sdk_version': 'web: 6.51.0',
        'channel': 'movie',
        'originator': 'sinister cinema, something weird video',
        'name': 'santa claus conquers the martians: trailer 1',
        'rating': 'not adult',
        'stream_type': 'video'
      },
      'media_params': {
        'genre': 'holiday, sci-fi',
        'show_type': 1
      }
    },
    'comscore': {
      'labelmapping': 'c3=rottentomatoes.com, ns_st_st=Rotten Tomatoes, ns_st_pu=Sinister Cinema,Something Weird Video, ns_st_pr=Santa Claus Conquers the Martians, ns_st_sn=*null, ns_st_en=*null, ns_st_ge=HolidaySci-Fi, ns_st_ia=0, ns_st_ce=0, ns_st_ddt=1964, ns_st_tdt=1964'
    }
  }
]

The [0].file member can be extracted with yt-dlp (or yt-dl).


Update nnr-policy.md

some small typos fixed

@leo-msft : Thanks for your contribution! The author(s) have been notified to review your proposed change.


Update Vindictus

Game Title
Vindictus
Status of the Anti-Cheat
👍 Running
Tinkering Steps
Vindictus has been working out of the box with Proton Experimental for about two years now.
Given almost all Nexon Game Security games haven't been checked in over a year, it's also possible that other NGS games now run (as already proven by Kartrider Drift, Tree of Savior, and Velied Experts) and it's worth checking.
Proof of Mention
https://www.protondb.com/app/212160

Mabinogi works via the Nexon Game Manager (Lutris), Steam version crashes due to the launcher (workaround may be available?) -- Need more people to test Mabinogi via NGM to be sure.

The First Descendant was running during the betas, so at least NGS works. Might disconnect in-game since it now has EAC, need to re-check when it launches in a few days on 2nd of July to get past the pre-download splash screen.

Mabinogi works via the Nexon Game Manager (Install "Nexon Games" via Lutris), Steam version crashes due to the launcher (workaround may be available?) -- Need more people to test Mabinogi via NGM to be sure.

Mabinogi works perfectly for me through Lutris, with a few settings toggled (specifically turning off the anti cheat settings, and changing to feral game mode)

Mabinogi works fine for me, no tinkering outside of installing it through Heroic Games Launcher and using WINE with the Nexon Launcher.


Copy selection address, but decimal

Would be nice to have this in the selection / copy address dropdown, considering python likes to print addresses as decimal.

Closing as wontfix for now, may re-open later. The current copy menu has a fair number of items already, an additional decimal for each would probably be overkill.


KIC 2.0 - TCPIngress API - Full Feature Parity

Spike
The purpose of this task is to ensure that the TCPIngress API is fully imported into the railgun/ KIC re-architecture project and provided full spec coverage and controller.
Acceptance Criteria

[ ] TCPIngress feature parity with v1.x
[ ] KTF integration tests provide full TCPIngress test coverage

blocked by https://github.com/Kong/kubernetes-ingress-controller/issues/1130

blocked by https://github.com/Kong/kubernetes-ingress-controller/pull/1163

checklist item number 2 has been moved to a different scope and milestone:
https://github.com/Kong/kubernetes-ingress-controller/issues/1179
All set with basic functionality :vulcan_salute:


support traditional (gollum) wiki links

It would be great to be able to add links with the standard notation: [[some-page-slug]]

@jpcaruana TBH I never spotted syntax like this - could you point me to any documentation about this?
Also remember that it's an open-source repository - feel free to work on it on your repo fork and make pull request later :-)

Hi,
this is the way wiki work in github for instance


[Protected var Request] - Page 7352 PutawayWorksheet

We would like to have the following variables as protected var, so we can use them in page extension.
Object: PutawayWorksheet.Page.al
Global Variables:
var
  CurrentWkshTemplateName: Code[10];
  CurrentWkshName: Code[10];
  CurrentLocationCode: Code[10];

Thanks in advance,
Christian

Thanks for reporting this. We agree, and we’ll publish a fix asap, either in an update for the current version or in the next major release. Please do not reply to this, as we do not monitor closed issues. If you have follow-up questions or requests, please create a new issue where you reference this one.


zcbor_map_decode_bulk return code is unlike the other zcbor API functions

Shouldn't the enclosing function just return the bool from zcbor_map_end_decode?
https://github.com/zephyrproject-rtos/zephyr/blob/68dc53b0779a37342f86a29362c8efdafdcea005/subsys/mgmt/mcumgr/util/src/zcbor_bulk.c#L71

or not be prefixed zcbor as it's from mcumgr and behaves more like the Zephyr API.
or be migrated into core zcbor_decode and apply the same semantics as zcbor

This function is for internal MCUmgr use, as the path suggests, it is not part of the zcbor library/code.

It is it in the migration guide.
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/migration/migration_guide_1.x_to_2.x.html

Indeed that text is wrong, it should be int rc; and rc = ... not ok = ... @peknis

One could argue, in C++ parlance,  it's more of a 'protected' function than 'private'.
In which case it would be nice if it behaved in the same way as the 'public' functions.

"Path of least surprise"

It's designed for custom implementations of MCUmgr too, not just the provided one.
Ok, happy to close.

Actually the documentation is correct:
ok = zcbor_map_decode_bulk(zsd, image_upload_decode,
                           ARRAY_SIZE(image_upload_decode), &decoded) == 0;

If zcbor_map_decode_bulk returns 0 (success) then ok will be set true, otherwise it will be set false


Error - auth0 cannot find node with id "auth0-login-form"

After upgrading from 3.5.2 to 3.6.1 the authentication page throws a js error saying "auth0 cannot find node with id "auth0-login-form" and it redirect me to the standard WP login page. The same was hapenning with version 3.6.0.
I may be missing something but had to revert back to 3.5.2 to get it working again.
Cheers for all your help.

Hi @hesperanca ... sorry for the trouble here. You said:

the authentication page

Are you talking about wp-login.php? That error is saying that it doesn't have anywhere to put the Lock form (it's looking for a node with an id attribute of auth0-login-form). That's always output with the core plugin so I'm not sure what's going wrong.
Do you have any relevant customizations at all?

Hi Josh,
Thanks for your reply.
Sorry, yes I'm talking about wp-login.php. As far as I know there are no customisations to the login process. If I revert back to 3.5.2 all is fine. As soon as I upgrade I start to get the error.
I'm relatively new to WordPress so there may be something I'm doing wrong but I cannot see what it could be.
Thanks for your help.

Same situation here. Upgraded from 3.5.2 to 3.6.1 today. Same JS error thrown on /wp-login.php

Thanks for the extra information here.
I just spun up a fresh test install and tried a few options and could not replicate this. Can I have you check a few more things, please?

Does the Auth0 plugin error log show anything that looks relevant?
Do you have anything in you Auth0 Settings > Appearance tab > Login Form CSS/JS field? Or in Auth0 Settings > Advanced tab > Extra Settings field?
Do you have a dev/test clone that we upgrade and debug? Just need a site that you can test the upgrade on while your main site remains on the older version. If you're able to share a URL to that site, it would be helpful (you can send it privately if you don't want the URL out there).

Thank you!

Hi Josh,
Thanks for looking into this.
Here are the answers to your questions:

Nope. There are no relevant errors on the Auth0 plugin error log.
Both settings are empty.
Unfortunately, it's all running on my local dev environment which means I cannot give you access. I was testing the upgrade locally before deploying it to our test environment (which is available over the internet). I can give you access to the test environment but that has the old plugin and I cannot upgrade that one because it's being used by our test team.

Sorry I cannot be more helpful.
Thanks for the help once again.

So, let's walk through all the WP basics here:

Deactivate all plugins that aren't Auth0 and switch to a default theme. Does the problem persist?
Deactivate and delete the plugin, then reinstall (don't run the Setup Wizard, just use the same domain, Client ID, and Client Secret). Does the problem persist?

I forgot to ask earlier ... when you upgrade and load wp-login.php, you get the error but does the page have a login form at all? And when it redirects, does it redirect to the same page with ?wle on the URL?

@hesperanca - Any updates here? I have another issue I'll need to fix and release, would be glad to get a fix in for this if the root cause in on our end.

Hi Josh,
Sorry been away from the office all day today. Just tried switching from the third party theme we were using to one of the default themes and it has started to work. Strange thing is that version 3.5.2 of the auth0 plugin works fine with the third party theme. I'll have a look at the theme code to see if I can find the reason for the conflict and let you know my findings.
Thanks for all the help.
Regards,
Hugo

Thanks for the update, @hesperanca. Let me know as soon as you're able, happy to add this to an upcoming patch release if it's an issue on our end.
One thing to note ... we did add a filter to the login form output so you can adjust how the form is output, shown here:
https://github.com/auth0/wp-auth0/blob/master/templates/login-form.php#L39
Documented here:
https://auth0.com/docs/cms/wordpress/extending#auth0_login_form_tpl
I'm sure that your theme isn't using that filter but it might helpful figure out the root cause.
Also, if that theme is open source and you can provide a link, I'm happy to take a look and see if I can figure out what's going on.
Thanks!

Hi Josh,
Thanks for the info. Although the theme isn't using that filter your comments made me look into other filters you are using and I found that you are using the 'login_message' filter to render the form:

and the theme code is also using the same filter in this way:

Which, based on my limited WP understanding, clears whatever other plugins use on that filter. What I cannot understan is why it was working before and not working now ( unless is something todo with the order that the filters run).
So I think the best option for me would be to create a completelly new login page using your shortcode. This way we bypass all of these issues.
I have another question\issue but it's completelly different from this one so I'll open a new issue.
Thanks for your help and all the great work with this plugin.
Hugo

Good find! Yes, that filter will run after our filter (11 is later than 5 in runtime) and clear everything out. But, like you said, that doesn't explain why it changed after the update. Version 3.5.2 uses 5 as well:
https://github.com/auth0/wp-auth0/blob/3.5.2/WP_Auth0.php#L60
What you can do, instead of creating a whole new page, is to remove their filter:
remove_filter( 'login_message', `wpjobster_custom_login_form_message`, 11 );

I'll close this one for now. Thanks for updating with the resolution!


kinect2_bridge with "reg_method:opencl" crashes on macOS 10.12

the information output is as following, while change reg_method to cpu is ok.
libfreenect2 is built with opencl and Protonect with cl argument runs smoothly

$ rosrun kinect2_bridge kinect2_bridge
[ INFO] [Kinect2Bridge::initialize] parameter:
base_name: kinect2
sensor: default
fps_limit: -1
calib_path: /Users/guoqiang/catkin_ws/src/iai_kinect2/kinect2_bridge/data/
use_png: false
jpeg_quality: 90
png_level: 1
depth_method: opencl
depth_device: -1
reg_method: opencl
reg_device: -1
max_depth: 12
min_depth: 0.1
queue_size: 2
bilateral_filter: true
edge_aware_filter: true
publish_tf: false
base_name_tf: kinect2
worker_threads: 4
[Info] [OpenCLDepthPacketProcessorImpl]  devices:
[Info] [OpenCLDepthPacketProcessorImpl]   0: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz (CPU)[Intel]
[Info] [OpenCLDepthPacketProcessorImpl]   1: Intel(R) Iris(TM) Graphics 6100 (GPU)[Intel Inc.]
[Info] [OpenCLDepthPacketProcessorImpl] selected device: Intel(R) Iris(TM) Graphics 6100 (GPU)[Intel Inc.]
[Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program...
[Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 4 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @20:31 with serial<PHONE_NUMBER>47
[Info] [Freenect2Impl] found 1 devices
[ INFO] [Kinect2Bridge::initDevice] Kinect2 devices found:
[ INFO] [Kinect2Bridge::initDevice]   0:<PHONE_NUMBER>47 (selected)
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 2016384 ir: 4128*33792
[Info] [Freenect2DeviceImpl] opened
[ INFO] [Kinect2Bridge::initDevice] starting kinect2
[Info] [Freenect2DeviceImpl] starting...
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[ INFO] [Kinect2Bridge::initDevice] device serial:<PHONE_NUMBER>47
[ INFO] [Kinect2Bridge::initDevice] device firmware: 4.0.3916.0
[Info] [Freenect2DeviceImpl] stopping...
[Info] [Freenect2DeviceImpl] canceling rgb transfers...
[Info] [Freenect2DeviceImpl] canceling depth transfers...
[Info] [Freenect2DeviceImpl] stopped
[Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program...
[Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully
[ INFO] [*DepthRegistration::New] Using OpenCL registration method!
[ INFO] [*DepthRegistration::New] Using OpenCL registration method!
[ INFO] [DepthRegistrationOpenCL::init] devices:
[ INFO] [DepthRegistrationOpenCL::init]   0: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz
[ INFO] [DepthRegistrationOpenCL::init]   1: Intel(R) Iris(TM) Graphics 6100
[ INFO] [DepthRegistrationOpenCL::init] selected device: Intel(R) Iris(TM) Graphics 6100
[ERROR] [DepthRegistrationOpenCL::init] depth_registration_opencl.cpp data->program.build(options.c_str()) failed: -11
[ERROR] [DepthRegistrationOpenCL::init] failed to build program: -11
[ERROR] [DepthRegistrationOpenCL::init] Build Status: -2
[ERROR] [DepthRegistrationOpenCL::init] Build Options:	-D r00=9.9996023952718482e-01f -D r01=-6.1876856493501024e-03f -D r02=-6.4212079112866477e-03f -D r10=6.1580237577474372e-03f -D r11=9.9997032557939436e-01f -D r12=-4.6288987933428933e-03f -D r20=6.4496595362981421e-03f -D r21=4.5891727952671350e-03f -D r22=9.9996867020168234e-01f -D tx=-5.1309302795311242e-02f -D ty=1.9095407517132816e-04f -D tz=-7.6237637937962245e-03f -D fxR=5.3206373520231637e+02f -D fyR=5.3265461618725919e+02f -D cxR=4.7926731172994317e+02f -D cyR=2.5532884285800074e+02f -D fxRInv=1.8794740814646043e-03f -D fyRInv=1.8773891553930354e-03f -D zNear=500 -D zFar=12000 -D heightR=540 -D widthR=960 -D heightD=424 -D widthD=512
[ERROR] [DepthRegistrationOpenCL::init] Build Log:	 :190:31: error: call to '__cl_sqrt' is ambiguous
const float4 tmp = (float4)(sqrt(2.0));
^~~~~~~~~
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4741:23: note: expanded from macro 'sqrt'
#define sqrt(__x) __cl_sqrt(__x)
^~~~~~~~~
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:366:48: note: expanded from macro '__CLFN_FD_1FD'
#define __CLFN_FD_1FD(name) float OVERLOAD name(float x);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:367:21: note: expanded from macro '__CLFN_FD_1FD'
float2 OVERLOAD name(float2 x);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:368:21: note: expanded from macro '__CLFN_FD_1FD'
float3 OVERLOAD name(float3 x);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:369:21: note: expanded from macro '__CLFN_FD_1FD'
float4 OVERLOAD name(float4 x);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:370:21: note: expanded from macro '__CLFN_FD_1FD'
float8 OVERLOAD name(float8 x);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:4738:15: note: candidate function
__CLFN_FD_1FD(__cl_sqrt);
^
/System/Library/Frameworks/OpenCL.framework/Versions/A/lib/clang/3.2/include/cl_kernel.h:371:22: note: expanded from macro '__CLFN_FD_1FD'
float16 OVERLOAD name(float16 x);
^
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] releasing usb interfaces...
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed
[ERROR] [Kinect2Bridge::start] Initialization failed!
[Info] [Freenect2DeviceImpl] closing...
[Info] [Freenect2DeviceImpl] already closed, doing nothing

Hi,
Try changing line 190 of kinect2_registration/src/depth_registration.cl
from
 const float4 tmp = (float4)(sqrt(2.0));
to
 const float4 tmp = (float4)(sqrt(2.0f));

That worked for me on ubuntu 18.04. Thank you very much !


Remove before all from network tests

What this PR does / why we need it:
Ginkgo's BeforeAll limits the ability to clean up in an AfterEach, adding a
generic global cleanup to run after each test,  and running tests in parallel.
This commit removes BeforeAll from all tests in the network test suit, and whenever
it is necessary uses BeforeEach and AfterEach.
Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #6123
Special notes for your reviewer:
Each commit addresses different test file in the network test-suit that had before all, except for
the vmi_multus file which was addressed by @ormergi  in #6293.
This change introduced a lot  of additional  vmi creations in the tests and it had a time cost. I roughly measured the time it takes
to run the entire network suit with and without this change and there is a significant difference as can be shown below:
(output of running the tests with time tool)
without the change:
real	123m58.789s
user	5m19.625s
sys	1m9.043s
with the change:
real	174m19.060s
user	6m51.113s
sys	2m9.304s
This is not an accurate measure per se, and it includes some skips and failures happen on my local environment,   but it can give the reader an idea of the time cost.
Release note:

NONE

Will appriciate a review from
/assign @EdDev

I initiated the client in an inner context. Moved to the outer most context.
https://github.com/kubevirt/kubevirt/compare/dadc4cb8ab72e3620b09ced41f31512e0553c511..a4d468962fc46254e56512267a4ae077b802477c

without the change:
real 123m58.789s
user 5m19.625s
sys 1m9.043s
with the change:
real 174m19.060s
user 6m51.113s
sys 2m9.304s

That is not too bad. I think that there are big chunks of tests (multus, service, slirp/macvtap, ...) which can be run in parallel after the cleanup. I see 87 tests running in serial mode right now (https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/6331/pull-kubevirt-e2e-k8s-1.19-sig-network/1433054891114237952), and almost all can be run in parallel once all BeforeAll are gone (some don't even use it right now and could potentially just be switched to parallel).

Just for completeness, if you remove Serial you will not see faster time locally because by default we don't run the tests locally in parallel. You can export KUBEVIRT_E2E_PARALLEL=true to run tests in parallel locally.

rebased on master
Thank you @rmohr  for the notes, and sorry for the late reply(holidays). Will address your comments shortly.

without the change:
real 123m58.789s
user 5m19.625s
sys 1m9.043s
with the change:
real 174m19.060s
user 6m51.113s
sys 2m9.304s

That is not too bad. I think that there are big chunks of tests (multus, service, slirp/macvtap, ...) which can be run in parallel after the cleanup. I see 87 tests running in serial mode right now (https://prow.ci.kubevirt.io/view/gs/kubevirt-prow/pr-logs/pull/kubevirt_kubevirt/6331/pull-kubevirt-e2e-k8s-1.19-sig-network/1433054891114237952), and almost all can be run in parallel once all BeforeAll are gone (some don't even use it right now and could potentially just be switched to parallel).

rough time measurement when testing on  parallel:
real	65m42.416s
user	10m16.181s
sys	2m55.991s
(slirp suit can not be run on parallel, because it alters the global kubevirt configuration, and on this run all slirp tests failed immediately, which probably affected the time of the run)

(slirp suit can not be run on parallel, because it alters the global kubevirt configuration, and on this run all slirp tests failed immediately, which probably affected the time of the run)

We have one trick normally to run such tests in parallel: We enable by default all features and just add one or two negative tests which alter the configuration and only these are then run in a serial fashion. You can enable slrip by default here: https://github.com/kubevirt/kubevirt/blob/main/tests/utils.go#L742 and just disable it for the negative test.

Done. I hope it'l work now.
Also I removed the afterEachs deletes and relied on the BeforeEachstests.BeforeTestCleanup() .
https://github.com/kubevirt/kubevirt/compare/9e5e09528017b9d5b4b6ea2e13c6570b90fb8802..f34d1089917f7dd5b4e6829b509967a6a2b3b2bf

looks like we have one test which needs a [Serial] left: https://github.com/kubevirt/kubevirt/blob/cb1725fcb58a19e4b57ad9c06bdedbabf2497994/tests/network/vmi_networking.go#L1016

The network tests have run until now serially. I be am worried about running them in parallel, mainly due to the maintenance cost.
Please do not mix the two in one PR. We need to discuss it and show the pros/cons before taking such an action.

Done. I hope it'l work now.

looks like we have one test which needs a [Serial] left:
https://github.com/kubevirt/kubevirt/blob/cb1725fcb58a19e4b57ad9c06bdedbabf2497994/tests/network/vmi_networking.go#L1016

Also I removed the afterEachs deletes and relied on the BeforeEachstests.BeforeTestCleanup() .

Great. Using BeforeEach is still the best for now.

Thanks.
fixed in this PR for now until we decide about running in parallel.

The network tests have run until now serially. I am worried about running them in parallel, mainly due to the maintenance cost.
Please do not mix the two in one PR. We need to discuss it and show the pros/cons before taking such an action.

moved to :
https://github.com/kubevirt/kubevirt/pull/6388
keeping it draft and partial (not applied to all networking tests) until we decide.

tests, network, vmi_networking: remove BeforeAll
same reasoning as 102b17a

I suggest you summarize it in one short sentence. Ref a commit is for sure irrelevant as it may change on rebase.
Something like BeforeAll has no teardown equivalent, therefore its usage leaks resources.

Thanks. Fixed.

Also createAndWait and deleteAndWait vmi funcs are moved to the tests utils,
beacsue those funcs are going to be used in the next commits.

So why you move them now if they are only needed in the next commit?
I suggest you extract these in a separate commit so we can focus better in the review.

I extracted it to a different commit.

tests, network, expose: remove beforeAll

The commit message body is not fitting the change. It describes the removal of all it from all tests.

Fixed

/retest

The network tests have run until now serially. I am worried about running them in parallel, mainly due to the maintenance cost.
Please do not mix the two in one PR. We need to discuss it and show the pros/cons before taking such an action.

Since the runtime of the lane would significantly increase I would suggest to keep it together. If individual tests would be come unreliable, they could be separately marked wit a simple [serial] tag in a follow-up PR.

Since the runtime of the lane would significantly increase I would suggest to keep it together. If individual tests would be come unreliable, they could be separately marked wit a simple [serial] tag in a follow-up PR.

If this one is approved/lgtm, I am fine with adding a commit that adds the parallel part. But I do not want the two mixed in the main review session and I am interested in seeing that all is good without adding the parallel part in the initial party.
If there is flakiness, we will have hard time knowing what caused it.

If this one is approved/lgtm, I am fine with adding a commit that adds the parallel part. But I do not want the two mixed in the main review session and I am interested in seeing that all is good without adding the parallel part in the initial party.
If there is flakiness, we will have hard time knowing what caused it.

For as long as it goes in together all in-one, fine by me.

If this one is approved/lgtm, I am fine with adding a commit that adds the parallel part. But I do not want the two mixed in the main review session and I am interested in seeing that all is good without adding the parallel part in the initial party.
If there is flakiness, we will have hard time knowing what caused it.

For as long as it goes in together all in-one, fine by me.

NP. I'll add the parallel part in another commit

f this one is approved/lgtm, I am fine with adding a commit that adds the parallel part. But I do not want the two mixed in the main review session and I am interested in seeing that all is good without adding the parallel part in the initial party.
If there is flakiness, we will have hard time knowing what caused it.

Network lanes seems to pass with the current changes( before adding the parallel part). Once we'll finish the review process on the current changes i'll add the parallel commit.

Can you please drop the get prefix? It could be replaced with new but even that is not really needed.

Done.

fixed two stupid mistakes

/retest
There was some kind of network issue that is not related to the PR.

/cc @rmohr

It looks like running network tests in parallel worked
@EdDev @rmohr

/test pull-kubevirt-fossa

/retest


tshark dependenacy

tshark is a required package, and should be added to the README.
TSharkNotFoundException: TShark not found. Try adding its location to the configuration file.

Nice catch. I assume pyshark installation would take care of it but it doesn't . Updated readme.


poor contrast ratio for displayed code blocks

Environment
Erlang/OTP 26 [erts-14.0.2] [source] [64-bit] [smp:4:4] [ds:4:4:10] [async-threads:1] [jit:ns] [x86_64-apple-darwin]
macOS Monterey (12.6.2)
started Livebook v0.10.0 by double-clicking the app
Using Chrome Version 114.0.5735.133 (Official Build) (x86_64)
Using Livebook's "light theme"
Current behavior
Let's say that I've put a code block into a Markdown section, as:
foo = 42
bar = 42*foo

When this block is displayed in the Livebook, the code isn't much darker than the background color. This makes the contrast ratio very poor, making the text difficult to read.
Expected behavior
The contrast ratio for displayed code blocks should be increased, preferably by making the text (a lot) darker. The way it's displayed in this issue would be Just Fine.

Hi Rich, we are following the official One Light Theme here. Please use the default dark mode, because that’s high contrast.

Problem is, I really dislike dark mode. It looks like "One Light Theme" has various definitions, implementations, etc. Since this is an accessibility issue, maybe I could get some traction if I found the right place (upstream) to report it. Suggestions?

I am not sure if theme authors would accept changes upstream but you can try, if they do, we will backport, although I am not sure where the source is either. But in a nutshell, some people dislike high contrast themes, and we can't support low and high contrast version of each theme, so we decided on the dark version being high contrast and the light one being regular.

Is the theme in question akamud/vscode-theme-onelight?  If not, could you point me to the one Livebook uses?

Yes, that’s it I believe.

Two notes:

you didn't post a screenshot on this issue, only on the linkjed issue, and I can say for certain that the contrast issue is not as bad on my machine. Please double check you don't have any browser extension that could be affecting the colors.

I am not sure if that is the official theme (and I haven't said as much!), although I believe it is a version of the theme :)

Here is a snippet as an example. Even the comment color (which is generally low contrast) seems brighter than your whole snippet:


confluent-kafka allows headers with str values

https://github.com/confluentinc/confluent-kafka-python/blob/c32d69dfbc61100ac03117573e46fd28a3ac6965/src/confluent_kafka/src/confluent_kafka.c#L1369-L1414

hmm while this is correct it does seem to maybe make consumers more complicated -- so maybe it's best to standardize on bytes here :/


Dont show featured projects in subcategories

we are currently showing the featured project for a parent category as the first project in all of it's child, more narrow categories.  This has been determined to be a bad discovery experience!  sad!
small little fix to check if the category has no parent so we don't grab the featured project from api.  should there be a test for this? maybe! I'll try to figure that out.
cc @ktman 👋

dope! re: test you can add a test to DiscoveryParamsTest.java that'd be swell

@luoser yeah ty figured it out in https://github.com/kickstarter/android-oss/pull/121/commits/9f98703197ef8d82f1e0254c79197d37f638bff2


Implement Bounded

Is it feasible to implement num_traits::bounds::Bounded?

Yes, this could be done trivially. Are you actually using this crate? To my knowledge nobody actually does; there's certainly no reverse dependencies on crates.io.
My goal when creating this crate was twofold: I wanted to play around to see how it would work with pre-existing APIs and I wanted to see how feasible implementations were for stdlib. The third-party trait implementations that exist right now are because that's what I needed for my "playing around" use case.

I used it for a small tool to control brightness -- where values are percentages (e.g.: ranged numbers from 1 to 100). But it's been parked for a long time TBH (hence, not published).

Okay! I'll get to this tonight. It should just be a few lines. It'll be behind the num feature gate.

Implemented and released.


Reduce the overhead of running the frida-gum-sys build script on our build times

Running the frida-gum-sys build script is the third biggest overhead for us during building. This overhead is primarily because we use the the auto-download feature. The time is basically spent downloading the complete compressed frida devkit, extracting everything and then statically linking against frida-gum, details can be found here. My initial thoughts are that we really don't need to download the whole devkit, keeping frida-gum static library in our source tree and statically linking against it depending on the platform in our own cargo build script can save us a lot of time. Interestingly build scripts are always run even if we are using something like sccache so this overhead is also present in CI builds.

[ ] Verify the findings using cargo +nightly build --timings and viewing the generated report
[ ] Move frida-gum.h and libfrida-gum.a into a directory and add that to the linker search path
[ ] Link with the platform dependent static library in the build script
[ ] Make sure that builds are stable for all supported platforms

Note: The idea is to modify the build script of frida-gum-sys to our use-case so refer to that build script for reference

Alright, so I have made some progress on this. We basically need to do three things --

Defer as much of the work as possible to the existing frida-gum-sys build script
Keep frida-gum libs in the source tree and use cargo:rustc-link-search to add the appropriate directory for the platform to the linker path
frida-gum-sys build script generates appropriate bindings using the platform specific frida-gum.h and bindgen so make sure that bindgen can find frida-gum.h

The first issue we face is that the lifecycle of a cargo build script is such that it is executed just before compiling the binary, which means that the build scripts of all the dependent crates are executed before the build script of mirrord-layer (and we can't have build script on the workspace level).
This basically implies that we need a mechanism to make bindgen aware of the include path for frida-gum.h and we need to it before executing our build script. Adding the appropriate path to the linker path can still be done in our build script without any problem.

So I have two approaches I need to discuss:

As of now frida-gum has no support for configuring the include directory, this approach tweaks the frida-gum-sys build script to support configuring the include directory using an environment variable and then uses the cargo feature to set this environment variable before building mirrord.
In my limited testing I have found this approach to work well, just that we would have to get the required changes included in frida-rust. Also we would need to keep a single header file for frida-gum with appropriate pre-processor flags for conditional compilation. Prototype for this approach can be found here.
The second approach doesn't quite work yet, laying it down here in the hope that someone else can provide a better insight. This approach uses the fact that bindgen allows arguments to be passed to clang through environment variables. So we can pass the appropriate include directory by setting this environment variable in cargo configuration. The only problem being that I have not been able to figure out how to make this work with relative paths and this approach is useless without that.
If we can make this work with relative paths we can probably set TARGET env var and then use BINDGEN_EXTRA_CLANG_ARGS_<TARGET> to set include paths based on target. The working code for this approach can be found here, although you would have to tweak the absolute path to make it work for you.

What about forking the auto download crate then using replace to use the fork?


[WIP] - Added the initial code to get APK size in comments

          1 Error

:no_entry_sign:
sh: 1: apkanalyzer: not found

          2 Warnings

:warning:
This pull request is a Work in Progress and not ready to merge

:warning:
Please provide a Pull Request description …

          2 Messages

:book:
Thanks @wajahatkarim3 👍👍

:book:
Release APK size: 4.52 MB

AndroidLint found issues
Warning (30)

File
Line
Reason

/home/runner/.gradle/caches/transforms-3/4ec957b4346db8a8a06ba01b1b0a70ee/transformed/jetified-annotation-experimental-1.0.0/jars/lint.jar
N/A
Lint found an issue registry (androidx.annotation.experimental.lint.ExperimentalIssueRegistry) which did not specify the Lint API version it was compiled with.

This means that the lint checks are likely not compatible.
If you are the author of this lint check, make your lint IssueRegistry class contain
  override val api: Int = com.android.tools.lint.detector.api.CURRENT_API
or from Java,
  @Override public int getApi() { return com.android.tools.lint.detector.api.ApiKt.CURRENT_API; }
If you are just using lint checks from a third party library you have no control over, you can disable these lint checks (if they misbehave) like this:
android {
        lintOptions {
            disable "UnsafeExperimentalUsageError",
                    "UnsafeExperimentalUsageWarning"
        }
    }
/home/runner/.gradle/caches/transforms-3/f381b4f06bb405560c6c05f139560cb4/transformed/appcompat-1.2.0/jars/lint.jar | N/A | Lint found an issue registry (androidx.appcompat.AppCompatIssueRegistry) which is older than the current API level; these checks may not work correctly.
Recompile the checks against the latest version. Custom check API version is 7 (4.0), current lint API level is 10 (7.0+)
/home/runner/.gradle/caches/transforms-3/3556d6d6e196707f50e55dbbeaba8359/transformed/fragment-1.2.5/jars/lint.jar | N/A | Lint found an issue registry (androidx.fragment.lint.FragmentIssueRegistry) which is older than the current API level; these checks may not work correctly.
Recompile the checks against the latest version. Custom check API version is 6 (3.6), current lint API level is 10 (7.0+)
/home/runner/.gradle/caches/transforms-3/8c76dc588cac3c7de64206d60fb0f345/transformed/jetified-lifecycle-runtime-ktx-2.2.0/jars/lint.jar | N/A | Lint found an issue registry (androidx.lifecycle.lint.LifecycleRuntimeIssueRegistry) which is older than the current API level; these checks may not work correctly.
Recompile the checks against the latest version. Custom check API version is 6 (3.6), current lint API level is 10 (7.0+)
/home/runner/.gradle/caches/transforms-3/8ed8d1afe1c807f313da8269f9d36d3f/transformed/recyclerview-1.2.0-beta02/jars/lint.jar | N/A | Lint found an issue registry (androidx.recyclerview.lint.RecyclerViewIssueRegistry) which is older than the current API level; these checks may not work correctly.
Recompile the checks against the latest version. Custom check API version is 8 (4.1), current lint API level is 10 (7.0+)
/home/runner/.gradle/caches/transforms-3/082f39393f787b6fb1906f59ebce7bb0/transformed/jetified-dagger-lint-aar-2.31.2/jars/lint.jar | N/A | Lint found an issue registry (dagger.lint.DaggerIssueRegistry) which is older than the current API level; these checks may not work correctly.
Recompile the checks against the latest version. Custom check API version is 8 (4.1), current lint API level is 10 (7.0+)
app/build.gradle | 12 | Old buildToolsVersion 30.0.2; recommended version is 30.0.3 or later
app/build.gradle | 53 | A newer version of org.jetbrains.kotlin:kotlin-stdlib than 1.4.21 is available: 1.4.30
app/build.gradle | 61 | A newer version of androidx.lifecycle:lifecycle-viewmodel-ktx than 2.2.0 is available: 2.3.0
app/build.gradle | 62 | A newer version of androidx.lifecycle:lifecycle-livedata-ktx than 2.2.0 is available: 2.3.0
app/build.gradle | 63 | A newer version of androidx.lifecycle:lifecycle-runtime-ktx than 2.2.0 is available: 2.3.0
app/build.gradle | 66 | A newer version of androidx.navigation:navigation-fragment-ktx than 2.3.3 is available: 2.3.4
app/build.gradle | 67 | A newer version of androidx.navigation:navigation-ui-ktx than 2.3.3 is available: 2.3.4
app/src/main/AndroidManifest.xml | 15 | When using intent filters, please specify android:exported as well
app/src/main/AndroidManifest.xml | 8 | On SDK version 23 and up, your app data will be automatically backed up and restored on app install. Consider adding the attribute android:fullBackupContent to specify an @xml resource which configures which files to backup, or just set android:fullBackupOnly=true. More info: https://developer.android.com/guide/topics/data/autobackup
app/src/main/java/com/wajahatkarim3/imagine/adapters/PhotosAdapter.kt | 48 | It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
app/src/main/java/com/wajahatkarim3/imagine/adapters/TagsAdapter.kt | 48 | It will always be more efficient to use more specific change events if you can. Rely on notifyDataSetChanged as a last resort.
app/src/main/res/layout/home_fragment.xml | 9 | Possible overdraw: Root element paints background @color/color_background with a theme that also paints a background (inferred theme is @style/Theme.Imagine)
app/src/main/res/values/colors.xml | 9 | The resource R.color.black appears to be unused
app/src/main/res/values/colors.xml | 13 | The resource R.color.color_error appears to be unused
app/src/main/res/values/colors.xml | 14 | The resource R.color.color_item_background appears to be unused
app/src/main/res/values/themes.xml | 6 | The resource R.style.Theme_Imagine_NoActionBar appears to be unused
app/src/main/res/values/strings.xml | 14 | Replace "..." with ellipsis character (…, …) ?
app/src/main/res/layout/photo_item_layout.xml | 23 | Missing contentDescription attribute on image
app/src/main/res/layout/tag_item_layout.xml | 24 | Missing contentDescription attribute on image
app/src/main/res/layout/photo_item_layout.xml | 16 | 'clickable' attribute found, please also add 'focusable'
app/src/main/res/layout/tag_item_layout.xml | 17 | 'clickable' attribute found, please also add 'focusable'
app/src/main/res/menu/menu_main.xml | 7 | Hardcoded string "Day Night", should use @string resource
app/src/main/res/layout/photo_item_layout.xml | 8 | When you define paddingEnd you should probably also define paddingStart for right-to-left symmetry
app/src/main/res/layout/tag_item_layout.xml | 8 | When you define paddingEnd you should probably also define paddingStart for right-to-left symmetry

  Generated by :no_entry_sign: Danger


Remove check for ring information from Atom::Match

Description
I ran into a case where I had two different SMILES for identical molecules, but no matching was found (i.e., HasSubstructMatch returned False)
A minimal example would be:
mol1 = Chem.MolFromSmiles('c12cc(c(Cc3ccc(cc3)Cc5ccc(C2)cc5)cc1)')
mol2 = Chem.MolFromSmiles('c1cc2ccc1Cc1ccc(cc1)Cc1ccc(cc1)C2')

In that case, Chem.MolToSmiles(mol1) == Chem.MolToSmiles(mol2) is True, but mol1.GetSubstructMatch(mol2) is empty.
It seems that this is a difficult case for the ring searching algorithm, such that len(Chem.GetSymmSSSR(mol1)), len(Chem.GetSymmSSSR(mol2)) is (7, 9). Since the number of rings is queried in Atom::Match, the substructure search fails as well.
This pull request removes the check for the ring number from Atom::Match in Code/GraphMol/Atom.cpp, so that the substructure search is successful. It also adds a test case for a slightly smaller version of that molecule (1 ring less).
All other tests (ran using ctest) are still passing.
Timings
I also did some timing checks, and it does not seem to make a big difference. Running new_timings.py without (top) and with (bottom) the change gives:
| 2023.03.1pre | 6.6 | 3.3 | 2.1 | 0.0 | 13.0 | 13.7 | 0.0 | 52.7 | 51.6 | 12.5 | 15.8 | 7.6 | 56.5 | 2.2 |
| 2023.03.1pre | 6.2 | 3.1 | 2.0 | 0.0 | 12.9 | 13.6 | 0.0 | 52.3 | 52.1 | 12.2 | 15.2 | 7.4 | 56.2 | 2.2 |

I also ran some small tests myself (using cyclosporin A, a linear peptide with sequence "DGAPSTE", as well as the molecule mentioned above), and did not find a large difference, except for the case were no alignment was found previously. The timings were collected using the timeit.repeat function in Python, with 1000 runs and 5 repeats.
Without the change:
Complicated ring system:
Can match: False
Average times for substructure search: 3.3, 3.4, 3.3, 3.3, 3.3 µs
Cyclosporin A
Average times for substructure search: 453.8, 464.6, 468.4, 466.7, 466.0 µs
Cyclosporin A, search for amides
Average times for substructure search: 8.4, 9.9, 8.5, 8.8, 8.4 µs
Cyclosporin A, search for (nonexistent) prolines
Average times for substructure search: 5.7, 5.6, 5.6, 6.0, 5.5 µs
linear peptide, search for prolines
Average times for substructure search: 4.4, 4.6, 4.5, 4.5, 4.4 µs

With the change:
Complicated ring system:
Can match: True
Average times for substructure search: 86.7, 89.0, 89.9, 89.9, 89.6 µs
Cyclosporin A
Average times for substructure search: 410.4, 413.1, 411.0, 411.1, 413.5 µs
Cyclosporin A, search for amides
Average times for substructure search: 8.6, 8.5, 8.5, 8.5, 8.5 µs
Cyclosporin A, search for (nonexistent) prolines
Average times for substructure search: 5.6, 5.6, 5.5, 5.6, 5.5 µs
linear peptide, search for prolines
Average times for substructure search: 4.4, 4.4, 4.4, 4.4, 4.4 µs

Questions

Could this change lead to other unexpected issues?
Are there other things I should try out?

I would be very grateful if you could have a look at this. This is my first pull request to rdkit, so please let me know if I forgot something.
Best regards,
Franz Waibl

Thanks for this well-explained and tested fix @fwaibl !


Reduce function definitions starting with case to function overload

Attempt to resolve #3. Right now it compiles to full function (not do: macro), but it think it's good starting point.
test : Int -> String
test num =
    case num of
        1 -> "cichocinski"
        number -> ("wende", number)

@spec test(int) :: String.t
def test(1) do
  "cichocinski"
end

def test(number) do
  {"wende", number}
end

EDIT: I know that function is invalid in terms of static type checking but it was done on purpose.

test num =
    case num of
        1 -> "cichocinski"
        number -> ("wende", number)

add a b =
    case a of
        1 -> a
        _ -> b

def test(1) do
  "cichocinski"
end

def test(number) do
  {"wende", number}
end

def add(a,b) do
  case a do
    1 -> a
    _ -> b
  end
end

Thanks!


Updated list of AWS regions for Amazon Polly

Updated the list of AWS regions to include all regions supported by the Amazon Polly service.
Fixes #14052
Description:
Related issue (if applicable): fixes #14052
Checklist:

[ ] The code change is tested and works locally.
[ ] Local tests pass with tox. Your PR cannot be merged unless tests pass

If user exposed functionality or configuration variables are added/changed:

[ ] Documentation added/updated in home-assistant.github.io

Hi @GotoCode,
It seems you haven't yet signed a CLA. Please do so here.
Once you do that we will be able to review and accept this pull request.
Thanks!


Don't encode http:// or https://

have added uri_encode_component for complete percent encoding and uri_encode now handles whole URIs including http://


Remove Instance from NFT Form

Some users don't know what to put inside instance field (check image below)

I think that we should remove it from UI and derive it from name
slugify(nft.name, '_')

Yeah, that's definitely more user friendly

Closed in #78


show ascending order in wegui job list

Hello,
How do I config cups webgui to display the jobs in ascending order (Newest to Oldest)?

That is no longer possible in the 2.x web interface, and we have no plan to add it.


Add a parameter for a custom AJAX function

Adding a parameter for a custom ajax function to use as a drop-in replacement to $.ajax(). This is necessarily in some custom cases where the data is retrieved in a way that is not conducive to making a request directly through $.ajax(), i.e. a websocket or a caching mechanism. This adds a lot more potential flexibility to the AJAX functionality of the library for relatively little cost.

Thank you for a great job. Since it's been so long and there were some conflicts, I merged it to 2.4.0


App always imports the first measurement instead the newest

Description
With Medisana BU550 connect the app imports not the newest measurement. Always the oldest one is saved.
Btw: Thank you for development!
Android version
Android 11
Reproduction steps
1. Delete memory of the BU550 connect
2. Make the first measurement and import it.
3. Make another measurement and try to import.
4. You will see that the first measurement was imported.

Screenshots & Settings backup
No response
App debug info
No response

Unfortunately I have no experience with the BU550 connect but if I understood you correctly you have to manually transmit values. (Please correct me if I'm wrong)
The intended scenario for the Bluetooth input feature was the following:

You take a measurement
Your measurement device automatically advertises data over Bluetooth
You open the app and tap on Bluetooth input
The app and the device figure out how to prefill measured data

Could you check whether your devices supports such a protocol? If not I can convert this to a feature request for importing data from Bluetooth.

A similar problem was reported on the Beurer BM 57 through another channel. After attempting the process described in my reply above, any further reports on which devices work and which don't are welcome:
Preliminary compatibility table

Reported working
Reported broken

Boso medicus CE6674
Medisana BU550

Omron x7 smart
Beurer BM 57

That's a great find! Your approach to the solution is also much simpler and stable than my initial idea of device specific code.
Two remarks:

From a glance it seems like the python code uses a notification instead of a indication. As far as I know the difference is just a few bits send to the ble device, but that needs more testing (from the behavior reported here it seems like it's fine for these cheap devices).
I still wouldn't wait with filling in the measurements (some cheap devices might not implement connection closing) and replace them in the (presumably) rare case a newer measurement (timestamp) is reported later.

ubpm by LazyT (desktop app) handles the multiple measurements quite nicely (at least from how it shows to the user), maybe their bluetooth-plugin code is worth a look. After connecting, it just imports all transmitted measurements though, so no "manual filtering" of sorts as far as I could tell.
It's on a GPLv3 license though, so I don't know how that would affect things (just as a heads-up).


How can I get Distogram prediction?

I am wondering for how can I get Distogram prediction? Because I want to know when I get a mispredicted structure, it's because there aren't enough diffusion samples or the Distogram prediction is wrong.

Currently there are no distogram predictions.

Because I want to know when I get a mispredicted structure, it's because there aren't enough diffusion samples or the Distogram prediction is wrong.

I don't think you need distogram to make conclusions.
You have n samples, if all 5 samples have some distances mispredicted - then it is an error at the level of trunk, not at the level of sampling (5 samples form a small distribution in this case, and you can see if all of them are different from ground truth)
Alternatively, compare prediction of n steps and 2n steps.

I think distogram prediction is very useful too. Could you please provide distogram prediction head or contact prediction head?


Save changes to "!C:\WINDOWS\system32\cmd.exe"?

When closing gvim.exe with [X] button on Window, this confirm dialog is shown. But this is strange message. Bram, do you have ideas to correct this?

I wrote down this problem but haven't worked on a solution yet.  Should at least not suggest to save changes for a terminal window.

Also see #2215

Fixed now.


Chore set min_be_exec_version from 0 to 3

Proposed changes
set min_be_exec_version from 0 to 3
Further comments
If this is a relatively large or complex change, kick off the discussion at<EMAIL_ADDRESS>by explaining why you chose the solution you did and what alternatives you considered, etc...

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall

run buildall


On MacOS/SwiftUI how do you use keyboard to submit?

On macOS Is there a simple way to allow "enter" key to submit on RichTextEditor ? I actually couldn't find this feature on the SwiftUI TextEditor either.
I want standard text input for a chat view. Enter submits text, shift+enter adds new line.
Any insight, much appreciated!

Hmmm not sure, SwiftUI has a native onSubmit view modifier, but that will (most probably) not work here. Let's keep this open and discuss it further.

@ismyhc I have verified that you can use the SwiftUI .onKeyPress(.return) modifier, for instance:
RichTextEditor(
    text: $document.text,
    context: context
)
.onKeyPress(.return) {
    print("Save")
    return .handled
}

Keep in mind that if you do this, the text field will not insert any new lines.
Also, if you create a document-based app, you have other shortcuts for this action. See the new demo for more info.


Update/change default spectrogram scheme

Updates the default spectrogram scheme to :inferno instead of :magma. The inferno color scheme provides slightly better contrast in comparison to magma.

Codecov Report

Merging #25 (5065cdc) into master (9d55721) will increase coverage by 0.09%.
The diff coverage is 0.00%.

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
+ Coverage   61.37%   61.46%   +0.09%
==========================================
  Files          15       15
  Lines        1007     1007
==========================================
+ Hits          618      619       +1
+ Misses        389      388       -1

Impacted Files
Coverage Δ

src/phon_spectrogram.jl
0.00% <0.00%> (ø)

src/vptree.jl
98.82% <0.00%> (+1.17%)
:arrow_up:

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.


Move the declaration of drt_debug_print into a header.

[X] Have you provided a meaningful PR description?

Fixes build error after the nrt_dbg_print was renamed to
drt_debug_print.

[ ] Have you added a test, reproducer or referred to an issue with a reproducer?
[X] Have you tested your changes locally for CPU and GPU devices?
[X] Have you made sure that new changes do not introduce compiler warnings?
[ ] If this PR is a work in progress, are you filing the PR as a draft?

The issue was after #1002 we renamed the function in all files but it was not publicly declared and defined, causing an:
error: call to undeclared function 'drt_debug_print'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]

The fix is to move the function definition out of _dpexrt_python.c into _dbg_printer.h and then include _dbg_printer.h everywhere.


Make anonymity optional

As a student I want to choose whether my name would be shown so that I can decide to stay anonymous or to make instructor know who left the feedback.
AC-01
[AC_DESCRIPTION]

[STEP] [EXPECTED_RESULT]

Way of making anonymity optional will be discussed with the сlient on the next meeting. So for now we don't have enough info for writing AC.


Analytics 2.2

Update application to use Analytics 2.2.
The change for this version is a single large PR that revises how much of the cost calculations are done to reduce use of hard-coded values. This needs review on test server before going to production.
This PR will be merged into the test server branch for release, but otherwise should stay open until any related issues have been resolved.

closing this as we have a new tag release in prep


Arcgoose Typings & TypeGenerator

I added some TypeScript Types which makes it even more smoother to use this library in TypeScript. Types are derived directly from the JS-Implementation (by hand).
I also added a cli to generate types directly from a Feature-Service URL. This will autogenerate the schemas, layers, tables and attribute-interfaces with the info retrieved from ArcGIS.
There is a new Section in Readme which demonstrates the behaviour.

@mvdbster Do you see any chance of this flowing into esri/arcgoose or do you think it should go into a seperate repo? The limits seem pretty hard to get into the official DefinietlyTyped don't know if this needed for such a specific package...
Since you are not using TS i don't even know if you are willing to adopt this definition. But i guess it would be possible to use the types also in a JS only environment...


feat: adds optional value pre- and suffix

:tada: This PR is included in version 1.0.0-dev.7 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


Source corrected

Change in renovels

corrected duplication of novels
improved cover quality

Changes in rulate

added authentication bypass for some light novels

icons (LNReader/lnreader-sources/pull/230)


Update version NPM serves to reflect latest here

When installing grunt-manifest using npm the version that is pulled down looks to be a few versions behind what is in github - is there any chance of updating this?

Updated.


fs: Add plugin ensuring hosts path are available in container.

Codecov Report

Merging #108 into master will decrease coverage by 0.23%.
The diff coverage is 0%.

@@            Coverage Diff             @@
##           master     #108      +/-   ##
==========================================
- Coverage   18.12%   17.88%   -0.24%
==========================================
  Files          54       54
  Lines        2714     2739      +25
  Branches      305      309       +4
==========================================
- Hits          492      490       -2
- Misses       2186     2213      +27
  Partials       36       36

Impacted Files
Coverage Δ

lib/python/treadmill_aws/plugins/fs/aws.py
0% <0%> (ø)

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 c1dd214...238c47f. Read the comment docs.


this is a bind mount so don't change the SELinux Context

If the source of the bind mount in an nfs v4 export is also managed by puppet then the SELinux Context is flipping between the original resource and the resource created here if they are not the same.

Thanks!