kkharji / xbase

Develop Apple software products within your favorite editor.
MIT License
537 stars 17 forks source link

Error trying to use run picker #216

Closed joshpetit closed 1 year ago

joshpetit commented 1 year ago

Editor/Client you used

Neovim

Installation and Dependences checklist

Description

When I try using the run picker, I get this error:

E5108: Error executing lua: .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:47: attempt to concatenate field 'name' (a nil value)
stack traceback:
        .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:47: in function 'find'
        .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:70: in function <.../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:69>

### Expected behavior

_No response_

### Reproduce

```Markdown
My configuration:

require("xbase").setup({
    --- Log level. Set it to ERROR to ignore everything
    log_level = vim.log.levels.DEBUG,
    --- Options to be passed to lspconfig.nvim's sourcekit setup function.
    --- Usually empty map is sufficient, However, it is strongly recommended to use on_attach key to setup custom mapppings
    -- sourcekit = {}, --- Set it to nil to skip lspconfig's sourcekit setup
    sourcekit = {
        on_attach = require("mystuff.on_attach_conf"),
        capabilities = require("cmp_nvim_lsp").default_capabilities(),
    }, --- Set it to nil to skip lspconfig's sourcekit setup
    --- Statusline provider configurations
    --- Simulators to only include.
    --- run `xcrun simctl list` to get a full list of available simulator
    --- If the list is empty then all simulator available  will be included
    simctl = {
        iOS = {
             "iPhone 14 Pro", --- only use this devices
        },
        watchOS = {}, -- all available devices
        tvOS = {}, -- all available devices
    },
    --- Log buffer configurations
    --- Mappings
    mappings = {
        --- Whether xbase mapping should be disabled.
        enable = true,
        --- Open build picker. showing targets and configuration.
        build_picker = "<leader>xb", --- set to 0 to disable
        --- Open run picker. showing targets, devices and configuration
        run_picker = "<leader>xr", --- set to 0 to disable
        --- Open watch picker. showing run or build, targets, devices and configuration
        watch_picker = "<leader>xs", --- set to 0 to disable
        --- A list of all the previous pickers
        all_picker = "<leader>xf", --- set to 0 to disable
        --- vertical toggle log buffer
        toggle_vsplit_log_buffer = "<leader>xl",
    },
}) -- see default configuration bellow

Actual behavior

Shows this error:

E5108: Error executing lua: .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:47: attempt to concatenate field 'name' (a nil value)
stack traceback:
        .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:47: in function 'find'
        .../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:70: in function <.../pack/packer/start/xbase/lua/xbase/pickers/telescope.lua:69>

### Operating system and version

macOS 13.3.1

### xbase version / branch / rev

8f85a17fc8b5f43d3ec9c172ed2b17efaa3c6583

### Neovim version

v0.9.0

### Vscode version (if the editor you used is vscode)

_No response_

### Installed XCode Developer Tools

```bash
Developer:

    Developer Tools:

      Version: 14.2 (14C18)
      Location: /Applications/Xcode.app
      Applications:
          Xcode: 14.2 (21534)
          Instruments: 14.1 (64556.12)
      SDKs:
          DriverKit:
              22.2:
          iOS:
              16.2: (20C52)
          iOS Simulator:
              16.2: (20C52)
          macOS:
              13.1: (22C55)
          tvOS:
              16.1: (20K67)
          tvOS Simulator:
              16.1: (20K67)
          watchOS:
              9.1: (20S71)
          watchOS Simulator:
              9.1: (20S71)

XBase Logs

INFO FSWatcher{name="dopestproductever"}: [Dropped]
 INFO Broadcaster{name="Dopestproductever"}: [Dropped]
 INFO Client{fd=13}: Connected
 INFO Runtime{name="Dopestproductever"}: [Initializing] ------------------------
 INFO Broadcaster{name="Dopestproductever"}: Created
 INFO Runtime{name="Dopestproductever"}: targets: {"dopestproducteverUITests": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }, "dopestproducteverTests": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }, "dopestproductever": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }}
 INFO Broadcaster{name="Dopestproductever"}: Connected [37269]
 INFO Runtime{name="dopestproductever"}: Connected [37269]
 INFO Runtime{name="dopestproductever"}: [Initialized] -------------------------
 INFO FSWatcher{name="dopestproductever"}: Watching

XBase Build Server Logs

INFO Broadcaster{name="Dopestproductever"}: [Dropped]
 INFO FSWatcher{name="dopestproductever"}: [Dropped]
 INFO Client{fd=13}: Connected
 INFO Runtime{name="Dopestproductever"}: [Initializing] ------------------------
 INFO Broadcaster{name="Dopestproductever"}: Created
 INFO Runtime{name="Dopestproductever"}: targets: {"dopestproducteverTests": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }, "dopestproducteverUITests": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }, "dopestproductever": TargetInfo { platform: "iOS", configurations: ["Debug", "Release"] }}
 INFO Broadcaster{name="Dopestproductever"}: Connected [37813]
 INFO Runtime{name="dopestproductever"}: Connected [37813]
 INFO Runtime{name="dopestproductever"}: [Initialized] -------------------------
 INFO FSWatcher{name="dopestproductever"}: Watching
kkharji commented 1 year ago

Thanks for reporting. It should be fixed now.