Giter Site home page Giter Site logo

legislator's People

Contributors

iisresetme avatar vors avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

legislator's Issues

Add support for PowerShell >=6

Since [AppDomain] is no longer the entry point for emitting new assemblies at runtime, Legislator's interface command fails on PowerShell Core and PowerShell 7:

PS ~> interface IThing {}
interface: Method invocation failed because [System.AppDomain] does not contain a method named 'DefineDynamicAssembly'.

The reflection APIs have been split into smaller packages in .NET Core, but since S.M.A already depend on System.Reflection.Emit, and the API surface remains largely unchanged, porting to PowerShell >6 should be trivial

Error handling bug: unresolved return type throws unhelpful "Cannot find an overload for "new" and the argument count: "2""

Failure to create interface types due to unresolved return type names currently result in the following unhelpful error message:

PS C:\> interface IPoint {
>>   property int X
>>   property ing Y # classic typo
>> }
property:
Line |
   4 |    property ing Y
     |    ~~~~~~~~~~~~~~
     | Cannot find an overload for "new" and the argument count: "2".

This is obviously not helpful, expected error should indicate the actual problem:

InvalidOperation:
Line |
   4 |    property ing Y
     |             ~~~
     | Unable to find type [ing].

Error handling bug: inappropriate closing of incomplete interface types

Lack of explicit error handling in interface appears to allow for incomplete type emission:

interface IIncomplete {
  property string Name
  property nonExistingType Thing
}

Resulting in creation of IIncomplete, but without nonExistingType member:

PS ~> [IIncomplete].DeclaredMembers.Name
Name

Add support for events

The CLI interface specification allows for the declaration of events in interfaces.

Legislator currently only supports properties and methods.

Add support for declaring events as part of an interface as well.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.