Vite/typescript

Thanks you so much! I will take a look at this thread tomorrow.
Some Questions: Is there any syntax or something worth mentioning that needs to be updated in README.md for this vite/typescript version? If so, feel free to add anything you think is appropriate for the developer to understand. Thanks in advance.

Hi, no problem! There's nothing to add to the readme, but I have to narrow the types... I'll use the template as a base for one of my projects and update the repo accordingly.

Well, probably we have to add that the branch exists 😅

Hi, Daniele.
I've checked this branch recently and thanks for your efforts! However, I can not successfully run the localhost after executing npm run dev because ./models folder in your repo is missed. Do you have any idea about it? Feel free to let me know if I'm understanding it the wrong way. Thanks.

Hi, no problem! There's nothing to add to the readme, but I have to narrow the types... I'll use the template as a base for one of my projects and update the repo accordingly.

Currently, the repo can't be built npm run build because it doesn't pass the typescript type check. I will merge this PR once the typescript tsc command is successful. Thank you.

Well, probably we have to add that the branch exists 😅

Thanks for your notice. Done 🙌

Hi @TomHsiao1260 I'll take a look for the compiling failure and take the needed steps to fix it 👌

@TomHsiao1260 do you still have issues ?

Hi, @theRenard
Thanks you in advance for this PR. Really appreciate it. However, I think the issue 1, issue 2 mentioned above still don't resolve yet. Could you take a look at these two threads? Feel free to discuss with me in the threads below. Thanks.


[website] figure out how to better explain ytt's strengths on the home page

based on @ctaymor's feedback i think we should find out better content that explains why someone should use ytt instead of erb/jinja/etc on the home page.

To that end, the main selling point I see in ytt is that you can start with plain YAML.
You could do that with jinja as well but it is less portable (python) and it is only text templating.
I would suggest placing this, or a similar loop, at the top  of the page above Features heading:
array_with_data:
#@ for val in [1,5,{"key":"val"}]:
- item: #@ val
  kind: data
#@ end

I would also throw in a summarizing tagline such as "Data can be DRY too"

closing in favor of: https://github.com/k14s/ytt/issues/99


Limit the retry period length in waitForPodsReady

What would you like to be added:
An additional field in waitForPodsReady.requeuingStrategy to limit the length of retry period to, say, 30 minutes-1hour.
Why is this needed:
Currently the retry period length grows exponentially. If the workload could not start for 2 days, the next retry will be in 2 days (more or less).  That basically means that the user has to recreate the workload to make it admitted in a reasonable time.
It might not be a problem with 1 workload, but it may be a challenge with 500 workloads that were failing over weekend due to a silly config error.
Completion requirements:
This enhancement requires the following artifacts:

[ ] Design doc
[x] API change
[x] Docs update

The artifacts should be linked in subsequent comments.
cc: @mimowo @tenzen-y

Sounds good to me.
@mwielgus @mimowo How about the .waitForPodsReady.requeuingStrategy.maxRequeuingPeriod?

Maybe by analogy to 'backoffBaseSeconds' we can have 'backoffMaxSeconds'?

Maybe by analogy to 'backoffBaseSeconds' we can have 'backoffMaxSeconds'?

But isn't this parameter nonrelated to backoff?

Maybe by analogy to 'backoffBaseSeconds' we can have 'backoffMaxSeconds'?

I synced about this offline with @mimowo. In conclusion, I agree with the backoffMaxSeconds since once the workload exceeds, the backoffMaxSeconds keeps to be re-queueing with the backoffMaxSeconds.

@tenzen-y I would like to work on this, probably my first contribution in project :) lmk, thanks!

@Kavinraja-G sgtm,
One question remains open if this param should be defaulted (to say 1h), or left as an opt-in knob. Any opinions?

I think we can default the value to 1h and set it as safer threshold.

sgtm, feel free to submit the PR. @mwielgus @tenzen-y let us know if you have some additional perspective.

1h still sounds short, given how long it might take to obtain a GPU these days. Maybe 24h?

@kevin-wangzefeng Yeah, feel free to take this issue.

1h still sounds short, given how long it might take to obtain a GPU these days. Maybe 24h?

I agree that 1h is still shorter, but I'm not convinced which default value is better since the value deeply depends on the Job types in the cluster like long running Jobs vs short term Jobs.
I believe that we should consider the objective of the default value. For example, the default value is for a. mitigating errors by invalid configuring credentials and image names or b. reducing the nonvaluable re-poping due to insufficient computing.
If we assume situation a, it would be better to set the default shorter time within a single business time, if we assume situation b, selecting 24h would be better.

For example, the default value is for a. mitigating errors by invalid configuring credentials and image names

Ok, so here we are assuming that the user didn't notice the multiple run attempts, and then they notice, they fix the image name (for example). So now we don't want them to wait 24h to run again.
In that case, 1h sounds ok. Maybe it's also acceptable from an insufficient computing perspective.

@Kavinraja-G have you started this already? Otherwise, I can take it

I think you can @Kavinraja-G has taken #2204 for now.

/assign


gensym captured variables that  haven't already been gensymed

If I tried to capture a global variable in nbJsFromCode inside a template, it didn't gensym the variable correctly (because it wasn't gensym'd by the template, the code didn't know to gensym it itself). This seems to fix it, though.

Trust you on this one :), maybe add a change log line and then squash and merge ahead!

Trust you on this one :), maybe add a change log line and then squash and merge ahead!

Hehe, I barely understand it either, but it doesn't seem to brake any existing code and fixes broken code :upside_down_face:

do you happen to have a small example for the issue? it is probably not worth making a test about it but at least it have it here documented in the issue for when we have to refer back for some reason could be good.

import nimib

nbInit

var counter: int # the gloabl variable in question
template component() =
  nbJsFromCode(counter):
    import std / dom
    window.addEventListener("load", proc (e: Event) =
      echo counter
    )
  counter += 1 # the counter should be different for the two components

component()
component()

nbSave

The counter should be different for the two components, but if you look in the JS console you see that both of them are printing 1 instead of 0 and 1. This is because they are both named counter_469762080 in the JavaScript so the second component's assignment, overrides the first one's. Hence why we have to gensym captured global variables.


Added destroy lifecycle method

With single page apps, you may want to manage the lifecycle of the DOM more precisely. I have added a pull request for a destroy method that can be used to clean up the events when pages change.

Hey @kmalakoff, that would be a good addition.
Here are some things that could be improved:

According to delegate-events docs, the 3rd param is a callback so we don't need that when unbinding.
Destroy method should be added on ClipboardAction too and Clipboard should call it.

All of those sound good assuming one instance of Clipboard is managed as a group.
FYI: I originally tried to use ClipboardAction directly (understanding the event delegation tradeoff) given https://github.com/zenorocha/clipboard.js/issues/25 since it wold be easier to integrate with React so definitely a destroy on the ClipboardAction could be good to expose a lower-level API. That said, after multiple attempts, I couldn't get it to work so settled with the jQuery approach using Clipboard.

Just started reviewing :) :octocat: Sent from GH.

Thank you, pull request merged! :octocat: Sent from GH.

Merged, tested and documented. Would you mind checking the final result and leave your opinions? Thanks for contributing @kmalakoff.

Yeah, works well. Thanks!


Bump

Python 3 support :tada:

Hi! This is the friendly automated conda-forge-linting service.
I just wanted to let you know that I linted all conda-recipes in your PR (recipe) and found it was in an excellent condition.

@daf, @lukecampbell, and @kwilcox can I add you as maintainers here?

:+1:


No windows app anymore?

Hey so, firstly, thanks for making this. I can't download the musixmatch app on the windows store anymore so I'm not sure how I am supposed to get a token. Thanks in advanced.

There is no token needed necessarily from the user (you), a token is already present in the code. Just clone this repository and execute commands as per in the readme and everything should work. Let us know here if you have any problems and close this issue if everything goes well. Thanks!

thank you so much. that was all.


Remote environment with Windows Server 2012.

I tried to run
"python -m pysc2.bin.agent --map Simple64"
using Remote Desktop. (local: Windows 10, remote: Windows 2012)
However it failed with the message
"Running Starcraft II Through a Remote Desktop Connection is Not Supported. Exiting Program."
which seems like same : http://www.blizzhackers.cc/viewtopic.php?f=220&t=487510
To work around this, it tried to connected remote server using Power Shell with command "Enter_PSSession"
Executing "python -m pysc2.bin.agent --map Simple64" with remote session create Starcraft 2 process, and soon Blizzard_Error process, which seems like the same as the case above.
Is there any method to solve this problem, or work around this?

This is not something we currently support. Remote desktop was disabled since there were a bunch of graphical and sound bugs. Would require some research to determine if it is safe to turn back on.
Another option could be to add a headless windows mode. That currently isn't planned either however.

Because I guessed Remote Desktop is disabled by graphical issue, and I also tried --render false option.  It did not work, too.
should headless windows mode be supported by SC2 itself? (not pysc2)

The windows SC2 client currently doesn't have a headless mode.


aftter call funtion FlutterLogs.logInfo("TAG", "subTag", "My Log Message"); (Flutter 1.25.0.pre.141)

error this on run application
[ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: MissingPluginException(No implementation found for method logThis on channel flutter_logs)

@chanthavong Is this happening on an example app or your project?

After updating Flutter to 2.0 I've started getting this error on release mode. In debug, however, it works fine.

MissingPluginException(No implementation found for method logThis on channel flutter_logs)
at MethodChannel._invokeMethod(platform_channel.dart:294)
at FlutterLogs.logError(flutter_logs.dart:269)
Flutter: V3.3.4
Happens in debug too sometimes


support exporting/replaying the results from graphql queries

r? @chazkiker2

OK, good enough for now. =)


Consider combining the API's of Portal, OpenAPI and perhaps the Admin Service into one OpenAPI service

Taken from the wiki

Problems:

The OpenAPI service is integrated into the Apollo Potal, thus it's not HA, (or we may need to deploy multiple Portal web-apps and configure a load balancing server).
The OpenAPI only covers a small subset API's of the Apollo Portal API, and increasing the coverage brings duplicated code (they require the same functionalities so they share the same code snippet to interact with the Admin Service, right?). related issues to ask for more Open API's: #2069 #1648 #1759
Users may want to implement their own Portal, even a mobile app Portal (such as https://github.com/ctripcorp/apollo/issues/1648#issuecomment-436495927)
Authorization and authentication should be done twice, one for the Portal and one for the OpenAPI

I'm thinking whether we can combine the API's of the Portal, OpenAPI and the AdminService into one OpenAPI (because they all require the same thing, manipulating configs), then the Portal UI and the users' third-party clients interact with this OpenAPI, authorization is also done there. I think this may also reduce the complexity of deployment (#1424 )
It's just a bold thought, what do you think @nobodyiam , are there other concenrs? If I've missed anything, please point it out, thanks :)

feel free to close it if it's out of scope :)

This is a bold thought to provide a real open api layer and treat portal as a standalone ui component. With this abstraction, it should be very easy to customize or even provide a fresh new ui.
However, this may involve a lot of refactoring work. Also adding one more component may bring extra effort in deployment and maintenance.
For the 4 problems described above,

This might not be a problem since adding a open api service will have the same issue
This involves some development work but it is not larger than refactoring the whole portal with a new open api service
This makes sense, though I think it may be rare to write a fresh new portal
Portal and OpenAPI now already have 2 difference authentication and authorization model


Remove unsupported parameters from AppleToastView initialization

Thanks for your contribution. But this PR has too much of deletion which should not include and and also the type is a default value, do not need to remove


Give effect to blendMode and alpha/opacity values in parameters

Draws to a CG context using a draw function with no alpha or blendMode parameters, should use an alpha/opacity value of 1.0f and a blendmode of kCGBlendModeNormal as per the spec.
Similarly, draws using a function with inline alpha and blendMode parameters, should use those for the draw and restore the original state afterwards.
At least 2 functions are affected:
drawInRect(rect, blendmode, alpha) & drawAtPoint(point, blendMode, alpha) : alpha values ignored

According to @shahmeeresmail #636 fixed this already.


Make SQHDatabase, SHQTable, and SQHResult filetypes work with different providers

Currently they're hardcoded to MySQL.
Look at how I've done it in plugin/sqhell.vim
e.g.
command! -range -nargs=0 SQHExecuteBlock execute "<line1>,<line2>call " . g:sqh_provider . "#ExecuteBlock()"

https://github.com/joereynolds/SQHell.vim/commit/0afe0e59b35cb14e8ec4aa975886277a0ad64928


Restrict game requests by date.

Problem:
Game stats (/data/game) queries are slow, section Vault -> Online replays.
As the possible solution for speedup is to find the way how to lower load on database.
Goal: limit the api requests by date.
PS: we don't know exactly where and how to solve it, faf-java-api doesn't have the default way to filter results if there some attribute is missing, so I suppose we should to do it on client side.

was this solved by the only from last year button and pagination?

@Sheikah45 Donno, try to ask that one who made the pagination. Still default date from (like 1 year) is not bad thing, cause any other request on API could do the load not only from client.


[API] Add GetTokens handler

Add new handler
Now we can get list of tokens by map: coin -> [addresses]
POST
path - /v3/tokens
body - {"coin": ["address"]}

We need new architecture for all atlas plaform if we need batch requests. There is no sense to use batch with current design.
My opinion is that we need to remove all batches and use another service that will aggregate requests if we need it.
Each platform have its own problems. Sometimes it is not working, sometimes it is broken because api changed. We cannot guarantee that with batch request there will not be a common panic

I think this problem can be solved in another PR
And since we have a similar implementation for other services, and it works now, I do not see a problem in this
https://github.com/trustwallet/blockatlas/blob/master/api/registry.go#L80

We need new architecture for all atlas plaform if we need batch requests. There is no sense to use batch with current design.
My opinion is that we need to remove all batches and use another service that will aggregate requests if we need it.
Each platform have its own problems. Sometimes it is not working, sometimes it is broken because api changed. We cannot guarantee that with batch request there will not be a common panic

I think this problem can be solved in another PR
And since we have a similar implementation for other services, and it works now, I do not see a problem in this
https://github.com/trustwallet/blockatlas/blob/master/api/registry.go#L80

Firstly, we do not need to make anything worse than it is.
Secondly, this issue is need to be solved on backend side

Created a separate issue to improve fetching tokens at any point in the future: https://github.com/trustwallet/blockatlas/issues/1057


SSC: tolerate the empty max cpu number in MACHINE ESA

Set maximum number of virtual processors to its default value if empty max cpu number defined in MACHINE ESA
The default max_cpus value is either 1 or the number of CPU statements for this user, whichever is greater.

@jichenjc @bjhuangr @SeanHQF please help review.


include python 3.12 into deps and ci

ONNXRuntime does not support 3.12 yet: https://github.com/microsoft/onnxruntime/blob/db3901ab9790fef952aa6a0147eedf671c17c899/pyproject.toml#L5

Will prefer to wait for ONNXRuntime to support 3.12 before supporting 3.12 ourselves and making a 0.1 release

Related issue: https://github.com/microsoft/onnxruntime/issues/17842

@NirantK Can you pin at least in this way, and free your own package. Would make it more clear, but has identical effect.
onnxruntime-gpu = {version = "*", python = ">=3.8,<3.12"}

onnxruntime = {version = "*", python = ">=3.8,<3.12"}

This gets overwritten every time we use poetry to upgrade packages to:

onnxruntime = "^1.16.3"

The Python version lock is indeed described as you'd mentioned:

python = ">=3.8.0,<3.12"

We'd not want to remove the version lock completely on onnxruntime for reproducibility of issues. Without that, a fastembed version could map to any onnxruntime version and we'd not be able to debug if it was a version issue.

FastEmbed now supports Python3.12 and this PR/branch is no longer relevant and updated. Closing this without merging.


Amplify CLI allows creation of duplicate REST API path

Describe the bug
Amplify CLI allows creation of duplicate REST API path
Amplify CLI Version
v4.28
To Reproduce

amplify add api -> add a /items REST endpoint
amplify add api -> add a /items REST endpoint again, observe there is no error

Expected behavior
should error the second time
Screenshots
this looks like its a risk of being a bad time...

no error seen on amplify status either

@sw-yx We do have a warning for catch all paths for overlapping paths
This path /items is overlapping with /items. /items is going to catch all requests from /items. Are you sure you want to continue?

@sw-yx Are they duplicate paths on separate API Gateway APIs? If so, there shouldn't be any conflict as the hostname for each API is unique.

i understand how this is permissible under the current APIG model, but i'm also saying that this isnt a good developer experience for people who don't know any better. as a user i expect each path to be unique, and that when i make a mistake, the tool i use helps me do the right thing instead of creating a hard-to-debug situation like this nobody wants.

@sw-yx Do you think the appropriate fix would be to only allow one REST API resource in the project, similar to how the CLI only allows one GraphQL API?

@edwardfoyle  i think that is one way to do it, yes, but why did we not implement that in the first place? what are the tradeoffs? (i honestly cant think of any)

I think what's happening here is actually a DX issue. When you add a new API, it should provide you the option to add new paths to an existing REST API or add a new REST API.
Something in the direction of this is probably better. A DX sample could be:
> amplify add api
GraphQL API
REST API
New path to an existing REST API --> shortcuts into amplify update api with the path question

I think what's happening here is actually a DX issue. When you add a new API, it should provide you the option to add new paths to an existing REST API or add a new REST API.
Something in the direction of this is probably better. A DX sample could be:
> amplify add api
GraphQL API
REST API
New path to an existing REST API --> shortcuts into amplify update api with the path question


setting custom health probe via portal gets reset automatically after some time

Describe the bug
I have deployed Elasticsearch in AKS using the link https://www.elastic.co/guide/en/cloud-on-k8s/current/k8s-quickstart.html,
and exposed (public ip / domain) using ingress app gateway.
Using ingress health probe is automatically created for elasticsearch, but since elasticsearch is by default protected with basic auth it returns 401 status code, which causes backend health to fail.
To resolve this, I tried manually editing the health probe from portal and set it as 200-399,401, which resolves the issue for sometime (it gets reset to 200-399 automatically after some time.)

@dipakyadav  By default AGIC assumes full control of the appgw. Hence any manual changes done by you in the application gateway shall be revoked by AGIC whenever any of these actions happen (New Pod launch, New ingress rule addition, Removal of ingress rules etc..). You have two options here, One is defining a ProhibitedTarget (you have to launch AGIC in shared mode for this). Another is editing the health check of the elasticsearch deployment (Editing the existing liveness/readiness probe).
Reference link for Azure Ingress Prohibited target
https://github.com/Azure/application-gateway-kubernetes-ingress/tree/master/crds
This issue shall be closed.

Thanks @vishal8k , will check


Error struct

We should have an exception that we can use to capture different errors. I'm not sure if we should wrap over the Mint errors or not. But it seems like we might want to for consistency.

Reraising Mint.HTTPError into a Finch.Error is probably prudent. I think that the way Mint documents all of the possible error types makes for a very easy to use API, and I think Finch could benefit from taking the same approach: https://github.com/elixir-mint/mint/blob/master/lib/mint/http_error.ex#L56
Do you think that it's worth differentiating between server errors and client errors? I've historically found a lot of value in doing so when working with HTTP clients, to make it easier to determine whether a given error is transient and should be retried, or if it's resulting from bad user input / programmer error.

We don't do the client/server distinction in Mint, so I'm afraid it would be a bit annoying to do here 😄

I've started a branch for this. I just need to ensure that we're capturing all of the mint errors correctly

One option here is to say that we return Exception.t. Then we can return Mint.Error for low-level stuff and Finch.Error for high level stuff. It may be more straight-forward than handling all of the wrapping.

Yeah, that's probably the right way to go. I was worried that having that inconsistency would make it harder for people to pattern match on.

is it possible that in this place
children = [
  {Finch,
   name: MyConfiguredFinch,
   pools: %{
     :default => [size: 10],
     "https://hex.pm" => [size: 32, count: 8]
   }}
]

we can also define the return behaviour of success response, such
there is an opportunity to name finch to be your own representation.
MyConfiguredFinch, is it possible to make response your own representation as well and when a request is made.
%Finch.Response{} becomes %MyConfiguredFinch{}

is it possible that in this place
children = [
  {Finch,
   name: MyConfiguredFinch,
   pools: %{
     :default => [size: 10],
     "https://hex.pm" => [size: 32, count: 8]
   }}
]

we can also define the return behaviour of success response, such
there is an opportunity to name finch to be your own representation.
MyConfiguredFinch, is it possible to make response your own representation as well and when a request is made.
%Finch.Response{} becomes %MyConfiguredFinch{}

I think this would be better handled within a module in your application. For example, you could define something like this:
defmodule MyApp.MyConfiguredFinch do
  defstruct [...fields]

  def request(request) do
    # or use a `case` if you also want to transform errors
    with {:ok, response} <- Finch.request(request, MyConfiguredFinch) do
      to_custom_response_struct(response)
    end
  end

  defp to_custom_response_struct(response) do
     %__MODULE__{...}
  end
end

Closing this for now.


Save and reopen Index after train()?

Looking at Index it's not obvious to me if there's a way I can save the index after it's been trained to avoid the cost of training it again on reload.
Would I just use inner_ptr and from_inner_ptr (but where would I get the size of the index in memory behind that ptr)?
Would you consider something like a save() method PR?

I missed io write_index.


Windows and Linus Tesseract produce drastically different results.

Environment
Running Tesseract on both Windows and Linux
Windows:
(downloaded from https://github.com/UB-Mannheim/tesseract/wiki)

Tesseract Version:  v5.0.0-alpha.20210506
Platform: Windows 10

Linux:

Tesseract Version:  tesseract 4.1.1
Platform: Ubuntu 20.04.2 LTS

Current Behavior:
I got the most recent versions of tesseract on both Windows and Linux and I was disappointed at the significant performance drop on Linux.
Linux
https://imgur.com/a/EHyFroL
Windows
https://imgur.com/a/VyyzocY
Current code for both:
`
import youtube_dl
import cv2
import os
import pytesseract as pyt
import numpy as np
import re
from functools import reduce
from nltk import edit_distance
import json
          for dep on Linux
  pyt.pytesseract.tesseract_cmd = r'/usr/bin/tesseract'
          for dev on Windows
  pyt.pytesseract.tesseract_cmd = 'C:\\Apps\\tesseract\\tesseract.exe'
  ...
  def gather_image_data(self, image, saveImageOnFile = None):
      image = cv2.cvtColor(image, cv2.COLOR_BGR2RGB)

      image_data = pyt.image_to_data(image)
      image_data = image_data.splitlines()

      processed_data = []
      for text_data_str in image_data[1:]:
          text_data = text_data_str.split()
          text_data[6], text_data[7], text_data[8], text_data[9] = int(text_data[6]), int(text_data[7]), int(text_data[8]), int(text_data[9])
          if len(text_data) == 12 and len(text_data[11]) > 3:
              processed_data.append(text_data)
       ...

      if saveImageOnFile:
          proof_image = image.copy()
          for box in processed_data:
              x, y, w, h, text = int(box[6]), int(box[7]), int(box[8]), int(box[9]), box[11]
              cv2.rectangle(proof_image, (x,y), (w+x,h+y), (255,0,0), 1)
              cv2.putText(proof_image, text, (x,y),cv2.FONT_HERSHEY_COMPLEX_SMALL, 1, (255,0,0), 2)
          cv2.imwrite(self.media_path+'/ID'+saveImageOnFile+'.jpg', proof_image)

      return processed_data

`
Expected Behavior:
I understand that the versions are different but the results are still too different. I would expect results to vary by maybe 10% not 50%
Suggested Fix:
(I dont really know but here..)
Implementing the training datasets from UB-Mannheim for the linux build.

I am sorry, but this is not tesseract problem:
Use the same tesseract version and the same traineddata, if you want to report "problem". Otherwise it does not make sense.
And replicate problem with tesseract directly as do not support 3rd party project.


Missing .env file?

Tried to follow your setup instructions to run locally, but I get this issue when running the docker compose command:
> docker-compose up --build
ERROR: Couldn't find env file: MY_GOPATH\src\github.com\ribice\goch\.env

I see that .env is in the .gitignore file, but referenced in the docker-compose.yml file, I am just wondering if that is the issue or if I am missing something.
Thank you for your help! Very excited to check out your project!

While testing I noticed this. I pushed an update that fixes this issue.


[STDERR] Unhandled exception. System.BadImageFormatException: An attempt was made to load a program with an incorrect format.  (0x8007000B)

Currently experiencing an issue trying to run the debug program.

But keep receiving this:

I've updated my .NET, VS Code, and C# extension.
Environment data
.NET SDK:
Version:   7.0.302
Commit:    990cf98a27
Runtime Environment:
OS Name:     Mac OS X
OS Version:  13.3
OS Platform: Darwin
RID:         osx.13-x64
Base Path:   /usr/local/share/dotnet/x64/sdk/7.0.302/
Host:
Version:      7.0.5
Architecture: x64
Commit:       8042d61b17
.NET SDKs installed:
7.0.302 [/usr/local/share/dotnet/x64/sdk]
.NET runtimes installed:
Microsoft.AspNetCore.App 7.0.5 [/usr/local/share/dotnet/x64/shared/Microsoft.AspNetCore.App]
Microsoft.NETCore.App 7.0.5 [/usr/local/share/dotnet/x64/shared/Microsoft.NETCore.App]
Other architectures found:
arm64 [/usr/local/share/dotnet]
registered at [/etc/dotnet/install_location_arm64]
Environment variables:
Not set
global.json file:
Not found
OmniSharp log
Starting OmniSharp server at 6/2/2023, 7:09:10 PM
Target: /Users/fan/HelloDotNet
OmniSharp server started with .NET 7.0.302
.
Path: /Users/fan/.vscode/extensions/ms-dotnettools.csharp-1.25.8-darwin-arm64/.omnisharp/1.39.6-net6.0/OmniSharp.dll
PID: 49568
[STDERR] Unhandled exception.
[STDERR] System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
(0x8007000B)
[ERROR] Error: OmniSharp server load timed out. Use the 'omnisharp.projectLoadTimeout' setting to override the default delay (one minute).
Steps to reproduce

Go to 'Output'
See error

Expected  behavior
OmniSharp loads properly.
Actual behavior
[STDERR] Unhandled exception.
[STDERR] System.BadImageFormatException: An attempt was made to load a program with an incorrect format.
(0x8007000B)
Additional context
N/A

@codewithfan The issue is the arm64 build of the extension will not work with a x64 SDK. Try uninstalling and installing a arm64 build instead.


lib/pq: Support to update the password for existing connection pool in golang

Proposal Details
I need a way so that I can update the password that existing postgress-connection pool db object uses for refreshing the connections in the pool.
Details below:
We are using postgress connection pool.
We are planning to move from basic Auth to AWS IAM DB Auth tokens
This token/password expires every 15 mins.
When creating the "db" connecton, I am able to connect using Auth-Token in place of the password.
However, I need a way of updating/refreshing the "password/token" that the existing connection pool uses.
So at any point Postgress wants to create the new connection, the password is a good/fresh one.

fyi - nodeJs allows this feature in pg-promise, we need this ability in golang.

We can use pgxpool with a BeforeConnect function to refresh the AWS IAM DB Auth token before creating new connections, ensuring the pool always has a valid token.

this is not a library owned by the go team, issues should be filed on their repo https://github.com/lib/pq

Thanks @seankhliao for guiding, I have filed a request in lib/pq -  https://github.com/lib/pq/issues/1171

Switching to another library pgxpool is very invasive change for us requiring a lot of testing efforts.
We are using golang sdk provided library to open the connection pool today
Creating connection pool
https://github.com/golang/go/blob/097b7162adeab8aad0095303aff8a045bbbfa6e0/src/database/sql/sql.go#L855
Get the connection pool object in db. Set other settings for the connection pool
db.SetConnMaxLifetime(connMaxLifetime)
db.SetMaxOpenConns(maxOpenConn)
db.SetMaxIdleConns(maxIdleConn)
db.SetConnMaxIdleTime(connMaxIdleTime)
I need to change the password that the connection pool uses to establish new connecitons, is there some way to do it today?

Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only.
For questions please refer to https://github.com/golang/go/wiki/Questions


Fix datagrid grouping arrows

What does the pull request do?

A better fix or #9633 compared to PR #9634. Originally I thought the Key names were swapped. However, the original names actually correspond to the correct path data, but the wrong names were used in the style setter.
What is the updated/expected behavior with this PR?

No functional changes compared to #9634, but the names in the code should be more correct now

You can test this PR using the following package version. 11.0.999-cibuild0027112-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-nightly/nuget/v3/index.json) [PRBUILDID]

You can test this PR using the following package version. 11.0.999-cibuild0027432-beta. (feed url: https://pkgs.dev.azure.com/AvaloniaUI/AvaloniaUI/_packaging/avalonia-nightly/nuget/v3/index.json) [PRBUILDID]


No fields found in struct

The generator runs with no errors but the resulting rfk.h does not contain any references to the field my struct has, only the base struct name. What am i missing?
Ex rfk::Struct const & s = CircleComponent::staticGetArchetype(); s.fields.size() is zero. s.memorySize however is 4 as i expect.
I am on linux building refureku as a subproject in cmake from source with gcc 10.2.0. RefurekuSettings is set using cmakes configure_file. I had to update the included libclang to my local libclang.so.11.1 as i have newer system libraries than what the older one was built against. I had to comment out the Library tests as it just keeps trying to use my projects RefurekuSettings.toml which obviously does not work for the tests. I can't even find the RefurekuSettings.toml for the tests so i was unable to fix that.
...
#include "refureku/SimpleComponents.rfk.h"
...
struct RFKStruct() CircleComponent {
		float radius = 1; // in m
		CircleComponent_GENERATED
};
...

Try this
#include "refureku/SimpleComponents.rfk.h"
...
struct RFKStruct() CircleComponent
{
    RFKField()
    float radius = 1; // in m

    CircleComponent_GENERATED
};
...
File_GENERATED

Let me know if this fixes your problem.

Oh is there no way to automatically include all fields from the RFKStruct?
On Mon, 26 Apr 2021, 16:59 Julien SOYSOUVANH, @.***>
wrote:

Hi exuvo,
I think you are missing the RFKField() macro before the fields you want to
reflect.
Try this
#include "refureku/SimpleComponents.rfk.h"
...struct RFKStruct() CircleComponent
{
RFKField()
float radius = 1; // in m
CircleComponent_GENERATED

};
...
File_GENERATED
Let me know if this fixes your problem.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/jsoysouvanh/Refureku/issues/4#issuecomment-826904301,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAPUKORT7Y7XEE4DK3SXD5LTKV5TVANCNFSM43SVNKMQ
.

Sure, you are probably looking for the ParseAllNested property.
Use it like this:
#include <Refureku/NativeProperties.h>

#include "refureku/SimpleComponents.rfk.h"
...
struct RFKStruct(ParseAllNested) CircleComponent
{
    float radius = 1; // in m

    CircleComponent_GENERATED
};
...
File_GENERATED

Let me know if this works out for you :)

Had to set(GEN_PROPERTY_RTTI ON) too for the linking but it is working now!

Followup question: What is the best way to check the type of a field? Is field.type.archetype == rfk::getArchetype() valid or should i be doing something else?
I see field.type which has a few is methods for some general information and its archetype->name has the literal name ex "float".

The type of a field (class rfk::Type) is its archetype + all potential qualifiers (*, &, const, etc...).
Do you want to check the type (including its qualifiers), or the archetype, which is the class/struct/fundamental type without qualifiers?
For example if you want to check if your field is a float*, you'll use:
field.type == rfk::Type::getType<float*>()

If you just wanna compare the archetype (regardless of the field qualifiers), you can write:
field.type.archetype == rfk::getArchetype<float>()

By the way, the rfk::getArchetype method automatically discards all type qualifiers so:
field.type.archetype == rfk::getArchetype<float*>()

will also return true if your field is a simple float.

Ok thanks that clears everything up.


Win10 failed to setFromStream with the cameras were connected with a TX2 board

I am trying to get a stream from two remote cameras connected with one TX2 board. I also download zed-examples and make it successfully.
When I trying to run receiver in win10(VS 2015) and sender in TX2, the receiver program failed to detect the camera. In the sender terminal, I can see the message: AddingReceiver with IP:<IP_ADDRESS>
In the TX2 Board(Ubuntu 16), I run sender and receiver(with ip<IP_ADDRESS> and port 30000) together, and it works.
Both TX2 and Win10 have CUDA9 and SDK2.8.2 with Firmware is 1142.
Any ideas for me?

Hi,
Make sure that the port is open on windows. Normally you should have a popup window when your sample start to authorize the application to access the network.
Best,
OB

Make sure that the port is open on windows. Normally you should have a popup window when your sample start to authorize the application to access the network.

Hi, I have checked out and make sure the port is open on Windows. Unfortunately, it still not work.

I have modified the zed_examples' sender code like that with the receiver is zed_examples' receiver code:
`///////////////////////////////////////////////////////////////////////////
//
// Copyright (c) 2019, STEREOLABS.
//
// All rights reserved.

//
///////////////////////////////////////////////////////////////////////////
/****************************************************************************************
** This sample shows how to record video in Stereolabs SVO format.					   **
** SVO video files can be played with the ZED API and used with its different modules  **
*****************************************************************************************/
// ZED includes
#include <sl/Camera.hpp>
// Sample includes
#include "utils.hpp"
// Using namespace
using namespace sl;
int main(int argc, char **argv) {
// Create a ZED camera
Camera zed;
std::vectorsl::DeviceProperties devList = sl::Camera::getDeviceList();
int nb_detected_zed = devList.size();
std::cout << " Number of ZED Detected : " << nb_detected_zed << std::endl;
// Set configuration parameters for the ZED
InitParameters initParameters;
initParameters.camera_resolution = RESOLUTION_HD1080;
initParameters.depth_mode = DEPTH_MODE_NONE;
initParameters.camera_fps = 15;
initParameters.sdk_verbose = true;
initParameters.sdk_verbose_log_file = "./zed_log.log";
// Open the camera

initParameters.input.setFromCameraID(0);
ERROR_CODE err = zed.open(initParameters);
if (err != SUCCESS) {
    std::cout << toString(err) << std::endl;
    zed.close();
    return -1; // Quit if an error occurred
}
initParameters.input.setFromCameraID(1);
Camera zed_1;
err = zed_1.open(initParameters);
if (err != SUCCESS) {
    std::cout << toString(err) << std::endl;
    zed_1.close();
    return -1; // Quit if an error occurred
}

sl::StreamingParameters stream_params;
stream_params.codec = sl::STREAMING_CODEC_AVCHD;
stream_params.port = 25000;
stream_params.bitrate = 12500;
stream_params.adaptative_bitrate = true;
stream_params.gop_size = -1;
err = zed.enableStreaming(stream_params);
if (err != SUCCESS) {
    std::cout << "Streaming initialization error. " << toString(err) << std::endl;
    zed.close();
    return -2;
}

stream_params.port = 30000;
err = zed_1.enableStreaming(stream_params);
if (err != SUCCESS) {
    std::cout << "Streaming initialization error. " << toString(err) << std::endl;
    zed.close();
    return -2;
}

SetCtrlHandler();

int fc = 0;
while (!exit_app) {
    if (zed.grab() == SUCCESS && zed_1.grab() == SUCCESS) {
        sl::sleep_ms(1);
        fc++;
    }
}

// Stop recording
zed.disableStreaming();
zed_1.disableStreaming();
zed.close();
zed_1.close();
return 0;

}`

Can you try with a reduced bitrate (2000 for example) ?
Can you double check that the receiver side has the correct IP (the one from the jetson) in setFromStream() ?

I have used the Router's LANs to connect two devices and it was failed to transport streaming.
However, when I use a Switch to connect two devices, it works.
So Does Switch or Router really influence the camera streaming？ @obraun-sl

It seems I should close the windows's defender. Then, it works.
THX.


Can't link PSQL query to inital request

Hi,
I'm almost certainly doing something incorrectly but I have a PostgreSQL database set up on a remote server which can be queried by grafana. When I try to integrate these queries into a data manipulation dashboard, I was expecting to see a Query option under initial request but it is not there. This is how it is done in your explainer video. What am I doing incorrectly?
The only options I see under initial request are -, Data Source and GET.

@gerrygralton Plugin is still under Grafana review to update in the Grafana Catalog.
Meanwhile, you can download and install directly from GitHub.


Writing to the error stream produces no output in methods of custom classes

Note: Only [void]-typed methods do not exhibit the problem demonstrated below.
Steps to reproduce
class Foo { [string] Bar() { Get-Item /NoSuch; return 'hi' } }; [Foo]::new().Bar()

Expected behavior
Get-Item : Cannot find path '/NoSuch' because it does not exist.
...
hi

Actual behavior
hi

That is, the error stream output was quietly suppressed.
However, the error is recorded in the automatic $Error variable.
Update: By contrast, all other streams (warning, verbose, debug, information) are passed through.
Environment data

PowerShell Core 6.2.1
Windows PowerShell v5.1

Write-Error doesn't work inside method, only throw works (this is maybe by design)
class Foo { [string] Bar() { Write-Error "MyError" ; return 'hi' } }; [Foo]::new().Bar()
class Foo { [string] Bar() { throw "MyError" ; return 'hi' } }; [Foo]::new().Bar()
Set ErrorAction to Stop, throws the error ( and you can use try/catch to handle the error)
class Foo { [string] Bar() { Get-Item /NoSuch -ErrorAction Stop ; return 'hi' } }; [Foo]::new().Bar()
class Foo { [string] Bar() { try { Get-Item /NoSuch -ErrorAction Stop } catch { throw "MyError:$_" } ; return 'hi' } }; [Foo]::new().Bar()

Indeed, the use of Write-Error inside a class method... the expected outcome isn't clear at all. Classes don't have stream implementations of their own, only input and output for data (and exceptions for errors).

@fMichaleczek: Yes, terminating errors work, because they abort execution of the method, but my concern was about nonterminating errors that you may simply want to pass through - while continuing to execute the method.
@vexx32, I naively thought that given that you call cmdlets inside methods, their nonterminating errors would surface too (e.g., Get-ChildItem /nosuchdir).
Currently, there is no way to to directly surface them from methods.

I'd be more inclined to call it a bug that they leak through when the return type is void tbh.  Otherwise the only way you'd be able to suppress them would be redirection or maybe $ErrorActionPreference.

Currently, there is no way to to directly surface them from methods.

I think if you really want a class to emit error records or any other stream, you should pass a PSCmdlet object as an argument or save it to a property.

@SeeminglyScience
So you think custom classes are  as their own world that deals in return values only that then map onto the success output stream - with no other streams available?
Certainly would require documentation, so that no one expects it work differently, they way I assumed (happy to create an issue once we have a shared understanding).
However, the worlds are not separate; the error stream is the only exception:

All other streams are passed through.
Additionally, $Error does reflect non-terminating errors that occur in methods.

PS> class Foo { [string] Bar() { Get-Item /NoSuch; write-warning warning; write-verbose verbose -vb; write-debug -debug debug; write-information -InformationAction continue information;  return 'hi' } }; $Error.Clear(); [Foo]::new().Bar()
WARNING: warning
VERBOSE: verbose
DEBUG: debug
information
hi

So you think custom classes are their own world that deals in return values only that then map onto the success output stream - with no other streams available?

In my opinion, yeah absolutely.

However, the worlds are not separate; the error stream is the only exception:

Well, yes and no.  Something that I've never liked about those cmdlets is they work in the context of the ICommandRuntime of their own command processor, not of the caller.  Class methods don't have a command processor or ICommandRuntime, their invocation is generated sort of like ScriptBlock.Invoke as opposed to an advanced function.  That's why those cmdlets still work and why it'd be difficult to "fix".
Just so I'm clear though, I'm not pointing at any of that as proof that it should be one way or another, it's just implementation detail.  I don't have any insight on what the PowerShell team intended, this is just my opinion.

That's helpful background information, @SeeminglyScience, thanks.
@SteveL-MSFT, can you shed light on the design intent and suggest a resolution?
Having consistent behavior one way or the other would be helpful.

@mklement0 The design intent was that PowerShell classes should have semantics equivalent to .NET classes (since they are, in fact, .NET classes.) This means explicit return types, a requirement to use the return statement, variables must be initialized before being used, detected at compile-time, not run time, etc. The goal with classes was to make it possible to write more reliable (and larger) scripts in PowerShell by providing more conventional programming language semantics.

Thanks, @bpayette, but what I want to know more specifically is the design intent with respect to passing the PowerShell output streams through.

@mklement0

design intent with respect to passing the PowerShell output streams through

The intent was that streams are not a part of classes semantically speaking. Methods return values and throw errors.

A somewhat tangential question, @bpayette, then: what of the other streams? It seems the information stream is handled well enough, and though I'll have to test this evening I am fairly sure I recall verbose and debug streams also behaving as they would outside a class context.

Indeed, @vexx32: as the code in comment above demonstrates, streams 3 - 6 are passed through.

@vexx32 Those streams are neither output nor error hence they are not involved in a discussion of output/error semantics.

@bpayette

Those streams are neither output nor error hence they are not involved in a discussion of output/error semantics.

How unfortunate, then, that they are involved in the implementation - which led to their involvement in this discussion.
I guess documenting this half-blending/separation of the worlds is our best option at this point: https://github.com/MicrosoftDocs/PowerShell-Docs/issues/4497


Minor Readme Update - putting Phil's name first.

Phil's (may he rest in peace) contribution is massive by comparison. His name ought to come first (at least.. I think so)

Good call, Hugh!


As an admin or contributor, I'd like the fields related to Account Model to be cleaned up so I can understand things better

and am not afraid of breaking things by mistake.
My comments are after the arrow (==>).

Account - SYSTEM_AccountType__c (text) Description: “Indicates which model drives Contact relationship behavior: Individual (Bucket) or One-to-One”  ==> What about Household Account Model? Does the description need to be updated?

Account - SYSTEMIsIndividual__c (checkbox) Description: “Indicates whether or not this Account is an Individual (true) or Organization (false).” ==> This is NOT referring to the sometimes called Individual account model, aka Bucket, correct? Individual here means person, unlike in the field description above, right?

Account - One2OneContact__c (lookup) ==> No description. I think it’s the related contact, if the One-to-One model is being used for that contact. Null otherwise.

Contact - HHId__c (formula: if(Account.SYSTEM_AccountType__c=='Household Account',CASESAFEID(AccountId),null)) Description: “holds the ID of the current Household Account.” ==> Description should also say: “if using Household Account model.”

Contact - Organization_Type__c (formula: NULLVALUE(IF( Account.SYSTEM_AccountType__c=="", TEXT(Account.Type),Account.SYSTEM_AccountType__c),"Organization" )) Description: “In order of preference, the SYSTEM_AccountType field, the Account Type field, and "Organization".” ==> Is this field really necessary? It’s just used in ACCT_IndividualAccounts_TDTM in a few places. It feels like we should be able to get the information we need from the parent account.

Contact - Primary_Affiliation__c (Lookup to Account) Description: “Used to track the account of the contact's Organization Affiliation record that is marked primary.”

Contact - Primary_Contact__c (Formula: Account.One2OneContact__c = Id) “Automatically checked if the Contact is the Primary Contact on their Account.” ==> Not used?

Contact - Type_of_Account__c (Formula: IF(Account.SYSTEMIsIndividual__c,"Individual","Organization")) Description: “"Individual" or "Organization" depending on Account setting.” ==> Not used?

Contacts_And_Orgs_Settings__c - Account_Processor__c (text) Description: “Setting for the Account model. Should be "One-to-one" or "Individual". Replaces the custom field Contact.SystemAccountProcessor__c” ==> Should the description also include “Household Account” as one of the possible values?

Contacts_And_Orgs_Settings__c - HH_Account_RecordTypeID__c (text) ==> I think it could be deprecated

Contacts_And_Orgs_Settings__c - One_to_One_RecordTypeID__c (text) Description: “The ID of the record type to be used for 1x1 accounts. If none is selected, the account will default to the user's default account selection.” ==> I think it could be deprecated

"Account - One2OneContact__c (lookup) ==> No description. I think it’s the related contact, if the One-to-One model is being used for that contact. Null otherwise."
Its label is now Primary Contact, and if using Household Account model it's just that. What about as help/description something along the lines of: This is the related Contact if using One to One model. The Primary Contact if using Household Account model. It should be blank for Individual Bucket model.
"Contact - Organization_Type__c" - I believe this was done because Record Types weren't used prior to NPSP 3 and the AccountType would be blank if not Household. Given that, I've always wanted the Account.AccountType field to be labeled as Individual Account Model which is more telling what it is/what it means.
"Contact - Primary_Contact__c (Formula: Account.One2OneContact__c = Id) “Automatically checked if the Contact is the Primary Contact on their Account.” ==> Not used?" Yes, it's used - it's helpful in Contact reports to filter and show primary contacts only. Helps to not have to use the Household deduplication functionality on campaign to be sure you're adding just one contact from a household to a campaign, for example.

**lurch: attach W-007442

Tracking W-007442


Wrong string interpolation syntax in cosmosdb example

Deploying https://github.com/Azure/bicep/blob/main/docs/examples/101/cosmosdb-free/main.bicep gives an error saying $ is not a valid character in name.
$(appName) should be replaced with ${appName}.
param appName string = uniqueString(resourceGroup().id)
param accountName string = toLower('cosmos-$(appName)')
param location string = resourceGroup().location
param databaseName string = toLower('db-$(appName)')

Thanks for raising this! I've submitted a fix for it.


[pg] SET statement failed

postgres=# SET client_min_messages = warning;
ERROR:  Catalog Error: unrecognized configuration parameter "client_min_messages"

Did you mean: "schema" (errno 1105) (sqlstate HY000)

Maybe we should store all the system variables as the MySQL part does.

Done in https://github.com/apecloud/myduckserver/pull/226


Custom grant request is failing

Describe the issue:
Related use case: choreo-apim-devportal [1]
I am trying to call the requestCustomGrant [2] API and obtain a new token. The custom grant request is done in the sign-in hook and the code looks like this.
        authClient?.signIn();

        authClient?.on(Hooks.SignIn, async (response: any) => {
            const config = {
                tokenEndpoint: "https://<apim-host>/oauth2/token",
                attachToken: false,
                data: {
                    client_id: "choreodevportal",
                    grant_type: "urn:ietf:params:oauth:grant-type:token-exchange",
                    subject_token_type: "urn:ietf:params:oauth:token-type:jwt",
                    requested_token_type: "urn:ietf:params:oauth:token-type:jwt",
                    scope: "{{scope}}",
                    subject_token: "{{token}}",
                },
                id: "apim-token-exchange",
                returnResponse: true,
                returnsSession: true,
                signInRequired: true
            }

            dispatch(userLoginSuccess(response));
            authClient?.getDecodedIDToken().then((idToken) => {
                dispatch(fetchUserInfoSuccess(idToken));
            }).catch((error) => {
                dispatch(setErrorNotification('Error while retrieving user information'));
                dispatch(fetchUserInfoFailure(error));
            });

            // Custom grant request
            authClient.requestCustomGrant(config).catch(error=>console.log(error));
        });

The requestCustomGrant is failing and the error log looks like,
fl: The custom grant request failed.

Please note that the custom grant request is sending the network call correctly and the response is received correctly.
Response:
{
   "access_token":"eyJ4NXQiOiJNbUV5WlRSaFpH....<clipped>",
   "issued_token_type":"urn:ietf:params:oauth:token-type:jwt",
   "scope":"urn:choreo:0d3780bb-6f09-4020-8cfa-a17d3e46cf22:apim:subscribe urn:choreo:7068fbc7-fa80-4e27-befa-98d8897b7fb9:apim:subscribe",
   "token_type":"Bearer",
   "expires_in":10800
}

Info: I have tried this with session storage and the web worker
Expected behavior:
Custom grant request should pass and the new token should be set as the auth client's token which will be setting in the auth header in subsequent http calls.
Environment information

Product Version: react sdk v0.1.4
OS: ubuntu 20.04

As per the discussion had with @brionmario, this issue is returned from the code line [1]. The issue could be resolved using validateIDToken: false in the global config.
Note that currently there's no way of having the id token validation enable/disable for only the custom grant request.
[1] https://github.com/asgardeo/asgardeo-auth-js-sdk/blob/0245ca5fad69c54c5092c51eb7154c5922f84ab5/lib/src/core/authentication-core.ts#L418

The custom grant requested access token is not setting correctly when the storage is set to the WebWorker.

The custom grant was not working correctly due to the WebWorker storage is not allowing the access token to be utilized by subject_token: "{{token}}". Therefore, this use case needs some storage option which can be accessed with the JS side. The exact use case will be tracked with another issue.


Suggestion: Start a gitter.im chat room

Many bio data analysis packages hosted on GitHub will have a Gitter.im chat room with a direct link in the readme. This is very helpful for newcomers with questions that may not qualify as an issue but can be quickly answered by the package contributors or just powerusers.
I recommend scanpy start a gitter. It may help slow the posting of new issues and allow faster triaging and help.

Agreed! :) I just haven't ever done that... ;) I'm happy if someone else does it but would otherwise look into it next week or so...

I wanted to do it, but I couldn’t create gitter.im/scanpy.
I noticed that https://github.com/scanpy exists which seems to be the problem. Seems to be a typo though, their name is Scana.py with a second “a”. I contacted the GitHub support, maybe they can rename it and give us https://github.com/scanpy.

Thanks, great!

As a possible alternate/ supplement, what about a discourse forum? I think threaded conversations are useful, especially when you can't expect everyone who has input to be online at the same time. It also looks like google indexes discourse, which could reduce repeated questions.

I created gitter.im/scanpyhelp
https://gitter.im/scanpyhelp/community?utm_source=share-link&utm_medium=link&utm_campaign=share-link

@ivirshup A discourse forum would be great but it looks like its quite pricy with no free version

Expanding on this a bit, here's an example discourse forum I've found useful: https://discourse.julialang.org. Good, relevant threads show up all the time in google searches, while I've spent a lot of time trying to find help on various pyviz and conda gitters with a pretty low success rate.
I think something like gitter/ single slack channel works for about 20 people, but after that it gets a bit rough. Having a single stream of messages means keeping track of a conversation over days becomes a huge task. Topics get dropped not based on the value of the discussion, but because of the conversation's overhead.

@outlace, whoops, didn't see your message before I posted mine, chatroom model woulda stopped that.
It looks to me like it's free to self host and theres (admittedly kinda high) educational price for discourse. I'll check out how easy it is to self host.
An alternative for threaded conversations is a good old fashioned google group or a tag on stack overflow.
The main reason I'm pushing this, is because the more I think about it, the more how unhelpful most gitters have been for me. It might have a lot to being in a non-European or American timezone though.

I guess stackoverflow tag would work for now until a dedicated discourse or the like is setup. The advantage of gitter is that if people are online questions can be answered rapidly which is helpful when youre in the middle of an analysis and run into a bug. It's no fun when you have to give up and have to wait until the next day. But I can see that timezone differences may prevent this if the users and collaborators are not timezone similar.

Hi, we’re still waiting for a response from the owners of https://github.com/scanpy (we asked them if it’s possible to rename the org to “scanapy”, the actual name of their project)
Until then, I’d like to not use gitter.im/scanpyhelp

@flying-sheep  Still no response?

not yet, but we sent the message to them only recently.

It's been about 3 months and there's still no place for people to ask questions except to file issues. https://gitter.im/scanpyhelp/community is still there

Yes, we sadly didn’t get any response from the people owning https://github.com/scanpy
@all: Should we go ahead and advertise https://gitter.im/scanpyhelp?

I don't know how I missed this the first time, but discourse could just be free for us https://free.discourse.group. I can go ahead and set this up, but would also be fine with a google group.

I have to admit that I'm still not an expert in these forums. I'm happy if we go with https://gitter.im/scanpyhelp as a solution. I also know discourse is super popular among many people and I'm happy if we go with it if all three of you, @outlace, @ivirshup and @flying-sheep, think this could be a better place. I simply can't judge myself as I haven't used either of them.
Most importantly, let's put what you guys choose on the top of the webpage and properly announce it; it would be terrible to have several of these chat rooms; one on gitter, one discourse, etc. with potentially even different names scanpyhelp, scanpy etc.

Yeah now I think discourse or a google group would be best. That way questions that are asked are preserved and searchable.

Great. @ivirshup set up this https://scanpy.discourse.group. We'll properly announce it and, I hope this becomes the persistent place for discussing issues around using Scanpy.
Thank you for the initiative, Brandon! I'll close this for now; if we're unhappy with this solution, we can get back at some point.
I'll also follow up on this with an email to you guys.
PS: Brandon, could you delete scanpyhelp at gitter so that we avoid potentially confusing people? Thank you.


Uncaught ReferenceError: require is not defined

Hi,
I am experimenting with ES7 generators in my project. I followed these instructions https://www.npmjs.com/package/gulp-babel#runtime to install the required gulp-babel plugin.
I am seeing an error in my console as follows when I reload the page:
main.js:3 Uncaught ReferenceError: require is not defined

Inside main.js:3 there is the line:
var _promise = require('babel-runtime/core-js/promise');

The task within my gulpfile.js looks like this:
gulp.task('scripts-dev', () => {
	return gulp
	.src('./assets/scripts/**/*')
	.pipe(jshint())
	.pipe(jshint.reporter('default'))
	.pipe(concat('main.js'))
	.pipe(babel({
		presets: ['es2015'],
		plugins: ['transform-runtime']
	}))
	.pipe(gulp.dest(dest.scripts));
});

Is there another plugin I need to install to get this working?
For reference, the branch I am experimenting with for my project can be seen here.

Same error here.
Do I need to learnd about requirejs or something?

I get the same error

The require identifier/function is undefined since it's not in the browser. You need to run your code through a bundler like https://webpack.js.org which will handle that. If you still need to use gulp, there's https://www.npmjs.com/package/gulp-webpack

Thanks. I will take a look. Can I suggest an update to the documentation to include the info above?

I solved this error with this way.
change babel to latest preset.
I read babel documentations
https://github.com/babel/babel-preset-env
.pipe(babel({
presets: ['env']
}))
and than install babel polyfill
and gonna eveyrhings work fine.

@rationality6 it doesn't work for me. It works when you remove plugins: ['transform-runtime'].

transform-runtime is by definition modular. If you're using it, you need to be using your code in an environment that supports modules, so either Node or client-side with Webpack or Browserify.


OrderStatusEnum has no CANCELLED value

Retrieving a cancelled order returns the error:
ValueError: 'CANCELLED' is not a valid OrderStatusEnum
This seems due to OrderStatusEnum not having a CANCELLED value, which is an order status according to the docs.
The code
s = shippo.Shippo(api_key_header=config("SHIPPO_API_KEY"))
s.orders.list(page=1, results=50)

Thanks for raising the issue, I've submitted a fix for our spec which should get merged tomorrow

Fixed by https://github.com/goshippo/shippo-python-sdk/pull/51


latest changes from private package

Background
This PR releases several updates to the unstable packages.
If you've been tagged as a reviewer, please add a changeset for your update(s).
Here's a related PR for the dev docs update available to review on spin.
(Provide a link to any relevant issues AND provide a TLDR of the issue in this pull request)
Solution
(Describe your solution, why this approach was chosen, and what the alternatives/impacts may be)
🎩

...

Checklist

[ ] I have :tophat:'d these changes
[ ] I have updated relevant documentation

I added this changeset when I added the PaymentIcon to unstable (PR). Do I still need to do anything?
Also @jkeohan has a PR up to add ProductThumbnail to unstable with a changeset. He's still working through some comments there that weren't caught in the private package. Can the ProductThumbnail changes not be included here?

I added this changeset when I added the PaymentIcon to unstable (PR). Do I still need to do anything?
Also @jkeohan has a PR up to add ProductThumbnail to unstable with a changeset. He's still working through some comments there that weren't caught in the private package. Can the ProductThumbnail changes not be included here?

Thanks for the context @lsit! I don't think you need to do anything.
I will remove the ProductThumbnail-related changes from this branch this afternoon.


Include ipaddress in SocketAddress.description.

Motivation:
WE should include the ipaddress in the description of SocketAddress if any way used as there may be no host at all.
Modifications:

Always include ipaddress if possible.
Add unit tests.

Result:
More useful description of the SocketAddress

@weissi addressed PTAL again


Add ability for AbstractFilter to accept wild card view names.

Need the ability to wild card config view name(s) in AbstractFilter.

On GitHub, pull requests are also issues. So, there's no need to create an issue, and then immediately issue a PR. The PR serves as its own issue number.


Add agent-v5 branch to the branch deletion exceptions

What does this PR do?

Add agent-v5 branch to the branch deletion exceptions
Motivation

Not have that branch deleted.
It is referenced from agent 5 repos.
Additional Notes

Possible Drawbacks / Trade-offs

Describe how to test/QA your changes

/merge


As an editor, I want upload and manage page attachments in wagtail so that I can associate them with pages.

this could be a regular django migration, since we don't need to do anything complicated with streamfields, hierarchy, etc.

[ ] convert cdhweb.resources.Attachment to a new model that subclasses wagtail's AbstractDocument

I started looking at this to see if it's as easy as we hope. A quick attempt at extending wagtail's abstract document and configuring our attachment to be the default document resulted in a non-obvious error in the wagtail admin documents list.
Our attachment model is either a link or an uploaded file. But wagtail documents have to have a file. So, I'm thinking migration path could be:

create new link attachment model, and make it available as a wagtail snippet
write data migration to convert all link-only attachments to new link attachment model
remove link-specific fields from attachment and extend abstract document per https://docs.wagtail.io/en/v2.8.1/advanced_topics/documents/custom_document_model.html#module-wagtail.documents

Hopefully we can configure an attachment chooser that would let you select links or documents so the display logic can be similar to what we have now.

two models, both with generic foreign keys:

Attachment, which extends AbstractDocument and represents an uploaded file
ExternalLink, which is not a Document subtype and represents content hosted outside the CDH site.

I was able to successfully upload a new document and attach it to a page, which appeared as it should on the site. When I tried adding an external link, however, I only had the option of using one of the existing links. It wouldn't allow me to upload a new one.


[Snyk] Security upgrade python from 3.14.0a1-slim-bookworm to 3.14.0a3-alpine3.20

Snyk has created this PR to fix 4 vulnerabilities in the dockerfile dependencies of this project.
Keeping your Docker base image up-to-date means you’ll benefit from security fixes in the latest version of your chosen image.
Snyk changed the following file(s):

Dockerfile

We recommend upgrading to python:3.14.0a3-alpine3.20, as this image has only 0 known vulnerabilities. To do this, merge this pull request, then verify your application still works as expected.
Vulnerabilities that will be fixed with an upgrade:

Issue
Score

Integer Overflow or Wraparound SNYK-DEBIAN12-ZLIB-6008963
  500

CVE-2024-56433 SNYK-DEBIAN12-SHADOW-8551160
  221

CVE-2024-56433 SNYK-DEBIAN12-SHADOW-8551160
  221

Information Exposure SNYK-DEBIAN12-GLIBC-1546991
  150

CVE-2023-50495 SNYK-DEBIAN12-NCURSES-6123823
  150

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Learn about vulnerability in an interactive lesson of Snyk Learn.

:tada: Snyk checks have passed. No issues have been found so far.
:white_check_mark: security/snyk check is complete. No issues have been found. (View Details)


Update Prop.svelte broken links

Update https://preview.allo.info/ to https://allo.info/

@ctibo let me know if you want me to create an issue for this or if this PR is sufficient.


[WFLY-11202] Upgrade yasson to 1.0.2; fix https://github.com/eclipse-…

…ee4j/yasson/issues/62
https://issues.jboss.org/browse/WFLY-11202

@asoldano Is this ok? Besides the general use as the JSONB impl, the only use of this I see is by Resteasy, so I'm asking you for the approval. ;)


Issues Debugging with OpenOCD/GDB

I'm having some trouble running code on an OpenTitan (using this commit) system with OpenOCD and GDB, on a Nexys Video board.  I've downloaded the toolchain using util/get-toolchain.py and built OpenOCD according to the instructions here (Using this riscv-openocd commit), but I've had several problems and still can't get it to run:

That commit of OpenOCD segfaults upon trying to connect to the board.  I've been able to fix this by adding an init command to lowrisc-earlgrey.cfg before the riscv set_prefer_sba on command, and then moving both to the bottom of the file (as init has to happen after some of the other commands there).
After fixing that, GDB reported a failure to load the binary (the hello_world example included in OpenTitan).  After some digging, this appeared to be because OpenOCD doesn't support writes of lengths that aren't multiples of 4 bytes, and that binary has a section with an odd number of compressed instructions in it (so it doesn't end on a 4-byte boundary).  I fixed this by identifying the section (.crt) and padding it out to the correct alignment in flash_link.ld.
That causes the program to load, but it won't run.  After loading and stepping once, GDB reports "[0] Found 1 triggers" and then can't identify where in the code it is: 0x00008000 in ?? ().  A second step causes it to report "Cannot find bounds of current function," which it repeats for every step thereafter.  I haven't been able to fix this problem yet.

Are you sure?  I thought riscv-dbg allows you to load programs over GDB?

I am not sure. I use GDB regularly with OpenTitan though and don't see any issues. I do load images with the spiflash script instead of via GDB though.

It seems like the problem was a memory mapping one--the linker script (which, in retrospect, I probably should have realized) puts all the data into flash, which GDB can't write.  If I modify it to put it into main memory and add an entry point at _start, I can step part of the way through the program.  Now I encounter two additional issues:

I can't add breakpoints.  When I try (at main, for example), it saysError: Target riscv.tap.0: Failed to read memory (addr=0x10001f0a)
Error:   progbuf=disabled, sysbus=skipped (unsupported size), abstract=disabled

From running OpenOCD in debug mode, it looks like it's trying to write a packet of size 2 using the system bus, which isn't supported.  This doesn't seem like a problem unique to the way I'm loading the code, as I imagine it would still be that way even if it were loaded from flash; has anyone ever encountered this?
  What could be causing this?

This ended up being a combination of memory size issue and startup file issue.  The memory wasn't big enough to store the binary, and the startup files also don't need their sections for copying data from where it's stored into another place in memory, as in this case it's already in memory.  Changing both of these things fixed the issue.


404 at /desktop/mac/apple-silicon/undefined

I found a broken link : https://docs.docker.com/desktop/mac/apple-silicon/undefined
I arrived on this page through: https://docs.docker.com/desktop/mac/apple-silicon/

Looks the same as https://github.com/docker/docker.github.io/issues/13553 (and some other reports), but so far we haven't been able to find the cause for these broken links (it may be a JavaScript issue)
Do you know what link you clicked on that page? What browser (and version) are you using, and do you have any browser extensions installed?

Let me close this ticket in favor of https://github.com/docker/docker.github.io/issues/13553, but if you're able to provide more details that could help us find the problem, feel free to comment on that ticket!


[Roadmap] Scheduling & Tasking

Related  Tasks

[x] RnD on how to go about Tasking on FHIR  - See Doc here
[x] #283
[x] #859
[x] How to Generate tasks via $apply operation
[x] #844
[x] #996

Closing this items as we have a stop-gap measure in place


Dynamic timeframe

Resolves #44

Codecov Report

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

@@            Coverage Diff            @@
##             master     #188   +/-   ##
=========================================
  Coverage          ?   92.01%
=========================================
  Files             ?       24
  Lines             ?      238
  Branches          ?        0
=========================================
  Hits              ?      219
  Misses            ?       19
  Partials          ?        0

Impacted Files
Coverage Δ

src/database/tables/users.js
100% <ø> (ø)

src/database/tables/requests.js
100% <ø> (ø)

src/routes/submit-admin.js
92.85% <ø> (ø)

src/routes/dashboard.js
88.88% <ø> (ø)

src/database/connection.js
100% <ø> (ø)

src/routes/submit.js
88.88% <100%> (ø)

src/routes/login.js
95.65% <100%> (ø)

src/services/yotiService.js
50% <20%> (ø)

src/server.js
90.9% <66.66%> (ø)

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 bc43078...4c2487d. Read the comment docs.

@msachi you have requested my review here rather than assign me. I just wanted to check if you wanted this merged or whether you want a review.

@lucymonie Yes if you could merge that as well please :)


interface ReadableObjStream<T> extends Omit<stream.Readable, 'push' | 'read'> {}

// Use extends (TYPE as any) to avoid compilation errors and override `Omit`-ted methods
class ReadableObjStream<T> extends (stream.Readable as any) {
    constructor()  {
        super({objectMode: true}); // force object mode. You can merge it with original options
    }
    // Override `Omit`-ed methods with YOUR CUSTOM SIGNATURE (can be non-comatible with parent):
    push(myOwnNonCompatibleSignature: T): string  { /* implementation*/ };
    read(options_nonCompatibleSignature: {opts: keyof T} ): string  { /* implementation*/ }
}

let typedReadable = new ReadableObjMode<{myData: string}>();
typedReadable.push({something: 'else'}); // will throw compilation error as expected
typedReadable.pipe(...) // non overloaded methods typings supported as expected

The only disadvantage of this solution is lack of typings when calling super.parentMethod (but thanks to the interface ReadableObjStream you have all the typings when using instance of ReadableObjStream.

@nin-jin @bioball Thanks for the contributions with the decorator compile-time checking.
Unfortunately it doesn't seem to work with protected members, e.g. in my fork of nin-jin's playground, only with public.

The override specifier was a killer feature in c++ 11.
It so much helps and protects refactoring code.
I definitely would like to have this in TS base support without any hurdles (VOTE!)

We've definitely shown wild support for this feature, but it seems they still don't plan on adding this feature anytime soon.

Another idea:
class Obj {

    static override<
        This extends typeof Obj,
        Over extends keyof InstanceType<This>,
    >(this: This, ...overs: [Over,...Over[]]) {
        return this as This & (
            new(...a:any[])=> InstanceType<This> & Protect< Omit<InstanceType<This> , Over > >
        )
    }

}

class Foo extends Obj {

    bar(a: number) {
        return 0
    }

    bar2(a: number) {
        return 0
    }

    foo = 1

}

class Foo2 extends Foo.override('bar') {

    foo = 2

    bar( a : number ) {
        return 1
    }

    // Error: Class 'Foo & Protect<Pick<Foo, "bar2" | "foo">>'
    // defines instance member property 'bar2',
    // but extended class 'Foo2' defines it as instance member function.
    bar2( a : number ) {
        return 1
    }

    bar3( a : number ) {
        return 1
    }

}

declare const Protected: unique symbol

type Protect<Obj> = {
    [Field in keyof Obj]:
    Object extends () => any
    ? Obj[Field] & { [Protected]: true }
    : Obj[Field]
}

Playground Link

Adding my two cents here.
We have a typical angular component, that handles forms and needs to unsubscribe from valueChanges and such. We didn't want to repeat the code all over the place (kinda current state), so I've made a "TypicalFormBaseComponent" that implements angulars OnInit and OnDestroy methods. The issue is that now if you actually use it and add your own OnDestroy method, you hide the original one and break the system. calling super.OnInit fixes it, but there is currently no mechanism for me to force the children to do that.
If you do it with the constructor, it forces you to call super()... I was looking for something similar, found this thread, and honestly, I am kinda bummed.
Implementing "new" and "override" in the ts might be a breaking change, but fixing it would be incredibly simple in basically any codebase (just adding 'override' everywhere where it screams). It might also be just a warning.
Anyways, is there some other way for me to force the super call in the children? TSLint rule that prevents hiding, or something like that?
PS: I don't agree with the "no comment" policy. It prevents people from throwing examples here. Maybe you won't implement 'override', but you'll implement something else, that takes care of their problems... that is, if you can actually read them.

@GonziHere In other languages such as C# or Java, overriding does not imply the requirement to call the super method - it often is not the case in fact. Constructors are special and not normal "virtual methods".
The override keyword would be used to specify that the method must already be defined with a compatible signature on the base class, and the compiler could assert this.

Yes, but the need for override forces you to notice that the method exists.

@GonziHere Look like what you may really need is to create abstract base classes with abstract functions.

Up!

@GonziHere @rjamesnw The safe thing to do is actually to somehow enforce that onInit and onDestroy are final, and define empty protected abstract template methods that the final methods call.  This guarantees that nobody can accidentally override the methods, and trying to do so (assuming there were a way to enforce final methods) would immediately point users to the right way to implement what they want.

@shicks, @rjamesnw, I'm in the same situation as @GonziHere. I don't want the base class to have abstract methods because there is functionality that I want executed for each of those lifecycle hooks. The problem is that I don't want that base functionality to be accidentally replaced when someone adds ngOnInit or ngOnDestroy on the child class without calling super(). Requiring override would bring to the attention of the dev that those methods exist in the base class and that they need to call super();

From my experience writing Java, @Override is so common that it becomes noise.  In many cases, the overridden method is abstract or empty (where super() should not be called), making the presence of override not a particularly clear signal that super() is needed.

From my experience writing Java, @Override is so common that it becomes noise. In many cases, the overridden method is abstract or empty (where super() should not be called), making the presence of override not a particularly clear signal that super() is needed.

That has nothing to do with the subject at hand. You might just as well say to use composition over inheritance to avoid the problem.

For me, the most useful part of override is to get an error while refactoring.
Right now it is all too easy to rename some method in a base class and forget to rename the ones that override it.
Remembering to call super is not that important. It is even correct to not call it in some cases.

I think that there is a misunderstanding on why the override would be important. Not to force someone to call the super() method, but to make them aware that one exists and allow them to conscientiously decide whether they want to suppress its behavior or extend it.

The pattern I use to ensure correctness is to use Parameters and ReturnType while referring very explicitly to the base class, something like this:
class Base {
    public methodName(arg1: string, arg2: number): boolean {
        return false;
    }
}
class Derived extends Base {
    public methodName(...args: Parameters<Base["methodName"]>): ReturnType<Base["methodName"]> {
        const [meaningful, variableNames] = args;
        return true;
    }
}

This kind of pattern is the basis for my suggestion to add an inherit keyword.. This ensures that any updates to the base class automatically propagate and if invalid in the derived class then an error is given, or of the name changes of the base class then an error is also given, also with the inherit idea you aren't constrained to only offer identical signature to the base class but can intuitively extend it.

I also think there's a misunderstanding about why override would be important, but I don't really understand all these issues with "whether super() is needed".
To echo what @lorenzodallavecchia and the original author of the issue have said, marking a function as override is a mechanism to avoid screw-ups that happen when the superclass is refactored, specifically when the name and/or signature of the overridden function changes or the function is removed.
Keep in mind that the person changing the signature of the overridden function may not be aware that overrides exist.  If (e.g. in C++) the overrides are not explicitly marked as overrides, then changing the name/signature of the overridden function does not introduce a compilation error, it simply causes those overrides to no longer be overrides.  (and.. probably no longer be useful, no longer be called by code that used to call them, and introduce a bunch of new bugs because things that are supposed to call the overrides are now calling the base implementation)
The override keyword, as implemented in C++, saves the person changing the base implementation from these problems, because immediately after their refactoring, compilation errors will indicate to them that a bunch of overrides exist (that override a now-nonexistent base implementation) and clue them in to the fact that they probably need to refactor the overrides as well.
There are secondary IDE usability benefits to having the override modifier as well (also mentioned by original author), namely that upon typing the word override the IDE can helpfully show you a bunch of possibilities of what can be overridden.

Together with the override keyword it would be good to also introduce a flag to require that all methods that override another uses override, so as to avoid cases where you create a method in a subclass and in the future the base class (that could be in a 3rd party library) creates a method with the same name as the method you created in the subclass (which could cause bugs now, because the subclass had overridden that method).
Getting a compilation error in this case, saying that you need to add the override keyword in this method (even tough you may not actually override the method, just change its name so as to not override the newly created method in the base class), would be much better and avoid possible runtime bugs.

From my experience writing Java, @Override is so common that it becomes noise.

After many Java-years I strongly disagree with above statement. Override is a way of communication, like checked exceptions. It's not about like or dislike, but about quality and expectations.
And therefore a big +1 to @lucasbasquerotto , but from another point of view: if I introduce a method in a subclass I want to have a clear semantic of overriding or not overriding. For example if I want to override a method, then I want to have a way to tell that explicitly. If something wrong with my implementation, for example a typo or wrong copy&paste, then I want to get feedback about it. Or other way: if I don't expect to override, I want feedback too, if overriding occasionally happens.

Feedback from another Java developer... @override is the only feature I'm really missing from Typescript.
I have ~15 of Java experience and 1-2 years or Typescript so pretty comfortable with both.
The zen of @override is you can remove a method from an interface and the compilation will break.
It's like the reverse of tight binding for new methods.  It allows you to remove old ones.
If you implement an interface and ADD a method the compilation will fail but there isn't an inverse of this.
If you remove a method you'll just end up with dead code.
(though maybe that can be fixed by a linter)

To be clear, when I said that @Override was noise, I was specifically referring to the comment about it being a signal that you need to call super.  The checking it provides is valuable, but for any given overridden method, it's a complete toss-up whether it's required or pointless to call super.  Since such a large fraction of overridden methods shouldn't, it's ineffective for that purpose.
My entire point is that if you want to ensure subclasses call back into your overrideable methods, the only effective way to do that is to make the method final (see #33446, among others) and have it call into a differently-named empty template method that can be safely overridden without the super call.  There's simply no other reasonable way to get that invariant.  I'm completely in favor of override, but as someone who's been burned by users incorrectly subclassing my APIs (and I'm on the hook not to break them), I believe it's worth shifting attention to final as the correct solution to this issue, rather than override as was suggested upthread.

I'm a little confused as to why people keeps suggesting one of final or override over the other. Surely we want both, as they solve different problems.
Override
Prevents people who are extending a class from accidentally overwriting a function with their own, breaking things in the process without even knowing. Having an override keyword lets the developer know that they are in fact overriding an existing function, and then they can choose to either rename their function or use the override (and then they can find out if they need to call super).
Final
Prevent people who are extending a class from overwriting a function completely, so that the original creator of the class can guarantee complete control.

@sam-s4s We want the define too :-)
Example of issue..
Initial
class Base {}
class Entity {
    id() {
        return 'BUG-123' // busisess entity id
    }
}

Base class refactored
class Base {
    id() {
        return '84256635572' // storage object id
    }
}
class Entity {
    id() {
        return '12' // busisess entity id
    }
}

We got accidental overload here.
Case with define keyword
class Base {
    define id() {
        return '84256635572' // storage object id
    }
}
class Entity {
    define id() {
        return '12' // busisess entity id
    }
}

Shold be error: Accidental redefine. Use override keyword to override base class method.

@nin-jin isn't define the same as not using override?

@sam-s4s We want the define too :-)

Oh, I've not seen anyone here mention a keyword define - but from what you describe, I assume you mean like the word virtual in C# ?
(also I found you example a little confusing, as your classes Base and Entity are not related. Did you mean for Entity to extend Base?)

@sam-s4s Entity extends Base, of course. :-) I have fixed my message. virtual is about something else.
@lorenzodallavecchia not using override is define | override for compiler. Using define is only define and compiler can strict check this.

@nin-jin In your model, this means not using the override keyword is still legal, right? For instance:
class Base {
  myMethod () { ... }
}

class Overridden extends Base {
  // this would not fail because this is interpreted as define | override.
  myMethod () { ... }
}

Ideally, the above example produces an error unless you use the override keyword. Albeit, I imagine that there would be a compiler flag to opt-out of override checking, where opting out is the same thing as override | define for all methods

@bioball yes, it's required for compatibility with a lot of existed code.

@sam-s4s Entity extends Base, of course. :-) I have fixed my message. virtual is about something else.

I'm still not sure what you mean by define... this is the definition of virtual in C#:
The virtual keyword is used to modify a method, property, indexer, or event declaration and allow for it to be overridden in a derived class.

Maybe you mean the opposite, where, instead of needing to mark the function as virtual in order to override, you can mark the function as define to then mean you have to use the override keyword to override it?

I skimmed through this thead in a couple minutes, but I haven't seen anyone propose using override as a way to avoid duplicate specification of parameters and return values. For example:
class Animal {
    move(meters:number):void {
    }
}

class Snake extends Animal {
    override move(meters) {
    }
}

In the above example, move would have the same required return type (void) and meters would also have the same type, but specifying it wouldn't be necessary. The large company I work for is trying to migrate all our javascript to typescript, away from Closure compiler typing. However, while in Closure we can just use @override and all the types will be inferred from the superclass. This is quite useful in reducing the possibility for mismatch and reducing duplication. One could even imagine implementing this such that extension of the method with additional parameters is still possible, even while not specifying types for the parameters that are specified in the superclass. For example:
class Animal {
    move(meters:number):number {
    }
}

class Snake extends Animal {
    override move(meters, time:number) {
    }
}

The motivation for me coming here and writing a comment is that our company is now requiring that we specify all the types even for overridden methods, because typescript doesn't have this functionality (and we're in a long migration). Its quite annoying.

FWIW, while it's easier to write, omitting parameter types (and other instances of cross-file type inference) hinders readability, since it requires someone unfamiliar with the code to dig around to find where the superclass is defined in order to know what type meters is (assuming you're reading it outside an IDE, which is quite common for unfamiliar projects where you don't have an IDE set up yet).

@shicks You could say that about literally any imported variable or class. Duplicating all the information you need onto a single file defeats the purpose of abstraction and modularity.

If I can share my 2 cents.
Since override is somehow contraintuitive for javascript developers (where all start as public and "overridable" for default). Why don't we think about add a final ?
abstract class MyBase {
   myRegularMethod(): {}
   final myFinalMethod(): {}
}

class MyImplementation extends MyBase {
   myRegularMethod(): {
     /// Everything works here! 👍
   }

// Compiler error!!!  myFinalMethod is final💀
   myFinalMethod(): {

   }
}

That would be backwards compatible.

If I can share my 2 cents.
Since override is somehow contraintuitive for javascript developers (where all start as public and "overridable" for default). Why don't we think about add a final ?
abstract class MyBase {
   myRegularMethod(): {}
   final myFinalMethod(): {}
}

class MyImplementation extends MyBase {
   myRegularMethod(): {
     /// Everything works here! 👍
   }

// Compiler error!!!  myFinalMethod is final💀
   myFinalMethod(): {

   }
}

That would be backwards compatible.

@distante as pointed out here, override and final solve 2 different problems

@distante as pointed out here, override and final solve 2 different problems

@distante as pointed out here, override and final solve 2 different problems

Oh really sorry, I missed it.
If this helps somebody, there is a tslint rule to force a @override comment here.

@distante as pointed out here, override and final solve 2 different problems

Oh really sorry, I missed it.
If this helps somebody, there is a tslint rule to force a @override comment here.

If I can share my 2 cents.
Since override is somehow contraintuitive for javascript developers (where all start as public and "overridable" for default). Why don't we think about add a final ?
abstract class MyBase {
   myRegularMethod(): {}
   final myFinalMethod(): {}
}

class MyImplementation extends MyBase {
   myRegularMethod(): {
     /// Everything works here! 👍
   }

// Compiler error!!!  myFinalMethod is final💀
   myFinalMethod(): {

   }
}

That would be backwards compatible.

Because with a final you prevent the use of that method in the extended class as with override that is permitted but you need to explicitly mention your intent and the writer of the super/base method will know that whoever overrides it will make a conscious choice to call the super method or not.
As for the familiarity of javascript developer with override, that is not necessarily a valid argument. So is the case with other features that TypeScript has over JavaScript and that is the exact reason why it is used. The functionality can however be an option "explcitOverride" that is turned off by default

If I can share my 2 cents.
Since override is somehow contraintuitive for javascript developers (where all start as public and "overridable" for default). Why don't we think about add a final ?
abstract class MyBase {
   myRegularMethod(): {}
   final myFinalMethod(): {}
}

class MyImplementation extends MyBase {
   myRegularMethod(): {
     /// Everything works here! 👍
   }

// Compiler error!!!  myFinalMethod is final💀
   myFinalMethod(): {

   }
}

That would be backwards compatible.

Because with a final you prevent the use of that method in the extended class as with override that is permitted but you need to explicitly mention your intent and the writer of the super/base method will know that whoever overrides it will make a conscious choice to call the super method or not.
As for the familiarity of javascript developer with override, that is not necessarily a valid argument. So is the case with other features that TypeScript has over JavaScript and that is the exact reason why it is used. The functionality can however be an option "explcitOverride" that is turned off by default

What's the latest update? seems like it's still unclear and it's been almost 6 years...

What's the latest update? seems like it's still unclear and it's been almost 6 years...

What's the latest update? seems like it's still unclear and it's been almost 6 years...

Actually there's a PR: https://github.com/microsoft/TypeScript/pull/39669

What's the latest update? seems like it's still unclear and it's been almost 6 years...

Actually there's a PR: https://github.com/microsoft/TypeScript/pull/39669

seems its also still planned to be included in the next release: https://github.com/microsoft/TypeScript/issues/41601 (at least at the time of writing this)

seems its also still planned to be included in the next release: https://github.com/microsoft/TypeScript/issues/41601 (at least at the time of writing this)

Thank you @Kingwl, and thank you @pcj for the groundwork in the initial proof-of-concept!

I'm not sure where to ask this, but it seems like tsc is compiling and leaving the override keyword in the compiled result. Is this something other folks are seeing?

Also .d.ts file is missing override.
Is it by design?  aka for back compat with old ts compilers

Also .d.ts file is missing override.
Is it by design? aka for back compat with old ts compilers

I don't see a reason why .d.ts files would need to contain that keyword; the override check is only useful for each individual class (as it's saying "this class you are writing has methods that don't declare they are overrides"). You can't really do anything with the knowledge that some other class has overriden a method from one of its own parent classes.
Leaving "override" in the JS source definitely sounds like a bug though. 🙂

Jake is right. I've opened https://github.com/microsoft/TypeScript/issues/43535 to track the JS output bug.

This is a fantastic feature but what about taking it a step farther and requiring use of the virtual keyword on the base class so you can actually control when you want to allow sub-classes to override or not? That could also be an opt-in switch, noImplicitVirtual.
There are often situations where overriding a function without calling super could break the application.


ConfigOptions return an error

ConfigOptions return an error, so we can react to things failing, rather than only reading it in the logs.

/assign @mattmoor

Feels like a test is missing?

Good catch, added.

I'd go with %v for errors, but I don't think it matters much

For production code I agree. For test code, I like %q as it shows any pesky trailing spaces.

/lgtm


JS stating my object is not defined

Challenge http://www.freecodecamp.com/challenges/waypoint-manipulate-javascript-objects has an issue. Please describe how to reproduce it, and include links to screenshots if possible.
I am unable to drag and drop the screen shot, but here is the coding:
var myDog = {
"name": "Camper",
"legs": 4,
"tails": 1,
"friends": []
};
// Only change code below this line.
// Let's add the property bark to myDog
myDog.bark="arf!";
// Now delete the property tails
delete(mydog.tails);

Apologies for the inconvenience, but the challenge gives incorrect examples.
delete is actually a keyword, just like var and new. It's correct usage is
delete myDog.tails

A correction is going up soon.
Happy Coding!