Skip to content
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

Multiple warnings in source code #15015

Open
11 of 29 tasks
emmagarland opened this issue Oct 21, 2023 · 13 comments · Fixed by #15019 or #15116
Open
11 of 29 tasks

Multiple warnings in source code #15015

emmagarland opened this issue Oct 21, 2023 · 13 comments · Fixed by #15019 or #15116

Comments

@emmagarland
Copy link
Contributor

emmagarland commented Oct 21, 2023

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

12.3.0+ (but applies to any version)
v14 (latest)

Bug summary

There are thousands of warnings within the Umbraco source code. I was hoping to try and start to reduce these as use this issue as a base to work from (unless there already is one?).

My idea is to go through each project and check that there are no warnings, and if there are, remove them.

This is until perhaps we can set warnings as errors to keep it clean for future? Bigger step/decision! I have started an initial PR for this at #15019.

Specifics

I recommend ticking off each project if there are no warnings, or if all warnings have since been removed.
To maintain this, we would also set warnings as errors (something for HQ to consider)

Steps to reproduce

  1. Open IDE of choice
  2. Build
  3. Observe warnings

Expected result / actual result

Minimal to no warnings ultimately

Tasks

@github-actions
Copy link

Hi there @emmagarland!

Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better.

We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.

  • We'll assess whether this issue relates to something that has already been fixed in a later version of the release that it has been raised for.
  • If it's a bug, is it related to a release that we are actively supporting or is it related to a release that's in the end-of-life or security-only phase?
  • We'll replicate the issue to ensure that the problem is as described.
  • We'll decide whether the behavior is an issue or if the behavior is intended.

We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions.

Thanks, from your friendly Umbraco GitHub bot 🤖 🙂

@github-actions
Copy link

Hi @emmagarland,

We're writing to let you know that we would love some help with this issue. We feel that this issue is ideal to flag for a community member to work on it. Once flagged here, folk looking for issues to work on will know to look at yours. Of course, please feel free work on this yourself ;-). If there are any changes to this status, we'll be sure to let you know.

For more information about issues and states, have a look at this blog post.

Thanks muchly, from your friendly Umbraco GitHub bot :-)

@Migaroez
Copy link
Contributor

Hey Emma!

As a new HQ'er this is something that popped on my radar as well and I am very pleased to see some community initiative on this.

I will talk this trough with the team on what our vision for this is, feel free to continue making smaller PR's and ill get back to you asap 🤗

@Migaroez Migaroez self-assigned this Oct 23, 2023
@Zeegaan
Copy link
Member

Zeegaan commented Oct 24, 2023

This would be great! I did some work on this a while ago, just trying to relieve some of this, by reformatting our code files: #12438 (this is just for the core project)

@emmagarland
Copy link
Contributor Author

Thanks @Migaroez and @Zeegaan! Glad that you like the idea, looking forward to hearing more.

Nice to see you did a bunch of updates already @Zeegaan 👍

Emma

@jacksorjacksor
Copy link

(Going to look into this as part of Umbraco UK Festival hackathon, if anyone else is then let me know!)

@emmagarland
Copy link
Contributor Author

Sounds good @jacksorjacksor !

I have a PR open to set warnings as errors on projects without warnings, but @Migaroez is going to let me know HQ stance on that.

In the meantime, removing warnings is fair game for all (there are lots)!

@jacksorjacksor
Copy link

jacksorjacksor commented Nov 2, 2023

Data analysis:

My build created 2299 errors, split over these 15 projects:

Project Count
Umbraco.Infrastructure 700
Umbraco.Tests.Integration 512
Umbraco.Web.BackOffice 316
Umbraco.Tests.UnitTests 302
Umbraco.Core 269
Umbraco.PublishedCache.NuCache 102
Umbraco.Cms.Persistence.SqlServer 31
Umbraco.Web.Common 24
Umbraco.Tests.Benchmarks 18
Umbraco.Tests.Common 7
Umbraco.Web.Website 6
Umbraco.Cms.Persistence.Sqlite 5
Umbraco.Cms.Persistence.EFCore 3
Umbraco.Examine.Lucene 3
Umbraco.Web.UI 1
Grand Total 2299

Data set:
BuildWarnings.csv

jacksorjacksor pushed a commit to jacksorjacksor/Umbraco-CMS that referenced this issue Nov 2, 2023
Removes warning from Umbraco.Web.UI as part of umbraco#15015
mikecp pushed a commit that referenced this issue Nov 2, 2023
Removes warning from Umbraco.Web.UI as part of #15015
@emmagarland
Copy link
Contributor Author

Data analysis:

My build created 2299 errors, split over these 15 projects:

|Project|Count|

|---|---|

|Umbraco.Infrastructure|700|

|Umbraco.Tests.Integration|512|

|Umbraco.Web.BackOffice|316|

|Umbraco.Tests.UnitTests|302|

|Umbraco.Core|269|

|Umbraco.PublishedCache.NuCache|102|

|Umbraco.Cms.Persistence.SqlServer|31|

|Umbraco.Web.Common|24|

|Umbraco.Tests.Benchmarks|18|

|Umbraco.Tests.Common|7|

|Umbraco.Web.Website|6|

|Umbraco.Cms.Persistence.Sqlite|5|

|Umbraco.Cms.Persistence.EFCore|3|

|Umbraco.Examine.Lucene|3|

|Umbraco.Web.UI|1|

|Grand Total|2299|

Data set:

BuildWarnings.csv

Nice - and now we can tick off the UI project too!

@Migaroez
Copy link
Contributor

Migaroez commented Nov 3, 2023

Hey y'all

We had a chat about this internally and I don't think it comes as a surprise that we would love all the warnings to go away as well.

Below are a couple of pointers/ideas

  • Keep the PR's coming but keep them small(ish) to avoid double work and support faster merging, don't forget to reference this ticket.
  • We can keep this ticket open as a tracking ticket if @emmagarland doesn't mind maintaining it.
  • We will further internally discus when the right time would be to turn on warnings as errors.
  • We are making our Internal review process a bit stricter to hopefully catch any new warnings from popping up.

@Migaroez Migaroez reopened this Nov 3, 2023
@emmagarland
Copy link
Contributor Author

All sounds brilliant, thanks @Migaroez for following this all up!

Agreed re small PRs.

Happy to keep this open as a tracking ticket, and I'll keep on top of it.

Looking forward to the outcome of this!

Emma

@emmagarland
Copy link
Contributor Author

Hey @Migaroez, thanks for merging the first phase of this task!

I'll reopen this issue to keep it as a tracking issue if that's cool.

Cheers,

Emma

@emmagarland emmagarland reopened this Aug 27, 2024
@emmagarland
Copy link
Contributor Author

emmagarland commented Aug 27, 2024

Data analysis:

My build created 2299 errors, split over these 15 projects:

Project Count
Umbraco.Infrastructure 700
Umbraco.Tests.Integration 512
Umbraco.Web.BackOffice 316
Umbraco.Tests.UnitTests 302
Umbraco.Core 269
Umbraco.PublishedCache.NuCache 102
Umbraco.Cms.Persistence.SqlServer 31
Umbraco.Web.Common 24
Umbraco.Tests.Benchmarks 18
Umbraco.Tests.Common 7
Umbraco.Web.Website 6
Umbraco.Cms.Persistence.Sqlite 5
Umbraco.Cms.Persistence.EFCore 3
Umbraco.Examine.Lucene 3
Umbraco.Web.UI 1
Grand Total 2299
Data set: BuildWarnings.csv

Current status of 'contrib', 3636 warnings split over 19 projects:

  1. Umbraco.Cms.Api.Delivery: 16
  2. Umbraco.Cms.Api.Management: 92
  3. Umbraco.Cms.Persistence.EFCore: 9
  4. Umbraco.Cms.Persistence.SqlServer: 31
  5. Umbraco.Cms.Persistence.Sqlite: 89
  6. Umbraco.Cms.Targets: 525
  7. Umbraco.Core: 525
  8. Umbraco.Examine.Lucene: 10
  9. Umbraco.Infrastructure: 697
  10. Umbraco.JsonSchema: 34
  11. Umbraco.PublishedCache.NuCache: 81
  12. Umbraco.TestData: 11
  13. Umbraco.Tests.Benchmarks: 15
  14. Umbraco.Tests.Common: 5
  15. Umbraco.Tests.Integration: 1269
  16. Umbraco.Tests.UnitTests: 319
  17. Umbraco.Web.Common: 40
  18. Umbraco.Web.UI: 1 (cannot currently find this warning)
  19. Umbraco.Web.Website: 13

As these are resolved, we can ensure warnings as errors are activated per project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment