I just wanted to discuss some improvements about using IIncludeFileSystem .
The first issue is that we do not have information about include Type (in comparison versus standard Direct3D), so in some advanced scenarii it's impossible to decide which file to add (or to eventually add no file).
The second issue is error handling in case file is not found :
SourceText GetInclude(string path)
Should we return a null (in the current case it seems that returning null simply replaces text by empty string), or throw an exception?
Hello,
I just wanted to discuss some improvements about using IIncludeFileSystem .
The first issue is that we do not have information about include Type (in comparison versus standard Direct3D), so in some advanced scenarii it's impossible to decide which file to add (or to eventually add no file).
The second issue is error handling in case file is not found :
SourceText GetInclude(string path)
Should we return a null (in the current case it seems that returning null simply replaces text by empty string), or throw an exception?
We could also have a try api instead, like :
GetIncludeResult TryGetInclude(string path, IncludeType ncludeType)
And have GetIncludeResult as a sum type instead (that either have a sourcetext or some message?