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

v fmt . -w makes import databases change to import diff.src.databases #18993

Closed
carpedil opened this issue Jul 28, 2023 · 4 comments
Closed

v fmt . -w makes import databases change to import diff.src.databases #18993

carpedil opened this issue Jul 28, 2023 · 4 comments
Labels
Bug This tag is applied to issues which reports bugs. Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V.

Comments

@carpedil
Copy link

Describe the bug

23072801

Expected Behavior

the imported module name should not be changed

Current Behavior

after run v fmt . -w , import databases change to import diff.src.databases

Reproduction Steps

v fmt . -w

Possible Solution

No response

Additional Information/Context

No response

V version

V 0.4.0 c7f708e

Environment details (OS name and version, etc.)

V full version: V 0.4.0 c7f708e
OS: windows, Microsoft Windows 11 Pro v22621 64-bit
Processor: 12 cpus, 64bit, little endian,

getwd: D:\codespace\vlang\v_study
vexe: C:\Users\cirya\v\v.exe
vexe mtime: 2023-07-28 01:58:28

vroot: OK, value: C:\Users\cirya\v
VMODULES: OK, value: C:\Users\cirya.vmodules
VTMP: OK, value: C:\Users\cirya\AppData\Local\Temp\v_0

Git version: git version 2.38.1.windows.1
Git vroot status: weekly.2023.30-18-gc7f708e6 (4 commit(s) behind V master)
.git/config present: true

CC version: Error: exec failed (CreateProcess) with code 2: 系统找不到指定的文件。
cmd: cc --version
thirdparty/tcc status: thirdparty-windows-amd64 e90c2620

@carpedil carpedil added the Bug This tag is applied to issues which reports bugs. label Jul 28, 2023
@JalonSolov
Copy link
Contributor

Do you have a v.mod file in the same directory as your main.v file? V (and v fmt) needs the v.mod file as an anchor to properly find your submodules.

@carpedil
Copy link
Author

carpedil commented Jul 30, 2023

Do you have a v.mod file in the same directory as your main.v file? V (and v fmt) needs the v.mod file as an anchor to properly find your submodules.

yes , it dose have the v.mod file at xxx/vlang/v_bugs/src/diff

├── src
│ ├── diff
│ │ ├── src
│ │ │ ├── _app
│ │ │ ├── app.db
│ │ │ ├── databases
│ │ │ ├── main.v
│ │ │ └── templates
│ │ └── v.mod
└── v.mod

@carpedil
Copy link
Author

don't know why, Need to continue observing the replicated scene

@ttytm ttytm added the Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V. label Mar 21, 2024
@ttytm
Copy link
Member

ttytm commented Mar 21, 2024

Should be fixed with latest V. Please let us know when you experience further issues.

@ttytm ttytm closed this as completed Mar 21, 2024
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. Unit: vfmt Bugs/feature requests, that are related to the `vfmt`, the formatter for V.
Projects
None yet
Development

No branches or pull requests

3 participants