Skip to content

Establish initial project code and tests #1

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

Merged
merged 8 commits into from
Jul 20, 2015
Merged

Conversation

daviwil
Copy link
Contributor

@daviwil daviwil commented Jul 8, 2015

Hi everyone,

This pull request contains the first big commit of code that I migrated over from our language service prototype. The high-level structure of the project is as follows:

  • src folder
    • PowerShellEditorServices: The core library which can be consumed by any .NET app
    • PowerShellEditorServices.Host: The host process for exposing the core library via an arbitrary transport
    • PowerShellEditorServices.Transport.Stdio: The standard I/O transport implementation that follows the TypeScript language service protocol
  • submodules folder
    • Contains a git submodule reference to Script Analyzer to be used in the Analysis Service
  • test folder
    • Contains xUnit test projects that mirror the folders in src but with the PowerShellEditorServices.Test prefix

At this point, the code is working and tested for basic scenarios but there is still a lot of cleanup work left to do. I'm starting the pull request now to get the discussion started, but I'll be pushing further changes here over the next few days as I clean up and refactor a few more things.

Please take a look at let me know what you think. I'd love to hear your thoughts on code organization, namespace and type naming, code style, etc. Especially let me know what implementation problems I need to address soon, specifically around PowerShell hosting. Your expertise from working on PoshTools will help me shortcut a lot of future issues 😄. I'll file bugs for all of the larger items to address so that they're tracked.

Thank you!

daviwil added 2 commits July 8, 2015 15:49
This commit contains the core codebase for the PowerShell Editor
Services project.  It establishes the high-level project structure
and design.  Some initial tests are also included to verify high-
level functionality.
@daviwil
Copy link
Contributor Author

daviwil commented Jul 9, 2015

Also forgot to mention that I left out a bunch of language service features that another developer wrote because I wanted to give her the opportunity to check those in. She will send a pull request for those changes once this pull request is complete.

daviwil added 5 commits July 16, 2015 10:51
Change the PSScriptAnalyzer submodule to point to the original
GitHub repository.
This change also makes XML comments mandatory on all public
interfaces for Release builds of the core library project.
This change completes the work to have all Transport.Stdio message types
be marked with a MessageTypeNameAttribute.  This attribute specifies
the name used to identify the type in the JSON messages that are sent
between client and editor service.

The MessageTypeResolver also validates whether a message type is decorated
with an attribute and throws a debug assert if it is missing.  This helps
message type authors remember to add the attribute so that everything works
correctly.

Finally, all existing message types have been updated to follow the new
message type decoration pattern.
This change introduces new types that wrap/replace the types
from System.Management.Automation which should not be exposed
outside of the core Editor Services library.  The reasoning is
that a consumer of our higher-level service types through an
EditorSession should not have to take a dependency on the
System.Management.Automation assembly (since this may become
more complicated in the future).  This also gives us a chance to
reshape the information that we return from API calls so that we
can provide extra value in some places and remove unneeded
information in others.

Going forward we will carefully monitor any new function
signatures to ensure that core PowerShell types aren't being
exposed through the abstraction unnecessarily.
@daviwil daviwil force-pushed the daviwil/initial-codebase branch 2 times, most recently from f9eaf08 to 3d15c28 Compare July 20, 2015 15:46
This change adds new tests for the LanguageService class.  It also
establishes a new shared library for test assemblies so that both
the core library tests and the host process tests can use the same
test data.  Usage of the shared test data in the host tests will
be added in a later commit.
@daviwil daviwil force-pushed the daviwil/initial-codebase branch from 3d15c28 to c263982 Compare July 20, 2015 16:00
daviwil added a commit that referenced this pull request Jul 20, 2015
Establish initial project code and tests
@daviwil daviwil merged commit 4b9d4a4 into master Jul 20, 2015
@daviwil
Copy link
Contributor Author

daviwil commented Jul 20, 2015

AppVeyor build is now green! Since we've got a good baseline now, I'm going to go ahead and merge this pull request so that we can get Kayla's language service features merged as well.

My immediate goal now is to get NuGet packaging and release versioning automation working so that we can start working against private NuGet packages until public release.

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.

1 participant