Coder Social home page Coder Social logo

Comments (20)

Amleto avatar Amleto commented on July 17, 2024 1

I made pull request:

#107

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024 1

ok, PR updated. Lets try again ^_^

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Can this solve your problem: https://stackoverflow.com/questions/11868017/couldnt-make-stderr-distinct-from-stdout-when-running-cygwin-commands ?

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

What, exactly?

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Can’t you see the stackoverflow link?

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

Yes, what part of it? I don't have cygwin and there are multiple aspects in that link so I don't know what you're referring to.

btw, I only have one 'touch' binary in my path.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Okay, I understand. But I don’t know if this problem is related to cmake-tools.nvim. The error message is not very specific.

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

Ok, I understand it might not be from cmake-tools, but something is still going wrong and not logged.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Yes. Maybe a Window’s issue.

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

On windows should cmake-tools even be trying to use 'touch'?

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

On windows should cmake-tools even be trying to use 'touch'?

No, it doesn’t. I mean this maybe a issue of neovim on Windows.

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

whats this?

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Oh, sorry for forgetting this. It uses this to generate session files.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Then maybe that’s the reason. Can you test it by removing this line?

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

I checked by comparing behaviour with those lines commented vs uncommented. I can verify that is the cause of the error message.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Interesting, i wonder if it will popup error if you directly execute the touch command. Maybe the reason is that users don’t have write permission to that directory?

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

I closed the PR due to the exception seen (attached in the PR).

There needs to be more changes - I didn't check that the supplied 'path' variable would be correct, which it seems not to be - I added a debug print,

local function init_session()
  init_cache()

  local path = get_current_path()
  if not utils.file_exists(path) then
    local file = io.open(path, 'w')
    if file then
      file:close()
    else
      print("file not opened " .. path)
    end
  end
end

and it revealed this:

file not opened C:\Users\<username>/AppData/Local/cmake_tools_nvim/D:\Coding\C++\Projects\simple-cmake.lua

from cmake-tools.nvim.

Amleto avatar Amleto commented on July 17, 2024

So I think this needs adjusting as well

local function get_current_path()
  local current_path = vim.loop.cwd()
  local clean_path = current_path:gsub("/", "")
  return get_cache_path() .. clean_path .. ".lua"; -- <<<<
end

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Yes, clean_path should be properly handled for each OS.

from cmake-tools.nvim.

Civitasv avatar Civitasv commented on July 17, 2024

Fixed by #107.

from cmake-tools.nvim.

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.