Re: Name of nim file at compile time

2020-06-24 Thread vitreo12
What i mean is: I tried it and it didn't work, as it would return the module 
where currentSourcePath is called, and not the compiled nim file


Re: Name of nim file at compile time

2020-06-23 Thread jibal
@Yardanico It depends on whether you want the name of the imported file (then 
use a proc) or the name of the file imported into (then use a template).

@vitreo12 "will not work" is not helpful; please be precise. IWFM


Re: Name of nim file at compile time

2020-06-23 Thread Yardanico
It can work if you don't use it in a template and just in a plain proc.


Re: Name of nim file at compile time

2020-06-23 Thread vitreo12
I had tried it, but it will not work when used from an imported module


Re: Name of nim file at compile time

2020-06-23 Thread vitreo12
I will look into it, thanks!


Re: Name of nim file at compile time

2020-06-23 Thread sekao
I think you want 
[currentSourcePath](https://nim-lang.org/docs/system.html#currentSourcePath.t)


Re: Name of nim file at compile time

2020-06-23 Thread pietroppeter
I think either 
[StackTraceEntry](https://nim-lang.org/docs/system.html#StackTraceEntry) or 
[instantiationInfo](https://nim-lang.org/docs/system.html#instantiationInfo) 
could work.


Name of nim file at compile time

2020-06-23 Thread vitreo12
Hello everyone!

Is there a way to retrieve the name of the .nim file that's been compiled at 
compile time?