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

Pretty printing extensible model. #6887

Open
ManishJayaswal opened this issue Nov 19, 2015 · 8 comments
Open

Pretty printing extensible model. #6887

ManishJayaswal opened this issue Nov 19, 2015 · 8 comments

Comments

@ManishJayaswal
Copy link
Contributor

Add better stack trace printing support as an example using the extensibility

@ManishJayaswal
Copy link
Contributor Author

@genlu

@amcasey
Copy link
Member

amcasey commented Nov 30, 2015

Presently, csi uses Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveScriptGlobals.Print.

@amcasey
Copy link
Member

amcasey commented Nov 30, 2015

Microsoft.CodeAnalysis.Interactive.InteractiveHost.Service also uses Microsoft.CodeAnalysis.Scripting.Hosting.InteractiveScriptGlobals.Print.

@amcasey
Copy link
Member

amcasey commented Nov 30, 2015

InteractiveScriptGlobals.Print delegates to the public abstract type Microsoft.CodeAnalysis.Scripting.Hosting.ObjectFormatter, which appears to have been designed as an extension point. It looks like we might just need to expose the members of ObjectFormatter.Formatter as extension points and then provide a way to swap out the ObjectFormatter without recompiling (e.g. MEF).

@amcasey
Copy link
Member

amcasey commented Dec 1, 2015

Specifying user-defined analyzers at compile-time seems like an analogous problem. I'll investigate how those are picked up and maybe we can do the same thing with "formatter" assemblies.

@amcasey
Copy link
Member

amcasey commented Dec 1, 2015

Analyzers are tagged with an attribute and then discovered using a MetadataReader. Once the fully qualified type names are known, the objects are instantiated via reflection.

@amcasey
Copy link
Member

amcasey commented Dec 2, 2015

I think we're going to start with a simpler model where the host object has a read-write ObjectFormatter property. I've made the change locally and it seems to "just work".

@amcasey
Copy link
Member

amcasey commented Feb 1, 2016

We scaled this back to user configurability in 1.2. A potential API is in place but is currently internal.

@amcasey amcasey modified the milestones: 1.3, 1.2 Feb 1, 2016
@ManishJayaswal ManishJayaswal modified the milestones: 1.3, 2.1 Jul 15, 2016
@ManishJayaswal ManishJayaswal modified the milestones: 2.1, 1.3 Jul 15, 2016
@jinujoseph jinujoseph modified the milestones: 15.1, 15.later May 22, 2017
@jinujoseph jinujoseph modified the milestones: 15.6, Unknown Nov 3, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants