Open gshields opened 7 months ago
v install
is when you want to use the package in your V code. If you want to build it from scratch you need to clone the repo: https://vsql.readthedocs.io/en/latest/install.html#compiling-from-source
@.:~/.vmodules/vsql$ v up Updating V... V is already updated. Current V version: V 0.4.4 7e5ffb7, timestamp: 2024-01-28 01:34:01 +0200 ............ @.:~/vmodules$ git clone https://github.com/elliotchance/vsql.git cd vsql make bin/vsql\ Cloning into 'vsql'... remote: Enumerating objects: 3027, done. remote: Counting objects: 100% (813/813), done. remote: Compressing objects: 100% (345/345), done. remote: Total 3027 (delta 580), reused 506 (delta 468), pack-reused 2214 Receiving objects: 100% (3027/3027), 2.49 MiB | 8.13 MiB/s, done. Resolving deltas: 100% (2255/2255), done.
@.:~/vmodules/vsql$ make bin/vsql
grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf
python3 generate-grammar.py
v fmt -w vsql/grammar.v
Reformatted file: /home/ghs/.vmodules/vsql/vsql/grammar.v
mkdir -p bin
v -prod cmd/vsql -o bin/vsql
cmd/vsql/bench.v:4:1: builder error: cannot import module "vsql" (no .v
files in "/home/ghs/.vmodules/vsql")
2 |
3 | import cli
4 | import vsql
| ~~~
5 |
6 | fn register_bench_command(mut cmd cli.Command) {
make: [Makefile:28: bin/vsql] Error 1
git clone https://github.com/elliotchance/vsql.git
cd vsql
@.:~/vmodules/vsql$ make bin/vsql
grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf
python3 generate-grammar.py
v fmt -w vsql/grammar.v
Reformatted file: /home/ghs/.vmodules/vsql/vsql/grammar.v
mkdir -p bin
v -prod cmd/vsql -o bin/vsql
cmd/vsql/bench.v:4:1: builder error: cannot import module "vsql" (no .v
files in "/home/ghs/.vmodules/vsql")
2 |
3 | import cli
4 | import vsql
| ~~~
5 |
6 | fn register_bench_command(mut cmd cli.Command) {
make: [Makefile:28: bin/vsql] Error 1
On Sat, Jan 27, 2024 at 9:17 PM Elliot Chance @.***> wrote:
v install is when you want to use the package in your V code. If you want to build it from scratch you need to clone the repo: https://vsql.readthedocs.io/en/latest/install.html#compiling-from-source
— Reply to this email directly, view it on GitHub https://github.com/elliotchance/vsql/issues/190#issuecomment-1913456825, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2NZI7N75XLYCYC6NWVANDYQXNP7AVCNFSM6AAAAABCN4IQZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGQ2TMOBSGU . You are receiving this because you authored the thread.Message ID: @.***>
What OS are you using? I have tried to run the same commands on macOS:
Elliots-MacBook-Pro:~ elliot$ git clone https://github.com/elliotchance/vsql.git
Cloning into 'vsql'...
remote: Enumerating objects: 3027, done.
remote: Counting objects: 100% (813/813), done.
remote: Compressing objects: 100% (345/345), done.
remote: Total 3027 (delta 580), reused 506 (delta 468), pack-reused 2214
Receiving objects: 100% (3027/3027), 2.49 MiB | 20.86 MiB/s, done.
Resolving deltas: 100% (2255/2255), done.
Elliots-MacBook-Pro:~ elliot$ cd vsql/
Elliots-MacBook-Pro:vsql elliot$ make bin/vsql
grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf
python3 generate-grammar.py
v fmt -w vsql/grammar.v
Reformatted file: /Users/elliot/vsql/vsql/grammar.v
mkdir -p bin
v -prod cmd/vsql -o bin/vsql
I wonder is V is confused by the path that it's being run in?
Description: Ubuntu 23.10
Linux 6.5.0-15-generic #15-Ubuntu SMP PREEMPT_DYNAMIC Tue Jan 9 17:03:36 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
I installed as cd ~/work; git clone https://github.com/vlang/v mkdir ~/.vmodules; cd ~; ln -s .vmodules/ vmodules
And then set my path to ~/work/v
On Sun, Jan 28, 2024 at 10:08 AM Elliot Chance @.***> wrote:
What OS are you using? I have tried to run the same commands on macOS:
Elliots-MacBook-Pro:~ elliot$ git clone https://github.com/elliotchance/vsql.git Cloning into 'vsql'... remote: Enumerating objects: 3027, done. remote: Counting objects: 100% (813/813), done. remote: Compressing objects: 100% (345/345), done. remote: Total 3027 (delta 580), reused 506 (delta 468), pack-reused 2214 Receiving objects: 100% (3027/3027), 2.49 MiB | 20.86 MiB/s, done. Resolving deltas: 100% (2255/2255), done. Elliots-MacBook-Pro:~ elliot$ cd vsql/ Elliots-MacBook-Pro:vsql elliot$ make bin/vsql grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf python3 generate-grammar.py v fmt -w vsql/grammar.v Reformatted file: /Users/elliot/vsql/vsql/grammar.v mkdir -p bin v -prod cmd/vsql -o bin/vsql
I wonder is V is confused by the path that it's being run in?
— Reply to this email directly, view it on GitHub https://github.com/elliotchance/vsql/issues/190#issuecomment-1913678233, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2NZI366SFZCXHNHW3DCX3YQ2H3HAVCNFSM6AAAAABCN4IQZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJTGY3TQMRTGM . You are receiving this because you authored the thread.Message ID: @.***>
I suspect V doesn't resolve the symlink correctly. However, it also seems very suspect to me the way it's being cloned into what is basically a cache directory (that's why it's hidden).
If you really want to do it this way, I guess try running make
from ~/.vmodules
- if that doesn't work you'll have to raise a bug with V.
Perhaps this is helpful: https://github.com/vlang/v/issues/16946
@gshields here is a full explanation: https://discord.com/channels/592103645835821068/1168743197619531856/1201483636051017768
Latest V 804a7bd has the vfmt patch.
Using it (just v up
), make
followed by make bin/vsql
will work inside ~/.vmodules
too.
Cool, thanks for the heads up!
On Mon, Jan 29, 2024, 10:10 AM Delyan Angelov @.***> wrote:
Latest V 804a7bd https://github.com/vlang/v/commit/804a7bdda539158c13a3f11fd9a32627a0253d69 has the vfmt patch.
Using it (just v up), make followed by make bin/vsql will work inside ~/.vmodules too.
— Reply to this email directly, view it on GitHub https://github.com/elliotchance/vsql/issues/190#issuecomment-1915293515, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA2NZI7MEVLLD2GTNO54JTLYQ7QYBAVCNFSM6AAAAABCN4IQZ6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMJVGI4TGNJRGU . You are receiving this because you were mentioned.Message ID: @.***>
#0 20:10:40 ᛋ master /v/oo❱rm -rf ~/.vmodules/elliotchance/
#0 20:10:51 ᛋ master /v/oo❱v install elliotchance.vsql
Scanning `elliotchance.vsql`...
warning: `elliotchance.vsql` is missing a manifest file.
details: Help to ensure future-compatibility by adding a `v.mod` file or opening an issue at:
`https://github.com/elliotchance/vsql/issues/new?title=Missing%20Manifest&body=elliotchance.vsql%20is%20missing%20a%20manifest,%20please%20consider%20adding%20a%20v.mod%20file%20with%20the%20modules%20metadata.`
Installing `elliotchance.vsql`...
Installed `elliotchance.vsql`.
#0 20:11:01 ᛋ master /v/oo❱cd ~/.vmodules/elliotchance/vsql/
#0 20:11:15 ᛋ main ~/.vmodules/elliotchance/vsql❱make
rm -f grammar.bnf vsql/grammar.v
grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf
python3 generate-grammar.py
v fmt -w vsql/grammar.v
Reformatted file: /home/delian/.vmodules/elliotchance/vsql/vsql/grammar.v
v fmt -w .
Already formatted file: /home/delian/.vmodules/elliotchance/vsql/cmd/vsql/out.v
Already formatted file: /home/delian/.vmodules/elliotchance/vsql/cmd/vsql/server.v
...
Already formatted file: /home/delian/.vmodules/elliotchance/vsql/vsql/std_joined_table.v
Already formatted file: /home/delian/.vmodules/elliotchance/vsql/scripts/generate-v-client-library-docs.vsh
./scripts/generate-v-client-library-docs.vsh > docs/v-client-library-docs.rst
#0 20:11:19 ᛋ main ~/.vmodules/elliotchance/vsql❱make bin/vsql
mkdir -p bin
v -prod cmd/vsql -o bin/vsql
#0 20:13:06 ᛋ main ~/.vmodules/elliotchance/vsql❱ls -la bin/vsql
-rwxrwxr-x 1 delian delian 2284632 Jan 29 20:13 bin/vsql
#0 20:13:22 ᛋ main ~/.vmodules/elliotchance/vsql❱
#0 20:13:26 ᛋ main ~/.vmodules/elliotchance/vsql❱v version
V 0.4.4 804a7bd
#0 20:13:29 ᛋ main ~/.vmodules/elliotchance/vsql❱
v install elliotchance.vsql ran make /.vmodules/elliotchance/vsql$ make bin/vsql grep "//~" -r vsql | cut -d~ -f2 > grammar.bnf python3 generate-grammar.py v fmt -w vsql/grammar.v Reformatted file: /home/ghs/.vmodules/elliotchance/vsql/vsql/grammar.v mkdir -p bin v -prod cmd/vsql -o bin/vsql cmd/vsql/bench.v:4:1: builder error: cannot import module "vsql" (no .v files in "/home/ghs/.vmodules/vsql") 2 | 3 | import cli 4 | import vsql |
~~~ 5 | 6 | fn register_bench_command(mut cmd cli.Command) { make: *** [Makefile:28: bin/vsql] Error 1