-
-
Notifications
You must be signed in to change notification settings - Fork 740
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
(Frosting) Tool installer should respect configuration #2904
Comments
@patriksvensson can you provide more information regarding what this issue was for? Thanks |
…onfiguration option
@gep13 Frosting uses an internal Something like this might be a first step to solve this. I did notice that Note that this would also require the |
Fixed by #2946 |
@patriksvensson upgraded to 1.0.0-rc0002 and it looks like Frosting does not yet respect the settings from the [Paths] section of my cake.config file. Digging a bit deeper and it looks like the internal ToolInstaller still uses a hardcoded Additionally, it no longer seems to take the working directory change into account as configured on the CakeHost instance as was the case in rc0001.
|
@dieterv Do you have an example where working directory fails? I just tried with a following simple example with the build script in a |
An example using Cake.Frosting 1.0.0-rc0002 which shows the `ToolInstaller` still uses a hardcoded `_environment.WorkingDirectory.Combine("tools").MakeAbsolute(_environment);` path to install tools into. Observe that CakeHost() was configured with a .UseWorkingDirectory("../..") but surprisingly the tools end up being installed in `./build/source/tools` instead of the expected `./tools` directory as was the case in Cake.Frosting 1.0.0-rc0001. Now, as far as the `ToolInstaller` is concerned, both are wrong. The [Paths][Tools] setting from the cake.config file should be used instead. See cake-build/cake#2904 (comment)
An example using Cake.Frosting 1.0.0-rc0002 which shows the `ToolInstaller` still uses a hardcoded `_environment.WorkingDirectory.Combine("tools").MakeAbsolute(_environment);` path to install tools into. Observe that CakeHost() was configured with a .UseWorkingDirectory("../..") but surprisingly the tools end up being installed in `./build/source/tools` instead of the expected `./tools` directory as was the case in Cake.Frosting 1.0.0-rc0001. Now, as far as the `ToolInstaller` is concerned, both are wrong. The [Paths][Tools] setting from the cake.config file should be used instead. See cake-build/cake#2904 (comment)
An example using Cake.Frosting 1.0.0-rc0002 which shows the `ToolInstaller` still uses a hardcoded `_environment.WorkingDirectory.Combine("tools").MakeAbsolute(_environment);` path to install tools into. Observe that CakeHost() was configured with a .UseWorkingDirectory("../..") but surprisingly the tools end up being installed in `./build/source/tools` instead of the expected `./tools` directory as was the case in Cake.Frosting 1.0.0-rc0001. Now, as far as the `ToolInstaller` is concerned, both are wrong in this case. The [Paths][Tools] setting from the cake.config file has been specified and should be used instead. See cake-build/cake#2904 (comment)
@pascalberger sure, I've modified your example to show that ToolInstaller does not use the working directory that was configured on CakeHost, see dieterv/cake-frosting-example@76e6518 Now, interesting as this is, the [Paths][Tools] setting from the cake.config file should be used instead, when available, which is not the case unfortunately. |
…onfiguration option
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
I've submitted #3059 as a proposed fix which support both config via cake.config/environment variables/args and a UseToolPath method in frosting. |
At least the |
But only for tools and not for addins and modules which are added through PackageReferences. |
@pascalberger wrote:
Fair enough, my projects where migrated from older build.cake files. Ah, yes, a |
This is the really the scenario that I was thinking about when I said:
Folks that are moving from Cake Scripting to Frosting would expect that any existing configuration to be applied, where it makes sense. That is why I think going forward Frosting should recognise if there is a |
I was just correcting the fact that they didn't make sense at all. There're code-paths that're used in So correct list configuration used by Forsting is:
Not used by frosting today
All above can already be configured with Frosting in
#3059 adds an |
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
* Frosting utilize CakeConfigurationProvider, enables config * Frosting IServiceCollection.UseToolPath * cake.config file * environment variables * command line arguments * Tools path should be resolved using configuration * fixes cake-build#2904
GH2904: Frosting cake.config&tool config support
🎉 This issue has been resolved in version v1.1.0 🎉 The release is available on: Your GitReleaseManager bot 📦🚀 |
Frosting should support configuration.
The text was updated successfully, but these errors were encountered: