Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error: undefined ident: nil #153

Closed
muuvmuuv opened this issue Oct 24, 2022 · 4 comments
Closed

error: undefined ident: nil #153

muuvmuuv opened this issue Oct 24, 2022 · 4 comments

Comments

@muuvmuuv
Copy link

Trying to build with latest V but prints:

./timer.v:23:40: error: undefined ident: `nil`
   21 | struct Timer {
   22 | mut:
   23 |     gg             &gg.Context = unsafe { nil }
      |                                           ~~~
   24 |     tasks          []Task
   25 |     date           time.Time // the day being shown
./ved.v:35:40: error: undefined ident: `nil`
   33 |     views                []View
   34 |     cur_split            int
   35 |     view                 &View = unsafe { nil }
      |                                           ~~~
   36 |     mode                 EditorMode
   37 |     just_switched        bool // for keydown/char events to avoid dup keys
./ved.v:43:46: error: undefined ident: `nil`
   41 |     all_git_files        []string
   42 |     top_tasks            []string
   43 |     gg                   &gg.Context = unsafe { nil }
      |                                                 ~~~
   44 |     query                string
   45 |     search_query         string
./ved.v:69:49: error: undefined ident: `nil`
   67 |     gg_pos         int
   68 |     cfg            Config
   69 |     cb             &clipboard.Clipboard = unsafe { nil }
      |                                                    ~~~
   70 |     open_paths     [][]string // all open files (tabs) per workspace: open_paths[workspace_idx] == ['a.txt', b.v']
   71 |     prev_y         int        // for jumping back ('')
./view.v:26:31: error: undefined ident: `nil`
   24 |     changed      bool
   25 |     error_y      int
   26 |     ved          &Ved = unsafe { nil }
      |                                  ~~~
   27 |     prev_y       int
   28 |     hash_comment bool
@gaetgu
Copy link
Contributor

gaetgu commented Oct 28, 2022

Hi @muuvmuuv! Can you please run v up and try to build on the latest commit? These issues should not exist if everything is up to date.

@muuvmuuv
Copy link
Author

That works but it does not open anything:

; v --version
V 0.3.1 c6158e4
; v .
; ./ved
height=1440
FULL SCREEN=true
REGISTERING VED KEY2

@gaetgu
Copy link
Contributor

gaetgu commented Oct 30, 2022

@muuvmuuv try to open ved with a filename provided, like ./ved ved.v.

This happens due to the absence of a ~/.ved/workspaces file, which should be created once you open a file, so you should be able to just run ./ved in the future and pick up right where you left off.

@muuvmuuv
Copy link
Author

Alright! This looks good, a little bit weird on macOS but nice. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants