Can the documentation be made clearer on the use of packadd

I recently decided to move from coc.nvim to Neovim's built in LSP. After following the instructions I failed to get it to work. I started this thread on reddit and with people's help I've got it working.
It was pointed out to me that the documentation now says many times you must use this line:
vim.cmd('packadd nvim-lsp')
After following that and learning how to create a pack directory which allowed me to link my nvim-lsp install to the pack directory I got it working.
If this is the correct way to do this then I think your documentation needs a small improvement as right now it says this:

Call :packadd nvim-lsp in your vimrc if you installed nvim-lsp to 'packpath' or if you use a package manager such as minpac.

If we must use the packadd method then it should not say "if you installed nvim-lsp to 'packpath'", this gives the impression it's not necessary to do that. As it sounded as if it wasn't required I ignored every instruction to use packadd. Some kind of help to explain how to install it to packpath would also be good.
You might be able to see from reddit that someone is now commenting that I'm completely wrong and packadd isn't needed, but if I remove it I can't get the built in LSP to work.
If I've got this completely wrong and I need to do something else to get it working please let me know.
Thanks for your hard work, much happier using built in LSP with vim-mucomplete than using coc.nvim that I didn't have a clue how to control what it was doing.

the documentation now says many times you must use this line:
vim.cmd('packadd nvim-lsp')
After following that and learning how to create a pack directory which allowed me to link my nvim-lsp install to the pack directory I got it working.

The vim.cmd('packadd nvim-lsp') line in the doc is confusing, yes, specially if you're not familiar with Vim. It is assumed that you would only add that line if you actually use 'packpath'.
The problem is some package managers use 'packpath', some don't. vim-plug does not.

Some kind of help to explain how to install it to packpath would also be good.

Depends on your package manager. The fact that you had to create a 'packpath' directory means your package manager doesn't use 'packpath'... otherwise it would have created the directory for you.

someone is now commenting that I'm completely wrong and packadd isn't needed, but if I remove it I can't get the built in LSP to work.

Need more details than that...

I'm using this to install the plugin:
Plug 'neovim/nvim-lsp'
If I don't use the vim.cmd('packadd nvim-l then I get this error message on launch:
Error detected while processing /Users/julianf/Dropbox/dotfiles/vim/my_config/nvim-lsp.vim: line   17: E5108: Error executing lua [string ":lua"]:1: module 'nvim_lsp' not found:         no field package.preload['nvim_lsp']         no file '/Users/julianf/.config/nvim/lua/nvim_lsp.lua'         no file '/Users/julianf/.config/nvim/lua/nvim_lsp/init.lua'
and the list keeps going on.

and what directory did you tell vim-plug to install to...?
The error message tells us it's looking in .config/nvim/.... Clearly vim-plug is installing somewhere else.

I don't know, I've always just used a line like Plug 'tpope/vim-repeat' in my init.vim and plugins work. Never configured it to say which directory to use.
I can see the plugins are installed in ~/.config/nvim/bundle/

are other plugins being found? what does this say:
:put =&runtimepath

Actually, the problem might be that you're calling require'nvim_lsp' before calling plug#end(). Can you try putting the Lua code somewhere after plug#end()

Yes, that was the problem, I moved it after plug#end() and it works.
Thanks for taking the time to help me. I'll update the reddit post in case it can help anyone else.

@justinmk also the question is, why should I call packadd nvim-lspconfig if I put plugin contents under ~/.local/share/nvim/site/pack/plugin/start/nvim-lspconfig/plugin/nvim_lsp.vim, which means that due to start directory neovim would load it during startup (and neovim actually loads it as :scriptnames points out).
But still, if I don't call packadd, I can't import nvim_lsp lua module...


vedio is recorded black in RecordRTC /Canvas-Recording/webpage-recording.html

pls can you help me when i try to record the webpage the vedio is recorded black

Thank you for your anwser
the script for recording WEBPAGE (https://www.webrtc-experiment.com/RecordRTC/Canvas-Recording/webpage-recording.html) record everything (inputs,text,canvas..)but doesn't record vedio camera and pictures
you can check your demo online and you will see that everthing in #elementToShare DIV is recording but the #camera vedio is recording

Any updates for this issue?


The Rigidbody2D cannot rotate after set the CollisionShape2D disabled first and enabled later

The Rigidbody2D cannot rotate if you disable the collision shape and then enable it again. But it's fine if you do nothing to the collision shape.
Godot version:
3.1.1
OS/device including version:
Windows 10
Issue description:
The rotation by apply_torque_impulse of the RigidBody2D may work incorrectly in Godot 3.1.1.
If you never disable the collision shape of the RigidBody2D, everything is normal, but if you first disable the shape use $CollisionShape2D.set_deferred('disabled', true) then after some events trigger and set it enabled with $CollisionShape2D.set_deferred('disabled', false), then the rotation looks like "broken", the node can only work with apply_central_impulse but no effect with apply_torque_impulse now.
Steps to reproduce:
func _ready():
	$CollisionShape2D.set_deferred('disabled', false)

The code above works fine, but you cannot rotate with the code below:
func _ready():
	$CollisionShape2D.set_deferred('disabled', true)
	yield(get_tree().create_timer(3), 'timeout')
	$CollisionShape2D.set_deferred('disabled', false)

This is not the actual code but for the test is enough, and I upload the very little represented project in Github: https://github.com/spkingr/test-git/tree/master/SpaceShipRotation
Minimal reproduction project:
https://github.com/spkingr/test-git/tree/master/SpaceShipRotation
The images:

Unable to reproduce with latest build, seems already fixed.

Unable to reproduce with latest build, seems already fixed.

So how to use the latest API in Godot 3.1 stable version to solve this bug?

Not stable version,  just built with latest master source code. See here to build it https://docs.godotengine.org/en/3.1/development/compiling/index.html

There are nightly binaries here everyday.
https://hugo.pro/projects/godot-builds/

Had the same issue disabling and enabling the collision shape. I can confirm that it is fixed on a nightly build.
Extra information should this be usefull:
Godot Engine v3.2.alpha.calinou.1d9233c38
OpenGL ES 3.0 Renderer: GeForce GTX 970M/PCIe/SSE2

Fixed in 3.2.

Hello, I am using the version 3.2.2 and I have exactly the same problem. I cannot apply torque forces when the collision shape is disabled. Any solution?
Thanks.

@lukepass Please create a new issue with a minimal reproduction project attached.

@Calinou I uploaded the project and opened a new issuje:
https://github.com/godotengine/godot/issues/41024
Thanks!


Increase max request size to 10mb by default

Addresses #1814
Summary
Configure micri to accept requests of up to 10MB instead of just 1MB so that users can send larger requests without any additional effort.
Why 10MB? Because 10MB ought to be enough for anybody. ;p
Checklist

The basics

[X] I tested these changes manually in my local or dev environment

Tests

[X] Added or updated
[ ] N/A

Event Tracking

[ ] I added event tracking and followed the event tracking guidelines
[X] N/A

Error Reporting

[ ] I reported errors and followed the error reporting guidelines
[X] N/A

Additional context
In order to mock a service that accepts images in the request body, I need to increase the maximum request size limit.
10MB is enough for my use case and was suggested by @philsturgeon, this could be a configuration option in the future if different use cases come up.

@philsturgeon could you please have a look at this PR?

@chohmann could you take a look at this when you have some time?


4.7 loan collection offer

4.7   Place Collection LoanOffer Support
Lenders can create an offer by sending funds to the contract and waiting for holders to give their NFT in exchange for the price.
Any holder will be able to answer this offer by giving up the NFT of their choice inside the collection. The rest of the loan cycle is the same as in the normal case.
This Pr aims at adding loan collection offers to Atlas DAO

Sound good


feat(plugin-vue): throw build error when a compononent is not imported

Clear and concise description of the problem
<template>
  <ImportedComponent />
</template>

<script setup>
// no imports here
</script>

When defining a component in template which is not imported, the build complete with success.
$ vite build

Suggested solution
It should throw a build error in order to catch missing imports during build.
Alternative
No response
Additional context
No response
Validations

[X] Follow our Code of Conduct
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

I think it should be a lint error instead.

It can not throw a build error.Because you can globally register a component in runtime.

It can not throw a build error.Because you can globally register a component in runtime.

Makes sense ! In that case, what about a @vite/plugin-vue config like :
// vite.config.ts
import vue from '@vitejs/plugin-vue'

...
  plugins: [
    vue({
      // throws a build error if a component is not registered
      checkRegisterComponents: true,
      // do not throws a build error if those components are not registered
      runtimeComponents: ['MyRuntimeComponent']
    })
  ]
...

You can use this ESLint rule: https://eslint.vuejs.org/rules/no-unregistered-components.html
This option doesn't fit in the Vite plugin IMO.

Thanks @sodatea !
There is no implementation for <script setup> yet but I agree that it belongs to ESLint.


aur-chroot: expose BASE_PACKAGES

Could we expose base_packages as a switch in aur-{sync,build} or env var ( like: TMPDIR ) ?
I need this for pushing some extra stuff  when building in clean chroot {stuff:{ccache,distcc,ccache-ext,pacman-gitlfs-proto}} and calling aur-chroot directly to pass extra packages as positional arguments is somewhat suboptimal, thanks 😏

On 16/02/2021 09:56, bartoszek wrote:

Could we expose |base_packages| as a switch in |aur-{sync,build}| or
env var ( like: |TMPDIR| ) ?
I need this for pushing some extra stuff when building in clean chroot
|{stuff:{ccache,distcc,ccache-ext,pacman-gitlfs-proto}}| and calling
|aur-chroot| directly to pass extra packages as positional arguments
is somewhat suboptimal, thanks 😏
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/AladW/aurutils/issues/807, or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKASJF2HT7KM5NSDI74DKDS7IXK7ANCNFSM4XWB3SRQ.

Please explain why calling aur-chroot directly is suboptimal.

Well I used to have symlink to aur-{sync,build}-chroot-ccache that prepends each aur-{build,sync} call with aur-chroot --create as it's any way aurutils can inject extra packages to root. After chroot is created there's no way to pass extra packages as aur-chroot --update omits extra positional arguments, basically deferring me to just remove root before calling  aur-{sync,build}-chroot-ccache or use arch-nspawn $root -c $aur_repo_path pacman -S ... to insert some extra packages my build setup requires.
Finally I just scraped this excess scripting as it become unmaintainable since I've started using multiple local repositories, and plainly insert base_packages+=(...) in aur-chroot to have required packages preinstalled without all this aur-chroot shenanigans.

Apropos pacman-git-lfs-proto it's a proposal for implementation of git-lfs protocol in pacman, doesn't get much traction since no one outside AUR seems to use git-lfs sources 😢
https://bugs.archlinux.org/task/67012#comment192945

On 16/02/2021 10:40, bartoszek wrote:

Well I used to have symlink to |aur-{sync,build}-chroot-ccache| that
prepends each |aur-{build,sync}| call with |aur-chroot --create| as
it's any way |aurutils| can inject extra packages to |root|. After
chroot is created there's no way to pass extra packages as |aur-chroot
--update| omits extra positional arguments, basically deferring me to
just remove |root| before calling |aur-{sync,build}-chroot-ccache| or
use |arch-nspawn $root -c $aur_repo_path pacman -S ...| to insert some
extra packages my build setup requires.
Finally I just scraped this excess scripting as it become
unmaintainable since I've started using multiple local repositories,
and plainly insert |base_packages+=(...)| in |aur-chroot| to have
required packages preinstalled without all this |aur-chroot| shenanigans.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/AladW/aurutils/issues/807#issuecomment-779711713,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/ABKASJCWRS7P7R2XFDNXYMLS7I4RDANCNFSM4XWB3SRQ.

That all sounds very complicated to me. I guess aur-chroot taking
positional arguments for --update makes sense (pacman -Syu takes package
names too, after all) but I'd have to see how it pans out with
positional arguments for other modes, i.e. makechrootpkg arguments for
--build. (Something like --margs could be used for that, similar to the
aur-build option).

While I was initially skeptical about this proposal, the UI from #955 is much nicer for e.g. ccache builds:
aur chroot --update ccache distcc
aur chroot --build --bind /home/_ccache:/build/.ccache


Revert Changes on Medical History Validation

In this PR:

Removes 50 alphanumeric char validation for Medical History in Main and Test Code

As this would be an enhancement, we need to revert this change. Merging.


test: Fix K8s demos to not use TTYs with kubectl exec

Signed-off-by: Romain Lenglet<EMAIL_ADDRESS>

This PR is fixing the CI bug hit in https://github.com/cilium/cilium/pull/3634#issuecomment-380333821

test-me-please

test-me-please

Thanks for fixing this!


Bug: Android unable to display QMenu within QInput

Android (both browser and Cordova) is unable to show a QMenu within a QInput field when the QInput  is tapped  on.
Video here showing the bug - in this case, I can tap on a v-slot:append dropdown icon:
https://user-images.githubusercontent.com/13761766/143984519-6c0874c0-923b-4c18-aa05-3c5678cc6a67.mp4
Video here is on iOS and shows what is meant to happen (tapping on the input still allows you to type and also display the QMenu results)
https://user-images.githubusercontent.com/13761766/143984409-f3305d66-08d3-46dc-8ebd-3a66de7bbf06.MP4

I need the code for reproduction, please

No worries. I'll make a sample project for you tomorrow.

I think I only need the QInput and the QMenu, to see how they are related to each other and how is the menu shown

https://github.com/nicholaszuccarelli/android-cordova-bugs-nov2021
Can be seen here inside this dialog. I struggle to make the QMenu open. At one point it displayed in the wrong position (which might be related to being able to scroll the entire window when focussing on the input).
The QMenu seemed to be fine within the actual QPage itself, but was not working in the QDialog.
https://user-images.githubusercontent.com/13761766/144150875-4d94c27e-e2d7-4cfa-875a-4f2b736615a4.mp4

https://github.com/pdanpdan/quasar/releases/tag/quasar-pdan-v1.16.3-beta.1


Crash in EFR32 lighting app when scanNetworks is issued during commissioning

Problem
When commissioning using the chip-tool built with https://github.com/project-chip/connectedhomeip/pull/20766 the EFR32 lighting app crashed with a Hard Fault. No stack trace shows up in Ozone but the crash goes away when 'otIp6SetEnabled(mOTInst, false);' is commented out at the following line: https://github.com/selissia/connectedhomeip/blame/master/src/platform/OpenThread/GenericThreadStackManagerImpl_OpenThread.cpp#L432
Proposed Solution

This is an OpenThread issue: https://github.com/openthread/openthread/issues/8110

Resolved by the above PR


Cannot connect to redis issue

Every time heroku runs it's regular maintenance for redis I get a timeout issue. It used to run for a day or so and then go away but now the error wont stop for some reason.
It seems like sidekiq throttled is trying to run a job with the old url prior to heroku updating the redis url after running it's upgrade and I believe that is what is causing the issue.
I tried to kill the jobs by adding sidekiq status and creating an expiration to sidekiq jobs but get the same problem. How would I kill jobs that keep getting the timeout issue?
This is my log:
2022-01-22T17:16:29.482888+00:00 app[worker.1]: pid=8 tid=ouainxnc4 WARN: Redis::CannotConnectError: Error connecting to Redis on ec2-44-194-160-154.compute-1.amazonaws.com:8449 (Redis::TimeoutError)
2022-01-22T17:16:29.482914+00:00 app[worker.1]: pid=8 tid=ouainxnc4 WARN: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:362:in `rescue in establish_connection'
2022-01-22T17:16:29.482915+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:343:in `establish_connection'
2022-01-22T17:16:29.482915+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:106:in `block in connect'
2022-01-22T17:16:29.482916+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:306:in `with_reconnect'
2022-01-22T17:16:29.482916+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:105:in `connect'
2022-01-22T17:16:29.482916+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-<IP_ADDRESS>9/lib/new_relic/agent/instrumentation/redis.rb:120:in `connect'2022-01-22T17:16:29.482916+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:381:in `ensure_connected'
2022-01-22T17:16:29.482917+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:231:in `block in process'
2022-01-22T17:16:29.482917+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:319:in `logging'
2022-01-22T17:16:29.482918+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:230:in `process'
2022-01-22T17:16:29.482918+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis/client.rb:125:in `call'
2022-01-22T17:16:29.482918+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/newrelic_rpm-<IP_ADDRESS>9/lib/new_relic/agent/instrumentation/redis.rb:74:in `call'
2022-01-22T17:16:29.482919+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:1956:in `block in zrangebyscore'
2022-01-22T17:16:29.482919+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:52:in `block in synchronize'
2022-01-22T17:16:29.482920+00:00 app[worker.1]: /app/vendor/ruby-2.6.3/lib/ruby/2.6.0/monitor.rb:230:in `mon_synchronize'
2022-01-22T17:16:29.482920+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:52:in `synchronize'
2022-01-22T17:16:29.482920+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/redis-4.1.3/lib/redis.rb:1955:in `zrangebyscore'
2022-01-22T17:16:29.482920+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:18:in `block (2 levels) in enqueue_jobs'
2022-01-22T17:16:29.482921+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:16:in `each'
2022-01-22T17:16:29.482921+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:16:in `block in enqueue_jobs'
2022-01-22T17:16:29.482921+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq.rb:97:in `block in redis'
2022-01-22T17:16:29.482921+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:65:in `block (2 levels) in with'
2022-01-22T17:16:29.482922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `handle_interrupt'
2022-01-22T17:16:29.482922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:64:in `block in with'
2022-01-22T17:16:29.482922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `handle_interrupt'
2022-01-22T17:16:29.482922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/connection_pool-2.2.2/lib/connection_pool.rb:61:in `with'
2022-01-22T17:16:29.482922+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq.rb:94:in `redis'
2022-01-22T17:16:29.482923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:15:in `enqueue_jobs'
2022-01-22T17:16:29.482923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:78:in `enqueue'
2022-01-22T17:16:29.482923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/scheduled.rb:70:in `block in start'
2022-01-22T17:16:29.482923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/util.rb:15:in `watchdog'
2022-01-22T17:16:29.482923+00:00 app[worker.1]: /app/vendor/bundle/ruby/2.6.0/gems/sidekiq-6.0.3/lib/sidekiq/util.rb:24:in `block in safe_thread'

And this is my sidekik.rb config file
require "sidekiq/throttled"
Sidekiq::Throttled.setup!

require 'sidekiq-status'
Sidekiq.configure_client do |config|
  config.client_middleware do |chain|
    chain.add Sidekiq::Status::ClientMiddleware, expiration: 30.minutes
  end
end

It seems the redis url is being cached somewhere and when the url is updated, throttled jobs are still trying to retrieve items in queue from the old url. Not sure where I can find this.

I have refactored fetch class implementation, and removed IPC based on pub/sub. That should eliminate sidekiq-throttled from the equation in the above problem. But will be happy to debug further - will need a bit more details though.


The examples provided for filterByHeaders do not work

Type of issue
Code doesn't work
Feedback
The following sample JSON configuration provided in the documentation does not work
"filterByHeaders": {
    "x-contoso": "contoso-intranet"
  }

When I changed it to the following it worked
"filterByHeaders": [
    {
      "name": "x-app",
      "value": "contoso-intranet"
    }
  ]

I am using schema https://raw.githubusercontent.com/microsoft/dev-proxy/main/schemas/v0.21.0/rc.schema.json.
Page URL
https://learn.microsoft.com/en-us/microsoft-cloud/dev/dev-proxy/how-to/intercept-requests-specific-headers
Content source URL
https://github.com/MicrosoftDocs/microsoft-cloud/blob/main/docs/dev/dev-proxy/how-to/intercept-requests-specific-headers.md
Author
@waldekmastykarz
Document Id
4bd540b0-592b-bc00-f53d-dd3d2ebd6ec7

Sorry for the trouble. Glad you figured it out. We'll fix it right away.

The fix PR has been merged and the changes should be visible in the next few hours. Once again, thank you for letting us know that something was wrong. We appreciate your help.


Cache busting queries

May be prudent to add queries that bust caches (both client-side and server-side) to gauge the actual recursive resolution time.
From a rudimentary profiler we wrote to test Node v Deno perf (in bash):
    prefix=$( dd if=/dev/urandom bs=20 count=20 status=none | tr -dc 'A-Z0-9' | xargs echo )
    # ex: JM7LBADPQGM7326MHWMYTNR09XBBGFKIWHVG6BQH6JK5QX103G4Q1H5SLYN.dnsleaktest.com
    domain="${prefix}.dnsleaktest.com"
    dohquery ${domain}

dnsleaktest.com can be substituted with any domain with wildcard DNS (like, neverssl.com, for example).
Ref: serverless-dns/serverless-dns/run:L56.

You can now use something like that:
godnsbench -a https://dns.google/dns-query -p 10 -c 1000 -t 1 -q {random}.example.net


Optimize container image size

Remove the SDK's git database to optimize the image size. There is no need for the git history (the checkout is anyway shallow).

wont this break the lfs files? there are a lot of static libs in there, but dont know if any of those are used in the build? If not its probably ok.

wont this break the lfs files? there are a lot of static libs in there, but dont know if any of those are used in the build? If not its probably ok.

Why do you think so? We don't delete those, they are checked out (as a copy) at that time.

Don't worry, I am just probably confusing how lfs works server side vs client side...


Create HTML output based on the otio file.

Can we create an HTML file based on the OTIO file?
This should be template based, so that its possible to generate different outputs.

Complete.


Toast without timeout

There is any way to set a toast without a timeout? Hide just after a user interaction?

@danieloprado no. Toast has a default timeout of 1500ms. It has been designed to hide after the timeout or button press whichever is earlier.
However, you can fork the library and change the code to meet your requirement.


Enhance single node upgrade restore vm operation

Problem:
address comments in https://github.com/harvester/harvester/issues/4005#issuecomment-2376379554

Need to wait until kubevirt is ready to handle vm operation then start restoring vm.
The information of vm before upgrade currently are placed in the same secret even if multiple upgrade CR exist. There are two drawbacks here, 1) Hard to know the vm info before upgrade in each upgrade 2) if error occurs, restoreVM delete secret, and in the next round of upgrade#onChange, restoreVM do nothing as the secret disappeared.

Solution:

To make sure kubevirt is ready before restoreVM, this pr triggers the restoreVM method after repo VM startup successfully.
Store the pre-upgrade vm info in upgrade CR annotation instead of secret.
Also add a validator to make sure restoreVM setting should not be true under multi-node cluster.

Related Issue:
https://github.com/harvester/harvester/issues/4005
Test plan:

Create iso based on this pr/branch
Use ipxe to create single node cluster,
Create 4 VMs with 2 running VMs, 1 stopped VM, and 1 paused VM.

Apply the following yaml to update restoreVM: true in Setting upgrade-config

apiVersion: harvesterhci.io/v1beta1
value: '{"imagePreloadOption":{"strategy":{"type":"sequential"}}, "restoreVM": true}'
kind: Setting
metadata:
  name: upgrade-config

Use the following yaml to upgrade harvester, note that the iso in isoURL should be the same one build in step1.

apiVersion: harvesterhci.io/v1beta1
kind: Version
metadata:
  name: master
  namespace: harvester-system
spec:
  isoURL: http://<IP_ADDRESS>:8000/harvester-master-amd64.iso
---
apiVersion: harvesterhci.io/v1beta1
kind: Upgrade
metadata:
  annotations:
    harvesterhci.io/skip-version-check: "true"
    harvesterhci.io/skipWebhook: "true"
  generateName: hvst-upgrade-
  namespace: harvester-system
spec:
  version: "master"

Verify all VMs were running before upgrade are still in running state after upgrade. And the paused vm before upgrade are stopped after upgrade.

rebased to master and manually test again, all good


Add Ability to Enhance Baseline service with D3 plug-in Modules

Add the capability to enhance the baseline "D3 Service" scope with additional plug-ins as a way to "configure" the service provider, before using getD3() method to obtain a reference to it.
The intent is to provide the capability discussed with @buKaneer in issue #6 out-of-the box.

Still waiting for more clarity on tooling for third-party library development, as per discussion in angular/angular-cli#1692.
I would prefer to consider a more comprehensive rewrite, based on a third-party library build toolchain that has stabilized.

@tomwanzek i am using your lib, first of all awesome work thank you for that..... is there any update i want to use d3 tip can you please help me on this....


JRE HeaderDoc warnings

I'm seeing a number of warnings in my Xcode project about bad HeaderDoc in the J2ObjC headers.
For example:

j2objc-2.3.1/include/java/lang/reflect/AnnotatedElement.h:92:38: Expected quoted string after equals sign
j2objc-2.3.1/include/java/lang/reflect/AnnotatedElement.h:92:38: HTML start tag prematurely ended, expected attribute name or '>'
j2objc-2.3.1/include/java/util/HashMap.h:1333:3: '@return' command used in a comment that is attached to a method returning void

FWIW, those errors are in OpenJDK, which is pulled to Android's libcore library, which we then pull. So we can stay up-to-date with Android, we try to minimize the changes we make to just those that are necessary for that code to work on iOS.
If anyone wants to contribute to OpenJDK (nice bragging rights), consider fixing these warnings and submitting a pull request there.


why IOException occurs in server point when client stops?

IOException occurs in server point when client stops. the Exception is IOException （The remote host forced the closure of an existing connection）[远程主机强迫关闭了一个现有的连接], and I use the normal testing code. the code is undering:
OkHttpClient client = new OkHttpClient();

  String post(String url, String json) throws IOException {
    RequestBody body = RequestBody.create(JSON, json);
    Request request = new Request.Builder()
        .url(url)
        .post(body)
        .build();
    try (Response response = client.newCall(request).execute()) {
      return response.body().string();
    }
  }

Unclear what action we should take on this. Could you provide an executable test case that demonstrates the problem?


Unable to Configure Model in Notebook

Version: 1.86.0
Description
When trying to configure a model in a Notebook through the script({ model: 'some-model' }) in JS script cell or the page config YAML, the model configuration does not take effect.
The Notebook still prompts that no model has been selected or defaults to the model configured in the .env file.
During debugging, I found that in the src/docsnotebook.ts file, the activateNotebookExecutor function correctly parses the model from the meta (const meta = parsePromptScriptMeta(jsSource)), but it seems that the meta.model is not properly used as a parameter in the subsequent startAIRequest function in src/state.ts.
To temporary resolve this, I manually modified the compiled JS file in the VS Code extension directory as follows:
        const { runId, request } = await client.startScript(
            template.id,
            files,
            {
                jsSource: options.jsSource,
                signal,
                trace,
                infoCb,
                partialCb,
                label,
                cache: cache ? template.cache : undefined,
                vars: structuredClone(options.parameters),
                model: template.model
            }
        )

After passing model: template.model in the third parameter, it seems to work as expected.

At the same time, I found that when I try to use system prompts in the Notebook, it seems that they cannot be used either.
Currently, I can modify the src/docsnotebook.ts file mentioned above to add:
model: template.model,
system: template.system,

Additionally, the runScriptInternal function in src/run.ts needs to be modified as follows:
    const prj = await buildProject({
        toolFiles,
    })
    if (jsSource)
        prj.scripts.push({
            id: scriptId,
            jsSource,
        })
    const script = prj.scripts.find(
        (t) =>
            t.id === scriptId ||
            (t.filename &&
                GENAI_ANY_REGEX.test(scriptId) &&
                resolve(t.filename) === resolve(scriptId))
    )
    if (!script) throw new Error(`script ${scriptId} not found`)
    const fragment: Fragment = {
        files: Array.from(resolvedFiles),
    }

In the following section, add model and system:
        prj.scripts.push({
            id: scriptId,
            jsSource,
            model: options.model,
            system: options.system,
        })

In the original code, the script for the current Notebook Cell was added to prj.scripts, but it only included template.id and jsSource. I don’t know if this was by design or a bug. In any case, from this point on, the script no longer contains information such as model and system, and they are no longer included when called later.

Thanks for digging.


shell: Introduce LISA_PRESERVE_SHELL

Sourcing init_env basically provides a set of bash functions (the lisa-*
commands) to the user and activates the python venv. However, that also
changes the PS1 and the colorscheme of the current shell, although this
isn't strictly necessary.
In order to give users the option of keeping their original shell
configuration, make the Lisa PS1 and colors depend on $LISA_SHELL_QUIET
not being set. While at it, list the env variables exported by init_env.
This results in:
queper01@queper01-lin:~/lisa$ LISA_SHELL_QUIET=1 source init_env
Activating LISA Python 3.6 venv (/data/work/lisa-next/.lisa-venv-3.6) ...
LISA version:
/data/work/lisa-next
branch: heads/lisa-shell-quiet
commit: 7f07c99ecec
Python version: 3.6
JupyterLab v0.35.4
No installed extensions
Environment variables:
LISA_SHELL_QUIET=1
LISA_CONF=/data/work/lisa-next/target_conf.yml
LISA_HOME=/data/work/lisa-next
LISA_RESULT_ROOT=/data/work/lisa-next/results
LISA_USE_VENV=1
LISA_HOST_ABI=x86_64
LISA_DEVMODE=1
LISA_VENV_PATH=/data/work/lisa-next/.lisa-venv-3.6
queper01@queper01-lin:~/lisa$
without changing colors.
Signed-off-by: Quentin Perret<EMAIL_ADDRESS>

I moved the check inside lisa_colors and made the printenv stuff display the exekall variable too. The WA and wltests variables are exported only upon invocation of lisa-wltest-series, so we just can't show them at this point.


Are the pre-trained models available somewhere?

Many thanks!

It's on developing now, will provide it once it is ready.

It's on developing now, will provide it once it is ready.

we have uploaded some pre-trained models, the details can be seen in s0/README

we have uploaded some pre-trained models, the details can be seen in s0/README

Thanks,
Here https://github.com/mobvoi/wenet/blob/main/examples/librispeech/s0/README.md?
I don't see anything there.

Thanks,
Here https://github.com/mobvoi/wenet/blob/main/examples/librispeech/s0/README.md?
I don't see anything there.

There are pre-trained models for AIShell in:
https://github.com/mobvoi/wenet/tree/main/examples/aishell/s0/README.md
Librispeech models need to be uploaded. @whiteshirt0429

I have uploaded a librispeech u2 model，the model link is "http://mobvoi-speech-public.ufile.ucloud.cn/public/wenet/librispeech/20210122_unified_conformer_exp.tar.gz" and you can use git hash "1ea7515e4722f4e05a5985f587120c994a93694a" to load it and decode

The more details can be found in  https://github.com/mobvoi/wenet/tree/main/examples/librispeech/s0/README.md

I have uploaded a librispeech u2 model，the model link is "http://mobvoi-speech-public.ufile.ucloud.cn/public/wenet/librispeech/20210122_unified_conformer_exp.tar.gz" and you can use git hash "1ea7515e4722f4e05a5985f587120c994a93694a" to load it and decode.
The more details can be found in https://github.com/mobvoi/wenet/tree/main/examples/librispeech/s0/README.md.

I have uploaded a librispeech u2 model，the model link is "http://mobvoi-speech-public.ufile.ucloud.cn/public/wenet/librispeech/20210122_unified_conformer_exp.tar.gz" and you can use git hash "1ea7515e4722f4e05a5985f587120c994a93694a" to load it and decode.

I have uploaded a librispeech u2 model，the model link is "http://mobvoi-speech-public.ufile.ucloud.cn/public/wenet/librispeech/20210122_unified_conformer_exp.tar.gz" and you can use git hash "1ea7515e4722f4e05a5985f587120c994a93694a" to load it.

It seems oss is not accessible from outside China. Maybe put in some other places, such as dropbox?

Thanks a lot for providing this!  I see that in the pretrained model archives, the bpe models aren't available.  If one wants to try these models on different audio files, we would need this file.  Otherwise, we have to download all the training data and rebuild to bpe model.


CenterCrop and Blur Transformation

The following code doesn't work, the image is not centercropped
Glide.with(context)
	.load(url)
	.centerCrop()
	.bitmapTransform(new BlurTransformation(context))
	.into(image);

and this doesn't apply the transformation
Glide.with(context)
	.load(url)
	.bitmapTransform(new BlurTransformation(context))
	.centerCrop()
	.into(image);

Look into .centerCrop... they both call .transform so if you want a combination:
.bitmapTransform(new CenterCrop(context), new BlurTransformation(context))

i'd like to encapsulate the codes twice to use Glide .here is my problem ,i'd like to use a List to save the transforms,but when i really invoke the method " bitmapTransform(			Transformation... bitmapTransformations) ",i don't know how to convert List to match the parameters。Could  u add a method with List parameter like "bitmapTransform(			List bitmapTransformations)"

@rexih use Glide's built-in MultiTransformation that has a Collection constructor. That gets created anyway automatically if you look into how bitmapTransform/transform works (GenericRequestBuilder.transform).

@TWiStErRob thx for the response. i looked into the code ,saw bitmapTransform use GifBitmapWrapperTransformation to handle the transforms and save the Transformation as a member(where use the MultiTransformation)
but i still dont know how to use MultiTransformation in builder. maybe later i will override a method

@rexih
List<Transformation<Bitmap>> transforms = new LinkedList<>();
transforms.add(new CenterCrop(context));
if (blah)
    transforms.add(new BlurTransformation(context));

// ....bitmapTransform(transforms) // is what you want, but it doesn't exist

@SuppressWarnings("rawtypes") // to prevent a generic varargs warning later
MultiTransformation transformation = new MultiTransformation<Bitmap>(transforms);

....bitmapTransform(transformation) // this works

@TWiStErRob wow ,nice code!i misuderstood it.thx a lot!

@TWiStErRob , I have been looking into MultipleTransform. I have a requirement where I want to combine rotation animation while performing multipleTransformation. So, I have an image with RoundedCorner which I load using Glide. Then, if I tap on the image, it should basically crop the corners till it get rounded and rotate at the same time, while transformation is in progress. Based on above example, I tried to combine RoundedCornersTransformation and I pass in different radius as a parameter. Then, once the radius is equal to the width/2, it should call CropCircleTransformation. Visually, I only see CropCircleTransformation with rotation animation and what I want to see is square cropping the corners, converting into a circle with rotation.
Here is my code snippet.
My Image size is 156dpx156dp. I also looked at this issue
https://github.com/wasabeef/glide-transformations/issues/16 and still cannot make it work.
`    private void multipleTransformation(String imageUrl, ImageView imageView){
List<Transformation> transforms = new LinkedList<>();
transforms.add(new RoundedCornersTransformation(mContext, 110, 0, RoundedCornersTransformation.CornerType.ALL));
    transforms.add(new RoundedCornersTransformation(mContext, 90, 0, RoundedCornersTransformation.CornerType.ALL));
    transforms.add(new RoundedCornersTransformation(mContext, 80, 0, RoundedCornersTransformation.CornerType.ALL));
    transforms.add(new RoundedCornersTransformation(mContext, 78, 0, RoundedCornersTransformation.CornerType.ALL));
    transforms.add(new CropCircleTransformation(mContext));
    MultiTransformation transformation = new MultiTransformation<Bitmap>(transforms);

    final float ROTATE_FROM = 0.0f;
    final float ROTATE_TO =  358.0f;
    RotateAnimation r; // = new RotateAnimation(ROTATE_FROM, ROTATE_TO);
    r = new RotateAnimation(ROTATE_FROM, ROTATE_TO, Animation.RELATIVE_TO_SELF, 0.5f, Animation.RELATIVE_TO_SELF, 0.5f);
    r.setDuration((long) 2*1500);
    r.setRepeatCount(3);
    r.setInterpolator(new LinearInterpolator());
    r.setRepeatMode(Animation.RESTART);

    Glide.with(mContext)
            .load(imageUrl)
            .bitmapTransform(transformation)
            .animate(r)
            .into(imageView);
}`

@gargmeha That's a really unrelated question to this issue... anyway, all transformations are applied before any animation starts. Applying multiple similar transformations this way just wastes resources, because it just creates new and new bitmaps, but in the end, the result will be just a circle crop. Animations are for revealing the image. Glide doesn't support what you want out of the box as far as I know.


path.basename now fails when called with non-string second argument

From where the non-string second argument appears? Also, could you please bump the version?

From map's callback signature.
Shouldn't it be bumped on release instead of with every PR?

Thanks. I thought I'd release it right away, but it probably doesn't make much difference now.

@honzajavorek then do, I think bump is automated and can be done directly.
I am not sure how you otherwise coordinate multiple PRs :)

Ah, I get your point.


env: node\r: No such file or directory

jsome 2.3.25
OS X 10.12.1
$ jsome
env: node\r: No such file or directory
$ which jsome |xargs dos2unix -F
dos2unix: converting file /Users/chris/.nvm/versions/node/v6.2.2/bin/jsome to Unix format...
$ jsome
{
  error: "EISDIR: illegal operation on a directory, read"
}
$

Honestly I wasn't able to see where the CR exists in the code. Maybe it's introduced pushing to npm?
That said, I'm not sure if this will help or not.


fix: output mjs files for ES modules support

closes #142
Clean and simple method of having .mjs files in dist-esm without batch renaming in a shell script, using typescript-esm.
I haven't tested this exhaustively yet, maybe I'm missing something.

do we have a release with such a thing? I see that it was reverted here https://github.com/prisma/nexus-prisma/pull/207/files

I'm asking bc I'm facing the https://github.com/prisma/nexus-prisma/issues/142 issue

@krolow With TS 4.7 released we'll see if we can just rely on that now. TBD.

@krolow see #200 for more details. Feel free to make a PR if you have the time!

:tada: This PR is included in version 1.0.0 :tada:
The release is available on:

npm package (@next-major dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


[2.6] Unable to remove cluster

Rancher Server Setup

Rancher version: 2.6.0
Installation option (Docker install/Helm Chart): Helm chart

If Helm Chart, Kubernetes Cluster and version (RKE1, RKE2, k3s, EKS, etc): RKE1

Proxy/Cert Details:

Information about the Cluster

Kubernetes version: v1.20.0
Cluster Type (Local/Downstream): Downstream

If downstream, what type of cluster? (Custom/Imported or specify provider for Hosted/Infrastructure Provider): vSphere

Describe the bug

I delete a downstream cluster and the node was removed from vsphere but now it's stuck in removal on the UI
To Reproduce

~I'm not sure how to reproduce this as I have not tried it again.~ It is always reproducible. Simply create a vsphere cluster, once its active, delete it. It'll be stuck forever!
Result
2021/09/05 05:26:50 [INFO] Stopping cluster agent for c-8lh48
2021/09/05 05:26:50 [ERROR] error syncing 'c-5dbcl': handler restrictedAdminsRBACCluster: Index with name by-cluster does not exist, requeuing

Expected Result

The cluster should be removed from the UI
Screenshots

Additional context
<!--Add any other context about the problem here.—>

@abhi1693 if the UI is refreshed was the deleted cluster removed from the UI?

@anupama2501  It took about 24 hours for it to get removed from it. I tried relogin but that didn't help.
Since then I have had this issue twice with the exact same log

@anupama2501 I was mistaken the home page still shows the cluster is scheduled for deletion. However, it's not visible in the sidebar

@anupama2501 I have another cluster that is stuck now. I have tried to remove the ns for the cluster, but rancher keeps recreating it again and so every cluster that we are deleting is now stuck at deletion.

I tried to recreate the issue and now my local cluster is also getting deleted.
Here are the logs
rancher-b9b5f6cb-w69hb_rancher.log

@abhi1693 would you be able to provide the steps that were tried when you see this issue, I will try to reproduce the same in my test setup?

@anupama2501 I have no idea how the local cluster started getting deleted. I deleted my test cluster and that on its own triggered it. Because I don't see any way to do this from the UI.
Unable to delete downstream cluster is always reproducible with vsphere setups. Once your cluster is active, then delete it from the UI from the homepage.

Have a couple of clarification questions:

Cluster that you were trying to delete created as a standard user or an admin?
vsphere cluster that was created, was it an infrastructure provider/custom cluster?
Was the cloud provider enabled?
Was the rancher server upgraded from v2.5.x or v2.4.x versions to v2.6.0 or a fresh install of v2.6.0?

I have a similar problem... we have a cluster in deleting state it isnt there when i do a k get cluster -n fleet-default on the rmc but still appears on the startpage of rmc (2.6.0)

@anupama2501

Cluster that you were trying to delete, was it created as a standard user or an admin?

I created using administrator

vsphere cluster that was created, was it an infrastructure provider/custom cluster?

I'm not sure about what exactly you are asking here. It's an on-prem setup. We are running vCenter v6.5 and v6.7 in our datacenters.

Was the cloud provider enabled?

No

Was the rancher server upgraded from v2.5.x or v2.4.x versions to v2.6.0 or a fresh install of v2.6.0?

I upgraded from v2.5.9 using the terraform provider as that is how we manage the cluster.

@abhi1693 thanks for all the info.
I created a downstream vsphere cluster as an admin with 3 etcd, 3 worker and 2 cp nodes on rancher v2.6.0
When I delete the cluster, I see the cluster is deleted from home page, cluster management and explore cluster page. I myself was not able to repro this issue but we already have similar issues logged:
https://github.com/rancher/dashboard/issues/3423
https://github.com/rancher/dashboard/issues/4053
This is not seen on the latest v2.6-head version which will be released as v2.6.2.
I tried creating the same on the latest v2.6-head and haven't seen the issue for a vsphere downstream cluster.

I am also having this same issue. I provisioned a RKE2 cluster and deleted the VM without removing it from rancher and I am not able to remove the cluster now.

Here's how to manually delete a cluster. Thanks Brad.
kubectl get clusters.management.cattle.io  # find the cluster you want to delete
export CLUSTERID="c-xxxxxxxxx" #
kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID

Or if you like just copy-pasting things:
kubectl get clusters.management.cattle.io  # find the cluster you want to delete, use for $CLUSTERID below
kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID

Awesome.  I can confirm this worked for me.  Thanks!

Awesome, glad to hear it!

I am also having the same issue with 2.6.2. Previously deleted cluster still shows under Advanced -> Mgmt Clusters
Same here. https://github.com/rancher/rancher/issues/34650#issuecomment-956555419 fixed it for me.

We're also hitting this issue with 2.6.2 which prevents us to migrate to Rancher 2.6.x.

Here's how to manually delete a cluster. Thanks Brad.
kubectl get clusters.management.cattle.io  # find the cluster you want to delete
export CLUSTERID="c-xxxxxxxxx" #
kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID

After running kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge, the cluster no longer shows under kubectl get clusters.management.cattle.io, and the kubectl delete clusters.management.cattle.io $CLUSTERID cant find it.
Cluster still shows under Cluster Management in the UI. Name is replaced with the cluster ID.

Here's how to manually delete a cluster. Thanks Brad.
kubectl get clusters.management.cattle.io  # find the cluster you want to delete
export CLUSTERID="c-xxxxxxxxx" #
kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID

After running kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge, the cluster no longer shows under kubectl get clusters.management.cattle.io, and the kubectl delete clusters.management.cattle.io $CLUSTERID cant find it.
Cluster still shows under Cluster Management in the UI. Name is replaced with the cluster ID.

Had the same problem. I was able to fix it by running these commands:
kubectl -n fleet-default get clusters.provisioning.cattle.io
kubectl -n fleet-default patch clusters.provisioning.cattle.io <cluster_name> -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl -n fleet-default delete clusters.provisioning.cattle.io <cluster_name>

The steps above were assuming that you'd already tried deleting it, and it was stuck waiting on the finalizers. Deleting it at some point (either before or after removing the finalizers) is definitely a requirement.

i am having a similar problem. My old cluster was called vetpro-prod2 and had an id of c-c16h4
i first tried  these commands:
kubectl get clusters.management.cattle.io  # find the cluster you want to delete
export CLUSTERID="c-xxxxxxxxx" #
kubectl patch clusters.management.cattle.io $CLUSTERID -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl delete clusters.management.cattle.io $CLUSTERID

However export CLUSTERID command returned no value.
So I tried these commands:
kubectl -n fleet-default get clusters.provisioning.cattle.io # find the name of the cluster you want to delete
kubectl -n fleet-default patch clusters.provisioning.cattle.io <cluster_name> -p '{"metadata":{"finalizers":[]}}' --type=merge
kubectl -n fleet-default delete clusters.provisioning.cattle.io <cluster_name>

That worked and the cluster does not show up in the Cluster manager anymore. (the old cluster was called vetpro-prod2)

HOWEVER it does still show up in the explorer:

In the docker logs I am seeing many of these errors:
2022/02/14 14:31:28 [ERROR] error syncing 'c-cl6h4/machine-99r5x': handler node-controller: Delete "https://D77ECA3AB450391D7A294C8F90AD0996.yl4.us-west-2.eks.amazonaws.com/api/v1/nodes/ip-10-50-98-31.us-west-2.compute.internal?timeout=45s": dial tcp: lookup D77xxxxxxxxxxxx.us-west-2.eks.amazonaws.com on <IP_ADDRESS>:53: no such host, requeuing
2022/02/14 14:43:38 [ERROR] Failed to handling tunnel request from <IP_ADDRESS>:42338: response 400: cluster not found
I am running 2.6.1 in a single docker container on ubuntu.  My clusters are all EKS.

@laurie-kepford FYI, this issue was addressed in 2.6.2.

I did finally get it to delete.  I ran kubectl delete namespace c-cl6h4

Same problem in 2.6.3, I even delete the namespace local, but it still exists, I think it is a BUG!
/BUG

There seems to be several issues being discussed in this thread. I will do my best to address them all.

The original description had a log message describing that the by-cluster index didn't exist. That is not related to deleting. The code that produces that error is not run if a cluster is deleting.
The name of the finalizer that is on the provisioning cluster object would be helpful to know. My guess, based on the comments here is that the finalizer was the mgmt-cluster-remove finalizer.
If the above is correct and the mgmt-cluster-remove finalizer was the one that was leftover, then that would explain why the cluster disappears from the Cluster Management page in the UI but not the Explore Cluster page.
The error from this comment indicates that the cluster no longer exists and Rancher is stuck trying to cleanup it up. There are certain protection built in (like if Rancher can contact the cluster, but the node no longer exists but this error is outside that scope).
There are mentions of not being able to delete a cluster with errors Method DELETE is not supported. That can happen if the role bindings are cleaned up before the cluster is completely deleted or left hanging around. That issue is being fixed: https://github.com/rancher/rancher/issues/35899
Finally, there are mentions of namespaces being left around or not cleaned up. That issue is also being fixed: https://github.com/rancher/rancher/issues/31546

@thedadams For 2 above, I remove thecontroller.cattle.io/cluster-agent-controller-cleanup finalizer on clusters.management.catttle.io, then the cluster is completely removed.

@dnoland1 That issue is being fixed: https://github.com/rancher/rancher/issues/35700

@thedadams Steps to reproduce this issue:

Provision an RKE2 cluster using the vSphere integration
Go to the vCenter and delete the VMs that Rancher provisioned for this cluster
Delete the cluster in Rancher from the Cluster Management page

Related issue: https://github.com/rancher/rancher/issues/35853

https://github.com/rancher/rancher/issues/35853 will be tracked separately, can close this if the original issue is fixed. cc @Auston-Ivison-Suse

Validation Setup

Rancher version: v2.6-head(599a9e8) (Setup via vsphere)
Local cluster k8s version: v1.22.7+k3s1
Downstream: vSphere, RKE1, k8s version: v1.22.7-rancher1-2

Validation Steps

setup rancher within vsphere then login.
Provision downstream clusters using the vsphere node driver
Wait for them to come up and then delete the clusters

Results
The cluster is removed successfully and no longer hangs like in the original description.
**Further tests: **

Clusters out of a vsphere environment also remove
RKE2 clusters also removed
Ec2, DO, all removed as well.

The issue is still persistent in Rancher 2.6.5, I mean as a former scientist, always wonder why the QC is so poor for so many IT products, so anti-user, the new 2.6.* GUI is horrendous compare to 2.5.*

I am on 2.7.9 Rancher - in my case the cluster is deleted and all the nodes are deleted in vsphere. But one worker node is stuck in deleting - by which the cluster cannot be deleted.
all the resources on vsphere are completely deleted. And Rancher UI is showing
cluster removing state "Resource scheduled for deletion"   and
one node is  in deleting state and tries to create - which it cant because there is no clsuter
"Creating server [fleet-default/boldyn-dev-ingress-d309c68e-mrv44] of kind (VmwarevsphereMachine) for machine boldyn-dev-ingress-59c9cf79b6xzqj5j-jsp7s in infrastructure provider

Tried everything - and i cannot do kubectl commands to delete by finalizers - because there are no resources


troubleshooting: add a bpf map for unexpected errors in bpf code

There are many places in our bpf code where we exit without generating the event when unexpected error happens. For troubleshooting and debugging it would be good to track this information so that we know if we hit any of those unexpected error paths. This can be implemented with a BPF map that maintains a counter per code location where we return early.

Many maps exist now for individual sensors. Is this to capture cases that don't already have maps or to somehow unify the error maps?

The purpose of this issue is to account for cases where we silently return. It is not about unifying the error maps.


Double approximation of second moment in Adafactor

Adafactor originally does its own an approximation of second moment.
But when GaLore is enabled, that approximation is done based on the shrunken grad by GaLore instead of the raw grad.
Possibly this behavior may have a slightly negative impact.

Thanks for pointing it out and this is correct. Vanilla Adafactor could face this issue but GaLore still reduces memory for Adafactor with momentum version.

Thank you for your reply.
And I'm sorry for that my comment is not clear on the main point.
My understanding is that GaLore can reduce the memory cost for exp_avg (when beta1 is not None), but not for exp_avg_sq because Adafactor originally calculates 1-rank approximation for exp_avg_sq.
(First of all, if this understanding is wrong, my comments are almost meaningless.)
Therefore using GaLore for exp_avg_sq might have the risk of increasing the approximation error rather than the benefit of memory efficiency.
So I thought it might be better to have a bypass mechanism that calculates the approximation of exp_avg_sq directly from the full gradient instead of the GaLore-approximated gradient.
But honestly, I have no idea whether the double approximation can really have a negative effect, and if so, whether it is non-negligible.
Thus I think there are three possible actions for this issue:

add a bypass mechanism because there is the need to deal it
hold off a decision because my concern is correct but the need is not clear
close this because no need right now (or my understanding is partially wrong)

Any of these would be acceptable to me.


QuestsGUI take second quest dont work

QuestsGUI: 0.17
Quests: 3.9.4
There is not console errors, but the problem is this:
I have two practically the same missions that simply change the amount of ores to break. When you select the first mission and complete it, trying to do the second one doesn't let you select from the menu. But if you select it with the / quests take command if it lets you do it. Also if you select those two missions at the same time before completing the first one if it leaves you both. This happens with all similar missions.
https://pastebin.com/R8LdFpNH

Thanks for your report. However, all issues regarding QuestsGUI must be posted at https://www.spigotmc.org/threads/questsgui-paid.399346/
You might first try renaming your second quest in way which does not use a + symbol.


Transference to an Executable - Device Agent

In our current model, the user agent will be downloaded by users and configured to run through a cron daemon. While this is an effective method of running code, there is no way to prevent users from reading the python file and learning the URI to post data. This is could lead to some major issues when it comes to falsifying metric data in the database.
One solution to this issue it the implementation of the python library called pyinstaller, it is possible to compile the code into an unreadable executable unix file. Once this file is created, the issue of unexpected posts through the API is eliminated.

PyInstaller can successfully transfer our client agent into an executable file. It is important that all packages are installed prior to compilation via PIP.


Compiled JavaScript import is missing file extension

TypeScript Version:  4.0.3
Search Terms: module es6 es2015 import file extension missing js ts bug 404
Steps to reproduce:
Create a main.ts:
import {foo} from './dep';
console.log(s, foo);

Create a dep.ts:
export const foo = 42;

Create a tsconfig.json:
{
  "compilerOptions": {
    "module": "ES2015"
  }
}

Then run:
npx tsc

Expected behavior:
The compiler generates JavaScript "which runs anywhere JavaScript runs: In a browser, on Node.JS or in your apps" (according to the TypeScript homepage). For example, it would be valid to create two files as follows; main.js:
import { foo } from './dep.js';
var s = "hello world!";
console.log(s, foo);

And dep.js:
export var foo = 42;

(More generally, the expected behavior is that the module specifier in the generated import must match the filename chosen for the generated dependency. For example, it would also be valid for the compiler to generate a file dep.xyz, if it also generated import ( foo } from './dep.xyz'.)
Actual behavior:
As above, except that in main.js, the import URL does not match the filename chosen by the compiler for the generated dependency; it is missing the file extension:
import { foo } from './dep';

When executing main.js in the browser, it requests the URL ./dep, which is a 404. This is expected, as the correct relative URL would be ./dep.js.
Related Issues: https://github.com/microsoft/TypeScript/issues/13422, voluntarily closed by the reporter for unknown reasons

TypeScript doesn't modify import paths as part of compilation - you should always write the path you want to appear in the emitted JS, and configure the project as necessary to make those paths resolve the way you want during compilation

Thanks @RyanCavanaugh! Do you mean I should write import { foo } from './dep.js' in my source main.ts? That does actually seem to work! In that the compiler uses './dep.ts' to find the types of variables exported.
However, I find this surprising, because

The recommendation everywhere else in TypeScript docs is to omit the file extension.
If I try to import from './dep.ts', the compiler gives me error TS2691: An import path cannot end with a '.ts' extension. Consider importing './dep' instead. So apparently it's not possible to generate JavaScript imports that end in .ts?
The module resolution docs don't say what's going on here. What logic makes this work? Is there a special case for .js, which is mapped to .ts?
I can't find a rationale for this design anywhere.

TS never takes an existing valid JS construct and emits something different, so this is just the default behavior for all JS you could write. Module resolution tries to make all of this work "like you would expect"
See also https://github.com/microsoft/TypeScript/issues/15479#issuecomment-300240856

@RyanCavanaugh that principle makes sense. My remaining confusion then is why the docs and compiler encourage omitting the file extension, if "you should write the import path that works at runtime". Maybe this encouragement is designed for a JS runtime that demands that you omit the file extension. But the runtimes I'm aware of are browser, ES modules, and Node.js, none of which make this demand.

@RyanCavanaugh Writing "./dep.js" doesn't sound logical. It requires the coder to know the exact complied output and be fully aware of the compiled environment. Isn't the whole idea of Typescript to abstract Javascript?
import { foo } from "./dep" is legitimate Typescript, and it provides the information for Typescript to resolve all that is needed to make the code compiled successfully. So, the compiled output similarly has to work.

The whole idea of TypeScript is to add static types on top of JavaScript, not to be a higher-level language that builds to JS. The C# / IL comparison is not apt at all.
There's literally no line of undownleveled JavaScript code you can write where TS intercepts some string in it and changes it to be something else. This is 100% consistent with TS behavior in every other kind of JS construct; it would be frankly bizarre to have import paths be the one thing that we decide to go mess with.

problem is, ts does not only need to add '.js', there are complexer resolution strategies.
i would like it, if there would be a way of calling a plugin after transpilation had been done, so I could fix the import names with that.
I know I could use a bundler / build system, but we ship directly the code typescript generates, without an additional build step. at the moment we fix the import path's in our own webserver.

@RyanCavanaugh @jameshfisher I was about to post a new bug about TypeScript but then the template encouraged me to search again, and I found this issue, which might be similar enough.
But I'm still confused, even reading above.
Here is the "bug" I submitted to the "vscode" repo, and that team rejected it and said that I should submit to the "TypeScript" repo here: https://github.com/microsoft/vscode/issues/108872
It seems that people trying to write TypeScript in VSC face this dilemma of choosing between:

VSC shows an error (red underline), but the code works, or:
If we follow the VSC error tooltip's suggestion, it will "resolve" the error in the editor, but then the code won't run.

I'm getting this error and don't understand why:
An import path cannot end with a '.ts' extension. Consider importing '_______' instead. ts(2691)

See also: microsoft/TypeScript#11235 (comment)

So far, I have had success with @RyanCavanaugh's suggestion to "always write the path you want to appear in the emitted JS, and configure the project as necessary to make those paths resolve the way you want during compilation".
But I am still confused because this advice contradicts the compiler and docs and ecosystem, which all encourage omitting file extensions.

Yeah that doesn't feel right. I really don't understand. I can't think of any principle where it would make sense to throw a prominent red error for something legal.

Same issue here. Adding a .js in the import inside a TypeScript file does allow to compile it with the TypeScript compiler and will output files with working ESM imports.
However, when I add .js extensions on the imports, I can't get testing working. Tried with Mocha and Jest, but no luck so far: they complain the files with .js extension don't exist, which is correct, those files don't exist since they actually have a .ts extension.
I would love to see the TypeScript compiler add .js extenstions on imports when the output is esm/es2015.

The problem I'm running into is that I need the .js extension added to export statements, not just import. I have this index.ts file for a library of math functions:
export * from './math.js';
export {
  Angle, convertFromRadians, convertToRadians, FMT_DD, FMT_DDD, FMT_HH, FMT_MINS, FMT_SECS, FMT_SIGNED,
  HALF_PI, Mode, PI, TWO_PI, Unit
} from './angle.js';
export { MinMaxFinder } from './min-max-finder.js';
export { SphericalPosition } from './spherical-position.js';
export { SphericalPosition3D } from './spherical-position-3d.js';
export { ZeroFinder } from './zero-finder.js';

Adding .js only works for the first line. I don't know if that's because it's a wildcard export or not. But the generated JavaScript code is missing the .js everywhere else:
export * from './math.js';
export { Angle, convertFromRadians, convertToRadians, FMT_DD, FMT_DDD, FMT_HH, FMT_MINS, FMT_SECS, FMT_SIGNED, HALF_PI, Mode, PI, TWO_PI, Unit } from './angle';
export { MinMaxFinder } from './min-max-finder';
export { SphericalPosition } from './spherical-position';
export { SphericalPosition3D } from './spherical-position-3d';
export { ZeroFinder } from './zero-finder';
//# sourceMappingURL=index.js.map```

@josdejong you can get around this by using an index.ts file. In the index.ts file do the following export { MyClass } from 'src/my-class.js', and in your test just import the file directly instead of via the index file import { MyClass } from src/my-class.ts`.

Thanks for sharing your workaround @bobbyg603 . I'm not sure how that would work for the imports inside src/my-class.ts, (nested). You can't change that dynamically depending on your context (testing or actually using).
It feels to me like there is a serious mismatch between plain ES modules (requiring actual existing paths with proper file extensions) and TypeScript code (relying on "smart" nodejs module resolution, not requiring file extensions, and (implicitly) changing the (implicit) file extensions from .ts to .js when compiling). I can't understand this issue is marked "Working as intended" in https://github.com/microsoft/TypeScript/issues/40878#issuecomment-702353715, this is a problem that needs to be addressed.
Most logical to me would be to write imports with *.ts extension in your code (matching the actual file extension). And when compiling, have TypeScript replace *.ts extensions with *.js, matching the actual file extension of the compiled file (which is changed to *.js by TypeScript). TypeScript changes the file extensions from *.ts to *.js, so logically it should also fix corresponding imports.

Facing the same problem.
In most scenarios, we use webpack. But for simple scenarios and samples, e.g. for our TS-training for developers, we want to use plain TS files and JS modules without the complexity of another transpiler like Babel/webpack.
It looks odd in training classes when you try to explain the beauty of TS and then have to stutter something like "TS never changes outputted strings". Or you have to tell them that it will get better with webpack.
=> "The simple case is ugly but it looks good in the more complicated case when we use more tools."
This means:

On the client/browser, TS needs a transpiler to transpile to some non-ECMASCRIPT-modules.
If you go go for "import ./myModule.js", IDEs might mark it as error.
Other ALM-scripts which parse source-code (testscripts, mock-scripts, build-scripts, deploy-scripts, ...) might get confused.

Why not add an option to tsconfig and leave it to the developer to use it or not?
We know that is is not "pure doctrine" but for many cases it will work. One could also emit a warning "will only work with static files" or something like that.
I'm aware that "import ./myModule" could resolve to something which is not a static file on the web-server. E.g. a web-service dynamically resolving and returning js-code.
In any case, please such an option would leave it to the developer's resonsibility how to transpile it.

Facing the same problem.
In most scenarios, we use webpack. But for simple scenarios and samples, e.g. for our TS-training for developers, we want to use plain TS files and JS modules without the complexity of another transpiler like Babel/webpack.
It looks odd in training classes when you try to explain the beauty of TS and then have to stutter something like "TS never changes outputted strings". Or you have to tell them that it will get better with webpack.
=> "The simple case is ugly but it looks good in the more complicated case when we use more tools."
This means:

On the client/browser, TS needs a transpiler to transpile to some non-ECMASCRIPT-modules.
If you go go for "import ./myModule.js", IDEs might mark it as error.
Other ALM-scripts which parse source-code (testscripts, mock-scripts, build-scripts, deploy-scripts, ...) might get confused.

Why not add an option to tsconfig and leave it to the developer to use it or not?
We know that is is not "pure doctrine" but for many cases it will work. One could also emit a warning "will only work with static files" or something like that.
I'm aware that "import ./myModule" could resolve to something which is not a static file on the web-server. E.g. a web-service dynamically resolving and returning js-code.
In any case, please such an option would leave it to the developer's resonsibility how to transpile it.

add .js extenstions on imports when the output is esm/es2015

I think add .js extenstions on imports when the output is esm/es2015 would be the only correct behaviour, because The file extension is always necessary  for relative specifier in esm.

@ioslh I'm trying to get eslint to be able to ensure ".js" extensions are never forgotten
any thumbs up or help in trying to make my PR be accepted would be appreciated:
https://github.com/benmosher/eslint-plugin-import/pull/2033

TypeScript developers, please, do whatever the hell you want with file extensions, this debate has been going on for years, I don't care, your mind is set, fine. But just document this very basic thing in a place that's easy to find: how on earth do I run the JavaScript emitted by tsc when "module" is set to "ESNext"? That will save a lot of people a lot of time. Most people understand "transpiles to JavaScript" as "transpiles to working JavaScript". But this is not the case.

I'm hitting this exact same issue. I'm not using webpack, just plain typescript and my javascript output is broken because the .js extension is missing. How on earth can this not be a bug? What am I supposed to do instead?

@TheBoneJarmer If you're just doing plain TS and JS, use the would-be filename as the import specifier like so:
import { version } from "./version.js";

The problem with this solution is that if you have an "outDir" different
than the default, i.e. a setup where transpiled files don't live beside the
.ts files, most tools will freak up and that's not a nice development
experience.
I was so pissed-up buy this that I built this monstrosity:
https://www.npmjs.com/package/add-js-extension
You can install it and have it watch your "outDir" and it will quickly and
transparently add the .js extension where appropriate to the transpiled
files as they appear / are updated by tsc.
It seems to be working well. Only missing major feature is that I currently
don't rewrite the source-maps but it doesn't seem to matter much since the
changes I make in the js files are only adding 3 chars to some import
statements at the end of some lines. No line offets, no changes to any
place where you would be likely nor even able to set a breakpoint anyways.
Give it a go and let me know of any issues you might find!
There are webpack modules that do the same thing, but my solution is much
less invasive: keeps file and directory structure, no bundling, no config.
I spent a considerable amount of time reading the obscure ESM spec and I'm
pretty confident my tool doesn't do anything unwise.
I actually think TS has it wrong, as the ESM spec clearly states that there
is no such thing as a default file extension. So you should "import foo
from '. /foo.ts'" and that should transpile to "import foo from
'./foo.js'". I don't see any deviation from JS here. "import foo from
'./foo'" seems just wrong.
On Thu, Jul 29, 2021, 22:43 RA80533 @.***> wrote:

@TheBoneJarmer https://github.com/TheBoneJarmer If you're just doing
plain TS and JS, use the would-be filename as the import specifier like so:
import { version } from "./version.js";
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/40878#issuecomment-889442439,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALESE6S37QUCIGMC3IKOTLT2G4NRANCNFSM4SA23LJQ
.

Thanks for the replies guys. Personally I entirely agree with @djfm. I am grateful for the workaround from @RA80533 though, don't take me wrong. But it is far from a good solution imho. And the reasons why are nicely explained by djfm. That said, you are not the only one who got that idea. I found another npm package through Google which does what I believe you do as well. It is called tsc-esm and is created by user @Gin-Quin.

That said. I also took my time to learn a bit more about the whole es6 module system and I also think javascript has a flaw here. Imho they should introduce something similar to what happens in urls with index.html. In most if not all web servers you never have to manually insert '/index.html' at the end of an url. When the path ends with a / the server automatically converts that to /index.html. When no file extension is added at the end of an import statement, the client should convert this first to .mjs. If no such file exists than to .js. And only then the client should throw an error if neither files were found.
Therefore I more or less can understand why typescript devs don't consider this a bug from their side. Typescript merely interprets the import statement for typescript purposes but may not be able to convert it that easily to esm. But I do think this should be a config option.
I mean, several users already created their own npm package out of frustration which I think shows how big this problem is. And they are right to be frustrated because my basic typescript app produces broken javascript, which is a definitely a bug from typescript.  This will only push people away from using TS. And on top of that, the fact that they say they won't do a thing about it does pisses me off even more.
Imho the tsc should stop conversion when an import statement cannot be converted to esm. Or throw a warning or hint that narrows down to "Due to limitations in the javascript language you are supposed to add a .js in your import statement or else tsc will produce broken code". And I'd be fine with that but not the way it is now.

When the path ends with a / the server automatically converts that to /index.html.

For a bit of clarity, this behavior is due to the way modern web authors tend to serve content. Web servers as a whole are glorified file systems. A request to / is semantically equivalent to inspecting the root directory yet, because web servers have optimized the browsing experience in a manner such that they aren't beholden to typical file system behaviors, that would-be directory request is often treated as a file request through some arcane redirection.

We should fork TypeScript. Let's call it FreeScript for instance.
There are way too many things in the hands of Microsoft right now and they
go way too well together: they have GitHub, Copilot (I'm in the preview and
it's pretty freaky), TypeScript, VSCode...
It's too good to be true. Our hands are tied. I have kind of a bad feeling
about this. Could turn out the wrong way.
I'd love something like a mix between TypeScript and Webpack. Except that
you wouldn't have to bundle up everything using hard to understand and hard
to configure plugins of plugins of plugins. But a lightweight, carefully
designed, and extensively tested layer of plugins on top of tsc could be
very nice.
Imagine how the language could grow if you could add rules to tsc via
plugins, like they do in eslint. Without any changes to JavaScript eslint
managed to get to a pretty good level of static analysis. Just imagine what
the community could do using TypeScript instead of JS.

Like:
if (someArray.length > 0) {
const x = someArray.pop();
console.log(x.y);
}
Doesn't compile with strictNullChecks, x might be undefined. But i'm pretty
sure it may not.
But I digress, sorry.
On Fri, Jul 30, 2021, 09:09 RA80533 @.***> wrote:

When the path ends with a / the server automatically converts that to
/index.html.
For a bit of clarity, this behavior is due to the way modern web authors
tend to serve content. Web servers as a whole are glorified file systems. A
request to / is semantically equivalent to inspecting the root directory
yet, because web servers have optimized the browsing experience in a manner
such that they aren't beholden to typical file system behaviors, that
would-be directory request is often treated as a file request through some
arcane redirection.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/40878#issuecomment-889681075,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALESE2LHCFXB5YZSZEWIF3T2JFZFANCNFSM4SA23LJQ
.

When the compiler is configured to target ES6, it creates non-valid ES6 code.

It creates non-valid ES6 code when given non-valid ES6 code. The first line in index.ts should be rewritten like so:
import {start} from "./lib.js";

@RA80533, no, it creates non-valid ES6 code when given valid TypeScript code.

I also just stumbled over this issue and as usual I find the justifications of "working as intended" as really questionable. There are various settings in the compiler which steer the module system. If I set "module": "commonjs" my typescript import statements are rewritten to require. There is also esModuleInterop which adds some extensions around the module imports.
While I agree that maybe the default behavior should be in the way that TypeScript leaves everything untouched, I also would say that it should/must be a TypeScript compiler setting to handle the mentioned use cases. I wanted to use TypeScript to create a small command line tool, which I can use in my GitHub Actions Workflow (without really making a reusable action) and it just does not work because the TypeScript output is not compatible with Node.js. Node.js seems to be usually a first class citizen in TS and here some very high level rules on the design goals (which IMO only partially apply here) prevent many people to use TS in such an obvious chain as running the compiled output in Node.js.
Maybe we have better chances with the Node.js guys to extend the module resolution algorithm.

Unbelievable how TS devs are stubborn on this.
On Tue, Sep 14, 2021, 11:33 Daniel Kuschny @.***> wrote:

I also just stumbled over this issue and as usual I find the
justifications of "working as intended" as really questionable. There are
various settings in the compiler which steer the module system. If I set "module":
"commonjs" my typescript import statements are rewritten to require.
There is also esModuleInterop which adds some extensions around the
module imports.
While I agree that maybe the default behavior should be in the way that
TypeScript leaves everything untouched, I also would say that it
should/must be a TypeScript compiler setting to handle the mentioned use
cases. I wanted to use TypeScript to create a small command line tool,
which I can use in my GitHub Actions Workflow (without really making a
reusable action) and it just does not work because the TypeScript output is
not compatible with Node.js. Node.js seems to be usually a first class
citizen in TS and here some very high level rules on the design goals
(which IMO only partially apply here) prevent many people to use TS in such
an obvious chain as running the compiled output in Node.js.
Maybe we have better chances with the Node.js guys to extend the module
resolution algorithm
https://nodejs.org/dist/latest-v14.x/docs/api/esm.html#esm_resolution_algorithm
.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/40878#issuecomment-918983144,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALESEYHJXMEELW4LUUB43DUB4JIFANCNFSM4SA23LJQ
.

Expectedly I stumbled upon this when setting a simple Node.js module written in TypeScript and compiled to CommonJS and ES to cater for both cases. I agree with @ericmorand and other similar opinions that, given a valid TypeScript code and valid TS configuration to target ES, the compiler SHOULD generate valid ES code. Otherwise, it should be considered a BUG. If it's a design goal to not generate valid code from TS code, then the design is flawed and needs to be fixed too.

You can now enforce file extensions in imoprts since #44501

I tried to use<EMAIL_ADDRESS>set module: node12 in tsconfig.json but the compiled code still does not include .js file extension. @pwhissell  could you give more hints?

The whole idea of TypeScript is to add static types on top of JavaScript, not to be a higher-level language that builds to JS.

Indeed, Typescript is a "superset of Javascript". But what means to be a superset? It means:

you add more features to Javascript,
you compile those added features to be valid Javascript.

The most basic Typescript additional rule is: "you can type a variable". Like this:
const value: string = "foo"

which will be transformed into const value = "foo".
Okay. You add a feature. You compile to make the feature work with the language. A superset of Javascript.
Now there is another feature that is added by Typescript: the fact that the extension is optional.
You can write:
import { imported } from "./my-module.js"

which is valid Javascript and valid Typescript. That's normal: Typescript is a superset.
But because of the Typescript-specific rule "make the file extension optional for ts/js files" (not a Javascript rule), you can also write (in Typescript only):
import { imported } from "./my-module"

which is valid Typescript but not valid Javascript.
If you add a feature as a superset of a target language, then you must  compile your feature into a valid output of yourtarget language.
And, yes, "make the file extension optional for ts/js files" is definitely a Typescript-specific feature.

I will add that I indeed created a library called tsc-esm as a workaround for this bug, and even though it works quite fine it has been a pain to develop and every time I use it (ie 100% of the times I need to create a library written in Typescript) I feel I should not have to patch the output of the Typescript compiler like I do.
I look forward the day when I can tag my library as "deprecated" :)

This whole discussion is absurd. Valid typescript obviously transpiles to invalid ES6 code. I do not understand in which world this can be classified as "works as designed" behavior. Adding ".js" to import statements which actually refer to ".ts" files as workaround is too wild for me. For my current project I have free choice, therefore I'm gonna switch over to CommonJS target module code. CommonJS works without file extensions. In case one can live with CommonJS target module, this is an option to get around this problem.

An alternative way to make this work without adding dependencies is to use Node's --es-module-specifier-resolution=node flag. For example, node --es-module-specifier-resolution=node dist/index.js, where index.js would itself have ES-style imports without the .js file extension.

I've created a pull request wich wich solve this for raltive imports, see:
https://github.com/microsoft/TypeScript/pull/47436
I've added a compiler switch:
   appendModuleExtension

@RyanCavanaugh

The whole idea of TypeScript is to add static types on top of JavaScript, not to be a higher-level language that builds to JS. The C# / IL comparison is not apt at all.

This statement is simply not true! TS is a compiler and it is defined in the documentation as "TypeScript is a strongly typed programming language that builds on JavaScript, giving you better tooling at any scale.", in fact, it does even generate output not present in the input, for example, polyfills for handling "await" etc, depending on the selected target. So it is very much a compiler that outputs JS, the rest seems to be confabulation used not to fix issues that do not fit your current mental model of what TS should or should not do.

I think probably a thousand person, me included, have written similar scripts. This is just absurd.

@ahejlsberg Please help us in the name of practicality and peace of mind.

This conversation is really frustrating. While I can understand not adding the .js suffix under the rationale of not modifying Javascript (though I disagree with it), what I cannot understand is the compiler happily producing code that will fail to run. There should  at least be an option to fail compilation if I don't use a .js suffix in the import. I don't even care if it's a default option, as long as it's exposed.
In the meanwhile, what do people recommend doing? What's the safest way to make sure tsc doesn't produce Javascript that will fail in this instance? I'm using node 16 and would really like top level awaits.

Yeah, it's not like there aren't already 1000 compiler options to tune the
behaviour of TypeScript, one more won't hurt...
On Sat, 23 Jul 2022, 19:13 Nathan Coleman, @.***> wrote:

This conversation is really frustrating. While I can understand not adding
the .js suffix under the rationale of not modifying Javascript (though I
disagree with it), what I cannot understand is the compiler happily
producing code that will fail to run. There should at least be an option
to fail compilation if I don't use a .js suffix in the import. I don't
even care if it's a default option, as long as it's exposed.
In the meanwhile, what do people recommend doing? What's the safest way to
make sure tsc doesn't produce Javascript that will fail in this instance?
I'm using node 16 and would really like top level awaits.
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/40878#issuecomment-1193157812,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALESEZ3JAJWWTLHN6X2K5LVVQR4JANCNFSM4SA23LJQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

Yeah, it's not like there aren't already 1000 compiler options to tune the behaviour of TypeScript, one more won't hurt...

And to reiterate, I'm not asking for am option that rewrites the imports, just an option that makes the compiler say "hey, this probably isn't what you want and will generate broken code", like a fatal warning. There could even be a flag that would override the warning and allow compilation anyways.
So "failOnInvalidModuleImport": true in tsconfig (defaults to false), which would cause the compilation failure, and a flag tsc  --allow-invalid-module-importwhich would ignore even if the setting was true, and compile anways.
TypeScript team, can you comment on adding an option like this? This is clearly a problem people have, and I can't see how exposing a default false option to give some greater compile safety could be a bad thing there. It would be a great way to earn some developer good will :)

As you all also see in my pull req, the rewrite are only a few lines of code

The recommendation to preemptively append .js extensions to TypeScript source is not only counterintuitive, it breaks ts-jest tests. It seems to me that TypeScript is in the wrong here. Why ban .ts extensions from import statements and encourage leaving them off altogether if the extension is resolved by the language server but not the compiler?
I just encountered this issue while attempting to port a library to TypeScript. I didn’t have to deal with it in prior projects because I was building apps with a bundler. Now that I’m emitting modules that can be tree-shaken downstream, this behavior, intended or not, leaves me in a bit of a pickle.

@adamshaylor for what it's worth, vitest supports .js imports in test code and is largely API-compatible with Jest.

Same confusion 🤔

good to see this crazy conversation still going after 2 years
its amazing to me that something so basic as module resolution continues to be one of the most frustrating things about the nodejs ecosystem
I cannot wait for deno to gain more traction and put this issue to bed by enforcing esm
to the TS team, listen to your users and add a compiler flag

I've got a react app that's being bundled with webpack, and a pure typescript server. The 2 projects share some model classes.
If I import my classes using the standard Typescript syntax import MyClass from "./model/MyClass", I get the "cannot find module ... imported from ..." error.
Alright, fine, I can simply add the ".js": import MyClass from "./model/MyClass.js"
... This causes webpack errors "Module not found: Error: Can't resolve './MyClass.js' in "...""
This is infuriating

At first glance of the time of this issue, I think I'm lucky to find a perfect solution. Until scrolling to the bottom then I realize that I'm unlucky. So sad.

So weird. In VSC if you Cmd+click on a import something from 'something.js'; you'll get to the .ts file, like VSC knows that this issue exists and "fixes it".

But wasn't it fixed?
To my greatest surprise, in my latest project, I'm using relative imports
in TypeScript without a file extension and the emitted JS just works!
On Thu, 3 Nov 2022, 15:51 Claudio Cicali, @.***> wrote:

So weird. In VSC if you Cmd+click on a import something from
'something.js'; you'll get to the .ts file, like VSC knows that this
issue exists and "fixes it".
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/TypeScript/issues/40878#issuecomment-1302230947,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AALESE7ZQOKDR7GJ3NTCYTTWGPGPFANCNFSM4SA23LJQ
.
You are receiving this because you were mentioned.Message ID:
@.***>

@djfm no, unbelievable

So weird. In VSC if you Cmd+click on a import something from 'something.js'; you'll get to the .ts file, like VSC knows that this issue exists and "fixes it".

This has nothing to do with VSC and also works in every other editor with the typescript LSP. Completely unrelated to this issue.

2023 now, and the flicker of hope for this feature is still alive!
See https://github.com/microsoft/TypeScript/pull/47436#issuecomment-1416016165

Here a few pull requests or issues, where i need only file extensions (.js) so I could use them in browser:
https://github.com/adobe/css-tools/pull/90
https://github.com/wokwi/wokwi-elements/issues/149#event-8429384442
I don't know why an extra option wich I created in my pull request could not be added...

I know use a js script to add the extension afterwards, see the pull I creaed here on how to do: https://github.com/wokwi/wokwi-elements/pull/150

Just leaving my +1 here... can't believe this is still an issue.
Would be as simple as to allow using .ts extensions and then transform them into .js.
This would make everyone happy: hundreds of people asking for it and TS maintainers because TS principles will not be affected this way (read this comment).
Hope TS maintainers will reconsider this soon.

Cross-posting this comment which explains that this is, very much intentionally, not something we are going to do.


ROCm HIP support?

Is possible to run stable-diffusion-xl-burn on AMD ?
https://pytorch.org/docs/stable/notes/hip.html

It should be possible but I don't use AMD GPUs so I can't easily test it.

I tried running on an amdgpu, and it doesn't seem to work:
cargo run --release --bin sample SDXL1.0 7.5 30 "An elegant bright red crab." crab
...
Loading embedder...
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Torch("Could not run 'aten::empty_strided' with arguments from the 'CUDA' backend. This could be because the operator doesn't exist for this backend, or was omitted during the selective/custom build process (if using custom build). If you are a Facebook employee using PyTorch on mobile, please visit https://fburl.com/ptmfixes for possible resolutions. 'aten::empty_strided' is only available for these backends: [CPU, Meta, QuantizedCPU, BackendSelect, Python, FuncTorchDynamicLayerBackMode, Functionalize, Named, Conjugate, Negative, ZeroTensor, ADInplaceOrView, AutogradOther, AutogradCPU, AutogradCUDA, AutogradHIP, AutogradXLA, AutogradMPS, AutogradIPU, AutogradXPU, AutogradHPU, AutogradVE, AutogradLazy, AutogradMeta, AutogradMTIA, AutogradPrivateUse1, AutogradPrivateUse2, AutogradPrivateUse3, AutogradNestedTensor, Tracer, AutocastCPU, AutocastCUDA, FuncTorchBatched, FuncTorchVmapMode, Batched, VmapMode, FuncTorchGradWrapper, PythonTLSSnapshot, FuncTorchDynamicLayerFrontMode, PythonDispatcher].\n\nCPU:
...

I have successfully generated a crab on my RX 6600 XT 8GB VRAM on linux
Here is my setup, maybe it will help someone along the way:

download https://download.pytorch.org/libtorch/rocm5.4.2/libtorch-cxx11-abi-shared-with-deps-2.0.1%2Brocm5.4.2.zip from https://pytorch.org/get-started/locally/
export LIBTORCH=${HOME}/libtorch # (where you unzipped the download)
export LIBTORCH_BYPASS_VERSION_CHECK=true  # because tch-rs wants libtorch-2.0.0 but the download is version 2.0.1
export LD_LIBRARY_PATH=${HOME}/libtorch/lib
downloaded all the model parameters (see README.md)
cargo run --release --bin sample SDXL1.0 n 7.5 30 "An elegant bright red crab." crab

The image generation took about 2 minutes on my machine.


serverless website documentation is outdated

Describe the bug
The documentation on https://www.serverless.com/plugins/serverless-esbuild
is terribly outdated, some of the options don't work.

Hey @pierreh It duplicates the issue https://github.com/floydspace/serverless-esbuild/issues/496


Importing like the Raindrop plugin?

Hello,
Would it be possible to have the option to import the saved articles, or highlights, into a page divided by hierarchy like in Raindrop?
Right now, the Omnivore plugin imports everything into one single page, making it difficult to separate the contents and keep track of all the saved articles.
With the Raindrop plugin, the articles are divided into a hierarchy, which looks like this

Thanks

Hi @hokutonanto can you explain what the r is there?

It's for Reddit.


Find a way for specific connectors to add data type support to ddl2cpp

I open this issue following #221 to track further improvements that should be required to enhance ddl2cpp. The idea is to find a way for specific connectors to extend the common data type support of the script.
Currently, the script has knows and handles some specific types from SQLite and PostgreSQL but we should find a way for any connectors to provide its own type mapping without having to modify the upstream script.

I am putting this on the wish list I am compiling.


Make builder for check commands which use Cargo

Similar to command::RustupCommand, make a similar builder style command for Cargo.
This will allow us to inject --ignore-rust-version when cmd in rustup run <cmd> is a Cargo command.
We should however be able to check the Cargo version, and add a filter which allows us to run newer and older Cargo versions alike.

@cornifer milestone-moved v0.17.0 reason="May have (significant) side effects, and requires more time to think about the pros and cons" see-also=issue:408


How do i use the solution?

Firstly, I am not reporting a bug.
I could build and install the solution, but I don't understand how I can use this. I don't find any documentation for using static ip setup for IoT.

Hi!
This solution is one approach for using a client-to-site VPN when static IP addresses are needed. Another approach for AWS IoT can be found here that goes into detail on how do something similar without using VPN software.


Feature/seetest appium connector

Description
Added the module seetest-appium to support video files from the Experitest SeeTest Appium platform.
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[x] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] This change requires a documentation update

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[x] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes
[ ] Any dependent changes have been merged and published in downstream modules

@Zsar Finished my rework based of your comments.