ermau / instant Goto Github PK
View Code? Open in Web Editor NEWResearch into instant feedback in software engineering
Home Page: http://ermau.com/instant-0-1/
License: Apache License 2.0
Research into instant feedback in software engineering
Home Page: http://ermau.com/instant-0-1/
License: Apache License 2.0
Once the initial method is enabled with the test code, you should be able to turn on display for methods other than the first enabled. This will require #32.
Need to have a way of recording and resetting by scope.
All other methods have their execution option disabled.
It either needs to be moved to the end of the first line, or as a quick-fix style popup.
Support dealing with changes in multiple unsaved files
Currently, object values are simply strings generated by [DebuggerDisplay] and/or .ToString(); We need to be able to take a snapshot of the object's state if we ever want to be able to move closer to debugger-like functionality.
We could:
This would probably be an optional feature, given potential performance implications.
This is likely due the fact that loops only try to re-display its own contents, which is messing with the ViewCache's internal count. It's re-purposing in-use displays, because it no longer sees them as in-use.
The auto-generated test code for a method does not update with method signature changes.
int x = 5; [x | 5]
int y = 2 [x | 5]
int x = 5;
Once you add the = 2, Roslyn sees the line as a 'valid' variable declarator, despite the lack of semicolon. Since it won't actually compile, it won't get executed and therefore there's a disparity between current and last executed operation IDs.
Breaking or continuing inside a loop is ignored as the end of the iteration.
Until #35 is fixed, some methods are not usable. We should avoid tagging them.
This is necessary so that we can unload and delete the generated code.
Compiler switches, conditional symbols, etc are not preserved from the real project to the instant compilation.
Cache external method call results in order to allow instant feedback for code that interacts with long running methods (expensive calculations, database interactions).
Also, allow users to optionally wait for these external calls to finish once (and be cached) if they initially time out.
For situations where there are multiple calls to a method (multiple calls in test code, recursion, etc), there needs to be a way to view and select which call to view from multiple calls.
Should be able to:
Occasionally, inserting new lines will remove the adorners below the new line and they will not reappear.
Targeted identification for a method to be logged (as opposed to applying logging universally). The current system just instruments the whole current file.
Dependency graphing for active file, avoid compiling non-needed files.
Infinite loop detection throws
System.OperationCanceledException: Infinite loop detected
at LiveCSharp.StringObjectLogger.EndInsideLoop() in D:\Instant\Prototype\StringObjectLogger.cs:line 68
when self assignment is performed within a loop construct (for or while).
public int DoIt(){
var n = 0;
for(var i = 0; i < 5; ++i){
i=i;
}
return n;
}
DoIt();
Instead of having the Instant button hovering next to each method, it'd be better if it were a quick fix-like option.
InvalidCastException
public int DoIt() {
var n = 0;
var i = 0;
while i<
i=i;
i++;
}
return n; } DoIt();
for (;; i++)
is not handled correctly, whereas:
for (;; ++i)
is.
Instead of using the status bar, we should show exceptions inline just like any other visualization. Once #21 is done we can let them inspect the exception just like any other variable.
Display method arguments passed into the method.
Load multiple files into a script engine without failing. Current version of Roslyn does not support namespaces, so this will have to be worked around.
This will not show any overlays:
json[kv.Key] = value;
Accept and run a block of code meant to setup and execute the target method.
Multiple assignments to the same variable does not provide any spacing to match up with each iteration.
For example:
void Foo()
{
for (int i = 0; i < 2; ++i)
{
int x = 6;
x = 7;
}
}
Foo();
Shows
| i | x |
| 0 | 6 |
| 1 | 7 |
| 2 | 6 |
| | 7 |
When it should show:
| i | x |
| 0 | 6 |
| | 7 |
| 1 | 6 |
| | 7 |
| 2 | |
Given that the output is really just strings right now, we need a way to truncate them for long strings, arrays, etc. Truncate at a certain point, and provide a button to pop open a window with the full contents.
I made VS2012 crash by editing code containing a loop while Instant is running. The stack trace from the ActivityLog.xml file:
System.OverflowException: Arithmetic operation resulted in an overflow. at Instant.VisualStudio.ViewCache.ClearViews() at Instant.VisualStudio.InstantVisualStudio.AdornCode(ITextSnapshot snapshot, String code, IDictionary2 methods, CancellationToken cancelToken) at Instant.VisualStudio.InstantVisualStudio.AdornCode(ITextSnapshot snapshot, CancellationToken token) at Instant.VisualStudio.InstantVisualStudio.OnLayoutChanged(Object sender, TextViewLayoutChangedEventArgs e) at Microsoft.VisualStudio.Text.Utilities.GuardedOperations.RaiseEvent[TArgs](Object sender, EventHandler
1 eventHandlers, TArgs args)
Steps to reproduce:
public void TestMe(string text, int max)
{
// What is it to begin with?
text = text;
max = max;
for (int i = 1; i < max; i++)
{
var cropped = text.Substring(0, i);
if (cropped.Contains(' '))
{
var lastSpace = cropped.LastIndexOf(' ');
cropped = cropped.Substring(0, lastSpace);
};
cropped += "...";
}
}
My environment is VS2012 premium RTM, .NET 4.5 RTM.
Regards
Andy
It took me a while to work out what had to be put in the box.
Could you pre-fill the box with the method signature so all the user has to do is fill in the parameters (if any)? Or a line of text explaining what needs to be typed in there.
Add checks against diagnostics before tracking methods, attempting to execute, etc.
Loops are only correctly handled at the top level
Due to the current license of Roslyn and it's closed source nature, the source needs to be ported to a system we can redistribute and ensure works on Mono.
Now that we're just compiling full code, including for the test code, private, protected and internal methods are no longer callable. Need to devise a way to call these.
There's no horizontal scrollbar in the demo code window.
Instead of loading all the source files, we can keep ones that haven't changed in memory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.