Xcode Neovim Replacement-ish.

Overview

drawing

An XCode replacement-ish development environment that aims to be your reliable XCode alternative to develop exciting new [apple] software products 🚀 .

Table of Content

👁 Overview

XBase enables you to build, watch, and run xcode products from within your favorite editor. It supports running products on iOS, watchOS and tvOS simulators, along with real-time logging, and some lsp features such as auto-completion and code navigation. ( 🌟 Features).

Furthermore, XBase has built-in support for a variety of XCode project generators, which allow you to avoid launching XCode or manually editing '*.xcodeproj' anytime you add or remove files. We strongly advise you to use one ... at least till XBase supports adding/removing files and folders, along with other requirements. ( 💆 Generators)

  • Watch XBase repo to remain up to date on fresh improvements and exciting new features.
  • Checkout Milestones for planned future features and releases.
  • Visit CONTRIBUTING.md to have your setup to start contributing and support the project.

Please be aware that XBase is still WIP, so don't hesitate to report bugs, ask questions or suggest new exciting features.

🌝 Motivation

I chose to dive into iOS/macOS app development after purchasing an M1 MacBook. However, coming from vim/shell environment and being extremely keyboard oriented, I couldn't handle the transition to a closed sourced, opinionated, mouse-driven development environment. I've considered alternatives like XVim2 and the built-in vim emulator, however still, I'd catch myself frequently hunting for my mouse.

As a long-time vim user who has previously developed a several lua/nvim plugins, I decided to invest some effort in simplifying my development workflow for producing 'xOS' products.

🌟 Features

  • Auto-Completion and Code navigation
    Auto-generate compilation database on directory changes + a custom build server that assists sourcekit-lsp in providing code navigation and auto-completion for project symbols.
  • Multi-nvim instance support
    Multiple nvim instance support without process duplications and shared state. For instance, you can stop a watch service that was being run from a different instance.
  • Auto-start/stop main background daemon
    Daemon will start and stop automatically based on the number of connected client instances.
  • Multi Target/Project Support
    Work on multiple projects at one nvim instance at the same time. TODO
  • Simulator Support
    Run your products on simulators relative to your target's platform. (+ watch build and ran on change)
  • Runtime/Build Logging
    Real-time logging of build logs and 'print()' commands
  • Statusline Support
    Global variable to update statusline with build/run commands, see Statusline
  • Zero Footprint
    Light resource usage. I've been using XBase for a while; it typically uses 0.1 percent RAM and 0 percent CPU.
  • Multi XCodeProj Support
    Auto-generate xcodeproj, when it doesn't exists, generator config files a updated or new files/directories added or removed.

💆 Generators

XBase primarily supports two project generators: XcodeGen and Tuist.

XCodeGen is recommended if you are just starting started with xcodeproj generators since it is considerably simpler with a yml-based configuration language. Having said that, Tuist is more powerful and packed with features, of which xcodeproj generation is but one.

XBase's support for generators is available in the following forms:

  • Identification.
  • Auto-generate xcodeproj if you haven't haven't generate it by hand.
  • Auto-generate xcodeproj when you edit the generator config files.
  • Auto-compile project when xcodeproj get regenerated.
  • Code Completion and navigation (#tuist)

Limitations

XCodeGen

  • No support for custom named yml config files, only project.yml.

Other Generators

With current XBase architecture, it should be pretty easy to add support for yet another awesome xcodeproj generator. feel free to get started with CONTRIBUTING.md or open a github issue

🛠 Requirements

🦾 Installation

To install XBase on your system you need run make install. This will run cargo build --release on all the required binaries in addition to a lua library. The binaries will be moved to path/to/repo/bin and the lua library will be moved to path/to/repo/lua/libxbase.so.

With packer

use {
  'tami5/xbase',
    run = 'make install',
    requires = {
      "nvim-lua/plenary.nvim",
      "nvim-telescope/telescope.nvim"
    },
    config = function()
      require'xbase'.setup({})  -- see default configuration bellow
    end
}

With vim-plug

Plug 'nvim-lua/plenary.nvim'
Plug 'nvim-telescope/telescope.nvim'
Plug 'tami5/xbase', { 'do': 'make install' }
lua require'xbase'.setup()

With dein

call dein#add('nvim-lua/plenary.nvim')
call dein#add('nvim-telescope/telescope.nvim')
call dein#add('tami5/xbase', { 'build': 'make install' })
lua require'xbase'.setup()

🎮 Usage

TLDR:

  • Install XBase
  • run require'xbase'.setup({ --[[ see default configuration ]] })
  • Open xcodeproj codebase.
  • Wait for first time project setup finish.
  • Start coding
  • Use available actions which can be configure with shortcuts bellow

When you start a neovim instance with a root that contains project.yml, Project.swift, or *.xcodeproj, the daemon server will auto-start if no instance is running, and register the project once for recompile-watch. To communicate with your deamon, checkout the configurable shortcuts.

Statusline

XBase provide feline provider, other statusline plugins support are welcomed. However, using vim.g.xbase_watch_build_status you can easily setup statusline indicators.

require("xbase.util").feline_provider() -- append to feline setup function

⚙️ Defaults

-- NOTE: Defaults
{
  --- Log level. Set to error to ignore everything: { "trace", "debug", "info", "warn", "error" }
  log_level = "debug",
  --- Default log buffer direction: { "horizontal", "vertical", "float" }
  default_log_buffer_direction = "horizontal",
  --- Statusline provider configurations
  statusline = {
    watching = { icon = "", color = "#1abc9c" },
    running = { icon = "", color = "#e0af68" },
    device_running = { icon = "", color = "#4a6edb" },
    success = { icon = "", color = "#1abc9c" },
    failure = { icon = "", color = "#db4b4b" },
    show_progress = false,
  },
  --- TODO(nvim): Limit devices platform to select from
  simctl = {
    iOS = {
      "iPhone 13 Pro",
      "iPad (9th generation)",
    },
  },
  mappings = {
    --- Whether xbase mapping should be disabled.
    enable = true,
    --- Open build picker. showing targets and configuration.
    build_picker = "<leader>b", --- set to 0 to disable
    --- Open run picker. showing targets, devices and configuration
    run_picker = "<leader>r", --- set to 0 to disable
    --- Open watch picker. showing run or build, targets, devices and configuration
    watch_picker = "<leader>s", --- set to 0 to disable
    --- A list of all the previous pickers
    all_picker = "<leader>ef", --- set to 0 to disable
    --- horizontal toggle log buffer
    toggle_split_log_buffer = "<leader>ls",
    --- vertical toggle log buffer
    toggle_vsplit_log_buffer = "<leader>lv",
  }
}

🩺 Debugging

Read logs

# Daemon logs
tail -f /tmp/xbase-daemon.log
# Build Server logs
tail -f /tmp/xbase-server.log

🎥 Preview

Watch build service.

On error it opens a log buffer where you can inspect what went wrong, otherwise only the statusline get updated.

Comments
  • `make install` error

    `make install` error

    Hello, does it work for now? I got an error when execute make install.

    make install
        Updating git repository `https://github.com/tami5/simctl`
        Updating crates.io index
      Downloaded ppv-lite86 v0.2.16
      Downloaded itertools v0.10.3
      Downloaded regex v1.5.6
      Downloaded strum v0.24.0
      Downloaded nom-supreme v0.6.0
      Downloaded shell-words v1.1.0
      Downloaded strum_macros v0.24.0
      Downloaded tracing v0.1.34
      Downloaded anyhow v1.0.57
      Downloaded async-stream v0.3.3
      Downloaded rand_core v0.5.1
      Downloaded rustversion v1.0.6
      Downloaded ryu v1.0.10
      Downloaded matches v0.1.9
      Downloaded num_cpus v1.13.1
      Downloaded aho-corasick v0.7.18
      Downloaded thiserror-impl v1.0.31
      Downloaded async-stream-impl v0.3.3
      Downloaded dirs v4.0.0
      Downloaded brownstone v1.1.0
      Downloaded async-trait v0.1.53
      Downloaded const_format_proc_macros v0.2.22
      Downloaded getrandom v0.1.16
      Downloaded bsp-types v0.1.3
      Downloaded matchers v0.1.0
      Downloaded joinery v2.1.0
      Downloaded rand v0.7.3
      Downloaded parity-tokio-ipc v0.9.0
      Downloaded xcodebuild v0.1.6
      Downloaded tokio-macros v1.7.0
      Downloaded same-file v1.0.6
      Downloaded arrayvec v0.7.2
      Downloaded futures-task v0.3.21
      Downloaded ansi_term v0.12.1
      Downloaded serde_yaml v0.8.24
      Downloaded tinyvec v1.6.0
      Downloaded sharded-slab v0.1.4
      Downloaded bitflags v1.3.2
      Downloaded cfg-if v1.0.0
      Downloaded futures-sink v0.3.21
      Downloaded futures-core v0.3.21
      Downloaded time v0.3.9
      Downloaded futures v0.3.21
      Downloaded log v0.4.17
      Downloaded crossbeam-utils v0.8.8
      Downloaded url v2.2.2
      Downloaded crossbeam-channel v0.5.4
      Downloaded wax v0.4.0
      Downloaded lsp-types v0.93.0
      Downloaded indent_write v2.2.0
      Downloaded tracing-core v0.1.26
      Downloaded form_urlencoded v1.0.1
      Downloaded autocfg v1.1.0
      Downloaded tap v1.0.1
      Downloaded percent-encoding v2.1.0
      Downloaded lazy_static v1.4.0
      Downloaded dirs-sys v0.3.7
      Downloaded either v1.6.1
      Downloaded heck v0.4.0
      Downloaded futures-macro v0.3.21
      Downloaded num_threads v0.1.6
      Downloaded futures-executor v0.3.21
      Downloaded linked-hash-map v0.5.4
      Downloaded nom v7.1.1
      Downloaded mio v0.8.3
      Downloaded bytes v1.1.0
      Downloaded unicode-ident v1.0.0
      Downloaded futures-channel v0.3.21
      Downloaded indexmap v1.8.1
      Downloaded futures-util v0.3.21
      Downloaded serde v1.0.137
      Downloaded regex-automata v0.1.10
      Downloaded const_format v0.2.23
      Downloaded minimal-lexical v0.2.1
      Downloaded itoa v1.0.2
      Downloaded once_cell v1.12.0
      Downloaded pin-utils v0.1.0
      Downloaded pin-project-lite v0.2.9
      Downloaded proc-macro2 v1.0.39
      Downloaded quote v1.0.18
      Downloaded slab v0.4.6
      Downloaded memchr v2.5.0
      Downloaded rand_chacha v0.2.2
      Downloaded futures-io v0.3.21
      Downloaded serde_repr v0.1.8
      Downloaded serde_json v1.0.81
      Downloaded signal-hook-registry v1.4.0
      Downloaded serde_derive v1.0.137
      Downloaded pori v0.0.0
      Downloaded syn v1.0.95
      Downloaded socket2 v0.4.4
      Downloaded tokio-stream v0.1.8
      Downloaded tinyvec_macros v0.1.0
      Downloaded thread_local v1.1.4
      Downloaded derive-deref-rs v0.1.1
      Downloaded thiserror v1.0.31
      Downloaded smallvec v1.8.0
      Downloaded unicode-bidi v0.3.8
      Downloaded bsp-server v0.1.3
      Downloaded process-stream v0.2.2
      Downloaded hashbrown v0.11.2
      Downloaded regex-syntax v0.6.26
      Downloaded idna v0.2.3
      Downloaded bstr v0.2.17
      Downloaded tracing-subscriber v0.3.11
      Downloaded yaml-rust v0.4.5
      Downloaded tracing-log v0.1.3
      Downloaded unicode-normalization v0.1.19
      Downloaded tracing-attributes v0.1.21
      Downloaded walkdir v2.3.2
      Downloaded tracing-appender v0.2.2
      Downloaded unicode-xid v0.2.3
      Downloaded tokio v1.18.2
      Downloaded libc v0.2.126
      Downloaded 114 crates (6.4 MB) in 12.02s
       Compiling proc-macro2 v1.0.39
       Compiling unicode-ident v1.0.0
       Compiling syn v1.0.95
       Compiling libc v0.2.126
       Compiling memchr v2.5.0
       Compiling cfg-if v1.0.0
       Compiling lazy_static v1.4.0
       Compiling pin-project-lite v0.2.9
       Compiling futures-core v0.3.21
       Compiling log v0.4.17
       Compiling serde_derive v1.0.137
       Compiling once_cell v1.12.0
       Compiling futures-task v0.3.21
       Compiling serde v1.0.137
       Compiling regex-syntax v0.6.26
       Compiling futures-channel v0.3.21
       Compiling itoa v1.0.2
       Compiling futures-util v0.3.21
       Compiling tinyvec_macros v0.1.0
       Compiling getrandom v0.1.16
       Compiling futures-sink v0.3.21
       Compiling futures-io v0.3.21
       Compiling matches v0.1.9
       Compiling crossbeam-utils v0.8.8
       Compiling pin-utils v0.1.0
       Compiling slab v0.4.6
       Compiling unicode-bidi v0.3.8
       Compiling bytes v1.1.0
       Compiling serde_json v1.0.81
       Compiling anyhow v1.0.57
       Compiling ryu v1.0.10
       Compiling percent-encoding v2.1.0
       Compiling minimal-lexical v0.2.1
       Compiling ppv-lite86 v0.2.16
       Compiling autocfg v1.1.0
       Compiling rustversion v1.0.6
       Compiling smallvec v1.8.0
       Compiling async-trait v0.1.53
       Compiling arrayvec v0.7.2
       Compiling unicode-xid v0.2.3
       Compiling bitflags v1.3.2
       Compiling ansi_term v0.12.1
       Compiling joinery v2.1.0
       Compiling linked-hash-map v0.5.4
       Compiling heck v0.4.0
       Compiling same-file v1.0.6
       Compiling either v1.6.1
       Compiling indent_write v2.2.0
       Compiling hashbrown v0.11.2
       Compiling tap v1.0.1
       Compiling shell-words v1.1.0
       Compiling tracing-core v0.1.26
       Compiling sharded-slab v0.1.4
       Compiling thread_local v1.1.4
       Compiling tinyvec v1.6.0
       Compiling form_urlencoded v1.0.1
       Compiling indexmap v1.8.1
       Compiling brownstone v1.1.0
       Compiling walkdir v2.3.2
       Compiling yaml-rust v0.4.5
       Compiling itertools v0.10.3
       Compiling regex-automata v0.1.10
       Compiling tracing-log v0.1.3
       Compiling unicode-normalization v0.1.19
       Compiling aho-corasick v0.7.18
       Compiling nom v7.1.1
       Compiling matchers v0.1.0
       Compiling bstr v0.2.17
       Compiling quote v1.0.18
       Compiling mio v0.8.3
       Compiling num_cpus v1.13.1
       Compiling signal-hook-registry v1.4.0
       Compiling socket2 v0.4.4
       Compiling num_threads v0.1.6
       Compiling dirs-sys v0.3.7
       Compiling crossbeam-channel v0.5.4
       Compiling idna v0.2.3
       Compiling regex v1.5.6
       Compiling const_format_proc_macros v0.2.22
       Compiling rand_core v0.5.1
       Compiling pori v0.0.0
       Compiling nom-supreme v0.6.0
       Compiling time v0.3.9
       Compiling dirs v4.0.0
       Compiling rand_chacha v0.2.2
       Compiling rand v0.7.3
       Compiling const_format v0.2.23
       Compiling futures-macro v0.3.21
       Compiling tracing-attributes v0.1.21
       Compiling tokio-macros v1.7.0
       Compiling thiserror-impl v1.0.31
       Compiling serde_repr v0.1.8
       Compiling async-stream-impl v0.3.3
       Compiling strum_macros v0.24.0
       Compiling derive-deref-rs v0.1.1
       Compiling async-stream v0.3.3
       Compiling tokio v1.18.2
       Compiling thiserror v1.0.31
       Compiling wax v0.4.0
       Compiling tracing v0.1.34
       Compiling strum v0.24.0
       Compiling tracing-subscriber v0.3.11
       Compiling tracing-appender v0.2.2
       Compiling futures-executor v0.3.21
       Compiling tokio-stream v0.1.8
       Compiling futures v0.3.21
       Compiling process-stream v0.2.2
       Compiling parity-tokio-ipc v0.9.0
       Compiling xcodebuild v0.1.6
    error[E0554]: `#![feature]` may not be used on the stable release channel
     --> /Users/xpeng/.cargo/registry/src/github.com-1ecc6299db9ec823/xcodebuild-0.1.6/src/lib.rs:2:12
      |
    2 | #![feature(str_split_whitespace_as_str)]
      |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    
       Compiling url v2.2.2
    For more information about this error, try `rustc --explain E0554`.
    error: could not compile `xcodebuild` due to previous error
    warning: build failed, waiting for other jobs to finish...
    make: *** [install] Error 101
    
    opened by TMTBO 22
  • ref(nvim): move all logic into editor crate

    ref(nvim): move all logic into editor crate

    This PR aims to refactor editor crate and move all logic editor crate, (including lua/ folder). This refactor may require adding additional RPC methods like get targets, scheme etc.

    TODOs

    • [x] Move logging and logger functionality to editor crate.
    • [x] Setup a broadcast server where client can listen and handle
    • [x] Remove nvim-rs crate from daemon crate.
    • [x] Try using raw_fd for passing messages
    • [x] Implement NvimGlobal::log function
    • [x] Fix attached client to same broadcast server don't recieve messsages
    • [x] Fix connected notification not delivered to new client sharing same project
    • [x] Specialize some message to be delivered to a single instance instead of all instance.
    • [x] Reimplement logger buffer logic
    opened by kkharji 6
  • Readme: mention how to setup xbase plugin

    Readme: mention how to setup xbase plugin

    Sorry if I'm abusing the issue tracker here, but either something is broken or I don't know what I'm doing.

    I added the plugin via vim-plug like this, and it appears to install just fine (make install succeeds at least):

    call plug#begin('~/.vim/plugged')
    Plug 'nvim-lua/plenary.nvim'
    Plug 'nvim-telescope/telescope.nvim'
    Plug 'tami5/xbase', { 'do': 'make install' }
    call plug#end()
    

    The project is built with xcodegen and has a project.yml file at it's root. But when I edit a file in the project directory, nothing happens. There's also no xbase log or socket opened in /tmp.

    Am I missing a config setting somewhere? I realize I installed this with vim-plug rather than packer, but I would have expected it to work the same.

    opened by michaelnew 4
  • Can't get it to launch

    Can't get it to launch

    Hey! Thanks for working on this, I couldn't believe when I saw it.

    I've done everything as in the README, but still nothing happens and the log files aren't even generated.

    I'm running on latest everything (nightly neovim), and sourcekit lsp works normally.

    Is there anything I could do to troubleshoot?

    Also, how am I suppose to use the feline provider? I tried to add it as a provider to a component but it didn't work.

    opened by andrestone 3
  • feat(vscode): initial support

    feat(vscode): initial support

    • [x] Fix(vscode): skipping some messages
    • [x] Fix(vscode): window.show*Message doesn't always work
    • [x] Feat(vscode): implement set statusline
    • [x] Feat(vscode): implement openLogger
    • [x] Feat(vscode): append errors from build log to problems
    • [x] Feat(vscode): support multiple workspace
    • [x] Fix: watch key is outsink
    • [x] Feat(vscode): highlight output log
    • [x] Fix(vscode): logger toggle does not hide
    • [x] Feat(vscode): setup sourcekit server
    • [x] Feat(vscode): implement reloadLspServer
    opened by kkharji 3
  • chore(deps): bump wax from 0.4.0 to 0.5.0

    chore(deps): bump wax from 0.4.0 to 0.5.0

    Bumps wax from 0.4.0 to 0.5.0.

    Commits
    • 8dba278 Bump version to 0.5.0.
    • 5bc4f27 Consolidate glob expression build errors.
    • 0487b44 Gate Variance behind the diagnostics-inspect feature.
    • 2ac3120 Update documentation.
    • 1522366 Deny some pedantic clippy lints.
    • 64a8f00 Associate depth with the computed root directory.
    • 1c72837 Merge pull request #21 from olson-sean-k/dependabot/cargo/nom-supreme-tw-0.8.0
    • c4bfe20 Update nom-supreme requirement from ^0.7.0 to ^0.8.0
    • b1af159 Rename Walk::for_each to Walk::for_each_ref.
    • 54586ac Use more precise conditional compilation attributes.
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 2
  • support barebone xcodeproj

    support barebone xcodeproj

    Although intentionally I wanted to stay away from supporting a non-generative Xcode project due to how it require reopening Xcode every time the project working directory structure changes, but this is something important, it would be nice to just clone a xcodeproj and be able to navigate it.

    Maybe there is a tool that would enable wave the requirement of reopening Xcode project when the directory change. We'll see.

    • [ ] Parse .xcodeproj and extract targets, schemas,
    • [x] #45
    • [ ] Make Project and enum with XBare variant indicating an non-generative xcodeproj.
    feature daemon 
    opened by kkharji 2
  • [logger] append title

    [logger] append title

    https://github.com/tami5/xbase.nvim/blob/724589988bb422e4bdcc6aa68869b2053fe5eea6/src/nvim/logger.rs#L44

    
            })
        }
    
        // TODO(logger): append title
        pub async fn log(&mut self, msg: String) -> Result<()> {
            tracing::debug!("{msg}");
    
    
    
    todo 
    opened by github-actions[bot] 2
  • support  custom index store

    support custom index store

    / Matching r"^CompileSwiftSources\s*"

    / Matching "^CompileSwift\s+ \w+\s+ \w+\s+ (.+)$"

    https://github.com/tami5/XcodeBase.nvim/blob/a87a4ff04529327cc5d8f8093e91118478b6c44b/shared/src/xcode/compilation.rs#L13

    
    // CREDIT: @SolaWing https://github.com/SolaWing/xcode-build-server/blob/master/xcode-build-server
    // CREDIT: Richard Howell https://github.com/doc22940/sourcekit-lsp/blob/master/Tests/INPUTS/BuildServerBuildSystemTests.testBuildTargetOutputs/server.py
    
    mod command;
    use anyhow::Result;
    use command::CompilationCommand;
    use lazy_static::lazy_static;
    use regex::Regex;
    use std::collections::HashMap;
    
    // TODO: Support compiling commands for objective-c files
    // TODO: Test multiple module command compile
    // TODO: support index store
    
    pub struct Compiliation {
        pub commands: Vec<CompilationCommand>,
        lines: Vec<String>,
        clnum: usize,
        index_store_path: Vec<String>,
    }
    
    impl Compiliation {
        pub fn new(build_log: Vec<String>) -> Self {
            let mut parser = Self {
                lines: build_log,
                clnum: 0,
                commands: Vec::default(),
                index_store_path: Vec::default(),
            };
    
            for line in parser.lines.iter() {
                parser.clnum += 1;
    
                if line.starts_with("===") {
                    continue;
                }
    
                if RE["swift_module"].is_match(line) {
                    if let Some(command) = parser.swift_module_command() {
                        if let Some(isp) = &command.index_store_path {
                            parser.index_store_path.push(isp.clone())
                        }
                        parser.commands.push(command);
                        continue;
                    };
                }
            }
            parser
        }
    
        /// Serialize to JSON string
        pub fn to_json(&self) -> Result<String, serde_json::Error> {
            serde_json::to_string_pretty(&self.commands)
        }
    }
    
    lazy_static! {
        static ref RE: HashMap<&'static str, Regex> = HashMap::from([
            (
                "swift_module",
                Regex::new(r"^CompileSwiftSources\s*").unwrap()
            ),
            (
                "swift",
                Regex::new(r"^CompileSwift\s+ \w+\s+ \w+\s+ (.+)$").unwrap()
            )
        ]);
    }
    
    impl Compiliation {
        /// Parse starting from current line as swift module
        /// Matching r"^CompileSwiftSources\s*"
        fn swift_module_command(&self) -> Option<CompilationCommand> {
            let directory = match self.lines.get(self.clnum) {
                Some(s) => s.trim().replace("cd ", ""),
                None => {
                    tracing::error!("Found COMPILE_SWIFT_MODULE_PATERN but no more lines");
                    return None;
                }
            };
    
            let command = match self.lines.get(self.clnum + 3) {
                Some(s) => s.trim().to_string(),
                None => {
                    tracing::error!("Found COMPILE_SWIFT_MODULE_PATERN but couldn't extract command");
                    return None;
                }
            };
    
            match CompilationCommand::new(directory, command) {
                Ok(command) => {
                    tracing::debug!("Extracted {} Module Command", command.name);
                    Some(command)
                }
                Err(e) => {
                    tracing::error!("Fail to create swift module command {e}");
                    None
                }
            }
        }
    
        /// Parse starting from current line as swift module
        /// Matching "^CompileSwift\s+ \w+\s+ \w+\s+ (.+)$"
        #[allow(dead_code)]
        fn swift_command(&self, _line: &str) {}
    }
    
    #[test]
    fn test() {
        tokio::runtime::Runtime::new().unwrap().block_on(async {
            let build_log_test = tokio::fs::read_to_string("/Users/tami5/repos/swift/wordle/build.log")
                .await
                .unwrap()
                .split("\n")
                .map(|l| l.to_string())
                .collect();
            let compiliation = Compiliation::new(build_log_test);
    
            println!("{}", compiliation.to_json().unwrap())
        });
    }
    
    
    todo sourcekit-lsp 
    opened by github-actions[bot] 2
  • Remove wathcers for workspaces that are no longer exist

    Remove wathcers for workspaces that are no longer exist

    /

    / Sometiems we get event for the same path, particularly

    / ModifyKind::Name::Any is ommited twice for the new path

    / and once for the old path.

    /

    / This will compare last_seen with path, updates last_seen if not match,

    / else returns true.

    https://github.com/tami5/XcodeBase.nvim/blob/a87a4ff04529327cc5d8f8093e91118478b6c44b/shared/src/watch.rs#L20

    
    use crate::state::SharedState;
    use crate::Command;
    use notify::{Error, Event, RecommendedWatcher, RecursiveMode, Watcher};
    use std::path::Path;
    use std::result::Result;
    use std::sync::Arc;
    use std::time::Duration;
    use tokio::sync::{mpsc, Mutex};
    use tracing::{debug, trace};
    use wax::{Glob, Pattern};
    
    // TODO: Stop handle
    
    pub async fn update(state: SharedState, _msg: Command) {
        let copy = state.clone();
        let mut current_state = copy.lock().await;
        let mut watched_roots: Vec<String> = vec![];
        let mut start_watching: Vec<String> = vec![];
    
        // TODO: Remove wathcers for workspaces that are no longer exist
    
        for key in current_state.watchers.keys() {
            watched_roots.push(key.clone());
        }
    
        for key in current_state.workspaces.keys() {
            if !watched_roots.contains(key) {
                start_watching.push(key.clone());
            }
        }
    
        for root in start_watching {
            let handle = new(state.clone(), root.clone());
            current_state.watchers.insert(root, handle);
        }
    }
    
    /// HACK: ignore seen paths.
    ///
    /// Sometiems we get event for the same path, particularly
    /// `ModifyKind::Name::Any` is ommited twice for the new path
    /// and once for the old path.
    ///
    /// This will compare last_seen with path, updates `last_seen` if not match,
    /// else returns true.
    async fn should_ignore(last_seen: Arc<Mutex<String>>, path: &str) -> bool {
        // HACK: Always return false for project.yml
        let path = path.to_string();
        if path.contains("project.yml") {
            return false;
        }
        let mut last_seen = last_seen.lock().await;
        if last_seen.to_string() == path {
            return true;
        } else {
            *last_seen = path;
            return false;
        }
    }
    
    // TODO: Cleanup get_ignore_patterns and decrease duplications
    async fn get_ignore_patterns(state: SharedState, root: &String) -> Vec<String> {
        let mut patterns: Vec<String> = vec![
            "**/.git/**",
            "**/*.xcodeproj/**",
            "**/.*",
            "**/build/**",
            "**/buildServer.json",
        ]
        .iter()
        .map(|e| e.to_string())
        .collect();
    
        // FIXME: Addding extra ignore patterns to `ignore` local config requires restarting deamon.
        let extra_patterns = state
            .lock()
            .await
            .workspaces
            .get(root)
            .unwrap()
            .get_ignore_patterns();
    
        if let Some(extra_patterns) = extra_patterns {
            patterns.extend(extra_patterns);
        }
    
        patterns
    }
    
    fn new(state: SharedState, root: String) -> tokio::task::JoinHandle<anyhow::Result<()>> {
        // NOTE: should watch for registerd directories?
        // TODO: Support provideing additional ignore wildcard
        //
        // Some files can be generated as direct result of running build command.
        // In my case this `Info.plist`.
        //
        // For example,  define key inside project.yml under xcodebase key, ignoreGlob of type array.
    
        tokio::spawn(async move {
            let (tx, mut rx) = mpsc::channel(100);
    
            let mut watcher = RecommendedWatcher::new(move |res: Result<Event, Error>| {
                if res.is_ok() {
                    tx.blocking_send(res.unwrap()).unwrap()
                };
            })?;
    
            watcher.watch(Path::new(&root), RecursiveMode::Recursive)?;
            watcher.configure(notify::Config::NoticeEvents(true))?;
    
            // HACK: ignore seen paths.
            let last_seen = Arc::new(Mutex::new(String::default()));
    
            // HACK: convert back to Vec<&str> for Glob to work.
            let patterns = get_ignore_patterns(state.clone(), &root).await;
            let patterns = patterns.iter().map(AsRef::as_ref).collect::<Vec<&str>>();
            let ignore = wax::any::<Glob, _>(patterns).unwrap();
    
            while let Some(event) = rx.recv().await {
                let state = state.clone();
                let path = match event.paths.get(0) {
                    Some(p) => p.clone(),
                    None => continue,
                };
    
                let path_string = match path.to_str() {
                    Some(s) => s.to_string(),
                    None => continue,
                };
    
                if ignore.is_match(&*path_string) {
                    continue;
                }
    
                // debug!("[FSEVENT] {:?}", &event);
                // NOTE: maybe better handle in tokio::spawn?
                match &event.kind {
                    notify::EventKind::Create(_) => {
                        tokio::time::sleep(Duration::new(1, 0)).await;
                        debug!("[FileCreated]: {:?}", path);
                    }
                    notify::EventKind::Remove(_) => {
                        tokio::time::sleep(Duration::new(1, 0)).await;
                        debug!("[FileRemoved]: {:?}", path);
                    }
                    notify::EventKind::Modify(m) => {
                        match m {
                            notify::event::ModifyKind::Data(e) => match e {
                                notify::event::DataChange::Content => {
                                    if !path_string.contains("project.yml") {
                                        continue;
                                    }
                                    tokio::time::sleep(Duration::new(1, 0)).await;
                                    debug!("[XcodeGenConfigUpdate]");
                                    // HACK: Not sure why, but this is needed because xcodegen break.
                                }
                                _ => continue,
                            },
                            notify::event::ModifyKind::Name(_) => {
                                // HACK: only account for new path and skip duplications
                                if !Path::new(&path).exists()
                                    || should_ignore(last_seen.clone(), &path_string).await
                                {
                                    continue;
                                }
                                tokio::time::sleep(Duration::new(1, 0)).await;
                                debug!("[FileRenamed]: {:?}", path);
                            }
                            _ => continue,
                        }
                    }
                    _ => continue,
                }
    
                trace!("[NewEvent] {:#?}", &event);
    
                // let mut state = state.lock().await;
    
                match state.lock().await.workspaces.get_mut(&root) {
                    Some(w) => {
                        w.on_dirctory_change(path, event.kind).await?;
                    }
                    // NOTE: should stop watch here
                    None => continue,
                };
            }
            Ok(())
        })
    }
    
    
    todo 
    opened by github-actions[bot] 2
  • chore(deps): bump serde from 1.0.148 to 1.0.151

    chore(deps): bump serde from 1.0.148 to 1.0.151

    Bumps serde from 1.0.148 to 1.0.151.

    Release notes

    Sourced from serde's releases.

    v1.0.151

    • Update serde::{ser,de}::StdError to re-export core::error::Error when serde is built with feature="std" off and feature="unstable" on (#2344)

    v1.0.150

    • Relax some trait bounds from the Serialize impl of HashMap and BTreeMap (#2334)
    • Enable Serialize and Deserialize impls of std::sync::atomic types on more platforms (#2337, thanks @​badboy)

    v1.0.149

    • Relax some trait bounds from the Serialize impl of BinaryHeap, BTreeSet, and HashSet (#2333, thanks @​jonasbb)
    Commits
    • 44bf363 Release 1.0.151
    • f261184 Merge pull request #2344 from dtolnay/coreerror
    • df40f80 Make StdError identical to core::error::Error on feature="unstable"
    • e7060ba Merge pull request #2342 from atouchet/badges
    • d98f0ee Update build status badge
    • 4f157a8 Prevent build.rs rerunning unnecessarily on all source changes
    • d493649 Release 1.0.150
    • 0e947e6 Merge pull request #2338 from serde-rs/atomic
    • 9249dab Deduplicate atomic_impl macro calls
    • 7440e56 Deduplicate atomic_impl macro implementations
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • chore(deps): bump once_cell from 1.13.0 to 1.17.0

    chore(deps): bump once_cell from 1.13.0 to 1.17.0

    Bumps once_cell from 1.13.0 to 1.17.0.

    Changelog

    Sourced from once_cell's changelog.

    1.17.0

    • Add race::OnceRef for storing a &'a T.

    1.16.0

    • Add no_std implementation based on critical-section, #195.
    • Deprecate atomic-polyfill feature (use the new critical-section instead)

    1.15.0

    • Increase minimal supported Rust version to 1.56.0.
    • Implement UnwindSafe even if the std feature is disabled.

    1.14.0

    • Add extension to unsync and sync Lazy mut API:
      • force_mut
      • get_mut

    1.13.1

    • Make implementation compliant with strict provenance.
    • Upgrade atomic-polyfill to 1.0
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump serde from 1.0.148 to 1.0.152

    chore(deps): bump serde from 1.0.148 to 1.0.152

    Bumps serde from 1.0.148 to 1.0.152.

    Release notes

    Sourced from serde's releases.

    v1.0.152

    • Documentation improvements

    v1.0.151

    • Update serde::{ser,de}::StdError to re-export core::error::Error when serde is built with feature="std" off and feature="unstable" on (#2344)

    v1.0.150

    • Relax some trait bounds from the Serialize impl of HashMap and BTreeMap (#2334)
    • Enable Serialize and Deserialize impls of std::sync::atomic types on more platforms (#2337, thanks @​badboy)

    v1.0.149

    • Relax some trait bounds from the Serialize impl of BinaryHeap, BTreeSet, and HashSet (#2333, thanks @​jonasbb)
    Commits
    • ccf9c6f Release 1.0.152
    • b25d0ea Link to Hjson data format
    • 4f4557f Link to bencode data format
    • bf400d6 Link to serde_tokenstream data format
    • 4d2e36d Wrap flexbuffers bullet point to 80 columns
    • df6310e Merge pull request #2347 from dtolnay/docsrs
    • 938ab5d Replace docs.serde.rs links with intra-rustdoc links
    • ef5a0de Point documentation links to docs.rs instead of docs.serde.rs
    • 5d186c7 Opt out -Zrustdoc-scrape-examples on docs.rs
    • 44bf363 Release 1.0.151
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump libc from 0.2.126 to 0.2.139

    chore(deps): bump libc from 0.2.126 to 0.2.139

    Bumps libc from 0.2.126 to 0.2.139.

    Release notes

    Sourced from libc's releases.

    0.2.139

    What's Changed

    New Contributors

    Full Changelog: https://github.com/rust-lang/libc/compare/0.2.138...0.2.139

    0.2.138

    What's Changed

    ... (truncated)

    Commits
    • f4bc851 Auto merge of #3042 - flba-eb:release_0.2.139, r=JohnTitor
    • dc3d43c Prepare 0.2.139 release
    • c59ca73 Auto merge of #3041 - devnexen:linux_kernel_version, r=JohnTitor
    • 88d6a1f adding KERNEL_VERSION macro for linux.
    • 45b431a Auto merge of #2758 - fkm3:master, r=JohnTitor
    • 572e11b Add misc constants and functions for android
    • 318dccc Auto merge of #3038 - gh-tr:rebased/20221216, r=JohnTitor
    • 07636f6 Auto merge of #3036 - LegionMammal978:iso-c-funcs, r=JohnTitor
    • 720151f Add support for QNX/Neutrino 7.1
    • 6a58758 Add ISO C functions atof, atol, atoll, strtoll, strtoull
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump notify from 5.0.0-pre.15 to 5.0.0

    chore(deps): bump notify from 5.0.0-pre.15 to 5.0.0

    Bumps notify from 5.0.0-pre.15 to 5.0.0.

    Release notes

    Sourced from notify's releases.

    notify 5.0.0

    5.0.0 (2022-08-28)

    For a list of changes when upgrading from v4 see UPGRADING_V4_TO_V5.md.

    Differences to 5.0.0-pre.16:

    • FIX: update minimum walkdir version to 2.2.2 #432
    • CHANGE: add need_rescan function to Event, allowing easier detection when a rescan is required #435
    • FIX: debouncer-mini: change crossbeam feature to crossbeam, to allow passthrough with notify re-exports #429
    • DOCS: improve v5-to-v5 upgrade docs #431
    • DOCS: file back v4 changelog into main #437
    • DOCS: cleanups and link fixes

    #431: notify-rs/notify#431 #432: notify-rs/notify#432 #437: notify-rs/notify#437 #435: notify-rs/notify#435 #429: notify-rs/notify#429

    Changelog

    Sourced from notify's changelog.

    notify 5.0.0 (2022-08-28)

    For a list of changes when upgrading from v4 see https://github.com/notify-rs/notify/blob/main/UPGRADING_V4_TO_V5.md.

    Differences to 5.0.0-pre.16:

    • FIX: update minimum walkdir version to 2.2.2 #432
    • CHANGE: add need_rescan function to Event, allowing easier detection when a rescan is required #435
    • FIX: debouncer-mini: change crossbeam feature to crossbeam, to allow passthrough with notify re-exports #429
    • DOCS: improve v5-to-v5 upgrade docs #431
    • DOCS: file back v4 changelog into main #437
    • DOCS: cleanups and link fixes

    #431: notify-rs/notify#431 #432: notify-rs/notify#432 #437: notify-rs/notify#437 #435: notify-rs/notify#435 #429: notify-rs/notify#429

    5.0.0-pre.16 (2022-08-12)

    • CHANGE: require config for watcher creation and unify config #426
    • CHANGE: fsevent: use RenameMode::Any for renaming events #371
    • FEATURE: re-add debouncer as new crate and fixup CI #286
    • FEATURE: allow disabling crossbeam-channel dependency #425
    • FIX: PollWatcher panic after delete-and-recreate #406
    • MISC: rework pollwatcher internally #409
    • DOCS: cleanup all docs towards v5 #395

    #395: notify-rs/notify#395 #406: notify-rs/notify#406 #409: notify-rs/notify#409 #425: notify-rs/notify#425 #286: notify-rs/notify#286 #426: notify-rs/notify#426 #371: notify-rs/notify#371

    Commits
    • d985ae1 prepare 5.0.0
    • a83279f improve upgrade docs and fix Config link
    • 65da37b file back v4 history into changelog
    • 1fbf8fa add accessor for whether rescan is required on Event
    • 17580f6 fixup rebase gunk
    • 54465e9 fixup optional crossbeam feature selection in debouncer-mini
    • 94f1680 update minimum walkdir version to 2.2.2 (#432)
    • 4d16a54 fixup doc links post initial debouncer-mini release
    • d698f90 fixup moved readme due to reorg
    • 2f91e15 fix typo in readme
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump tracing from 0.1.35 to 0.1.36

    chore(deps): bump tracing from 0.1.35 to 0.1.36

    Bumps tracing from 0.1.35 to 0.1.36.

    Release notes

    Sourced from tracing's releases.

    tracing 0.1.36

    This release adds support for owned values and fat pointers as arguments to the Span::record method, as well as updating the minimum tracing-core version and several documentation improvements.

    Fixed

    • Incorrect docs in dispatcher::set_default (#2220)
    • Compilation with -Z minimal-versions (#2246)

    Added

    • Support for owned values and fat pointers in Span::record (#2212)
    • Documentation improvements (#2208, #2163)

    Changed

    • tracing-core: updated to 0.1.29

    Thanks to @​fredr, @​cgbur, @​jyn514, @​matklad, and @​CAD97 for contributing to this release!

    #2220: tokio-rs/tracing#2220 #2246: tokio-rs/tracing#2246 #2212: tokio-rs/tracing#2212 #2208: tokio-rs/tracing#2208 #2163: tokio-rs/tracing#2163

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • chore(deps): bump paste from 1.0.7 to 1.0.10

    chore(deps): bump paste from 1.0.7 to 1.0.10

    Bumps paste from 1.0.7 to 1.0.10.

    Release notes

    Sourced from paste's releases.

    1.0.10

    • Support Literal as result of paste, as in [<1_u $bit>] producing 1_u32 etc. (#92)

    1.0.9

    • Preserve invisible delimiters in the input tokenstream if it contains no pastes (#86)

    1.0.8

    • Add categories to crates.io metadata
    Commits
    • 188cecc Release 1.0.10
    • 80d037b Merge pull request #92 from dtolnay/literal
    • b3b77f2 Gate literal fromstr support on new enough compiler
    • 0ffe860 Simplify literal suffix test
    • 8c15baf Support Literal as result of paste
    • 5814fa7 Add regression test for issue 91
    • 81cdb4f Time out workflows after 45 minutes
    • fe65644 MIT copyright line
    • 75dd0c7 Raise minimum tested toolchain to rust 1.56
    • c5b5772 Remove default package.readme metadata from Cargo.toml
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
Releases(v0.3.0)
  • v0.3.0(Jul 9, 2022)

    🎉 v0.3.0 - 2022-07-09

    Features

    Use vim.notify #editor
    Support xcworkspace (#101) #general ....
    • When xcworkspace exists, use it instead of xcodeproj when compiling and recompiling projects.
    • When xcworkspace exists, build target are passed with -scheme flag, so targets and scheme need to have the same name.
    • speed up tuist setup through compiling the Manifest scheme instead of each target
Support multiple projects within a single instance #general

Bug Fixes

Remove old logging interface #nvim ....

This errors when the users add no longer supported or invalid configuration key

Sometimes log level is not set #nvim

Refactor

Move out nvim specific logic (#103) #daemon ....
  • init

  • chore(deps): update xclog and process-stream + refactor

  • ref: setup shared logger

  • ref: remove nvim-rs

  • feat: broadcast server

  • fix(editor): receiving multiple messages at the same time

This just a hack because I couldn't pinpoint why is the client is receiving a bulk of message separated by newline

  • ref(editor): rename BroadcastMessage to Broadcast

  • feat(nvim): setup logger

  • fix: run/build commands

  • ref: logs

  • ref: remove log macros

  • ref: remove log_request

  • ref: remove client type, use root only

  • fix: status line updates

  • ref: rename editor to client

  • fix: watch status

  • feat(nvim): support custom notify

  • feat: respect user log level

  • enh(logger): format

  • fix(tuist): generate compile commands

  • ref: rename neovim to nvim

  • chore: cleanup

  • ref: move make try_register part of register

  • ref(client): register return bool

  • ref: move logging functionality to lua

  • ref: clean up

  • fix: open logger on error

  • feat: append generation logs on error only

  • ref(nvim): move logger buffer mappings to setup

  • fix(nvim): change log buffer change position if already opened

  • feat(nvim): add custom configurations for log_buffer

  • chore: add icon to error messages

  • feat(messages): success level

  • feat: update lsp server on compile files reloaded

Use weak references + rework internal state #daemon
Use vim.log.levels to set xbase.log_level #nvim
Switch to tarpc framework #general
Rename lualib to editor-lib #general
Relay on json transport only (#115) #general ....
  • ref: switch to JSON-based socket

  • feat(api): get all runners

  • feat(api): get watchlist and targets with one api call

  • chore(api): operation instead of ops

  • feat(nvim): setup nvim as daemon socket client

  • chore: re-setup tracing for sourcekit-helper

  • fix(nvim): drop command sending roots as nil

  • ref(nvim): just use server.request

  • style(rustfmt)

  • chore(nvim): use table for commands

  • fix(nvim): dropping roots

  • ref: relocate bin files

  • feat(daemon): graceful shutdown

  • fix(nvim): Auto-start daemon

  • fix(nvim): missing out some messages

  • fix(nvim): update statusline

  • ref: general refactor

  • doc: update

Enhancement

Formatting, display and readability #logger
Source code(tar.gz)
Source code(zip)
  • v0.2.0(Jun 22, 2022)

    🎉 v0.2.0 - 2022-06-22

    Features

    Always allow provisioning updates #build ....

    Hot fix for an issues I had where I needed to open xcode for updating my signature

    Faster build #cargo
    Generate compile commands without signing #compile ....

    Finally, this will ensure no more errors with regards to provisioning profile or singing, at least for auto complaining

    Respect gitignore #daemon ....

    previously it was required to set custom paths to ignore in project.yml, now extra ignored path reads from gitignore instead.

    Update status variable when watch is running #nvim
    Reload sourcekit server on compile #nvim
    Clear state on .compile change #sourcekit ....

    Doesn't seem critical now that the sourcekit lsp server is reloaded on compile.

    Init dependabot #general
    Make xcodeproj source of truth (#80) #general ....
    • feat(daemon): switch to reading from xcodeproj only
    • ref(daemon): remove xcodegen project types
    • ref: remove xcodegen.rs
    • feat(lua): identity xcodeproj on setup
    • fix(compile): error while removing non-existing cache
    • chore(readme): requirements
    • ref: use platform target method instead of sdkroots
    • ref: use xcodeproj new api
    • chore(deps): bump wax dependency
    • chore: update readme
  • Support tuist (#91) #general ....
    • feat(tuist): support regeneration
    • feat(project): support generating xcodeproj when absent
    • feat(compile): append xcodeproj generation logs
    • ref(compile): check for xcodeproj before trying to generate it
    • feat(tuist): generate both project and manifest xcodeproj
    • feat(tuist): generate compile commands for both project and manifest
    • feat(nvim): update status variable when watch is running
    • ref(project): decompose and specialize
    • feat(tuist): lsp support for tuist files
    • chore(readme): update
    • ref: make main binary named xbase
    • feat(tuist): recompile on config files change
    • fix(xcodegen): ignoring existing xcodeproj
    • fix(compile): on file rename
    Support swift projects (#97) #general ....
    • feat(swift): initial support closes #66
    • ref(daemon): abstract run logic
    • feat(swift): run project
    • fix(swift): logger
    • chore(readme): update
    • chore(ci): update ci command
    • feat(swift): ignore tests target for build and run

    Bug Fixes

    Error while removing non-existing cache #compile
    Incorrect paths to binaries #daemon ....

    CARGO_MANIFEST_DIR unfortunately points to package root instead of workspace root

    Crashing on multiline message nvim print #daemon ....

    only print the first line and the rest redirect to log buffer

    Avoid adding extra `/` #gitignore
    Avoid duplicating ** #gitignore
    Fix simulator latency #logging
    Xclog is not defined #lua
    Xcodegen binary not found #general

    Refactor

    Abstract build logic into ProjectBuild #daemon
    Update logging and compile commands (xclog) (#70) #general ....
    • switch to new xclog api and refractor duplicated code.
    • remove xcode.rs module
    • Fix #69.
    Separate concerns + contribution guidelines (#76) #general ....
    • ref: extract tracing setup to lib/tracing
    • ref: extract build server to sourcekit crate
    • ref: extract lib and daemon
    • ref(daemon): use xbase_proto
    • ref: flatten structure
    • feat: contributing guidelines
    • chore: update readme
    Remove crossbeam-channel crate #general
    Move project/device module to root #general
    Rename tracing package to log #general ....

    conflicts with running cargo check and test

    Ci

    Build, install and format #general
    Source code(tar.gz)
    Source code(zip)
  • v0.1.2(Jun 11, 2022)

  • v0.1.0(May 26, 2022)

    [0.1.0] - 2022-05-26

    Features

    Bug Fixes

    Refactor

    Enhancement

    Documentation

    Deps

    Dev

    Revert

    Source code(tar.gz)
    Source code(zip)
  • Owner
    Wandering, exploring, making mistakes and actively pushing limits. (k)
    null
    🔭 Search Dash.app from Neovim with Telescope. Built with Rust 🦀 and Lua

    Dash.nvim Query Dash.app within Neovim with a Telescope picker! The theme used in the recording is lighthaus.nvim. Note: Dash is a Mac-only app, so yo

    Mat Jones 193 Dec 28, 2022
    Neovide - No Nonsense Neovim Client in Rust

    Neovide This is a simple graphical user interface for Neovim (an aggressively refactored and updated Vim editor). Where possible there are some graphi

    Neovide 9.3k Jan 5, 2023
    An async autocompletion framework for Neovim

    ⚡ nvim-compleet This plugin is still in early development. ?? Table of Contents Installation Features Configuration Sources Commands Mappings Colors R

    Riccardo Mazzarini 520 Dec 25, 2022
    Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim.

    cat.nvim Failed experiment in downloading random cat image, turning it into ascii and displaying it in Neovim. Failed as I realized far too late, that

    James Vero 4 Aug 5, 2022
    Neovim Configuration Manager (Swap/Backup/Try Configurations Easily)

    ncm-rs Neovim Configuration Manager (Swap/Backup/Try Configurations Easily) I created this package because I wanted to try out Lazyvim (which is why i

    instance.id 4 Mar 5, 2023
    Neovim plugin for moving lines up and down, written in Rust

    Moveline.nvim Moveline is a simple plugin for moving lines up and down. It's written in Rust using my library nvim-utils. Installation Moveline can be

    Will Hopkins 34 Mar 18, 2023
    WIP. Goals: Treesitter highlighting, snippets, and a smooth intergration with neovim.

    typst.nvim WIP. Goals: Tree-sitter highlighting, snippets, and a smooth integration with neovim. For the past week, I've been thinking what I want for

    SeniorMars 66 Apr 9, 2023
    this-week-in-neovim.org official webapp repository

    This Week In Neovim This repository holds the source code of https://this-week-in-neovim.org. Architecture How does it run in production Automatic upd

    Dimitri Sabadie 189 Jun 23, 2023
    A dark and light Neovim theme written in fennel, inspired by IBM Carbon.

    oxocarbon.nvim Note: The old rust version can be found on the rust branch of this repository Oxocarbon is looking for ports! If you're a user of anoth

    Nyoom Engineering 690 Jun 29, 2023
    nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor.

    ?? nvim-oxi nvim-oxi provides safe and idiomatic Rust bindings to the rich API exposed by the Neovim text editor. The project is mostly intended for p

    Riccardo Mazzarini 655 Jul 13, 2023
    A CLI to easily switch between multiple Neovim configuration environments, written in Rust

    Neovim Configuration Switcher Neovim Configuration Switcher (short nvims) is a CLI to easily switch between multiple Neovim configuration environments

    Nhan Pham 3 Mar 30, 2024
    🚀 Discord Rich Presence plugin for Neovim written in Rust

    ?? Cord ?? Cord is a Discord Rich Presence plugin designed for Neovim, written in Rust. ?? Features Lightweight and dependency-free Cross-platform sup

    vyfor 39 May 6, 2024
    exa is a modern replacement for ls.

    exa exa is a modern replacement for ls. README Sections: Options — Installation — Development exa is a modern replacement for the venerable file-listi

    Benjamin Sago 20.3k Jan 8, 2023
    zoxide is a blazing fast replacement for your cd command

    zoxide A smarter cd command for your terminal zoxide is a blazing fast replacement for your cd command, inspired by z and z.lua. It keeps track of the

    Ajeet D'Souza 8.7k Dec 31, 2022
    procs is a replacement for ps written in Rust.

    procs is a replacement for ps written in Rust. Documentation quick links Features Platform Installation Usage Configuration Features Output by t

    null 3.6k Dec 30, 2022
    fastmod is a fast partial replacement for the codemod tool

    fastmod is a fast partial replacement for codemod. Like codemod, it is a tool to assist you with large-scale codebase refactors, and it supports most of codemod's options.

    Facebook Incubator 1.4k Dec 29, 2022
    A drop-in replacement for `dapp` and `seth` in Rust

    dapptools.rs Rust port of DappTools dapp example Usage Run Solidity tests Any contract that contains a function starting with test is being tested. Th

    Georgios Konstantopoulos 5k Jan 1, 2023
    A readline replacement written in Rust

    A readline replacement written in Rust Basic example // Create a default reedline object to handle user input use reedline::{DefaultPrompt, Reedline,

    JT 292 Jan 9, 2023
    Fls - Ferris-LS, a very bad LS replacement. Besides that, proves that I suck at clean & good code.

    FLS A handy ls remake, purely for learning. Why FLS? There's no reason, at all, don't use it. I just want to learn Rust :D Usage Flags: -i = Use icons

    florida 6 Jan 24, 2022