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

[AOT compatible] Resolve AOT Build Error in Peek.UI #36194

Merged
merged 8 commits into from
Dec 9, 2024

Conversation

lei9444
Copy link
Contributor

@lei9444 lei9444 commented Dec 3, 2024

Summary of the Pull Request

  1. Resolved the AOT check error in Peek.UI by adding the partial keyword to the NeighboringItems and NeighboringItemsEnumerator classes.

Before:
image

After:
image

  1. update the NOTICE.md and verifyNoticeMdAgainstNugetPackages.ps1 to fix pipeline
    Root Cause: When a project sets to true, Microsoft.NET.ILLink.Tasks is automatically referenced, and the output includes this package with an (A) designation.
    image

This PR also updates NOTICE.md to include Microsoft.NET.ILLink.Tasks and verifyNoticeMdAgainstNugetPackages.ps1 to remove the Auto-referenced (A) description.

PR Checklist

  • Closes: #xxx
  • Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
  • Tests: Added/updated and all pass
  • Localization: All end user facing strings can be localized
  • Dev docs: Added/updated
  • New binaries: Added on the required places
  • Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx

Detailed Description of the Pull Request / Additional comments

Validation Steps Performed

@snickler
Copy link
Collaborator

snickler commented Dec 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 4, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@snickler
Copy link
Collaborator

snickler commented Dec 4, 2024

@crutkas @jaimecbernardo - it looks like the packages and NOTICE.md aren't syncing up in CI for some reason.

But work when built and ran locally on my device

image

@crutkas
Copy link
Member

crutkas commented Dec 4, 2024

#36136 is throwing same style error

@jaimecbernardo
Copy link
Collaborator

@crutkas @jaimecbernardo - it looks like the packages and NOTICE.md aren't syncing up in CI for some reason.

@snickler Looks like there's some auto reference thing added to the discovered packages?
image

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 4, 2024

@crutkas @snickler @jaimecbernardo Thanks for assisting with the CI issue. I’ve identified the root cause: when a project includes the property, it automatically references Microsoft.NET.ILLink.Tasks. When I tried adding this package to Directory.Packages.props, it resulted in a build error. To resolve this, I updated NOTICE.md by adding two lines. Do you think this is the right approach?

@jaimecbernardo
Copy link
Collaborator

Hi @lei9444 , The idea of notice.md is listing the packages we are using from nuget. I think the proper fix here would be changing the verification script to remove the :Auto-referenced line from the generated lines before comparing with NOTICE.md .

Now I'm not sure if we should keep the Microsoft.NET.ILLink.Tasks (A) line in there, but in theory it's a package we end up using from nuget, even if it's automatically added, so I guess we keep it in NOTICE.md.

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 5, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 5, 2024

/azp run

Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 5, 2024

Hi @jaimecbernardo @snickler @crutkas I have updated the script to remove the Auto_referenced line. This message describes what is (A) mean.
image
Please take a moment to review it when you have time.

@jaimecbernardo
Copy link
Collaborator

Just triggered a Dart build to test, thank you 😄

@lei9444
Copy link
Contributor Author

lei9444 commented Dec 6, 2024

Just triggered a Dart build to test, thank you 😄

Thank you! The first run failed, but I retriggered the pipeline, and everything passed.

Copy link
Collaborator

@jaimecbernardo jaimecbernardo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thank you!
I've done a sanity test to make sure this wasn't creating conflicting dlls of some sort and every utility worked well.
@crutkas @ethanfangg @DHowett , we need a CODEOWNER to approve. Can you please take a look?

@crutkas
Copy link
Member

crutkas commented Dec 6, 2024

Done

@jaimecbernardo
Copy link
Collaborator

@lei9444 I've merged main since we've updated spellcheck in main. After CI passes, feel free to merge 😉 🎉

@lei9444 lei9444 merged commit 3aec0a0 into main Dec 9, 2024
16 checks passed
Alapipapi added a commit to Alapipapi/PowerToys that referenced this pull request Dec 10, 2024
* add partial for aot support

* add Microsoft.NET.ILLink.Tasks to packages.props

* format

* Revert "format"

This reverts commit 742d5e2.

* add Microsoft.NET.ILLink.Tasks to notice.md

* add auto reference

* update script to remove the 'Auto-reference line'

---------

Co-authored-by: Jaime Bernardo <[email protected]>
stefansjfw added a commit to zadjii-msft/PowerToys that referenced this pull request Dec 18, 2024
* [Workspaces] implement the move feature (microsoft#35480)

* [Workspaces] Add move functionality

* spell checker

* [Workspaces] Modify Arranger to move apps without launch

* moved ipc helper

* removed callback

* use LauncherStatus in WindowArranger

* wait for launching next app

* launch in a separate thread and protect by mutexes

* update app version in advance

* changed canceling launch

* increased waiting time

* Fix optional parameter load from json

* changed arranger waiting time

* additional waiting time for Outlook

* added app id

* ensure ids before launch

* set id in editor

* minor updates

* [Workspaces] Move: Get the nearest window when moving a window

* [Workspaces] convert optional boolean to enum to avoid json problems

* Handle case when the new Application Property "moveIfExists" does not exist

* Re-implementing app-window pairing for moving feature.

* spell checker

* XAML formatting

* Fixing bug: IPC message not arriving

* spell checker

* Removing app-level-setting for move app. Also fixed compiler errors due styling.

* Updating editor window layout

* Re-implementing window positioning UI elements

* XAML formatting

* Code review findings

* Code cleanup

* Code cleanup

* Code cleanup

* code cleanup

* Code cleanup

* Code cleanup

* fix Move attribute after launch and snapshot

* Extend WindowArranger with PWA functionality to detect different PWA apps. PwaHelper moved to the common library

* fix repeat counter in the editor

* Code optimization

* code cleanup, optimization

* fix double-processing window

---------

Co-authored-by: Seraphima <[email protected]>
Co-authored-by: donlaci <[email protected]>

* [KeyboardManager]Fix mapping shift to numpad (microsoft#35890)

* Keyboard Manger fix numpad as shift

Fixed shift not being released if a numpad key as shift.

* Added comments

* Fix typo

* Fix the numpad unlocked key not working if the locked version is overridden by shift

* Fix spelling check.

* Revert the VK_CLEAR change.

---------

Co-authored-by: Jaime Bernardo <[email protected]>

* [Analyzers] Update .editorconfig with rules to relax IDE errors (microsoft#36095)

* [Analyzers] Remove duplicate pascal case style from .editorconfig

* [Analyzers] Configured severity for individual IDE and CA rules showing as errors in VS

Set severity for IDE0005, IDE0008, IDE0016, IDE0018, IDE0019, IDE0021, IDE0022, IDE0023, IDE0025, IDE0027, IDE0028, IDE0029, IDE0031, IDE0032, IDE0034, IDE0036, IDE0039, IDE0042, IDE0044, IDE0045, IDE0046, IDE0047, IDE0057, IDE0051, IDE0052, IDE0054, IDE0055, IDE0056, IDE0057, IDE0059, IDE0060, IDE0061, IDE0063, IDE0071, IDE0073, IDE0074, IDE0075, IDE0077, IDE0078, IDE0083, IDE0090, IDE0100, IDE0130, IDE160, IDE180, IDE0200, IDE0240, IDE0250, IDE0251, IDE0260, IDE0270, IDE0290, IDE0300, IDE0301, IDE0305, IDE1005, IDE1006, CA1859, CA2022, CA2263

* [Analyzers] Fix mismatched analyzer descriptions

* [Analyzers] Fix misspelling

* Update .editorconfig

Made the following style rules `silent` instead of `suggestion`: 
- Use explicit type instead of 'var'
- Use expression body for ...
- Use block-scoped namespace

* [Analyzers] Set IDE0290 to silent

* [Analyzers] Remove IDE1006 configuration from .editorconfig in favor of making exclusions for the few entries

* [Analyzers][Indexer] Add IDE1006 suppressions

* [Analyzers][Peek] Add IDE1006 suppression

* [Analyzers][MWB] Add IDE1006 suppression.

* [Analyzers][Plugins] Add IDE1006 suppression

* [Analyzers][ImageResizer] Suppress IDE0073 to retain original copyright

* [Analyzers] Remove IDE0073 severity change in .editorconfig

---------

Co-authored-by: Ani <[email protected]>

* [Workspaces] PWA follow-up (microsoft#36217)

* [PTRun][Calculator]Allow scientific notation with lowercase 'e' (microsoft#36187)

* [Workspaces] Add encoder parameter to bitmap.save() (microsoft#36228)

* [Workspaces] Add encoder parameter to bitmap.save()

* 1 more call fixed

* Move repeated code to the csharp library

* [Workspaces] Implement store of app window's size and position (microsoft#36086)

* [Workspaces] Implement store of app window's size and position

* Modifying the default values to -1. The program will use the original default values for the first run.

* [ScreenRuler]Add setting to show the measurement in an extra unit (microsoft#35887)

* display ruler: supporting millimeter and other units

* Measurement Tool: UI Setting for an extra unit

* Update images

* spelling

* spelling

* suit code style

* Fix for code review

* remove weird file

* rename field

* [Deps]Update MSTest from 3.5.0 to 3.6.3 (microsoft#36115)

* Update MSTest from 3.5.0 to 3.6.3

* Use STA attributes that are now part of MSTest

* Adding Jerry to community.md (microsoft#36232)

Update COMMUNITY.md

* [Workspaces] Arranger: smart timer (microsoft#36096)

* [Workspaces] Add move functionality

* spell checker

* [Workspaces] Modify Arranger to move apps without launch

* moved ipc helper

* removed callback

* use LauncherStatus in WindowArranger

* wait for launching next app

* launch in a separate thread and protect by mutexes

* update app version in advance

* changed canceling launch

* increased waiting time

* Fix optional parameter load from json

* changed arranger waiting time

* additional waiting time for Outlook

* added app id

* ensure ids before launch

* set id in editor

* minor updates

* [Workspaces] Move: Get the nearest window when moving a window

* [Workspaces] convert optional boolean to enum to avoid json problems

* Handle case when the new Application Property "moveIfExists" does not exist

* Re-implementing app-window pairing for moving feature.

* spell checker

* XAML formatting

* Fixing bug: IPC message not arriving

* spell checker

* Removing app-level-setting for move app. Also fixed compiler errors due styling.

* Updating editor window layout

* Re-implementing window positioning UI elements

* XAML formatting

* Code review findings

* Code cleanup

* Code cleanup

* Code cleanup

* code cleanup

* Code cleanup

* Code cleanup

* [Workspaces] Arranger: Reset wait timer after each successful arrange action

* fix merge error

---------

Co-authored-by: Seraphima <[email protected]>
Co-authored-by: donlaci <[email protected]>

* Upgrade to check-spelling v0.0.24 (microsoft#36235)

This upgrades to [v0.0.24](https://github.com/check-spelling/check-spelling/releases/tag/v0.0.24).

A number of GitHub APIs are being turned off shortly, so you need to upgrade or various uncertain outcomes will occur.

There's a new accessibility forbidden pattern:

> Do not use `(click) here` links
> For more information, see:
> * https://www.w3.org/QA/Tips/noClickHere
> * https://webaim.org/techniques/hypertext/link_text
> * https://granicus.com/blog/why-click-here-links-are-bad/
> * https://heyoka.medium.com/dont-use-click-here-f32f445d1021
```pl
(?i)(?:>|\[)(?:(?:click |)here|link|(?:read |)more)(?:</|\]\()
```

There are some minor bugs that I'm aware of and which I've fixed since this release, but I don't expect to make another release this month.

I've added a pair of patterns for includes and pragmas. My argument is that the **compiler** will _generally_ tell you if you've misspelled an include and the **linker** will _generally_ tell you if you misspell a lib.

- There's a caveat here: If your include case-insensitively matches the referenced file (but doesn't properly match it), then unless you either use a case-sensitive file system (as opposed to case-preserving) or beg clang to warn, you won't notice when you make this specific mistake -- this matters in that a couple of Windows headers (e.g. Unknwn.h) have particular case and repositories don't tend to consistently/properly write them.

* Adjust to community.md, shifting jerry's github user name (microsoft#36242)

Update COMMUNITY.md

* [AOT compatible] Resolve AOT Build Error in Peek.UI (microsoft#36194)

* add partial for aot support

* add Microsoft.NET.ILLink.Tasks to packages.props

* format

* Revert "format"

This reverts commit 742d5e2.

* add Microsoft.NET.ILLink.Tasks to notice.md

* add auto reference

* update script to remove the 'Auto-reference line'

---------

Co-authored-by: Jaime Bernardo <[email protected]>

* Awake Updates - `TILLSON_11272024` (microsoft#36049)

* Update with bug fixes for tray icon and support for parent process

* Process information enum

* Update the docs

* Fix spelling

* Make sure that PID is used in PT config flow

* Logic for checks based on microsoft#34148

* Update with link to PR

* Fixes microsoft#34717

* Small cleanup

* Proper task segmentation in a function

* Cleanup the code

* Fix synchronization context issue

* Update planning doc

* Test disabling caching to see if that manages to pass CI

* Cleanup to make sure that we're logging things properly.

* Update ci.yml

* Disable cache to pass CI

* Retry logic

* Cleanup

* Code cleanup

* Fixes microsoft#35848

* Update notes and codename

* After third attempt, log error instead of throwing exception

* More cleanup to avoid double execution

* Add expected word

* Safeguards for bad values for timed keep-awake

* More updates to make sure I am using uint

* Update error message

* Update packages

* Fix notice and revert CsWinRT upgrade

* Codename update

* Update expect.txt

* Update the struct

* Ensuring we're properly awaiting tray initialization

* Update to make sure tray reflects the bound process

* Cleanup, proper JSON serialization for logs.

* Not needed.

* Add command validation logic

* Moving the initialization logic earlier

* Make sure we show the display state in the tooltip

* Update tray string

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update src/modules/awake/Awake/Core/Manager.cs

Co-authored-by: Jaime Bernardo <[email protected]>

* Update logic for icon resets

* Update doc

* Simplify function for setting mode shell icon

* Issues should be properly linked

* Minor cleanup

* Update timed behavior

---------

Co-authored-by: Jaime Bernardo <[email protected]>
Co-authored-by: Clint Rutkas <[email protected]>

* [Workspaces] detecting right app version (microsoft#36100)

* [Workspaces] Add move functionality

* spell checker

* [Workspaces] Modify Arranger to move apps without launch

* moved ipc helper

* removed callback

* use LauncherStatus in WindowArranger

* wait for launching next app

* launch in a separate thread and protect by mutexes

* update app version in advance

* changed canceling launch

* increased waiting time

* Fix optional parameter load from json

* changed arranger waiting time

* additional waiting time for Outlook

* added app id

* ensure ids before launch

* set id in editor

* minor updates

* [Workspaces] Move: Get the nearest window when moving a window

* [Workspaces] convert optional boolean to enum to avoid json problems

* Handle case when the new Application Property "moveIfExists" does not exist

* Re-implementing app-window pairing for moving feature.

* spell checker

* XAML formatting

* Fixing bug: IPC message not arriving

* spell checker

* Removing app-level-setting for move app. Also fixed compiler errors due styling.

* Updating editor window layout

* Re-implementing window positioning UI elements

* XAML formatting

* Code review findings

* Code cleanup

* Code cleanup

* Code cleanup

* code cleanup

* Code cleanup

* Code cleanup

* [Workspaces] fix detection of specific version of apps

---------

Co-authored-by: Seraphima <[email protected]>
Co-authored-by: donlaci <[email protected]>

* Move the XamlStyler config to src/ (microsoft#36202)

my never ending goal to minimize files in the root dir

* [AdvancedPaste]Add Semantic Kernel opt-in to allow chaining of paste actions (microsoft#35902)

* [AdvancedPaste] Semantic Kernel support

* Changed log-line with potentially sensitive info

* Spellcheck issues

* Various improvements for Semantic Kernel

* Spellcheck issue

* Refactored Clipboard routines

* Added integration tests for KernelService

* Extra telemetry for AdvancedPaste

* Added 'Hotkey' suffix to AdvancedPaste_Settings telemetry event

* Added IsSavedQuery

* Added KernelQueryCache

* Refactoring

* Added KernelQueryCache to BugReportTool delete list

* Added opt-n for Semantic Kernel

* Fixed bug with KernelQueryCache

* Ability to view last AI chat message on error

* Improved kernel query cache

* Used System.IO.Abstractions and improved tests

* Fixed under-count of token usage

* Used Semantic Kernel icon

* Cleanup

* Add missing EndProject line

* Fix dependency version conflicts

* Fix NOTICE.md

* Correct place of SemanticKernel in NOTICE.md

* Unlinked CustomPreview toggle from AI

* Added Microsoft.Bcl.AsyncInterfaces dependency to AdvancedPaste

* Fixed NOTICE.md order

* Moved Custom Preview to behaviour section

* Made Image to Text raise error on empty output

* Added AIServiceBatchIntegrationTests

* Updated AIServiceBatchIntegrationTests

* Added prompt moderation

* Moved GPO Infobar to better location

* [Launcher]Port from WPF-UI to .NET 9 WPF (microsoft#36215)

* Initial implementation

* Fix fluent style

* Fix no endline

* Update expect.txt

* Fix formatting

* Fix light theme looking bad on Windows 10

* fix formatting

* test change

* Now really fixed W10

* Add a comment

* Fix typos

* Fix spellcheck errors

* Fix spellcheck pattern for websites

* Change patterns for spellcheck in the right file

* Fix XAML styling

* Fix contrast colors on W11

* Fix formatting

* Removed emty line

* Fix formatting

* Added comment to fluentHC file

* fix comment

* Fix Windows10 again.
Adress feedback.

* W11 fix chaning from high contrast to normal not having correct background

* W10 Fix high contrast not working after switching from light/dark moed

* Address feedback

* Fix formatting

* Second W11 fix chaning from high contrast to normal not having correct background

* [UX]Updating New+ and Settings icons (microsoft#36290)

* Updated icons

* Updating more icons and icos

* [Settings][Dashboard] Accessibility fixes (microsoft#36280)

* make narrator announce buttons/toggles

* add toggles module name

* [ci]Sign OpenAI dll that's not signed (microsoft#36299)

* Update CODEOWNERS to include gordon, jerry and kayla (microsoft#36308)

* Update CODEOWNERS

* Update names.txt

* Making the powertoys-code-owners team code owners (microsoft#36310)

* Update CODEOWNERS

* Update names.txt

* Update CODEOWNERS

* [FZEditor]Fix Create new layout dialog radio buttons IsChecked values  (microsoft#36320)

* 0.87 changelog (microsoft#36335)

* 0.87 changelog

* Fix spellcheck

* Update README.md

Co-authored-by: Heiko <[email protected]>

---------

Co-authored-by: Heiko <[email protected]>

---------

Co-authored-by: Laszlo Nemeth <[email protected]>
Co-authored-by: Seraphima <[email protected]>
Co-authored-by: donlaci <[email protected]>
Co-authored-by: Ionuț Manța <[email protected]>
Co-authored-by: Jaime Bernardo <[email protected]>
Co-authored-by: Jeremy Sinclair <[email protected]>
Co-authored-by: Ani <[email protected]>
Co-authored-by: PesBandi <[email protected]>
Co-authored-by: Wenjian Chern <[email protected]>
Co-authored-by: Youssef Victor <[email protected]>
Co-authored-by: Clint Rutkas <[email protected]>
Co-authored-by: Josh Soref <[email protected]>
Co-authored-by: leileizhang <[email protected]>
Co-authored-by: Den Delimarsky 🔐 <[email protected]>
Co-authored-by: Niels Laute <[email protected]>
Co-authored-by: Davide Giacometti <[email protected]>
Co-authored-by: Heiko <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants