Closed villesundell closed 3 years ago
Thank you for contacting us. I think it will be useful. But I would not like to do this at the file name level.
I'd like to see something like:
#![dialect(pont)]
module Helpers {
}
#![dialect(diem)]
module Helpers {
}
What do you think about this? And you will also be able to store these modules in DiemHelpers.move and PontemHelpers.move.
Hi Ville 👋 Thanks for your proposal. We already have think about it and discussing a little better implementation :) .
Thanks guys, once again :slightly_smiling_face: Yes, conditional compiling by #![dialect(diem)]
instead of defining those in Dove.toml
makes sense :+1:
Hello! Recently the Diem Association (read: Facebook :laughing: ) has been very interested to expand Move support to platforms such as NEAR (in fact, directly sponsored by Facebook).
This can lead to a situation, where a feature (for example: retrieving current time) can be implemented differently on Diem, Pontem and NEAR (since that would be platform specific, not language specific).
So, I would like to request a feature that would permit compiling different files if on a certain platform, and would also include (and exclude) some dependencies accordingly.
For example:
DiemHelpers.move
implementingHelpers
-module, and includediem-stdlib
as a dependency.PontemHelpers.move
implementingHelpers
-module (and not DiemHelpers.move)..move
files could then just useHelper::getTime()
.(Of course all of this would be project specific, and defined in
Dove.toml
.)