Git Product home page Git Product logo

Comments (5)

smolck avatar smolck commented on May 24, 2024

Should be fixed on master, mind giving it a test to confirm on your system?

from uivonim.

halostatue avatar halostatue commented on May 24, 2024

It works. I also looked at the code changes and what I can’t tell is whether the process.env in 0f055ce is set at packaging time or at runtime (if at packaging time then NODE_ENV=production npm run package should have the same effect, right?).

I’m not sure if you’ve given any thought to a command-line launcher, but simply running the inner uivonim binary doesn’t do what would be expected, and the code helper for viscose doesn’t seem to be useful in terms of figuring out how to make it work.

dist/mac-arm64/uivonim.app/Contents/MacOS/uivonim package.json
(node:69474) electron: The default of nativeWindowOpen is deprecated and will be changing from false to true in Electron 15.  See https://github.com/electron/electron/issues/28511 for more information.
(Use `uivonim --trace-warnings ...` to show where the warning was created)
No argument passed to --nvim, using default `nvim`
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_ui_attach","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_ui_try_resize","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_ui_try_resize","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_ui_try_resize","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"response -> neovim.api.nvim_ui_attach: null","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_subscribe","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_call_function","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"request -> neovim.api.nvim_command","level":"debug"}
[winston] Attempt to write logs with no transports {"level":"info","message":"handleNotification: "}
[winston] Attempt to write logs with no transports {"level":"info","message":"handleNotification: "}
[winston] Attempt to write logs with no transports {"message":"response -> neovim.api.nvim_command: null","level":"debug"}
[winston] Attempt to write logs with no transports {"message":"response -> neovim.api.nvim_command: null","level":"debug"}
[winston] Attempt to write logs with no transports {"level":"info","message":"handleNotification: "}
[winston] Attempt to write logs with no transports {"message":"response -> neovim.api.nvim_ui_try_resize: null","level":"debug"}
[winston] Attempt to write logs with no transports {"level":"info","message":"handleNotification: "}
[winston] Attempt to write logs with no transports {"level":"info","message":"handleNotification: "}
[winston] Attempt to write logs with no transports {"message":"response -> neovim.api.nvim_ui_try_resize: null","level":"debug"}
Error running nvimCommand instance.ts: 'Error: nvim_command: Vim(call):E117: Unknown function: UivonimCreateHighlights'

I want to make an alias that launches uivonim instead of MacVim when I type gvim; I could do it as something that calls open -a uivonim "${@}", but that feels unnecessarily platform-specific.

I’ll open a separate ticket for that if I find something that will help with this. Thanks for the quick fixes!

from uivonim.

smolck avatar smolck commented on May 24, 2024

It works. I also looked at the code changes and what I can’t tell is whether the process.env in 0f055ce is set at packaging time or at runtime (if at packaging time then NODE_ENV=production npm run package should have the same effect, right?).

My understanding is that it's set at runtime, although I could be wrong, haven't tested it.

I’m not sure if you’ve given any thought to a command-line launcher, but simply running the inner uivonim binary doesn’t do what would be expected, and the code helper for viscose doesn’t seem to be useful in terms of figuring out how to make it work.

What's unexpected? Those logs are actually all normal; I guess I could silence them for production though.

I’ll open a separate ticket for that if I find something that will help with this. Thanks for the quick fixes!

No problem, and thank you for opening the issue! Definitely feel free to let me know/open an issue if you run into anything else.

from uivonim.

halostatue avatar halostatue commented on May 24, 2024

Re: NODE_ENV, I am sort of surprised that the prod webpack build doesn’t substitute process.env.NODE_ENV for 'production' so that tests like 'production' === 'production' become true tests.

The unexpected event was that package.json wasn’t opened by uivonim.app/Contents/MacOS/uivonim package.json. Sorry that I forgot to put that detail in. The logging should be suppressed when running from the command-line in production, or hooked up to something that logs to the macOS console.

Ultimately I’m looking for something like what Oni2 provides (https://onivim.github.io/docs/using-onivim/command-line#macos) or what VSCode provides with its code binary. It’s a script that would have to be packaged in, but I’m trying to figure out the right way to get things working. I’ll open a ticket when I figure more out, but it’ll be a few days.

from uivonim.

halostatue avatar halostatue commented on May 24, 2024

Hate to raise this further, but things seem to not be great with the packaged .app.

  1. ran npm run package
  2. opened the dmg for arm64 (dist/uivonim-0.28.0-arm64.dmg)
  3. dragged uivonim.app to /Applications
  4. opened uivonim via Alfred or the finder in /Applications

I get the following JS error:

CleanShot 2021-09-30 at 18 27 37@2x

and the ui doesn’t start properly:

CleanShot 2021-09-30 at 18 26 46@2x

I suspect that this is related to the fact the nvim is installed in /opt/homebrew/bin/ (the default location for arm64 Homebrew installations) and not in /usr/local/bin (the default location for x86-64 Homebrew installations). The former is not in the system-defined $PATH, but is in my shell’s $PATH (which would explain why opening it from the command-line works).

To test this, I created a symlink from /opt/homebrew/bin/nvim to /usr/local/bin/nvim and things worked. On the other hand, I then got this pair of messages from my plugins:

CleanShot 2021-09-30 at 18 34 13@2x

I think that the right thing to do here would be to modify process.env.PATH to include /opt/homebrew/bin if the architecture is arm64, the OS is Darwin, and the path already exists. This won’t help anyone not using Homebrew (e.g., Macports users and Nix users won’t get any benefit from this), but it would fix the 90% case, and it might be possible to later figure out more generally applicable heuristics (e.g., finding local-path installed homebrew, which I ran for years).

from uivonim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.