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

TypeName parsing API #100094

Merged
merged 52 commits into from
Apr 24, 2024
Merged

TypeName parsing API #100094

merged 52 commits into from
Apr 24, 2024

Commits on Jan 23, 2024

  1. Configuration menu
    Copy the full SHA
    22d131e View commit details
    Browse the repository at this point in the history

Commits on Jan 24, 2024

  1. assembly name parsing

    adamsitnik committed Jan 24, 2024
    Configuration menu
    Copy the full SHA
    5de9526 View commit details
    Browse the repository at this point in the history

Commits on Jan 25, 2024

  1. Configuration menu
    Copy the full SHA
    6dbcd59 View commit details
    Browse the repository at this point in the history

Commits on Jan 26, 2024

  1. decorator parsing

    adamsitnik committed Jan 26, 2024
    Configuration menu
    Copy the full SHA
    6f1f161 View commit details
    Browse the repository at this point in the history

Commits on Jan 29, 2024

  1. Configuration menu
    Copy the full SHA
    4ec4ea5 View commit details
    Browse the repository at this point in the history
  2. implement TypeName.GetType

    adamsitnik committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    f5a8716 View commit details
    Browse the repository at this point in the history

Commits on Jan 30, 2024

  1. nested types support

    adamsitnik committed Jan 30, 2024
    Configuration menu
    Copy the full SHA
    52cb351 View commit details
    Browse the repository at this point in the history

Commits on Jan 31, 2024

  1. support ignore case

    adamsitnik committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    60ad6f0 View commit details
    Browse the repository at this point in the history
  2. integrate with System.Private.CoreLib:

    - allow ignoring errors (return null)
    - assembly name parsing
    adamsitnik committed Jan 31, 2024
    Configuration menu
    Copy the full SHA
    b5349bd View commit details
    Browse the repository at this point in the history

Commits on Feb 1, 2024

  1. integrate with System.Private.CoreLib:

    - report errorIndex in the ex message
    - fix Full Framework build
    - fix nested types support
    - implement NativeAOT part
    adamsitnik committed Feb 1, 2024
    Configuration menu
    Copy the full SHA
    2dbd091 View commit details
    Browse the repository at this point in the history

Commits on Feb 2, 2024

  1. Configuration menu
    Copy the full SHA
    bd78637 View commit details
    Browse the repository at this point in the history
  2. build fix 1/n

    adamsitnik committed Feb 2, 2024
    Configuration menu
    Copy the full SHA
    8fda94a View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2024

  1. make TypeNameParser internal, extend TypeName with Parse and TryParse…

    … methods, move "allowFullyQualifiedName" to Options bag
    adamsitnik committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    745e7bb View commit details
    Browse the repository at this point in the history
  2. introduce TotalComplexity

    adamsitnik committed Feb 7, 2024
    Configuration menu
    Copy the full SHA
    ee43e71 View commit details
    Browse the repository at this point in the history

Commits on Feb 8, 2024

  1. introduce FullName, so we have Name, FullName and AssemblyQualifiedNa…

    …me and they are consistent with Sytem.Type APIs
    adamsitnik committed Feb 8, 2024
    Configuration menu
    Copy the full SHA
    a3a7f26 View commit details
    Browse the repository at this point in the history

Commits on Feb 9, 2024

  1. back tick error handling

    adamsitnik committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    a2296d0 View commit details
    Browse the repository at this point in the history
  2. move helper methods to a standalone helper type, include it as a link…

    … in test project and cover with tests, fix edge case bugs
    adamsitnik committed Feb 9, 2024
    Configuration menu
    Copy the full SHA
    4c8a6f7 View commit details
    Browse the repository at this point in the history

Commits on Feb 12, 2024

  1. Configuration menu
    Copy the full SHA
    eadf970 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    abf7543 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2024

  1. Configuration menu
    Copy the full SHA
    281c4f3 View commit details
    Browse the repository at this point in the history

Commits on Feb 19, 2024

  1. Configuration menu
    Copy the full SHA
    dc58cce View commit details
    Browse the repository at this point in the history

Commits on Feb 20, 2024

  1. Configuration menu
    Copy the full SHA
    b947977 View commit details
    Browse the repository at this point in the history

Commits on Feb 22, 2024

  1. Configuration menu
    Copy the full SHA
    4c9a7d5 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c63f3a8 View commit details
    Browse the repository at this point in the history
  3. add escaping support

    adamsitnik committed Feb 22, 2024
    Configuration menu
    Copy the full SHA
    83cdd1b View commit details
    Browse the repository at this point in the history

Commits on Feb 23, 2024

  1. Configuration menu
    Copy the full SHA
    23ad44f View commit details
    Browse the repository at this point in the history

Commits on Mar 19, 2024

  1. Configuration menu
    Copy the full SHA
    96b04f4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c8014fd View commit details
    Browse the repository at this point in the history

Commits on Mar 20, 2024

  1. Configuration menu
    Copy the full SHA
    1c76366 View commit details
    Browse the repository at this point in the history
  2. solve the TODOs

    adamsitnik committed Mar 20, 2024
    Configuration menu
    Copy the full SHA
    8cd205a View commit details
    Browse the repository at this point in the history

Commits on Mar 21, 2024

  1. Configuration menu
    Copy the full SHA
    ae514ec View commit details
    Browse the repository at this point in the history

Commits on Mar 22, 2024

  1. Configuration menu
    Copy the full SHA
    c7c67c8 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Jan Kotas <jkotas@microsoft.com>
    adamsitnik and jkotas committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    87804e9 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    97aad27 View commit details
    Browse the repository at this point in the history
  4. remove everything related to strict parsing (it will come back in a s…

    …imilar form but with a different name)
    adamsitnik committed Mar 22, 2024
    Configuration menu
    Copy the full SHA
    f940723 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    b1ed250 View commit details
    Browse the repository at this point in the history

Commits on Apr 2, 2024

  1. Configuration menu
    Copy the full SHA
    90a5582 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    9a5d01b View commit details
    Browse the repository at this point in the history

Commits on Apr 3, 2024

  1. don't pre-allocate full names for all declaring types, just store the…

    … full name of final type and the length of the substring
    adamsitnik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    cfb2216 View commit details
    Browse the repository at this point in the history
  2. build fix

    adamsitnik committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    d63365f View commit details
    Browse the repository at this point in the history

Commits on Apr 9, 2024

  1. Merge remote-tracking branch 'upstream/main' into typeNameParser

    # Conflicts:
    #	src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
    adamsitnik committed Apr 9, 2024
    Configuration menu
    Copy the full SHA
    7d685c8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    04731fb View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2024

  1. fix the build

    adamsitnik committed Apr 11, 2024
    Configuration menu
    Copy the full SHA
    113a87f View commit details
    Browse the repository at this point in the history

Commits on Apr 15, 2024

  1. AssemblyNameInfo

    adamsitnik committed Apr 15, 2024
    Configuration menu
    Copy the full SHA
    7005164 View commit details
    Browse the repository at this point in the history

Commits on Apr 16, 2024

  1. Configuration menu
    Copy the full SHA
    cd8a9c2 View commit details
    Browse the repository at this point in the history

Commits on Apr 17, 2024

  1. Merge remote-tracking branch 'upstream/main' into typeNameParser

    # Conflicts:
    #	src/libraries/System.Private.CoreLib/src/Resources/Strings.resx
    adamsitnik committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    1143a3e View commit details
    Browse the repository at this point in the history
  2. address API and code review feedback:

    - remove IEquatable Implementation from TypeName and AssemblyNameInfo (and GetHashCode too)
    - parser should not enforce runtime-specific rules like illegal type decorators (ByRef to ByRef etc)
    - add XML docs for the new AssemblyNameInfo type
    - propagate ProcessorArchitecture and ContentType from AssemblyNameInfo to the created AssemblyName
    - reject PublicKeyToken of odd length
    - remove checked arithmetic for getting node count: it's impossible to parse a name that would cause int overflow
    - add test case for escaped closing square bracket in the assembly name
    - remove unused code
    - address TODOs
    - add clarifications for ECMA divergence
    - remove one step from AssemblyNameInfo -> AssemblyName -> RuntimeAssemblyName conversion for NativeAOT
    adamsitnik committed Apr 17, 2024
    Configuration menu
    Copy the full SHA
    afdbc5f View commit details
    Browse the repository at this point in the history

Commits on Apr 18, 2024

  1. Configuration menu
    Copy the full SHA
    413be9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b424d76 View commit details
    Browse the repository at this point in the history

Commits on Apr 23, 2024

  1. address code review feedback:

    - unify syntax for character checks
    - remove false statement about unreachable code from the AssemblyNameParser
    - fix whitespace formatting
    - reduce code duplication and supress RS0030 for TypeSystem (we need to use System.Linq.ImmutableArrayExtensions.ToArray)
    - use hungarian notation for static fields
    - remove boxing
    - pass VSB by reference to avoid resource leaks
    - use HexConverter.TryDecodeFromUtf16
    adamsitnik committed Apr 23, 2024
    Configuration menu
    Copy the full SHA
    da203c0 View commit details
    Browse the repository at this point in the history

Commits on Apr 24, 2024

  1. address code review feedback:

    - don't throw TypeLoadException in the parser, let loader do that
    - add Debug.Assert(typeName.IsSimple) for clarity
    - always include invalid character index in the error message
    - remove resources added to CoreLib (they are never going to be used)
    - use [DoesNotReturn] and implement proper throw helper pattern
    - remove outdated comment about name validation
    - AssemblyNameInfo.Flags should return the exact value provided in ctor
    - don't allocate FullName until it's really needed
    - refactor Make and Resovle methods into one method
    - fix the test: specify namespace to make sure the type loader loads System.Int32 and later throws TypeLoadException for byref to byref
    adamsitnik committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    7979e27 View commit details
    Browse the repository at this point in the history
  2. Apply suggestions from code review

    Co-authored-by: Jan Kotas <jkotas@microsoft.com>
    adamsitnik and jkotas committed Apr 24, 2024
    Configuration menu
    Copy the full SHA
    22de761 View commit details
    Browse the repository at this point in the history