"Go to definition" doesn't work.

Hi, thanks for this great plugin!
I think this will help many people and myself to get close to Elixir programming.
So, my problem is, I was able to install this plugin via Nvim/AstroNvim/Lazy.vim. The plugin installs ElixirLS and NextLS, but doesn't properly work. Especially the shortcut key for "Go to definition (gd)" doesn't work. I tried enabling/disabling the options (ElixirLS, NextLS, Credo), but no luck yet.
My current setup is:

Debian Trixie
erl -v => Erlang/OTP 25 (installed via asdf)
Elixir --version => 1.15.5 (installed via asdf)
Nvim -v => 0.9.1 (installed the appimage version, not via asdf)
lazy.nvim => 10.3.0 (installed by AstroNvim)
elixir-tools => 0.9.1 (installed by lazy.nvim)
elixir-ls => 0.15.1 (installed by this plugin)

The detail of the plugin is:
○ elixir-tools.nvim  BufReadPre BufNewFile
    dir     /home/bus710/.local/share/nvim/lazy/elixir-tools.nvim
    url     https://github.com/elixir-tools/elixir-tools.nvim
    version 0.9.1
    tag     v0.9.1
    branch  main
    commit  8b13b29
    readme  README.md
    help    |elixir-tools.nvim.txt|
    event    BufReadPre  BufNewFile

How it was configured (in ~/.config/nvim/lua/user/plugins/user.lua):
return {
  -- along with other plugins...
  { "vim-erlang/vim-erlang-runtime" },
  { "vim-erlang/vim-erlang-compiler" },
  { "vim-erlang/vim-erlang-omnicomplete" },
  { "vim-erlang/vim-erlang-tags" },
  { "elixir-editors/vim-elixir" },
  {
    "elixir-tools/elixir-tools.nvim",
    version = "*",
    event = { "BufReadPre", "BufNewFile" },
    config = function()
      local elixir = require "elixir"
      local elixirls = require "elixir.elixirls"

      elixir.setup {
        nextls = { enable = false },
        credo = { enable = true },
        elixirls = {
          enable = true,
          -- https://github.com/elixir-tools/elixir-tools.nvim/issues/143
          -- ls ~/.cache/nvim/elixir-tools.nvim/installs/elixir-lsp/elixir-ls/
          tag = "v0.15.1",
          settings = elixirls.settings {
            dialyzerEnabled = false,
            enableTestLenses = false,
          },
          on_attach = function(client, bufnr)
            vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
            vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
            vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
          end,
        },
      }
    end,
    dependencies = {
      "nvim-lua/plenary.nvim",
    },
  },
}

 How the log looks like:
[START][2023-08-31 12:25:03] LSP logging initiated
[ERROR][2023-08-31 12:25:03] .../vim/lsp/rpc.lua:734	"rpc"	"/home/bus710/.cache/nvim/elixir-tools.nvim/installs/elixir-lsp/elixir-ls/tags_v0.15.1/1.15.5-25/language_server.sh"	"stderr"	"running /home/bus710/.cache/nvim/elixir-tools.nvim/installs/elixir-lsp/elixir-ls/tags_v0.15.1/1.15.5-25/launch.sh\nLooking for ASDF install in /home/bus710/.asdf/asdf.sh\nASDF found, relaunching in bash shell\nLooking for ASDF install in /home/bus710/.asdf/asdf.sh\nSourcing ASDF\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Codegen (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Codegen.beam)\n  lib/codegen.ex:1: Jason.Codegen (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Sigil (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Sigil.beam)\n  lib/sigil.ex:1: Jason.Sigil (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Helpers (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Helpers.beam)\n  lib/helpers.ex:1: Jason.Helpers (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Formatter (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Formatter.beam)\n  lib/formatter.ex:1: Jason.Formatter (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.beam)\n  lib/jason.ex:1: Jason (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Fragment (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Fragment.beam)\n  lib/fragment.ex:1: Jason.Fragment (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.DecodeError (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.DecodeError.beam)\n  lib/decoder.ex:1: Jason.DecodeError (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.EncodeError (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.EncodeError.beam)\n  lib/encode.ex:1: Jason.EncodeError (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.OrderedObject (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.OrderedObject.beam)\n  lib/ordered_object.ex:1: Jason.OrderedObject (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.beam)\n  lib/encoder.ex:1: Jason.Encoder (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Decoder (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Decoder.beam)\n  lib/decoder.ex:25: Jason.Decoder (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encode (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encode.beam)\n  lib/encode.ex:14: Jason.Encode (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Enumerable.Jason.OrderedObject (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Enumerable.Jason.OrderedObject.beam)\n  lib/ordered_object.ex:77: Enumerable.Jason.OrderedObject (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Any (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Any.beam)\n  lib/encoder.ex:77: Jason.Encoder.Any (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Jason.OrderedObject (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Jason.OrderedObject.beam)\n  lib/ordered_object.ex:90: Jason.Encoder.Jason.OrderedObject (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Atom (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Atom.beam)\n  lib/encoder.ex:175: Jason.Encoder.Atom (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Decoder.Unescape (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Decoder.Unescape.beam)\n  lib/decoder.ex:461: Jason.Decoder.Unescape (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Integer (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Integer.beam)\n  lib/encoder.ex:181: Jason.Encoder.Integer (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Float (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Float.beam)\n  lib/encoder.ex:187: Jason.Encoder.Float (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.List (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.List.beam)\n  lib/encoder.ex:193: Jason.Encoder.List (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Map (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Map.beam)\n  lib/encoder.ex:199: Jason.Encoder.Map (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.BitString (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.BitString.beam)\n  lib/encoder.ex:205: Jason.Encoder.BitString (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Date (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Date.beam)\n  lib/encoder.ex:218: Jason.Encoder.Date (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Time (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Time.beam)\n  lib/encoder.ex:218: Jason.Encoder.Time (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.NaiveDateTime (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.NaiveDateTime.beam)\n  lib/encoder.ex:218: Jason.Encoder.NaiveDateTime (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.DateTime (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.DateTime.beam)\n  lib/encoder.ex:218: Jason.Encoder.DateTime (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Decimal (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Decimal.beam)\n  lib/encoder.ex:224: Jason.Encoder.Decimal (module)\n"
[WARN][2023-08-31 12:25:09] ...lsp/handlers.lua:537	"warning: redefining module Jason.Encoder.Jason.Fragment (current version loaded from /home/bus710/.asdf/installs/elixir/1.15.5-otp-25/.mix/archives/jason-1.4.1/jason-1.4.1/ebin/Elixir.Jason.Encoder.Jason.Fragment.beam)\n  lib/encoder.ex:232: Jason.Encoder.Jason.Fragment (module)\n"
[WARN][2023-08-31 12:25:16] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/esbuild.ex:69: Esbuild.start/2\n"
[WARN][2023-08-31 12:25:16] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/esbuild.ex:83: Esbuild.start/2\n"
[WARN][2023-08-31 12:25:16] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/tailwind.ex:72: Tailwind.start/2\n"
[WARN][2023-08-31 12:25:16] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/tailwind.ex:86: Tailwind.start/2\n"
[WARN][2023-08-31 12:25:18] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/finch/http2/pool.ex:362: Finch.HTTP2.Pool.connected/3\n"
[WARN][2023-08-31 12:25:18] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/finch/http2/pool.ex:460: Finch.HTTP2.Pool.connected_read_only/3\n"
[WARN][2023-08-31 12:25:28] ...lsp/handlers.lua:537	"warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead\n  lib/plug/cowboy.ex:352: Plug.Cowboy.to_args/5\n"

Cache structure (tree in $HOME/.cache/nvim/elixir-tools.nvim)
.
├── elixir-tools-credo-language-server.txt
└── installs
    └── elixir-lsp
        └── elixir-ls
            └── tags_v0.15.1
                └── 1.15.5-25
                    ├── debugger.bat
                    ├── debugger.sh
                    ├── deep_merge-1.0.0.ez
                    ├── elixir_ls_debugger-0.15.1.ez
                    ├── elixir_ls_utils-0.15.1.ez
                    ├── elixir_sense-2.0.0.ez
                    ├── erl2ex-0.0.10.ez
                    ├── erlex-0.2.6.ez
                    ├── jason_v-1.4.0.ez
                    ├── language_server-0.15.1.ez
                    ├── language_server.bat
                    ├── language_server.sh
                    ├── launch.sh
                    ├── path_glob_vendored-0.1.1.ez
                    └── statistex-1.0.0.ez

6 directories, 16 files

So the log says it tried to call asdf.sh, but I don't know where to see the detailed log.
If anybody needs additional info from my side, please let me know.
Thanks,

Does elixir ls show up when you do :LspInfo as attached to the buffer?
Is there any logs when you do :ElixirOutputPanel

Hi @mhanberg
Thanks for quick response.
For the q1:
 Language client log: /home/bus710/.local/state/nvim/lsp.log
 Detected filetype:   elixir

 1 client(s) attached to this buffer:

 Client: ElixirLS (id: 1, bufnr: [1])
 	filetypes:
 	autostart:       false
 	root directory:  /home/bus710/Downloads/demo
 	cmd:             /home/bus710/.cache/nvim/elixir-tools.nvim/installs/elixir-lsp/elixir-ls/tags_v0.15.1/1.15.5-25/language_server.sh

 Other clients that match the filetype: elixir

(below, tailwindcss shows up, but I guess that is not related to this issue)

For the q1:
[Info] Started ElixirLS v0.15.1
[Info] Running in /home/bus710/Downloads/demo
[Info] ElixirLS built with elixir "1.15.5" on OTP "25"
[Info] Running on elixir "1.15.5 (compiled with Erlang/OTP 25)" on OTP "25"
[Info] Protocols are not consolidated
[Info] Elixir sources not found (checking in /home/runner/work/elixir/elixir). Code navigation to Elixir modules disabled.
[Info] Loaded DETS databases in 96ms
[Info] Starting build with MIX_ENV: test MIX_TARGET: host
[Info] Compile took 345 milliseconds
[Info] [ElixirLS WorkspaceSymbols] Indexing...
[Info] [ElixirLS WorkspaceSymbols] Module discovery complete
[Info] [ElixirLS WorkspaceSymbols] 22 callbacks added to index
[Info] [ElixirLS WorkspaceSymbols] 191 modules added to index
[Info] [ElixirLS WorkspaceSymbols] 398 types added to index
[Info] [ElixirLS WorkspaceSymbols] 4376 functions added to index
[Info] Experimental server is disabled.

Hope these outputs help somehow.

Hmm, everything should be good.
I'll now ask, have you actually set any keymaps? the plugin doesn't do it for you

meaning, can you try by running :lua vim.lsp.buf.definition() while your cursor is an appropriate place

First of all, the definition() function doesn't do anything when I ran it during the cursor is on the PageController in the router.ex file of a minimal Phoenix app.
Second, I thought AstroNvim has some basic keymaps for me, so I didn't set anything for elixir-tools (Their community plugins for Go and Rust do it out of box, so my assumption was wrong).
I guess I should do some configurations like your README, but for the shortcuts I actually want... like:
vim.keymap.set("n", "gd", vim.lsp.buf.definition())

If this is the case, I am so sorry for your time :sweat_smile:

Another minor question - is this the same for elixir-tools.vscode as well? Should I still set keymaps for Vscode?

I think.... AstroNvim has its own keymaps setting as default.
https://astronvim.com/recipes/mappings#disable-telescope-lsp-mappings
So maybe my assumption is not totally wrong.

First of all, the definition() function doesn't do anything when I ran it during the cursor was on the PageController in the router.ex file of a minimal Phoenix app.

Unfortunately you picked a bad case to try haha. ElixirLS got definitino doesn't work on controller references in the router, because the router does some funky compile time macro stuff. You should try it on almost any other module.

Second, I thought AstroNvim has some basic keymaps for me, so I didn't set anything for elixir-tools other than the introduced ones in the README (AstroNvim community plugins for Go and Rust do it out of box, so my assumption might be wrong).

Well, if those plugins for Go and Rust are included with Astro, then it makes sense that they have some default configuration. elixir-tools.nvim is not included in Astro.

Another minor question - is this the same for elixir-tools.vscode as well? Should I still set keymaps for Vscode?

I'm not really understanding the question, to be honest.  But elixir-tools.vscode doesn't have any keymaps that come with it, but VSCode should already have some default ones that apply to all LSPs

I think.... AstroNvim has its own keymaps setting as default.
https://astronvim.com/recipes/mappings#disable-telescope-lsp-mappings
So maybe my assumption is not totally wrong.

If Astro specifies the keymaps in an LspAttach autocmd, then they should work automatically with elixir-tools.nvim. If they are specified by using the on_attach callback when starting the LSP ,then you'll need to manually pass that into the elixir-tools setup function

Yeah, it defines it in the on_attach callback.
You should be able to set it with something like this
{
  "elixir-tools/elixir-tools.nvim",
  version = "*",
  event = { "BufReadPre", "BufNewFile" },
  config = function()
    local elixir = require("elixir")
    local elixirls = require("elixir.elixirls")

    elixir.setup {
      nextls = {enable = false},
      credo = {},
      elixirls = {
        enable = true,
        settings = elixirls.settings {
          dialyzerEnabled = false,
          enableTestLenses = false,
        },
        on_attach = function(client, bufnr)
          -- 👇
          require("astronvim.lsp.util").on_attach(client, bufnr) -- 👈 this is what you should add
          -- ☝
          vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
          vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
          vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
        end,
      }
    }
  end,
  dependencies = {
    "nvim-lua/plenary.nvim",
  },
}

So, I was able to make the gd keymap work.
on_attach = function(client, bufnr)
  -- require("astronvim.lsp.util").on_attach(client, bufnr)
  vim.keymap.set("n", "gd", vim.lsp.buf.definition)
  vim.keymap.set("n", "<space>fp", ":ElixirFromPipe<cr>", { buffer = true, noremap = true })
  vim.keymap.set("n", "<space>tp", ":ElixirToPipe<cr>", { buffer = true, noremap = true })
  vim.keymap.set("v", "<space>em", ":ElixirExpandMacro<cr>", { buffer = true, noremap = true })
end,

I guess the global keymap doesn't work for elixir file for some reason. Also, your suggestion is commented out because the gd key doesn't work when the require().on_attach() is active.
Also, what I could confirm is that, the PageController is indeed a bad case to try the gd key. Instead, other tokens like these are better:

Phoenix.LiveDashboard.Router
DemoWeb.Telemetry
Plug.Swoosh.MailboxPreview

If my module is there with the project name, it is working as well. Let's say the project name is "demo", so my live view module named "HelloLive" has the prefix with that like "DemoWeb.HelloLive", the gd keymap works!
Thanks a lot! Now I feel little more confidence with my setup.


Monkey patch warning when using PEX to run a gunicorn app

Hi guys, my application is being packaged with pex through the pants build tool pex_binary directive. In previous versions of pants and pex I wasn't getting any warning in the startup of my gunicorn flask app, but in recent versions I started receiving the following warning:

MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['pex.fetcher (/tmp/pants-sandbox-me3cWc/.pex/.bootstrap/pex/fetcher.py)'].
monkey.patch_all()

Searching for this issue on github I found out that I need to monkey patch as soon as possible in my app. However searching in the pex docs I haven't found any way to monkey patch earlier than my current pex entry_point. In the warning I can see that it's complaining of a file called pex/fetcher.py which I have no control over.
Do you guys have any recommendation on how to fix this issue?

@mariano-filipe can you provide a small repro? That would help tremendously.

Ok, I figured out the repro, but its great when you can do this when submitting a bug report, especially when it involves systems outside the one you're reporting against:
:; cat app.py
from gevent import monkey
monkey.patch_all()

from flask import Flask

app = Flask(__name__)

@app.route('/')
def hello_world():
    return 'Hello, World!'

:; pex flask gevent gunicorn --module app -c gunicorn --inject-args app:app -o app.pex
:; ./app.pex &
[1] 46657
:; [2024-06-04 15:20:40 -0700] [46657] [INFO] Starting gunicorn 22.0.0
[2024-06-04 15:20:40 -0700] [46657] [INFO] Listening at: http://<IP_ADDRESS>:8000 (46657)
[2024-06-04 15:20:40 -0700] [46657] [INFO] Using worker: sync
[2024-06-04 15:20:40 -0700] [46728] [INFO] Booting worker with pid: 46728
/home/jsirois/dev/pex-tool/pex/app.py:2: MonkeyPatchWarning: Monkey-patching ssl after ssl has already been imported may lead to errors, including RecursionError on Python 3.6. It may also silently lead to incorrect behaviour on Python 3.7. Please monkey-patch earlier. See https://github.com/gevent/gevent/issues/1016. Modules that had direct imports (NOT patched): ['pex.fetcher (/home/jsirois/.pex/unzipped_pexes/1f919528d7942b66beb34e5b56a696a21ae82673/.bootstrap/pex/fetcher.py)'].
  monkey.patch_all()

:; curl http://<IP_ADDRESS>:8000
Hello, World!

The warning turns out to be a red-herring. Although pex/fetcher.py is inlcuded in the PEX .bootstrap/, it is unused; so gevent is missing the mark here. Nonetheless, the .bootstrap/ should only contain Pex code needed to boot a PEX file and so pex/fetcher.py should go.

Ok, pex/fetcher.py can actually be used at runtime in the case of a --venv PEX, although a re-exec happens after that, clearing state and that use also does not call install_pip which is the only case where an URLFetcher might be used.  As such, just making the import ssl lazy is enough.

@jsirois thanks a lot for the quick response and explanation. The new version will help us moving forward with new pants versions too. Appreaciate it 🙏🏽

Ok @mariano-filipe the fix is released:

https://github.com/pex-tool/pex/releases/tag/v2.3.2
https://pypi.org/project/pex/2.3.2/


Adding simple OAuth 1 timeout handling.

Adding simple Oauth 1 timeout handling.

There's probably a better way, but this seems to be working for me, so I thought I'd offer it up.

Usage:
var OAuth = require('oauth').OAuth;
oauth  = new OAuth(config.request,
                    config.access,
                    config.key,
                    config.secret,
                    '1.0', null, 'HMAC-SHA1');
oauth.setTimeout(500);

@ciaranj could you post an example of how to do this? thanks


Make sure gcloud-auth doc isn't too datastore specific

From @tseaver in: https://github.com/GoogleCloudPlatform/gcloud-python/pull/1137/files#r39682019

Dunno -- maybe it just needs to note that the other API clients are all similar (actually, datastore is the oddball, compared to storage/pubsub/bigquery/dns).

@tseaver The only mention of datastore is at the beginning in the "Client-Provided Authentication" section:

Nothing else even mentions a sub-package (though we do later mention all the services and required scopes).

I can change it if you like, what do you think would work better?
I know I've got to send a PR against this doc since discovered that we've got broken links since
https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authorization/enable-apis.png
has become
https://raw.githubusercontent.com/GoogleCloudPlatform/gcloud-common/master/authentication/enable-apis.png
(and similar for the other 2 or 3 such images we use in this doc).
(I caused this since I asked the node guys and gcloud-common to say authentication instead of authorization.)

@tseaver Bump

Works for me.  I must have been bleary-eyed.

Closing now. (Only left it open until I remembered to do the work in #1166)


Adds temporary spinner during Unholy install

We'll need to do the same for other templates when we expand those, but this makes the standard unholy app template look better during ignite new. Fixes #717.

@skellock It does start the spinner before the npm install command. But it takes about 9 seconds on my machine before it even hits that line of code. The issue is that the spinup time for the new ignite add process is slow.

Okay, I feel pretty lame now -- an hour wasted on it, when you're absolutely right, @skellock.
Now, is there any reason we really need to protect the spinner startup?

I can't remember exactly atm, but I think it had something to do with deciding what to show when it gets installed via new or directly when using add.
  I've spent more than a few hours on this stuff, and it's still not pretty.


Chore: Improve test speed with concurrency

Unit tests are really slow, in some cases. I think that we can make it faster.
Describe the solution you'd like
Implement concurrency to the tests.
Describe alternatives you've considered
None
Additional context
I didn't test to see the real speed impact, it could happen that it actually don't happen the test speed at all. In this case, the answer to this issue is to get it dropped and keep the test as it is.

Already done.


feat: allow whole hoodie client config

solves #69

Well... disconsider this... ember doesnt pass the PouchDB property to the ENV... I dont know why... Maybe because its a function, not a string... =(


chore: release 1.2.1

:robot: I have created a release *beep* *boop*
1.2.1 (2022-06-18)
Bug Fixes

update bee-js peer dependency (#13) (6419cb3)

This PR was generated with Release Please. See documentation.

:robot: Release is at https://github.com/ethersphere/manifest-js/releases/tag/v1.2.1 :sunflower:


[OR-1623] fix ci for publish docker pakcages

fix ci for publish docker pakcages
failed CI: https://github.com/tokamak-network/tokamak-thanos/actions/runs/9220157195

Thank you! 🙇🏼♂

Hi Steven,
Could you explain about the root cause and how you resolve it? :bow:

Hi Steven, Could you explain about the root cause and
how you resolve it? 🙇

I guess this error is related to:

Ref to: https://github.com/ethereum-optimism/optimism/blob/develop/ops/docker/Dockerfile.packages#L20C50-L20C81

Hi Steven, Could you explain about the root cause and how you resolve it? 🙇

Sure, I'm sorry for my missing!
I don't know about this.
But when I tested to build docker in my local, I become to know about the difference of the pnpm-lock.yaml file. There is pnpmfileChecksum: vipskp6rjsbh4jjdio2kmcz6ye in our repo. But in the docker build, there is no this line. So, I checked about this line. I become to know that it is created by .pnpmfile.cjs. And I found there is no .pnpmfile.cjs in the dockerfile in our packages.
I want to know about this file more!

Hi Steven, Could you explain about the root cause and how you resolve it? 🙇

Sure, I'm sorry for my missing! I don't know about this. But when I tested to build docker in my local, I become to know about the difference of the pnpm-lock.yaml file. There is pnpmfileChecksum: vipskp6rjsbh4jjdio2kmcz6ye in our repo. But in the docker build, there is no this line. So, I checked about this line. I become to know that it is created by .pnpmfile.cjs. And I found there is no .pnpmfile.cjs in the dockerfile in our packages.
I want to know about this file more!

Thank you very much, Steven! :heart:


Use String over bytes for message payload in FileTransport

This makes the message part of the email file readable (and script friendly).
I have not added any tests, this doesn't appear to be a public API.

Thanks, done (a bit differently, open for feedbacks before 0.10 release) in 0ac3438d320663a30bc63ea7f0040e4171e6cb12.


very long edges

Example: Add the poloniex cluster, then the notpetya cluster and then click the outgoing neighbors of this last one. I get very long edges to the outgoing neighbors on Chrome and on Firefox

I still get the problem, is it solved?

At least, I'm not getting long edges for the example above. Do you have another one?

OK, it is solved but not deployed yet.


define more keyboard shortcuts

lots of empty menu items...

in particular, reset environment in the language manager (this is not easy since there can be more than one of these if you have multiple languages.  maybe it runs them all?)

https://github.com/twosigma/beaker-notebook/issues/3721

https://github.com/twosigma/beaker-notebook/issues/3852

https://github.com/twosigma/beaker-notebook/issues/3856

all the above subissues are closed, we have the basics covered IMO.


How to ensure the accuracy of the data

Hello, thank you for doing such an inspiring job.
I would like to ask a question, how do you ensure the accuracy of this data when performing 3D-Language Data Generation? Or is there a detection mechanism to detect it?
Hope to receive an answer, thank you!
You guys are really great, I’m so envious!
In Chinese, niubi!

In 3D-LLM, like LLAVA we do not check the quality of the generated GPT-generated data.
However, our new paper https://vis-www.cs.umass.edu/multiply/ suggests that we could place an agent in the embodied environment to execute the tasks for ensuring quality.
An alternative way is to use hallucination scores to examine the quality https://arxiv.org/pdf/2305.10355.pdf


A better website

Algonaut.js needs a better website & documentation! Let's just start over :)

dont forget about vue press and git book (gitbook 3 just came out btw)

Looks like Gitbook now supports RunKit integration. A bummer there's no CodePen integration though!
VuePress 2 is the move, we'll be able to customize it much more easily.


PCEngines fw update

@PLangowski please target this PR to develop not main

Looks good in general, but the board paths are different atm, so we'll need to either change them here or update the dasharo build and upload scripts to ise this path instead.
Right now all binaries are placed in directory pcengines_apu2/v0.9.0 (the boards are treated as variants of apu2)

So @PLangowski please adjust the script to match the paths as suggested by @mkopec

@macpijan done a6f8ce96a4a3eb711a1fdb151d24ef082f0eae58


feat: regenerate SDK with L2V and doc changes

Closing since changes will be included in https://github.com/istreamlabs/go-sdk/pull/20.


add Clecko engine

Coverage increased (+0.04%) to 46.509% when pulling 751cd7c4028289a8d01ac8ab944c849078f7f8b9 on add-clecko into 22b89b7397875437f1dc0a24721b03b1a887fa99 on master.


Security 3.14: Enforcement of security points 160 and 170

The relevant security points are as follows.

Security Point
Description

160
Well edit only assays created by self

170
Well edit all assays

Tasks:

app_server.py: Under /submitWellEdits route, verify security point 160 and 170 - TEST before proceeding
- If have 170, don't need to figure out who created record nor verify 160
- If not have 170, check who created record and verity 160
In viz.html, disable Well Edit link if do not have 120 or 130

Test Plan:

BEFORE form disabling, test edit record behavior (message is appropriate; db is changed only as appropriate)

170 and 160: Can edit any assay
170: identical to previous case
160: can edit any assay created by self, cannot edit assays created by others
neither of 160 or 170: cannot edit any record
Works for multiple users
Works for multiple team login contexts

Repeat tests AFTER form changes

can open Well Edit window iff have one of 160 or 170

Test Plan - SUCCESS!


Updates to example SLURM / Singularity job script

A couple suggested updates to the SLURM job script based on user testing. In particular, the "power" button needs to be used to exit RStudio to avoid an error message after an scancel / sbatch / subsequent login; and package installation didn't work out-of-the-box when ~/.Renviron wasn't configured to install packages into the user's home directory (Singularity squashfs images are read-only).
Otherwise, I haven't noticed any odd hiccups with this configuration so far.

merged and deployed.  sorry about the delay, it's been a crazy summer

No prob---same here. Thanks!


Early stopping

In training raccoon data, having the error:
Epoch 00094: ReduceLROnPlateau reducing learning rate to 9.999999939225292e-10.
Epoch 00094: early stopping.
how to solve the problem?

144/144 [==============================] - 47s 324ms/step - loss: 73.5387 - val_loss: 154.7555
Epoch 00079: early stopping


Build Miri's libstd with debug assertions

It would be good to build Miri's libstd with debug assertions -- the performance is already horrible anyway, and this way we get better testing.

At https://github.com/rust-lang/rust/blob/625375400cdd172877e81c3ce44ce68f2011af2d/src/libcore/intrinsics.rs#L1417, there is a function which is used in several debug assertions to test the alignment and non-nullness of pointers. This function uses an ptr-int cast followed by a modulo to check for the alignment. I think this should be changed to align_offset to prevent the address to be considered leaking and thus unnecessarily growing memory_extra.intptrcast.int_to_ptr_map.

My long-term plan is anyway for the base address in int_to_ptr_map to be allocated eagerly instead of lazily, so I am not much concerned about growing that map.
Also, align_offset cannot be used to test the rel alignment, precisely because it does not take int_to_ptr_map into account.


SqlBulkCopy - generics to avoid boxing

This PR is in reference to #353
This is an attempt to reduce garbage created during a SqlBulkCopy operation for applications that are using SqlBulkCopy to stream batches of data out during a larger overall process.
The overall approach was to be more respectful of the IDataReader interface and use it's typed methods if possible to eliminate uneccesary boxing.  The unboxed value is passed around generically and converted back to its underlying type using a ValueTypeConverter.
I did observe some performance degradation when passing around by value, kicking off the idea to pass everything by ref -- this is more in line with how SqlBulkCopy previously behaved, minus the boxing.
While I do see less garbage created, I am seeing some disappointing performance results (abbreviated Benchmark.NET results):
|                Method |     Mean ||    Gen 0 | Gen 1 | Gen 2 |  Allocated |
|---------------------- |---------:||---------:|------:|------:|-----------:|
| NewBulkCopy_NewReader | 387.4 ms ||        - |     - |     - | 12017576 B |
| OldBulkCopy_NewReader | 161.9 ms || 250.0000 |     - |     - | 26412872 B |

There are still a considerable amount of heap allocations occurring, primarily during SqlDecimal -- I have logged the following issue to address: dotnet/runtime#1034
I think there is something different with the way my dlls are compiled?  I'm seeing much slower times in places where I did not make any changes, such as TdsParser.WriteTokenLength
My WriteTokenLength: 144ms
Old WriteTokenLength: 30ms
Any assistance in understanding the perf degradation is welcomed and appreciated!

 Thank you for your submission, we really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.:x: cmeyertons sign nowYou have signed the CLA already but the status is still pending? Let us recheck it.

There seem to be build errors for the PR, please take a look at the logs and try to build and run tests locally before the pipelines trigger builds. You can use steps from BUILDGUIDE to do the same.

Can you post your test program/query and i'll see if i can help on the WriteTokenLength speed issue?

@Wraith2 below are the files -- I tried uploading a zip, but it was failing with a 503...
In order to do the side-by-side compare in the same run, I had to change all the namespaces around and it was a huge headache -- I ended up finding it easier to just drop in the new dll when switching back and forth.
csproj
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
  </PropertyGroup>

  <ItemGroup>
    <PackageReference Include="BenchmarkDotNet" Version="0.12.0" />
    <PackageReference Include="Dapper" Version="2.0.30" />
    <PackageReference Include="Microsoft.Data.SqlClient" Version="1.1.0" />
  </ItemGroup>

</Project>

Program.cs
using BenchmarkDotNet.Attributes;
using BenchmarkDotNet.Configs;
using BenchmarkDotNet.Loggers;
using Dapper;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;

namespace Benchmark
{
    class Program
    {
        static void Main(string[] args)
        {
            var config = ManualConfig.Create(DefaultConfig.Instance);
            config.Options = ConfigOptions.DisableOptimizationsValidator;
            config.Add(new ConsoleLogger());

            BenchmarkDotNet.Running.BenchmarkRunner.Run(typeof(DataReaderGithubBenchmark), config);
        }
    }

    [SimpleJob(launchCount: 1)]
    [MarkdownExporter, RankColumn, MemoryDiagnoser]
    public class DataReaderGithubBenchmark
    {
        private const string DB = "cmeyertons_benchmark";
        private static readonly Random _sR;
        private static readonly IEnumerable<ItemToCopy> _items;
        private IDataReader _reader;
        private static readonly string _tableName = "dbo.DataReaderBenchmark";
        private static readonly string _connString;
        private static readonly int _count = 100000;

        private class ItemToCopy
        {
            public decimal Col1 { get; } = Convert.ToDecimal(_sR.NextDouble());
            public string Col2 { get; } = _sR.Next().ToString();
            public int Col3 { get; } = _sR.Next();
            public bool Col4 { get; } = true;
        }

        private static int _runId = 0;

        static DataReaderGithubBenchmark()
        {
            var csb = new Microsoft.Data.SqlClient.SqlConnectionStringBuilder()
            {
                DataSource = ".",
                InitialCatalog = "master",
                IntegratedSecurity = true,
            };

            var masterCs = csb.ToString();
            _connString = new Microsoft.Data.SqlClient.SqlConnectionStringBuilder(masterCs)
            {
                InitialCatalog = DB,
            }.ToString();

            using var masterc = new Microsoft.Data.SqlClient.SqlConnection(masterCs);
            using var c = new Microsoft.Data.SqlClient.SqlConnection(_connString);

            masterc.Execute(@$"
                DROP DATABASE IF EXISTS {DB};
                CREATE DATABASE {DB};
            ");

            c.Execute($@"
                USE {DB};

                CREATE TABLE {_tableName} (
                    RunId INT NOT NULL,
                    Col1 DECIMAL NOT NULL,
                    Col2 NVARCHAR(50) NULL,
                    Col3 INT NOT NULL,
                    Col4 BIT NOT NULL
                )
            ");

            _sR = new Random();

            var item = new ItemToCopy();

            _items = Enumerable.Range(0, _count).Select(x => item).ToArray();
        }

        [GlobalSetup]
        public void Setup()
        {
            _reader = new EnumerableDataReaderFactoryBuilder<ItemToCopy>("test")
                .Add("RunId", i => _runId)
                .Add("Col1", i => i.Col1)
                .Add("Col2", i => i.Col2)
                .Add("Col3", i => i.Col3)
                .Add("Col4", i => i.Col4)
                .BuildFactory()
                .CreateReader(_items)
            ;
        }

        [Benchmark]
        public void NewBulkCopy_NewReader()
        {
            _runId = 1;
            _reader.Close(); // this resets the reader
            OldBulkCopy(_reader);
        }

        // When I was doing the compare -- I changed all the namespaces around so I could load both assemblies.
        //[Benchmark]
        //public void OldBulkCopy_NewReader()
        //{
        //    _runId = 4;
        //    _newReader.Close();
        //    OldBulkCopy(_reader);
        //}

        private static void OldBulkCopy(IDataReader reader)
        {
            using var bc = new Microsoft.Data.SqlClient.SqlBulkCopy(_connString, Microsoft.Data.SqlClient.SqlBulkCopyOptions.TableLock);

            bc.BatchSize = _count;
            bc.DestinationTableName = _tableName;
            bc.BulkCopyTimeout = 60;

            bc.WriteToServer(reader);
        }

        private static void NewBulkCopy(IDataReader reader)
        {
            //using var bc = new cmeyertons.Data.SqlClient.SqlBulkCopy(_connString, cmeyertons.Data.SqlClient.SqlBulkCopyOptions.TableLock);

            //bc.BatchSize = _count;
            //bc.DestinationTableName = _tableName;
            //bc.BulkCopyTimeout = 60;

            //bc.WriteToServer(reader);
        }
    }
}

EnumerableDataReader.cs
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Benchmark
{
    public interface IEnumerableDataReaderFactoryBuilder<T>
    {
        string Name { get; }

        EnumerableDataReaderFactoryBuilder<T> Add<TColumn>(string column, Expression<Func<T, TColumn>> expression);
        EnumerableDataReaderFactory<T> BuildFactory();
    }

    public class EnumerableDataReaderFactoryBuilder<T> : IEnumerableDataReaderFactoryBuilder<T>
    {
        private readonly List<LambdaExpression> _expressions = new List<LambdaExpression>();
        private readonly List<Func<T, object>> _objExpressions = new List<Func<T, object>>();
        private readonly DataTable _schemaTable;

        public EnumerableDataReaderFactoryBuilder(string tableName)
        {
            this.Name = tableName;
            _schemaTable = new DataTable();
        }

        private static readonly HashSet<Type> _validTypes = new[]
        {
                typeof(decimal),
                typeof(decimal?),
                typeof(string),
                typeof(int),
                typeof(int?),
                typeof(double),
                typeof(bool),
                typeof(bool?),
                typeof(Guid),
                typeof(DateTime),
            }.ToHashSet();

        public EnumerableDataReaderFactoryBuilder<T> Add<TColumn>(string column, Expression<Func<T, TColumn>> expression)
        {
            var t = typeof(TColumn);

            var func = expression.Compile();

            Expression<Func<T, object>> objExpression = (o) => func(o);

            _objExpressions.Add(objExpression.Compile());

            if (_validTypes.Contains(t))
            {
                t = Nullable.GetUnderlyingType(t) ?? t; // data table doesn't accept nullable.
                _schemaTable.Columns.Add(column, t);
                _expressions.Add(expression);
            }
            else
            {
                Console.WriteLine($"Could not matching return type for {this.Name}.{column} of: {t.Name}");
                _schemaTable.Columns.Add(column); //add w/o type to force using GetValue

                _expressions.Add(objExpression);
            }

            return this;
        }

        public EnumerableDataReaderFactory<T> BuildFactory() => new EnumerableDataReaderFactory<T>(_schemaTable, _expressions, _objExpressions);

        public string Name { get; }
    }

    public class EnumerableDataReaderFactory<T>
    {
        public DataTable SchemaTable { get; }
        public Func<T, object>[] ObjectGetters { get; }
        public Func<T, decimal>[] DecimalGetters { get; }
        public Func<T, decimal?>[] NullableDecimalGetters { get; }
        public Func<T, string>[] StringGetters { get; }
        public Func<T, double>[] DoubleGetters { get; }
        public Func<T, int>[] IntGetters { get; }
        public Func<T, int?>[] NullableIntGetters { get; }
        public Func<T, bool>[] BoolGetters { get; }

        public Func<T, bool?>[] NullableBoolGetters { get; }

        public Func<T, Guid>[] GuidGetters { get; }
        public Func<T, DateTime>[] DateTimeGetters { get; }
        public bool[] NullableIndexes { get; }

        public EnumerableDataReaderFactory(DataTable schemaTable, List<LambdaExpression> expressions, List<Func<T, object>> objectGetters)
        {
            SchemaTable = schemaTable;
            DecimalGetters = new Func<T, decimal>[expressions.Count];
            NullableDecimalGetters = new Func<T, decimal?>[expressions.Count];
            StringGetters = new Func<T, string>[expressions.Count];
            DoubleGetters = new Func<T, double>[expressions.Count];
            IntGetters = new Func<T, int>[expressions.Count];
            NullableIntGetters = new Func<T, int?>[expressions.Count];
            BoolGetters = new Func<T, bool>[expressions.Count];
            NullableBoolGetters = new Func<T, bool?>[expressions.Count];
            GuidGetters = new Func<T, Guid>[expressions.Count];
            DateTimeGetters = new Func<T, DateTime>[expressions.Count];
            NullableIndexes = new bool[expressions.Count];

            ObjectGetters = objectGetters.ToArray();

            for (int i = 0; i < expressions.Count; i++)
            {
                var expression = expressions[i];

                NullableIndexes[i] = !expression.ReturnType.IsValueType || Nullable.GetUnderlyingType(expression.ReturnType) != null;

                switch (expression)
                {
                    case Expression<Func<T, object>> e: break; // do nothing
                    case Expression<Func<T, decimal>> e: DecimalGetters[i] = e.Compile(); break;
                    case Expression<Func<T, decimal?>> e: NullableDecimalGetters[i] = e.Compile(); break;
                    case Expression<Func<T, string>> e: StringGetters[i] = e.Compile(); break;
                    case Expression<Func<T, double>> e: DoubleGetters[i] = e.Compile(); break;
                    case Expression<Func<T, int>> e: IntGetters[i] = e.Compile(); break;
                    case Expression<Func<T, int?>> e: NullableIntGetters[i] = e.Compile(); break;
                    case Expression<Func<T, bool>> e: BoolGetters[i] = e.Compile(); break;
                    case Expression<Func<T, bool?>> e: NullableBoolGetters[i] = e.Compile(); break;
                    case Expression<Func<T, Guid>> e: GuidGetters[i] = e.Compile(); break;
                    case Expression<Func<T, DateTime>> e: DateTimeGetters[i] = e.Compile(); break;
                    default:
                        throw new Exception($"Type missing: {expression.GetType().FullName}");
                }
            }
        }

        public IDataReader CreateReader(IEnumerable<T> items) => new EnumerableDataReader<T>(this, items.GetEnumerator());
    }

    public class EnumerableDataReader<T> : IDataReader
    {
        private readonly IEnumerator<T> _source;
        private readonly EnumerableDataReaderFactory<T> _context;

        public EnumerableDataReader(EnumerableDataReaderFactory<T> context, IEnumerator<T> source)
        {
            _source = source;
            _context = context;
        }

        public object GetValue(int i)
        {
            var v = _context.ObjectGetters[i](_source.Current);
            return v;
        }

        public int FieldCount => _context.ObjectGetters.Length;

        public bool Read() => _source.MoveNext();

        public void Close() => _source.Reset();

        public void Dispose() => this.Close();

        public bool NextResult() => throw new NotImplementedException();

        public int Depth => 0;

        public bool IsClosed => false;

        public int RecordsAffected => -1;

        public DataTable GetSchemaTable() => _context.SchemaTable;

        public object this[string name] => throw new NotImplementedException();

        public object this[int i] => GetValue(i);

        public bool GetBoolean(int i)
        {
            var g = _context.BoolGetters[i];

            if (g != null) return g(_source.Current);

            return _context.NullableBoolGetters[i](_source.Current).Value;
        }

        public byte GetByte(int i) => throw new NotImplementedException();

        public long GetBytes(int i, long fieldOffset, byte[] buffer, int bufferoffset, int length) => throw new NotImplementedException();

        public char GetChar(int i) => throw new NotImplementedException();
        public long GetChars(int i, long fieldoffset, char[] buffer, int bufferoffset, int length) => -1;

        public IDataReader GetData(int i) => throw new NotImplementedException();

        public string GetDataTypeName(int i) => throw new NotImplementedException();

        public DateTime GetDateTime(int i) => _context.DateTimeGetters[i](_source.Current);

        public decimal GetDecimal(int i)
        {
            var g = _context.DecimalGetters[i];

            if (g != null) return g(_source.Current);

            return _context.NullableDecimalGetters[i](_source.Current).Value;
        }

        public double GetDouble(int i) => _context.DoubleGetters[i](_source.Current);

        public Type GetFieldType(int i) => _context.SchemaTable.Columns[i].DataType;

        public float GetFloat(int i) => throw new NotImplementedException();

        public Guid GetGuid(int i) => _context.GuidGetters[i](_source.Current);

        public short GetInt16(int i) => throw new NotImplementedException();

        public int GetInt32(int i)
        {
            var g = _context.IntGetters[i];

            if (g != null) return g(_source.Current);

            return _context.NullableIntGetters[i](_source.Current).Value;
        }

        public long GetInt64(int i) => throw new NotImplementedException();

        public string GetName(int i)
        {
            if (_context.SchemaTable.Columns.Count > i)
            {
                return _context.SchemaTable.Columns[i].ColumnName;
            }
            throw new IndexOutOfRangeException($"No column for index {i}");
        }

        public int GetOrdinal(string name)
        {
            if (_context.SchemaTable.Columns.Count == 0)
            {
                throw new Exception("Schema table is empty");
            }
            return _context.SchemaTable.Columns.IndexOf(name);
        }

        public string GetString(int i) => _context.StringGetters[i](_source.Current);

        public int GetValues(object[] values) => throw new NotImplementedException();

        public bool IsDBNull(int i)
        {
            // short circuit for non-nullable types
            if (!_context.NullableIndexes[i])
            {
                return false;
            }

            // otherwise find the first one -- starting w/ most occurring to least

            var ig = _context.NullableIntGetters[i];
            if (ig != null)
            {
                return ig(_source.Current) == null;
            }

            var sg = _context.StringGetters[i];
            if (sg != null)
            {
                return sg(_source.Current) == null;
            }

            var bg = _context.NullableBoolGetters[i];
            if (bg != null)
            {
                return bg(_source.Current) == null;
            }

            var dg = _context.NullableDecimalGetters[i];
            if (dg != null)
            {
                return dg(_source.Current) == null;
            }

            return false;
        }
    }
}

I've done some experimenting and have some suggestions. All of this I've only checked on netcore, not netfx so you'll need to check the behaviour on netfx to see if they same applies.
ValueConverter can be reduced to:
    public static class ValueTypeConverter
    {
        /// <summary>
        /// Converts the value to the TOut type
        /// </summary>
        /// <typeparam name="TIn"></typeparam>
        /// <typeparam name="TOut"></typeparam>
        public static TOut Convert<TIn,TOut>(TIn input) => (TOut)(object)input;
    }

And then made internal (so it doesn't change the public api surface). You can then add a linked reference to the file in the test harness so you can access it if you need to. Though really I don't think there need to be specific tests for it.

I suggest changing the type to be non-generic and making the method generic so that the number of instantiations don't eat space in the type list for the app. Consider that if you have a list of all the types in the application and then add 40 generic instantiations of ValueTypeConverter you have to search longer than if you have a single ValueTypeConverter type with 40 method overloads on it.
when you're not using lambda compilation you don't need the 'ref' everywhere so all the signatures can have it removed which makes thing look a lot more natural. Because you're no longer having to pass references you don't need to add many intermediate variables you can just instantiate directly at the call site.
AOT compilation will "see" these calls and be able to produce the required instantiations because they're all statically declared in the code. This removes any problem with lambda and code emission.

All of this relies on the netcore JIT being able to elide the pattern (T)(object)t to t. If netfx doesn't do this then your approach of using lambda compilation will probably be the way to implement it on netfx and that should be ok because we know netfx is desktop only. If this is the case can you see if it's possible to do it using the same public api surface on ValueTypeConverter and using a local variable to ref inside the call somewhere? that way if we do ever get to the position where we can merge a lot of the netfx and netcore codebases we only have to conditionally include the correct implantation and it'll all still fit together.

I've done some experimenting and have some suggestions. All of this I've only checked on netcore, not netfx so you'll need to check the behaviour on netfx to see if they same applies.
ValueConverter can be reduced to:
    public static class ValueTypeConverter
    {
        /// <summary>
        /// Converts the value to the TOut type
        /// </summary>
        /// <typeparam name="TIn"></typeparam>
        /// <typeparam name="TOut"></typeparam>
        public static TOut Convert<TIn,TOut>(TIn input) => (TOut)(object)input;
    }

And then made internal (so it doesn't change the public api surface). You can then add a linked reference to the file in the test harness so you can access it if you need to. Though really I don't think there need to be specific tests for it.

I will implement your ValueTypeConverter suggestions -- I like that approach more.  I will also make it internal.
I was using the unit tests to more quickly iterate on the ValueTypeConverter implementation -- took some trial and error to get it right, especially for the ref implementation.  I would say they are still valuable to keep, but definitely agree that adding the linked reference is much cleaner than making it public.
Side note, I was kind of surprised to see the Test project as a whole didn't have internals of the SqlClient project exposed to it.

I suggest changing the type to be non-generic and making the method generic so that the number of instantiations don't eat space in the type list for the app. Consider that if you have a list of all the types in the application and then add 40 generic instantiations of ValueTypeConverter you have to search longer than if you have a single ValueTypeConverter type with 40 method overloads on it.

I definitely agree -- that is definitely an improvement and I will implement that.

when you're not using lambda compilation you don't need the 'ref' everywhere so all the signatures can have it removed which makes thing look a lot more natural. Because you're no longer having to pass references you don't need to add many intermediate variables you can just instantiate directly at the call site.

I actually didn't need the ref implementation initially -- it's not a requirement of the lambda compilation.  My first iteration omitted ref, so T value would pass by value -- ValueTypeConverter just needed some slight tweaks to go to ref.  Then I started trying to diagnose the performance issues.  I realized the current implementation passes the boxed value around by reference, so I converted to the ref implementation to align to the previous behavior.  I was hoping to see better perf using ref, but did not.
Side note, for a decimal type, is the conclusion correct that passing by value is slower than passing by stack reference (16 bytes vs 8 bytes in 64x)?

AOT compilation will "see" these calls and be able to produce the required instantiations because they're all statically declared in the code. This removes any problem with lambda and code emission.

All of this relies on the netcore JIT being able to elide the pattern (T)(object)t to t. If netfx doesn't do this then your approach of using lambda compilation will probably be the way to implement it on netfx and that should be ok because we know netfx is desktop only. If this is the case can you see if it's possible to do it using the same public api surface on ValueTypeConverter and using a local variable to ref inside the call somewhere? that way if we do ever get to the position where we can merge a lot of the netfx and netcore codebases we only have to conditionally include the correct implantation and it'll all still fit together.

I will definitely keep the public API surface aligned between netfx and netcore (I guess that means I have to copy over all of the T value changes to the netfx side?).

Side note, for a decimal type, is the conclusion correct that passing by value is slower than passing by stack reference (16 bytes vs 8 bytes in 64x)?

That's a behaviour which can be changed by the JIT and by the platform. Unix and windows may have different behaviours due to the ABI of the native code generated. It is also a behaviour that may change in future iterations of the JIT so it's a level I don't tend to push at too hard. So I don't know :grin:.

Expanded ValueMethod to include GetInt32, etc. -- considering switching it to a bit-wise enum to possibly improve perf.
Still seeing some perf diffs, however they're much smaller (20%) when doing a like-for-like comparison using benchmark_current branch as the baselien and benchmark branch containing the generic changes.

Some notes:
I changed the name of ValueTypeConverter to GenericConverter to more accurately describe the behavior.  I think on the netfx side, it's still going to require an underlying GenericConverter<TIn, TOut to leverage the static constructor to cache off the lambda expression compilation -- I didn't see a good way of implementing that w/o using some typed dictionary lookup (which would not perform adequately compared to the generic).
I'd like to resolve the perf issues above before porting to netfx to avoid having to keep the code in sync multiple times.
Some ideas I have:

passing the decimal / SqlDecimal around by value is hurting perf
less inlining w/ the generics?
ValueMethod could be converted to a bit-wise enum.

I've been profiling using JetBrains DotTrace and haven't had success in determining why it's so much slower -- it's hard to pinpoint comparing old vs. new because the control flow has changed to let the generic value flow downwards from read -> write.

Can you export the profiler traces and upload them, I have dottrace so I should be able to open them and take a look. You also need to take a look at the test failures and see if there's anything that can be fixed.

Can you export the profiler traces and upload them, I have dottrace so I should be able to open them and take a look. You also need to take a look at the test failures and see if there's anything that can be fixed.

@Wraith2 I can't upload to Github, so sent to your email listed on your profile.   I will take a look at the tests to get that cleaned up.

 Incidentally a lot of those SqlDecimal allocations will be removed in .net 5 if https://github.com/dotnet/runtime/pull/1155 gets merged.

There was a problem with my benchmark (some random-ness) and after de-randomizing the copied data, the changes in this PR appear to improve BulkCopy's overall performance (as I was hoping).

@cheenamalhotra

General comments:

The classes GenericConverter you added in NetFx and NetCore projects are not same.

I have left a comment on the netfx version explaining why -- it seems like in order to observe the same performance in netfx we cannot leverage the same capabilities in the JIT -- if that's not the case, i'm happy to simply and get it down to one code path.  The only risk I saw was these changes actually hurting perf instead of helping (due to potential double boxing not leveraging the JIT)

You did not make changes to NetFx project, any specific reason?

I posed this question to you in the review -- happy to port changes over to netfx -- was hoping I could get your blessing on the actual logic changes before having to port / maintain updates in both places during iterations.

Also I did not see extensive test cases to reflect what we achieved with the PR.

I did earlier post some of my benchmark results in the PR using Benchmark.NET that showcase the zero GC allocations + the performance increase on the same dataset.  I'm open to suggestions on more what you would like to see as a requirement for this.  I was hoping the existing test suite would cover potential regressions on touching this code.

I'm yet to go deep down the logic path, wanted to highlight some top observations.

I do have my benchmarks  in a branch -- more than happy to include their [Fact] commented out in the Test project if that works?

@cmeyertons
In case you haven't noticed, there are failures in your builds for netcore, please run tests locally and push fixes for them so we can start reviews.

I do have my benchmarks in a branch -- more than happy to include their [Fact] commented out in the Test project if that works?

That would be nice to have! Whenever we start Perf benchmarking officially we'll include those in future.

I posed this question to you in the review -- happy to port changes over to netfx -- was hoping I could get your blessing on the actual logic changes before having to port / maintain updates in both places during iterations.

Sure, we'll be reviewing it soon when tests pass, and then you can port over to NetFx.

Hi @cmeyertons,
Do you have any estimation when you can get back to this code at your convenient time?
We don't mean to force your hand on this PR despite preferring you to keep working on it. If you are not able to continue working on it we will manage it by ourselves.

Apologies all around - I lost sight of this amongst my primary work responsibilities. I’ll carve some time out tomorrow to look back into this

/me pokes @cmeyertons

I will carve out some time next Tuesday to address further comments - my time has been constrained with my primary work.

That is appreciable. Thank you for informing us here @cmeyertons.

@Wraith2 @DavoudEshtehari
Just pushed up some changes to address feedback + get a fully working test proving the no-boxing results using Benchmark.NET
Right now, it just tests a table with an int and a bool column -- happy to include other primitives if desired.

Are the failing checks due to something more widespread in the SqlClient ecosystem?
Looks like a lot of CreateDatabase failures in Enclave + 2 functional test failures related to Always Encrypted

@cmeyertons Yes, I think these failures are not related to your PR

@cheenamalhotra @DavoudEshtehari @Wraith2  I believe this PR has all feedback completed -- the only remaining item is the decision on whether or not we want to port these changes to netfx -- happy to do so, just need to hear from team if we're good w/ changes thus far

Have you investigated how difficult/different the port to netfx would be? I think it it's low friction you'll almost certainly be asked to do so, there's a lot of line of business software out there using bulk copy which would be improved by better performance and it would be a good selling point for driving library adoption over the system version.

@cmeyertons
Please go ahead and update NetFx source. I think the changes look good to take it forward to completion 👍

@cheenamalhotra @Wraith2 performed the following:

ported code into netfx -- it was pretty trivial.  The only thing I had to watch out for was not copying over optimizations made to Guid to use stackalloc (left alone to use .ToByteArray())
got the benchmark fully working (even in net461) as a unit test that measures the no boxing effect.
after getting the benchmark fully working, was able to confirm that (TOut)(object)value gets optimized out by the JIT even in net461, so was able to align the netfx and netcore GenericConverter implementations

Excellent work, thanks 👍

That's great progress, would request you to fix the failing tests in NetCore, as these failures are related to changes here..
Also could you provide us benchmarks for perf improvements you observed, in order to document here for the reviewing team?

/me pokes @cmeyertons
It'd be nice to get this into the next release

@Wraith2 i can carve out some time today
I was kind of stuck on fixing the test - I remember it being related to the stream bulk copy functionality and couldn’t easily step through it because the test had a large amount of data unrelated to the breakage.
will dig in some more today and post my findings

@cmeyertons Could you resolve conflicts, please?

I’m currently working on patching my changes on top of main and will create a new PR - there were too many hairy conflicts I couldn’t easily resolve.

Closing as new PR #1048 replaces it.


Add support for nullish operations

Such as: $exists: false, $eq: null
Most probably these will be "limited support" operations when SAI is not in the schema - not sure if SAI being present would actually help here!

Ah, that's why $eq: null didn't work when I tried it last night - it's not implemented. :-)

Using GET with {"foo.bar":{"$in":[null]}} helped achieve this!

Yep that's a valid workaround! I will update this issue to remove the need for adding $in support as it already exists.
Still, would be way more ergonomic to allow exists/eq, more intuitive imo (and fewer characters!)

@EricBorczuk I ll take this as agreed.

For now all the work on this issue is suspended. We will not take any further actions. Please use the $in alternative, but be aware that if this is the only condition it can result in the full table scan.

not planned


Sunburst: Group-by/JoinTables as data source

This helps reduce memory usage by utilizing datagrok internals for aggregation.

Please do not merge just yet. I need to fix onSizeChange and click handling.

Now it's ready for merge.


Add types on module files

What kind of change does this PR introduce?
types
Did you add tests for your changes?
no
Does this PR introduce a breaking change?
no
What needs to be documented once your changes are merged?
nothing

Thanks


Typo in "Using our components library"

In the point 6, it says Router.razor (wrong) instead of Routes.razor(right)

Agreed =)
Thanks for helping out correcting these misstakes. I really appriciate that-


The prop "scrollToInputAdditionalOffset" is not documented

Is there a reason why the prop "scrollToInputAdditionalOffset" is not documented?

Hi @parijatsahai,
Assuming that you're asking regarding the readme, there's no particular reason why this wasn't documented. The readme wasn't properly maintained, other props are not documented there either... I agree that it can be improved.
That said, you can see the available props in the propTypes.


child terms naming inconsistency: MP:0008836 abnormal transforming growth factor beta level

Hi,
MP:0008836 abnormal transforming growth factor beta level has two children that don't mention beta:
MP:0008838 decreased transforming growth factor level
MP:0008837 increased transforming growth factor level
Could you rename those children
MP:0008838 decreased transforming growth factor beta level
MP:0008837 increased transforming growth factor beta level
Thanks,
Laurens

Renamed child terms MP:0008838 and MP:0008837 to include "beta" in the term label.


Proposal Title gets empty when typing sth into markdown editor

Describe the bug
When entering a proposal title in the create proposal form and tabbing into the markdown editor and start typing the proposal title gets empty.
To Reproduce
Steps to reproduce the behavior:

Go to create proposal page
Enter sth into proposal title
Enter sth into markdown editor
See proposal title gets empty

Expected behavior
form values stay in the input fields as long as I dont leave the page
Additional context
Maybe sth went wrong with clearing the form fields and not storing the values forever.

input in markdown triggers form reset, looking into it.


feat: enable all babel syntax plugins

Summary
Breaking due to the increased peer dep, so let's land this in Jets 26.
Also needs https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax/commit/565b63ac1b9876cb48bdb1dcc88121a7607624bf to be published

Test plan
Not sure... It looks correct? 😀

This doesn't work on Node 8, which is fine - we will only land in Jest 26 anyways, which will drop node 8. However

Plugin/Preset files are not allowed to export objects, only functions.

@nicolo-ribaudo

Oh I can add Node 8 support (Babel still supports Node 8 anyway).

No need to on our account unless the next version of babel will support node 8 🙂
I opened up https://github.com/nicolo-ribaudo/babel-preset-current-node-syntax/pull/1 as well for the other error


Fixed linter error in config-service.ts

Fixed unexpected type any by casting configSchema to Record

Closing due to inactivity please feel free to reopen as needed.


Added AST cases for var_decl and visibility_attr

This change is

Reviewed 4 of 4 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved.

Comments from Reviewable


Error add plugin on xcode 14.0.2 / Cordova 11.0.0

Howdy
I'm having a problem installing the plugin.
Install with : cordova plugin add cordova-plugin-firebase-messaging --variable IOS_FIREBASE_POD_VERSION="9.6.0"
output.txt

I have the same issue. Have you resolved this one ?

Actually I resolved it by upgrading cordova-ios.


Reimplement joint-configuration algorithms, fix #658

Fix #658.
Now all joint-configuration algorithms have two versions: one with return value as argument, and one which allocates memory.
Notice that most algorithms will probably give wrong results if the output is the same object as one of the inputs. This is true in particular for integrate. I might implement integrateInPlace in the future.
Additionally, I re-implemented distance so that it does not employ the auxiliary vector provided by squaredDistance.
Also, I am providing the square of the distance with method squaredDistanceSum, because squaredDistance was already taken. By the way, I think squaredDistance is pretty useless now that it is not employed by distance, should it be eliminated, and its name recycled for what I called squaredDistanceSum?

squaredDistance is required for people who wants to tune the metric on the config space i.e. use different weights on each joint. However, this might be achievable with the difference operator.
In HPP, I think we do not use directly these algorithms because we need to put weights on rotational parts of SE(n).

@jmirabel I see. Now that I think about it, summing the rotational difference to the positional one does not make a lot of sense

By the way, why don't you overload the function for squaredDistance ?

By the way, why don't you overload the function for squaredDistance ?

Because it's impossible. The method returning the vector and the one returning double would have the same signatures, only the return type would change, which is not allowed in. A more coherent naming would be squaredDistance for the double and squaredDistances or squareDistanceVector for the vector, but that would break current code employing squaredDistance.

@jmirabel I see. One think I realised while doing this, is that distance is summing the rotational difference to the positional one does not make a lot of sense

This indeed why we have allowed the overloading of this function through the LieGroupeMap. But for a robotic arm, this is fine.

Ok

Well, it's just that to compute distance you need to compute the sum of
squared distances and finally take the squared root... One might want to
avoid the square root, so I gave this option, much in the same way we
sometimes use squaredNorm() instead of norm().
Il giorno ven 15 feb 2019 alle 10:13 Justin Carpentier <
<EMAIL_ADDRESS>ha scritto:

@jcarpent commented on this pull request.
In src/algorithm/joint-configuration.hpp
https://github.com/stack-of-tasks/pinocchio/pull/679#discussion_r257154476
:

@@ -251,6 +251,38 @@ namespace pinocchio
dIntegrate<LieGroupMap,Scalar,Options,JointCollectionTpl,ConfigVectorType,TangentVectorType,JacobianMatrixType>(model, q.derived(), v.derived(), J.derived(),arg);
}

/**

@brief      Overall squared distance between two configuration vectors

@param[in]  model      Model we want to compute the distance

@param[in]  q0         Configuration 0 (size model.nq)

@param[in]  q1         Configuration 1 (size model.nq)

@return     The squared distance between the two configurations

*/
template<typename LieGroup_t, typename Scalar, int Options, template<typename,int> class JointCollectionTpl, typename ConfigVectorIn1, typename ConfigVectorIn2>
Scalar squaredDistanceSum(const ModelTpl<Scalar,Options,JointCollectionTpl> & model,

@gabrielebndn https://github.com/gabrielebndn Do you have ideas of when
this function might be useful?
Maybe @jmirabel https://github.com/jmirabel has some hints.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/stack-of-tasks/pinocchio/pull/679#discussion_r257154476,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AHSgDTqfVfWnHIKORqYvPPyPaz_bqV1Wks5vNnpBgaJpZM4a8r8l
.

Yes sure. I'm wondering if someone will use it or not. As it is done now, keep it like.
My only wish is to not add two much signatures to avoid the code becoming a mess.

I've implemented the requested changes. I will wait for the resolution of  #681 and rebase on that

Thanks for these modifications.
I will proceed to the merge before, as I think it will be easier and the PR are independent.

@gabrielebndn Is it fine for you?

@jcarpent as I had already rebased on #673, I checked everything is fie and I pushed it. Anyhow I am not getting the compilation error referenced in #681


How do I get the first versions of this app when it first came out without the search bar?

How do I get the first versions of this app when it first came out without the search bar?

You can see the history here: https://github.com/rbrundritt/SimpleUwpAzureMaps/commits/main/


vinvent.Bar for simple multi-dimensional iterable

To create a bar chart for the following simple data:
data = [
    ['foo', 10],
    ['bar', 20],
    ['baz', 5],
]

This will not work:
bar = vincent.Bar(data)

I have found the following to make it work using multi_iters:
data2 = zip(*data)
d = {'x': data2[0], 'data': data2[1]}
vincent.Bar(d, iter_idx='x')

However, this seems somewhat complicated. Can a simple solution be suggested instead?

(Almost same as #54)


Issue in verifying istio on s390x

Setup a local cluster using kubeadm
The node status
Kubectl get nodes
Build istioctl from source
Added istoctl to path
Tried to execute the sample helloworld example
a)	Built the required examples-helloworld-vx images using build_service.sh
b)	On running istioctl kube-inject -f helloworld.yaml -o helloworld-istio.yaml
We observed content of helloworld-istio.yaml as empty
c)	So we ran helloworld.yaml using kubectl
kubectl create -f helloworld-istio.yaml
On running above command we see pods status as pending with below pods status
Kubectl describe pod <>

@rshriram ,any updates on this?


Textured Material not rendering

Hi, I'm trying to augment a textured object in the splat. However, those textured objects are not rendered. How can this be fixed? Also, in the readme file, you mentioned that integrating transparent objects does not work and would be challenging. Could give me the general directions on making this work?

What kind of material are you using for the textured object? If it's a material that requires lights, you will need to add lights to the scene. Alternatively you could use something likeTHREE.MeshBasicMaterial, which supports textures and would work without lights.

Thanks that worked. I'm curious how we can render transparent or semi transparent objects in the scene

Transparent objects are difficult because the splat scenes themselves are made up of a transparent mesh. Since transparent objects are typically rendered without writing to the depth buffer, other three.js objects and the splat scene won't properly occlude each other. You would need to somehow modify the rendering of the splat scenes to include rendering to the depth buffer. I have actually experimented with that, but the results did not look great.

One way that might work for your case, depending on how your transparent objects are positioned relative to each other, is to alter the material for each to write to the depth buffer and set the .renderOrder for each to reflect the order in which you want them to be rendered (which will depend on the camera's position and orientation). Then set the .renderOrder for the viewer's .splatMesh to be larger than any of your other transparent objects, which will cause it to be rendered last. It's not a perfect solution, but it will work for certain cases.

I'm going to close this one for now, let me know if you have any further thoughts or questions about this.


Fix bail with single str parameter

Use bail! macro with a single str parameter such as bail!("This is a test") resulted in a compile error from a missing From conversion. . Fixed by just using the anyhow! macro also for single parameter bail!.
Alternatively one could add the needed conversion?
Also added small test to verify that that it compiles.

Published in 1.0.1.

Awesome, thanks for super fast response and publishing! 👍


fully configure nginx, support RO filesystem

Towards https://github.com/giantswarm/giantswarm/issues/31101#issuecomment-2470437117
Problem triggered by https://github.com/giantswarm/handbook/pull/295
Slack thread with the down alert: https://gigantic.slack.com/archives/C90BZMUJ1/p1733124575839329
Summary
The Handbook image stopped working in the updated chart (due to RO filesystem).
This seems like a limitation of the upstream image's default configuration.
Like for our Intranet image, supplying a complete and sensible nginx configuration and pre-creating the needed directories should solve this.

Added the required empty-dir mount to the chart.


Can't see anything on opening

The program opens up but doesn't display any process information, just a totally blank table. I installed/built the program following the instructions. Anyone know what I can do to find out what the problem might be? Here are the messages I get from the terminal.
`In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:2:
In file included from include/linux/compiler_types.h:69:
include/linux/compiler-clang.h:45:9: warning: 'HAVE_BUILTIN_BSWAP32' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP32
^
:4:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP32 1
^
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:2:
In file included from include/linux/compiler_types.h:69:
include/linux/compiler-clang.h:46:9: warning: 'HAVE_BUILTIN_BSWAP64' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP64
^
:5:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP64 1
^
In file included from :2:
In file included from /virtual/include/bcc/bpf.h:12:
In file included from include/linux/types.h:6:
In file included from include/uapi/linux/types.h:14:
In file included from include/uapi/linux/posix_types.h:5:
In file included from include/linux/stddef.h:5:
In file included from include/uapi/linux/stddef.h:2:
In file included from include/linux/compiler_types.h:69:
include/linux/compiler-clang.h:47:9: warning: 'HAVE_BUILTIN_BSWAP16' macro redefined [-Wmacro-redefined]
#define HAVE_BUILTIN_BSWAP16
^
:3:9: note: previous definition is here
#define HAVE_BUILTIN_BSWAP16 1
^
3 warnings generated.
bpf: Failed to load program: Invalid argument
fd 9 is not pointing to valid bpf_map
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
bpf: Failed to load program: Invalid argument
fd 9 is not pointing to valid bpf_map
processed 0 insns (limit 1000000) max_states_per_insn 0 total_states 0 peak_states 0 mark_read 0
`

What environment (distro/kernel) are you running on?

Closing this issue for now. Please feel free to re-open and add the environment specific details.


[release-2.6] Rebuild with new base image

Signed-off-by: Subbarao Meduri<EMAIL_ADDRESS>

/lgtm

Closing this PR. The imagescan is only being reported and targeted for the current release.


Clarifying the license in the Readme

"BSD" should not be used as a license identifier, as it's too unspecific.
It is important to be specific about the "kind of BSD license" used, as their terms vary and the BSD-4-clause e.g. should not be combined with GPL licensed software.
I suggest to use the SPDX identifier, see  https://spdx.org/licenses/.

Agreed.
Thanks!


Remove $statuslist from Sisimai::Lhost::Office365

Sisimai::Rhost::Microsoft has the same list
The value of lhost or rhost will be matched with any value in $RhostClass->{'Microsoft'}

The following commits should be implemented in Sisimai::Rhost::Microsoft

sisimai/go-sisimai@611a509
sisimai/go-sisimai@63eb9f6

Sisimai::Lhost::Office365 has been removed because Sisimai::Lhost::Exchange2007 can decode a bounce mail returned from Office365 #557


Capture view in Swift 3.0 will be flash

A flash will be there if you capture a long view by SwViewCapture.

The flash happen only in the case of iPhone 7 plus simulator


Modal not showing the LottieView

Description
Using the Modal from react-native does not show the LottieView
Steps to Reproduce
Using Lottie as usual
Expected behavior: [What you expected to happen]
It should work everywhere
Actual behavior: [What actually happened]
Not showing
Minimal reproduction
`import React, { useRef } from "react";
import LottieView from "lottie-react-native";
const LoadingAnimation: React.FC = () =>{
// Define the type of the ref to match LottieView
const animationRef = useRef(null);
const play = () => {
console.log("animationRef", animationRef);
animationRef.current?.play();
}
return (
<LottieView
ref={animationRef}
onLayout={() => play() }
style={{
height: 50,
justifyContent: 'center',
alignItems: 'center',
}}
source={require("../assets/json/astronot.json")}
autoPlay
loop
/>
);
}
export default LoadingAnimation;`
`import React, { useMemo } from 'react';
import { View, StyleSheet, Modal } from 'react-native';
import { useLoading } from './LoadingContext';
import LoadingAnimation from './LoadingAnimation';
const UniversalLoadingComponent: React.FC = () => {
const { isLoading } = useLoading();
const loadingAnimation = useMemo(() => (

), []);
return (
<Modal visible={isLoading} animationType="none" transparent style={{
flex: 1, justifyContent: 'center',
alignItems: 'center',
}}>

{/*  /}
{/ {loadingAnimation} */}

)
};
const styles = StyleSheet.create({
centeredView: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: "red"
},
});
export default UniversalLoadingComponent;
`
React Native Environment
"react": "^18.2.0",
"react-native": "^0.73.1",
Lottie Version
Version:     "lottie-react-native": "^6.4.1",

I got the same issue, any updates?

Hi. Thank you for opening an issue. Is the new architecture enabled?

Hi. Thank you for opening an issue. Is the new architecture enabled?

Hi, thank you for the answer.
The new architecture is disabled.
After some research I found the BREAKING CHANGES #992 that removed the default width. After apply my own width, height and/or aspectratio the behaviour was as expected.
My problem is solved.

@chatphonhasser How about you? I see that your code also only mentions height

`import React, { useRef } from "react";
import LottieView from "lottie-react-native";
import { Dimensions, StyleSheet } from "react-native";
const styles = StyleSheet.create({
fullScreen: {
position: 'absolute',
width: Dimensions.get('window').width,
height: Dimensions.get('window').height,
backgroundColor: 'rgba(0, 0, 0, 0.5)',
justifyContent: 'center',
alignItems: 'center',
zIndex: 1000, // Ensures it's on top of other components
},
});
const LoadingAnimation: React.FC = () =>{
// Define the type of the ref to match LottieView
const animationRef = useRef(null);
const play = () => {
console.log("animationRef", animationRef);
animationRef.current?.play();
}
return (
<LottieView
ref={animationRef}
onLayout={() => play() }
style={styles.fullScreen}
source={require("../assets/json/Icon-Only (2).json")}
autoPlay
loop
/>
);
}
export default LoadingAnimation;`

`import React, { useMemo } from 'react';
import { View, StyleSheet, Modal } from 'react-native';
import { useLoading } from './LoadingContext';
import LoadingAnimation from './LoadingAnimation';
const UniversalLoadingComponent: React.FC = () => {
const { isLoading } = useLoading();
const loadingAnimation = useMemo(() => (

), []);
if(isLoading) {
return (<>
{loadingAnimation}
</>
)
}
else{
return null;
}
};
export default UniversalLoadingComponent;
`
I am using this then it worked.

This code sample is missing quite a bit that i can't figure out (What's in the loadingAnimation, what useLoading is doing, what is in the animation file, etc). Please provide a self contained code example or a reproducible repo so i can test things out. Otherwise, if it is working for both of you, i'll close the issue.

As I said it is working.
The point here is the style(unable to style the component within a View) and how the component is enclosed. Which is the issue I think. I cannot put it in a View tag.
<View>
    <LottieView/>
</View>

loadingAnimation ==> I provided the code
const LoadingAnimation: React.FC = () =>{
// Define the type of the ref to match LottieView
const animationRef = useRef(null);

const play = () => {
console.log("animationRef", animationRef);
animationRef.current?.play();
}
return (
<LottieView
ref={animationRef}
onLayout={() => play() }
style={styles.fullScreen}
source={require("../assets/json/Icon-Only (2).json")}
autoPlay
loop
/>
);
}

export default LoadingAnimation;

This is Lottie's Fabric example:
import React from 'react';
import {StyleSheet, Text, TouchableOpacity, View} from 'react-native';
import LottieView from 'lottie-react-native';

const color = {
  primary: '#1652f0',
  secondary: '#64E9FF',
};

const remoteSource = {
  uri: 'https://raw.githubusercontent.com/lottie-react-native/lottie-react-native/master/apps/paper/src/animations/Watermelon.json',
};

const dotLottie = require('./animations/animation_lkekfrcl.lottie');

const localSource = require('./animations/LottieLogo1.json');

const App = () => {
  const [source, setSource] = React.useState(localSource);
  const [isLoop, setLoop] = React.useState(false);

  return (
    <View style={styles.container}>
      <LottieView
        key={source + isLoop}
        source={source}
        autoPlay={true}
        loop={isLoop}
        style={styles.lottie}
        resizeMode={'contain'}
        colorFilters={colorFilter}
        enableMergePathsAndroidForKitKatAndAbove
        onAnimationFinish={() => {
          console.log('Finished');
        }}
        onAnimationFailure={e => {
          console.log('Error ', {e});
        }}
      />
      <View style={styles.controlsContainer}>
        <TouchableOpacity
          onPress={() => {
            setSource(localSource);
          }}
          style={styles.button}>
          <Text style={styles.text}>{'Local animation'}</Text>
        </TouchableOpacity>
        <TouchableOpacity
          onPress={() => {
            setSource(remoteSource);
          }}
          style={styles.button}>
          <Text style={styles.text}>{'Remote animation'}</Text>
        </TouchableOpacity>
        <TouchableOpacity
          onPress={() => {
            setSource(dotLottie);
          }}
          style={styles.button}>
          <Text style={styles.text}>{'DotLottie animation'}</Text>
        </TouchableOpacity>
        <TouchableOpacity
          onPress={() => {
            setLoop(p => !p);
          }}
          style={styles.button}>
          <Text style={styles.text}>{isLoop ? 'Loop on' : 'Loop off'}</Text>
        </TouchableOpacity>
      </View>
    </View>
  );
};

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    paddingVertical: 32,
  },
  controlsContainer: {marginTop: 24, gap: 12},
  button: {
    backgroundColor: color.primary,
    paddingHorizontal: 24,
    paddingVertical: 16,
  },
  text: {color: 'white', textAlign: 'center'},
  lottie: {width: 400, height: 400},
});

const colorFilter = [
  {
    keypath: 'BG',
    color: color.primary,
  },
  {
    keypath: 'O-B',
    color: color.secondary,
  },
  {
    keypath: 'L-B',
    color: color.secondary,
  },
  {
    keypath: 'T1a-Y 2',
    color: color.secondary,
  },
  {
    keypath: 'T1b-Y',
    color: color.secondary,
  },
  {
    keypath: 'T2b-B',
    color: color.secondary,
  },
  {
    keypath: 'T2a-B',
    color: color.secondary,
  },
  {
    keypath: 'I-Y',
    color: color.secondary,
  },
  {
    keypath: 'E1-Y',
    color: color.secondary,
  },
  {
    keypath: 'E2-Y',
    color: color.secondary,
  },
  {
    keypath: 'E3-Y',
    color: color.secondary,
  },
];

export default App;

And here is the output:

As you can see, you very much can put it in a View tag and expect it to work. This is why i am asking for a reproducible so i can narrow down what is going on. Also, as i mentioned, your original example for LoadingAnimation is not allocating width to the component. As of Version 6, you are required to provide both width and height (Or equivalent sizing props like flex) and we no longer calculate those values.

It worked. Thanks.
For your information, I could clone your project, there is the index error.
Have a nice day


My Mailhog stopped working after MAMP -> Valet

I used MAMP and installed mailhog to test some WordPress mail being sent from a site on the MAMP server.  Mailhog worked like a charm with MAMP.  Now I use Valet, and while I like it, Mailhog doesn't work anymore.
Mailhog stopped working when I switched to valet, so my question is how can I make Mailhog work with Valet as well as it did with MAMP?

WP_DEBUG has to be on.  (I don't know how it got turned off in the first place)

Hi @brothman01 please how did you configured MAMP with Mailhog?


Selenoid support

Added connection params to the Selenoid RemoteWebDriver for Chrome and Firefox browsers.
Changed clipboard handling in the sendKeys() method to support Selenoid container.

@agozhiy @Atri0 please, review the PR.
Tests can be executed for the Firefox browser on Jenkins:
http://<IP_ADDRESS>:8080/job/Web_Framework_Tests/

+1 LGTM

@agozhiy please, review the changes.

@agozhiy please, review the changes.

+1.


doc(*): Replace references to IRC/Freenode with Slack

Fixes #86

that was the fastest LGTMs I've ever seen. We've got the fastest LGTM'ers in the wild west

I guess we all just really wanted off or IRC.


Very cool. Sir, license?

It's ok if you have none, just curious. :)

Thanks for asking - MIT.

You're welcome @tylerb1, thanks for updating! :)


Projection result confirmation

Hello,
I'm now working on the cross-modality detection tasks in 3D space.
Since the SFDNet uses this method as their depth completion way, so I try this repo as well.
The following is the output of PENet and the outcome I obtained when I project them back.
Does it look correct?
I know that the recovered 3d position from the depth map is suffering from the artifacts as u discuss in this issue: https://github.com/JUGGHM/PENet_ICRA2021/issues/3.
But it looks more severe far beyond my expectation.
Thanks for any help

I test it on KITTI 3D Object detection dataset

I have found where is the problem, so basically u need to specify the path to .tar file, instead of just the folder name.

When I project the depth map, the results is as follows.

I've specified the weight path correctly.
Thank you in advance !


Go back to small /edge

Proposed changes
Rather than having two whole versions of the site, one edge and one stable, just have the one version, but have a /edge/ subdirectory with its own index, CLI reference stubs, and API reference. In the Edge CLI reference stubs, have an admonition that they are edge and give a link back to the non-Edge one.
A few new files are fetched in the Dockerfile and put into the right places in /edge/.
So there is an entry for /edge/ in the left-hand TOC, and there are links to the edge CLI and API refs near the stable ones in the Reference tab.
This PR also pulls out the no-longer-used glossary.md from the Dockerfile.
I retained the Try the Edge docs link in the tab bar, for visibility.
Netlify will get you some of the way there, but to really test, you need to build the Dockerfile and run locally.

Fixes #2720

OK, I popped off the top commit. Merge at will.

Thanks, @mstanleyjones :)


fix: broken link in account-balance.md

I noticed this link was broken when I was looking through the nodejs docs

Thanks for noticing this and submitting the fix!


Test suite creates zero-initialized String

I am working on enabling Rust to better detect misuse of uninitialized memory (https://github.com/rust-lang/rust/pull/71274), and this crate was flagged as a possible regression. Specifically, this line:
https://github.com/Badel2/zerobuf/blob/5038006fa73197cdc5ed83ff48a016b4e446b50b/src/lib.rs#L366
creates a zero-initialized String, which is Undefined Behavior as strings must never be 0.

Good find, that's true. The purpose of that test is to check if "all zeros" is a valid value of type T. It seems impossible to check that without undefined behavior.
But if you implement that check into the compiler that's perfect, then this library will always be safe to use as users will not be able to create a ZeroBuf<String> because of a compiler error.

The check in the compiler is not and never will be 100% safe. There is no way in Rust to determine if type type T can be zero-initialized; that would require a trait that lets crate authors inform users if their type supports something like this.

That makes sense. Anyway, I released 0.0.3 with that one test removed. Thank you very much for your work!

I think the crate I had in mind is https://docs.rs/zerocopy/0.3.0/zerocopy/. It has some useful traits, though not one that exactly matches "zero-initializable".