Unused import
V doctor:
V full version: V 0.4.6 6b2d527
OS: linux, Ubuntu 20.04.2 LTS (WSL 2)
Processor: 4 cpus, 64bit, little endian, 11th Gen Intel(R) Core(TM) i5-11400F @ 2.60GHz
getwd: /home/svg/projects/reporting_service
vexe: /home/svg/v/v
vexe mtime: 2024-05-27 08:39:03
vroot: OK, value: /home/svg/v
VMODULES: OK, value: /home/svg/.vmodules
VTMP: OK, value: /tmp/v_1000
Git version: git version 2.25.1
Git vroot status: Error: fatal: not a git repository (or any of the parent directories): .git
.git/config present: false
CC version: cc (Ubuntu 10.5.0-1ubuntu1~20.04) 10.5.0
thirdparty/tcc: N/A
What did you do?
v -g -o vdbg cmd/v && vdbg run.v
import os
import coroutines
import time
fn routine(){
coroutines.sleep(1)
ol("GAAAAAAAAAAAAAAAAAA")
defer {
ol("Exit on defer")
}
}
fn ol(str string){
println(str)
}
fn main(){
{
ol("holaaa")
go routine()}
}
What did you expect to see?
unused import
What did you see instead?
run.v:1:8: warning: module 'os' is imported but never used
1 | import os
| ~~
2 | import coroutines
3 | import time
run.v:3:8: warning: module 'time' is imported but never used
1 | import os
2 | import coroutines
3 | import time
| ~~~~
4 | fn routine(){
5 | coroutines.sleep(1)
==================
tcc: error: file '/home/svg/v/thirdparty/photon/photonwrapper.so' not found
...
==================
(Use `v -cg` to print the entire error message)
builder error:
==================
C error found. It should never happen, when compiling pure V code.
This is a V compiler bug, please report it using `v bug file.v`,
or goto https://github.com/vlang/v/issues/new/choose .
You can also use #help on Discord: https://discord.gg/vlang .
[!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.
Unused imports warnings are correct. Right? Are you reporting the photonwrapper failing?
I only downloaded the lastest V Linux version, When I tried the app, it shows me that error. I never tried photonwrapper.... Maybe could be V Linux package is corrupted or something
El El vie, 31 may. 2024 a la(s) 8:13 a. m., Felipe Pena < @.***> escribió:
Unused imports warnings are correct. Right? Are you reporting the photonwrapper failing?
— Reply to this email directly, view it on GitHub https://github.com/vlang/v/issues/21606#issuecomment-2142131991, or unsubscribe https://github.com/notifications/unsubscribe-auth/AJ5X2N26MVFQ2DBSNPZNETTZFBZQDAVCNFSM6AAAAABIQCPG5CVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCNBSGEZTCOJZGE . You are receiving this because you authored the thread.Message ID: @.***>
@ialbertocamilo photonwrapper is necessary, because it is used for coroutines.
Warnings ok, build fails due to no compiled version of photonwrapper