microsoftgraph / microsoftgraph/msgraph-sdk-dotnet
Xamarin: make SDK linker-safe
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 789
- Forks
- 264
- Avg merge
- 15h 17m
- Merged PRs (30d)
- 3
Description
I am using this SDK in a Xamarin project and have full linking enabled. This results in classes from this library being linked away although needed, e.g. for deserializing JSON responses - which then of course results in an exception/app crash at runtime.
Of course I could exclude the whole library from the linking process but given the rather large SDK size (~4MB) I prefer not to. Right now I exclude the linked away classes manually from the linking process. However I saw that responses not always have all properties (and this even differs from user to user although the same code is being executed). So even when everything works for my OneDrive account, it is possible that my app users have different JSON responses and the classes for deserializing them arent included in the app.
It would be great if the SDK could be made linker-safe so that I wouldn't have to care and exclude classes manually. This can be done by Attributes as described here or here
AB#7293
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 reproducing the issue in a Xamarin project with full linking enabled, using the linker documentation linked in the report for setup. Identify which SDK classes needed for JSON deserialization are removed and evaluate the attribute-based linker approach described in the linked references. Done means the SDK works with full linking without manual class exclusions and does not crash when responses vary.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- mobile-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100