vlang / v

Simple, fast, safe, compiled language for developing maintainable software. Compiles itself in <1s with zero library dependencies. Supports automatic C => V translation. https://vlang.io
MIT License
35.63k stars 2.15k forks source link

`v.reflection` `attrs` rework #21537

Open heyimtcn opened 3 months ago

heyimtcn commented 3 months ago

Describe the feature

change []string to []VAttribute for attrs fields and add attrs field to Function in v.reflection to match comptime

Use Case

VAttribute is easier to use than string for attributes, the ability to get attributes for functions at runtime

Proposed Solution

No response

Other Information

No response

Acknowledgements

Version used

V 0.4.5 404f93e.774253e

Environment details (OS name and version, etc.)

V full version: V 0.4.5 404f93e.774253e
OS: linux, Debian GNU/Linux 11 (bullseye) (VM)
Processor: 1 cpus, 64bit, little endian, Intel(R) Xeon(R) CPU E5-2686 v4 @ 2.30GHz

getwd: /home/admin/playground
vexe: /home/admin/v/v
vexe mtime: 2024-05-20 09:25:25

vroot: OK, value: /home/admin/v
VMODULES: OK, value: .vmodules
VTMP: OK, value: /tmp/v_0

Git version: git version 2.30.2
Git vroot status: Error: fatal: detected dubious ownership in repository at '/home/admin/v'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/admin/v
.git/config present: true

CC version: cc (Debian 10.2.1-6) 10.2.1 20210110
thirdparty/tcc status: Error: fatal: detected dubious ownership in repository at '/home/admin/v/thirdparty/tcc'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/admin/v/thirdparty/tcc
 Error: fatal: detected dubious ownership in repository at '/home/admin/v/thirdparty/tcc'
To add an exception for this directory, call:

    git config --global --add safe.directory /home/admin/v/thirdparty/tcc

[!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.

felipensp commented 3 months ago

Hey @heyimtcn, are you working on it ?

heyimtcn commented 3 months ago

Hey @heyimtcn, are you working on it ?

Im unable to use my computer for some time, i meant in the future, not right now, i'll uncheck the box, sorry for the confusion