-
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Make the process fail if the changelog file is not found #12
Comments
I think this is a good idea, but I think it should be a warning by default, mostly because the design of this library is 'implicit' by default. Let's dive into why. When you add This library by comparison currently has no such opt-in requirement - it implicitly discovers and uses a CHANGELOG file in the current project directory if one exists. This means that there's no user action we can point to to justify a fail-by-default behavior in my opinion. There are two ways we could address this IMO:
|
Thank you for the clear explanations. Personally, I always preferred explicit behaviour from my code and so would prefer the second option. |
I agree. A few other people have spoken up as well. We should remove the implicit mode and provide a helpful error if the user doesn't specify a |
Looking at the code it seems like there are already severals checks done for the file existence: Lines 24 to 28 in 7ad0461
KeepAChangelog/src/Ionide.KeepAChangelog.Tasks/Library.fs Lines 49 to 54 in 7ad0461
I guess they are currently only generating warnings and we should hard fail in these cases. What would be the correct way of failing?
|
@tboby just added two msbuild warnings verifying that the changelog file is provided and exists. |
So, now that it's no longer implicit, what behaviour do we want? I suspect that the Do we want the Alternatively, do we want to add a property to supress the validation? Trying to think if it would be annoying if you Build.props this package and then your test project starts throwing errors. |
Hello @baronfel,
this is an issue created from our discussion on F# slack.
Currently, if the changelog file is not found there is no indication for the user. The
dotnet pack
command succeed as if nothing was wrong.I personally think that if the changelog file is not found at the specified path, the process should fail because it is generating something from an invalid context.
For example, when we specify the
PackageLicenseFile
node in anfsproj
the task is failing if the provided value is invalid or the file is missing/not found.The text was updated successfully, but these errors were encountered: