-
Notifications
You must be signed in to change notification settings - Fork 32
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
Install and use licenses in standard file locations #741
Conversation
this is ready for review. Please note this is only a suggestion how to deal with the changes to the new license locations. Quickly tested the behavior locally. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aside from the suppressions, the changes LGTM.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.ReadabilityRules", "SA1128:ConstructorInitializerMustBeOnOwnLine", Justification = "Generated File.")] | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1516:ElementsMustBeSeparatedByBlankLine", Justification = "Generated File.")] | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.Naming Rules", "SA1303:ConstFieldNamesMustBeginWithUpperCaseLetter", Justification = "Generated File.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines have been added to suppress the StyleCop violations found in the source files added by the new licensing package.
We should not be doing this here because this will suppress those rules for all files.
I'm not sure if StyleCop.Analyzers has a way to suppress specific files from analysis (the best I could find was this issue which I commented on way back), but I have raised https://github.com/Particular/Operations.Licensing/pull/37 to fix these violations in the source package, so if that PR is merged then we can update to the latest package and remove these lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FYI https://github.com/Particular/Operations.Licensing/pull/37 has been merged.
@Particular/operations-licensing-maintainers please let us know when a new alpha has been released so we can update to it in this PR.
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.LayoutRules", "SA1516:ElementsMustBeSeparatedByBlankLine", Justification = "Generated File.")] | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("StyleCop.CSharp.Naming Rules", "SA1303:ConstFieldNamesMustBeginWithUpperCaseLetter", Justification = "Generated File.")] | ||
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Code", "PCR0001:Await used without specifying ConfigureAwait", Justification = "Default in WPF is fine.")] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line is a repitition of a line above and should be removed.
@@ -41,7 +41,7 @@ public License() | |||
|
|||
public bool ValidForApplication(string applicationName) | |||
{ | |||
return ValidApplications.Contains(applicationName) || ValidApplications.Contains("All"); | |||
return ValidApplications.Contains(applicationName) || ValidApplications.Contains("All") || applicationName == "NServiceBus"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need "NServiceBus" for the app name here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was added to accommodate for older licenses so I think we can just leave as is unless its causing issues for SI?
See:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Discussed in @Particular/serviceinsight-maintainers sync today. We're OK with this. It doesn't affect SI.
1.0.0-alpha0007 is now on myget
https://www.myget.org/feed/particular/package/nuget/Particular.Licensing.Sources/1.0.0-alpha0007
…On Tue, Aug 22, 2017 at 9:15 AM Adam Ralph ***@***.***> wrote:
***@***.**** commented on this pull request.
------------------------------
In src/ServiceInsight/App_Packages/Particular.Licensing/License.cs
<#741 (comment)>
:
> @@ -41,7 +41,7 @@ public License()
public bool ValidForApplication(string applicationName)
{
- return ValidApplications.Contains(applicationName) || ValidApplications.Contains("All");
+ return ValidApplications.Contains(applicationName) || ValidApplications.Contains("All") || applicationName == "NServiceBus";
Discussed in @Particular/serviceinsight-maintainers
<https://github.com/orgs/Particular/teams/serviceinsight-maintainers>
sync today. We're OK with this. It doesn't affect SI.
—
You are receiving this because you are on a team that was mentioned.
Reply to this email directly, view it on GitHub
<#741 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAHoZH7YBzZT2u70LRW7LIi9M9nPqL7kks5saoAHgaJpZM4O3ifB>
.
|
updated to alpha7 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @timbussmann, the changes look good to me.
Can you please:
- Entirely revert the changes to
GlobalSuppressions.cs
. There's still an EOL change in there which causes the file to be shown in the diff. - Squash all the commits into one
Then I'll be happy to approve/merge.
49dc42f
to
571150e
Compare
@adamralph reverted changes to the globalsuppressions.cs. Can't you squash yourself when merging using github's squash & merge feature? |
250930a
to
f340ac0
Compare
Thanks @timbussmann.
We never use that, since it does an I've squash locally and force pushed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Particular/serviceinsight-maintainers I've squashed @timbussmann's commits. If you're happy with the result can you please merge.
@timbussmann is there any functional change for the user here? Does this mean SI now respects new locations for license files? |
@adamralph yes, SI would now search the new file locations for licenses and would also install new licenses to the new storage location (to the user local app data) additionally to the registry. |
Thanks @timbussmann, I've updated the title and description, and marked this as a feature. Can you please check to see if the title and description are correct? @Particular/serviceinsight-maintainers given this is a feature, I've changed the next milestone from 1.7.2 to 1.8.0. |
@adamralph LGTM except that the file paths are alawys using |
👍 thanks, corrected.
I see PascalCase here: ServiceInsight/src/ServiceInsight/App_Packages/Particular.Licensing/FilePathLicenseStore.cs Line 10 in 249c565
|
@adamralph ah you're right. Sorry it was just the file name applied the lowercasing rule. Wondering whether that should be changed for the rest of the path as well now :/ |
ServiceInsight will now install licenses in the following location:
%localappdata%\ParticularSoftware\license.xml
...and it will use licenses located in any of the following locations:
{Application base directory\license.xml}
(e.g.C:\MyApps\MyEndpoint\license.xml
)%programdata%\ParticularSoftware\license.xml
%localappdata%\ParticularSoftware\license.xml