Consider specifying a given architecture for APIs when targetting AnyCPU
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 2.5k
- Forks
- 124
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 9
Description
Is your feature request related to a problem? Please describe.
Windows Forms needs to build for AnyCPU so customers can continue to build for AnyCPU. Some Win32 APIs are not really portable (notably the Pack = 1 versions), but for WinForms internal purposes the x86/x64 definitions are equivalent.
Describe the solution you'd like
The ability to specify in the settings json that we want specific listed APIs to come from a given architecture. This would also allow us to address things like Get/SetWindowLong/Ptr.
Describe alternatives you've considered
The only real alternative is to manually define things- which is very much not desirable. :)
Additional context
I spoke with @tannergooding a bit about this and he helped me understand this is not something we can really deal with at the Win32Metadata level as it has to allow for all consumers (can't presume .NET) and uses of the data structures (composition within other types, etc.).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the settings JSON handling and the API-generation path, then examine how architecture is represented for AnyCPU targets. Compare the behavior of Get/SetWindowLong/Ptr and the Pack = 1 APIs; done means listed APIs can be assigned a requested architecture without relying on manual definitions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100