Vampire
01/24/2023, 5:17 PMactions/cache/restore@v3
and actions/cache/save@v3
.
But I fear the generator will not work with that?
đPiotr KrzemiĆski
01/24/2023, 5:58 PMPiotr KrzemiĆski
01/24/2023, 7:35 PMVampire
01/24/2023, 7:36 PMVampire
01/24/2023, 7:37 PMCacheRestoreV3
CacheSaveV3
Piotr KrzemiĆski
01/24/2023, 7:38 PMCache_RestoreV3
? My intent is to show that this is a nested action, but now I'm not sure if it's worth showing. Thoughts?Vampire
01/24/2023, 7:38 PMPiotr KrzemiĆski
01/24/2023, 7:38 PMVampire
01/24/2023, 7:39 PMVampire
01/24/2023, 7:39 PMPiotr KrzemiĆski
01/24/2023, 7:39 PMPiotr KrzemiĆski
01/24/2023, 7:40 PMPiotr KrzemiĆski
01/24/2023, 8:06 PMCacheV3.Restore
- Restore
being a nested class of CacheV3
Piotr KrzemiĆski
01/24/2023, 8:06 PMVampire
01/24/2023, 8:07 PMCacheV3
can be a completely own action in itself, or that it can only be a holder.Piotr KrzemiĆski
01/24/2023, 8:08 PMVampire
01/24/2023, 8:08 PMmy/littl/action/action.yaml
will it then be My.Little.ActionV0
?Vampire
01/24/2023, 8:09 PMPiotr KrzemiĆski
01/24/2023, 8:09 PMMyV0.Little.Action
. Looks a bit weird, doesn't it? This version in the first part. But it matches the fact that the root thing is versionedVampire
01/24/2023, 8:10 PMVampire
01/24/2023, 8:11 PMPiotr KrzemiĆski
01/24/2023, 8:12 PMVampire
01/24/2023, 8:14 PMVampire
01/24/2023, 8:15 PMVampire
01/24/2023, 8:15 PMPiotr KrzemiĆski
01/24/2023, 8:16 PMVampire
01/24/2023, 9:57 PMboolean
which it should really be, the generated class does not change of course, the accessor only gives the expression string for it anyway.Piotr KrzemiĆski
01/25/2023, 6:04 AMPiotr KrzemiĆski
01/25/2023, 6:05 AMVampire
01/25/2023, 8:34 AMboolean
or a BooleanExpression
and the output would supply the latter which could also be used for the Gradle cache action example. In the meantime you could probably just have two properties or two setters each taking one of them. Or alternatively you could use Either
from Arrow or make an own version. But that would make the direct setting less nice.Piotr KrzemiĆski
01/25/2023, 8:39 AMEither
, but with more specific âsidesâ like typed
and untyped
Vampire
01/25/2023, 8:41 AMVampire
01/25/2023, 8:45 AMExpression
from myFieldExpression
.
If you have something like a specific Either
you will break all usages when switching to denotable union types.Vampire
01/25/2023, 8:54 AMPiotr KrzemiĆski
01/25/2023, 8:58 AMFooV1.Bar
and figured it would be pretty complex to implement in a proper, generic way + one day Iâm hoping to create a complier plugin that would generate the wrappers, and Iâm not sure how easy it would be to generate a single class with nested classes for more than 1 requested action wrappers. Thatâs why I decided to go with something simple that I almost have implemented. I prefer to put the effort in more crucial featuresPiotr KrzemiĆski
01/25/2023, 9:00 AMsome-action/foo/bar-baz
and some-action/foo-bar/baz
which will lead to generating the same class name, but I assess the risk of getting these as lowPiotr KrzemiĆski
01/25/2023, 9:01 AMPiotr KrzemiĆski
01/25/2023, 9:02 AMVampire
01/25/2023, 9:05 AMPiotr KrzemiĆski
01/25/2023, 9:06 AMVampire
01/25/2023, 10:37 AMI guess in the light of the denotable union types for mid-term it would be better to have two separate properties.Maybe something like this will work nicely: https://github.com/Vampire/github-workflows-kt/commit/4ed978461cfbfeb4d9ae0ff2175f1f45de0f17b9 Not sure about the `List`s though
Piotr KrzemiĆski
01/25/2023, 1:30 PMPiotr KrzemiĆski
01/25/2023, 1:31 PMVampire
01/26/2023, 2:26 AMVampire
01/26/2023, 2:28 AMval foo = uses(action = SetupWslV1())
val bar = SetupWslV1(
distributionExpression = foo.outputs["bar"],
useCacheExpression = Expression("1 == 2"),
updateExpression = foo.outputs.wslShellDistributionWrapperPath as Expression<Any>,
wslShellCommandExpression = foo.outputs.wslShellDistributionWrapperPath
)
Piotr KrzemiĆski
01/26/2023, 7:25 AMVampire
02/03/2023, 8:43 AMPiotr KrzemiĆski
02/03/2023, 8:44 AMPiotr KrzemiĆski
02/03/2023, 8:45 AMVampire
02/03/2023, 8:50 AMPiotr KrzemiĆski
02/03/2023, 8:51 AMPiotr KrzemiĆski
02/03/2023, 8:55 AMVampire
02/03/2023, 9:05 AMString
fields.Piotr KrzemiĆski
02/03/2023, 9:06 AMVampire
02/03/2023, 9:07 AMPiotr KrzemiĆski
02/03/2023, 9:07 AM