You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Sometimes we are referencing files on the disk that are bundled with the project, and they should exist during development and later when distributed, so it would be cool if compiler could confirm their existence on the disk.
I imagine that when we do something like [absfile|/some/path|], we could also somehow verify via TH that it exists. Maybe it would be special kind of quoter, smth like [absfile'|/some/path|], where ' indicates it will check for its existence on the disk? What about relative paths, for which we know what they are relative to, how would we do that kind of check?
I am not sure how feasible this really is, especially since location of the file can change from development to distribution, but it would be interesting to explore.
This also sounds quite costly, since during each compilation we would have to check for the files on the disk, I wonder if that is feasible.
The text was updated successfully, but these errors were encountered:
Martinsos
changed the title
Add support for verifying during compile time that file exists?
Add support for verifying during compile time that file actually exists?
Jul 19, 2023
Sometimes we are referencing files on the disk that are bundled with the project, and they should exist during development and later when distributed, so it would be cool if compiler could confirm their existence on the disk.
I imagine that when we do something like
[absfile|/some/path|]
, we could also somehow verify via TH that it exists. Maybe it would be special kind of quoter, smth like[absfile'|/some/path|]
, where'
indicates it will check for its existence on the disk? What about relative paths, for which we know what they are relative to, how would we do that kind of check?I am not sure how feasible this really is, especially since location of the file can change from development to distribution, but it would be interesting to explore.
This also sounds quite costly, since during each compilation we would have to check for the files on the disk, I wonder if that is feasible.
The text was updated successfully, but these errors were encountered: