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

Update error #22510

Closed
milen-prg opened this issue Oct 13, 2024 · 9 comments
Closed

Update error #22510

milen-prg opened this issue Oct 13, 2024 · 9 comments
Labels
Bug This tag is applied to issues which reports bugs.

Comments

@milen-prg
Copy link

milen-prg commented Oct 13, 2024

Describe the bug

A last try to update, it returns error:

v up

cannot compile C:\v\cmd\tools\vup.v: 1
vlib/os/fd.c.v:83:6: error: expecting method name
81 | }
82 |
83 | fn C.select(ndfs int, readfds &C.fd_set, writefds &C.fd_set, exceptfds &C.fd_set, timeout &C.timeval) int
| ~~~~~~
84 |
85 | // These are C macros, but from the V's point of view, can be treated as C functions:

Reproduction Steps

v up

Expected Behavior

normal updating as ever

Current Behavior

return error

cannot compile C:\v\cmd\tools\vup.v: 1
vlib/os/fd.c.v:83:6: error: expecting method name
81 | }
82 |
83 | fn C.select(ndfs int, readfds &C.fd_set, writefds &C.fd_set, exceptfds &C.fd_set, timeout &C.timeval) int
| ~~~~~~
84 |
85 | // These are C macros, but from the V's point of view, can be treated as C functions:

Possible Solution

No response

Additional Information/Context

No response

V version

just before the last weekly.2024.41

Environment details (OS name and version, etc.)

v doctor
cannot compile C:\v\cmd\tools\vdoctor.v: 1
vlib/os/fd.c.v:83:6: error: expecting method name
81 | }
82 |
83 | fn C.select(ndfs int, readfds &C.fd_set, writefds &C.fd_set, exceptfds &C.fd_set, timeout &C.timeval) int
| ~~~~~~
84 |
85 | // These are C macros, but from the V's point of view, can be treated as C functions:

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@milen-prg milen-prg added the Bug This tag is applied to issues which reports bugs. label Oct 13, 2024
@kbkpbot
Copy link
Contributor

kbkpbot commented Oct 13, 2024

Just type 'make' in V directory.

@medvednikov
Copy link
Member

v up is supposed to run make on such failures...

@medvednikov
Copy link
Member

@spytheman can you please have a look at this?

@JalonSolov
Copy link
Contributor

v up is supposed to run make for you, but it's failing to build vup.v, which means it can't work.

I have had this happen a few times, when I waited too long between updates... the tools I had simply couldn't properly build the new code.

Running make directly should fix things.

@milen-prg
Copy link
Author

make is successfully used, thanks! (I was forgot the make command, used at first installation. It is good, that it kept the installed additional modules).

@spytheman
Copy link
Member

@medvednikov it is related to the recent change that made keywords like select be directly available as a function name, without using a @ prefix.

It was done relatively quickly, (first the change, that relaxed the parser, and then the change, that changed all the V repo, to use the new relaxed syntax), without waiting for say a week, and so an older V, from the last release, could not compile the new code.

I am not sure, what could be done, except that perhaps, we should be more careful, when doing such changes, to leave enough time (say a week) between introducing new syntax, and then changing the whole V repo to use it, with the goal of having at least 1 older V weekly release, being able to v up to the current state.

Another option would be, to modify the tool recompilation logic for vup specifically, so that if there is an already present vup executable, it would be still used and run, if the recompilation of the tool from scratch failed with the new code. That may make diagnostic harder, when there is a problem with vup itself, but may help mask such errors, due to too quick syntax changes.

@spytheman
Copy link
Member

Whatever change we make will only affect future users of v up 🤔 .

Users, who already have an older V, will continue to encounter the error, until they upgrade manually, either by doing git pull && make, cloning from source, or by downloading a new release, when we make one.

@spytheman
Copy link
Member

I've made #22518 , to address the problem for future releases.

@medvednikov
Copy link
Member

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This tag is applied to issues which reports bugs.
Projects
None yet
Development

No branches or pull requests

5 participants