Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all 106942 articles
Browse latest View live

RSRP-451569: Replace obsolete functions that developer marked by Obsolete attribute

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Dec 7, 2015 2:09:06 PM
Updated Oct 12, 2018 1:26:41 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.2, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Please add a tool for replace obsolete functions that developer marked by Obsolete attribute by replacement function.
For example

[Obsolete("This functions is obsolted.Please replace by SumBy function")] 
public static double[] SumValues(this double[] array, double value)
{
return SumBy(array, value);
}
when R# saw SumValues function shows new fix item for replace SumValues by SumBy.

RSRP-471803: Under certain circumstances, dependencies between classes are not noticed by Resharper

$
0
0
Reporter Max Guernsey (maxguernseyiii) Max Guernsey (maxguernseyiii)
Created Oct 10, 2018 7:45:12 PM
Updated Oct 12, 2018 1:33:56 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Waiting for Info
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

The problem is that sometimes some methods which are in fact used are treated as if there are no references to it even though there are several references to it. Practically speaking, this affects everything but its biggest impact on me is that it makes rename and safe delete unsafe operations. It also makes the code render stupidly - graying out public methods that are called by the method right above or below it in the same file.

I'm not going to engage in magical thinking and pretend I know the cause so I'll just dump what I think I know and hope someone with more context can figure out the problem.

Here are the circumstances, some of which probably matter:

  1. The code is in a .NET Standard project.
  2. The project has file references to copies of UnityEngine.dll et al
  3. The code references other .NET standard projects, which are functioning perfectly.
  4. All of the classes where the problem is happening inherit MonoBehaviour.

Here are things that I am pretty sure aren't sole causal factors:

  1. .NET Standard: I have other projects in the same solution and they work just fine.
  2. Just using Unity classes I have several classes which do not inherit MonoBehaviour and Resharper works fine with all of them.
  3. The presence or absence of the Unity plug-in. I can't figure out how that plug-in is supposed to help me but it has absolutely no impact on this problem either way.

I'd be glad to add any more information upon request.

RSRP-471823: An error occurred while decompiling the method (method: 60017D0, type: , assembly: ). Unable to cast object of type 'JetBrain

$
0
0
Reporter Andrey Davydov (Andrey.Davydov) Andrey Davydov (Andrey.Davydov)
Created Oct 12, 2018 12:07:47 PM
Updated Oct 12, 2018 1:40:55 PM
Subsystem Decompiler
Assignee Nikita Raba (nikita.raba)
Priority Normal
State Submitted
Type Exception
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
Timeline Wave 183 — JetBrains dotTrace Timeline Viewer 2018.3 EAP 1 Build 183.0.20181005.162553-eap01




An error occurred while decompiling the method (method: <Method> 6001A10, type: <Type>, assembly: <Assembly>). Unable to cast object of type 'JetBrains.Metadata.Reader.Impl.MetadataClassType' to type 'JetBrains.Metadata.Reader.API.IMetadataReferenceType'.

— EXCEPTION #1/2 [InvalidCastException]
Message = “Unable to cast object of type 'JetBrains.Metadata.Reader.Impl.MetadataClassType' to type 'JetBrains.Metadata.Reader.API.IMetadataReferenceType'.”
ExceptionPath = Root.InnerException
ClassName = System.InvalidCastException
HResult = E_NOINTERFACE=COR_E_INVALIDCAST=80004002
Source = JetBrains.Decompiler.Core
StackTraceString = “
 at JetBrains.Decompiler.Typing.ExpressionTyper.InferType(IExpression expression)
 at JetBrains.Decompiler.Typing.ExpressionTyper.InferType(IExpression expression)
 at JetBrains.Decompiler.Typing.ExpressionTyper.GetType(IExpression expression)
 at JetBrains.Decompiler.Typing.TypeCastInserter.<Run>b__6_0(IBinaryOperationExpression expression)
 at JetBrains.Decompiler.Ast.NodeEx.Visit[T](INode node, Action`1 preorderAction, Action`1 postorderAction)
 at JetBrains.Decompiler.Ast.NodeEx.Visit[T](INode node, Action`1 preorderAction, Action`1 postorderAction)
 at JetBrains.Decompiler.Ast.NodeEx.Visit[T](INode node, Action`1 preorderAction, Action`1 postorderAction)
 at JetBrains.Decompiler.Ast.NodeEx.Visit[T](INode node, Action`1 preorderAction, Action`1 postorderAction)
 at JetBrains.Decompiler.Typing.TypeCastInserter.Run()
 at JetBrains.Decompiler.MethodDecompiler.UnguardedDecompile(IMetadataMethod metadataMethod, IDecompiledMethodBase ownerMethod)
 at JetBrains.Decompiler.MethodDecompiler.Decompile(IMetadataMethod metadataMethod)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “An error occurred while decompiling the method (method: <Method> 6001A10, type: <Type>, assembly: <Assembly>). Unable to cast object of type 'JetBrains.Metadata.Reader.Impl.MetadataClassType' to type 'JetBrains.Metadata.Reader.API.IMetadataReferenceType'.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains dotTrace Timeline Viewer 2018.3 EAP 1 Build 183.0.20181005.162553-eap01”
Data.SccRevisionEnv = “
dotTrace\Standalone:
    git::refs/heads/183-eap1::0495257f89c3b777337122b4cd47e39d1ffd3dd7


Platform\Core\Shell:
    git::refs/heads/183-eap1::0eb0065d062c9bfc4eb1590bcaf200021b887a20

InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Util.Logging.Logger.LogException(String comment, Exception ex)
 at JetBrains.Util.Logging.Logger.LogException(String comment, Exception ex)
 at JetBrains.Decompiler.MethodDecompiler.Decompile(IMetadataMethod metadataMethod)
 at JetBrains.Util.CollectionUtil.GetOrCreateValue[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 factory)
 at JetBrains.Decompiler.ClassDecompiler.DecompileMethods(MethodDecompiler methodDecompiler, IDecompiledClass decompiledClass, IProgressIndicator indicator)
 at JetBrains.Decompiler.ClassDecompiler.Decompile(IMetadataTypeInfo typeInfo, IProgressIndicator indicator)
 at JetBrains.Util.CollectionUtil.GetOrCreateValue[TKey,TValue](IDictionary`2 dictionary, TKey key, Func`2 factory)
 at JetBrains.Decompiler.Render.CSharp.MetadataRenderer.DecompileClass(IMetadataTypeInfo type, IProgressIndicator indicator)
 at JetBrains.Decompiler.Render.CSharp.MetadataRenderer.RenderClassLike(String kind, IMetadataTypeInfo typeInfo, Boolean isPartial, IProgressIndicator indicator)
 at JetBrains.Decompiler.Render.CSharp.MetadataRenderer.RenderType(IMetadataTypeInfo typeInfo, IProgressIndicator indicator, Boolean addPartialModifier)
 at JetBrains.Decompiler.Render.CSharp.MetadataRenderer.TryRenderType(IMetadataTypeInfo typeInfo, IProgressIndicator indicator, Boolean addPartialModifier)
 at JetBrains.Decompiler.Render.CSharp.MetadataRenderer.RenderTopLevelType(IMetadataTypeInfo typeInfo, IProgressIndicator indicator, Boolean addPartialModifier)
 at JetBrains.Metadata.Debug.CodeTextWriter.MetadataRenderOrchestrator`1.CollectTypeNames(Action`2 render, IProgressIndicator indicator)
 at JetBrains.Metadata.Debug.CodeTextWriter.MetadataRenderOrchestrator`1.DoRender(Action`2 render, IProgressIndicator indicator)
 at JetBrains.DataFlow.Lifetimes.Using[TRetVal](Func`2 λ)
 at JetBrains.SourceView.PdbSourceInfo.DecompileTaskBuilder.DoWork(DecompileInfo decompileInfo, IProgressIndicator progress)
 at JetBrains.SourceView.SourceModel.WorkTaskManager.WorkTaskInfo`1.DownloadRunner()
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()
 at System.Threading.ThreadPoolWorkQueue.Dispatch()

RSRP-470920: Object reference not set to an instance of an object.

$
0
0
Reporter Maltseva Ekaterina (Maltseva.Ekaterina) Maltseva Ekaterina (Maltseva.Ekaterina)
Created Aug 3, 2018 4:25:53 PM
Updated Oct 12, 2018 2:09:08 PM
Subsystem UI
Assignee Mikhail Senkov (micha)
Priority Normal
State Submitted
Type Exception
Fix version 2018.3
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
ReSharperPlatformVs15 Wave 182 Hive _8ca9bb57 — JetBrains ReSharper Ultimate 2018.2 EAP 7 D Build 182.0.20180803.15757-eap07d

JetBrains dotCover 182 Build 182.0.20180803.23824-eap07d
JetBrains dotMemory 182 Build 182.0.20180803.40054-eap07d
JetBrains dotTrace 182 Build 182.0.20180803.23825-eap07d
JetBrains ReSharper 182 Build 182.0.20180803.24105-eap07d
JetBrains ReSharper C++ 182 Build 182.0.20180803.40054-eap07d

Object reference not set to an instance of an object.

— EXCEPTION #1/2 [NullReferenceException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root.InnerException
ClassName = System.NullReferenceException
HResult = E_POINTER=COR_E_NULLREFERENCE=80004003
Source = JetBrains.PsiFeatures.UIInteractive.Core
StackTraceString = “
 at JetBrains.PsiFeatures.UIInteractive.Core.Tree.CodePreview.CodePanel.DisplayNew(CodePanelDisplayData newData)
 at JetBrains.PsiFeatures.UIInteractive.Core.Tree.CodePreview.CodePanel.DisplayNew(CodePanelDisplayData newData)
 at JetBrains.PsiFeatures.UIInteractive.Core.Tree.CodePreview.CodePanel.DisplayNew(ICollection`1 originalRanges, OneToListMap`2 originalHighlightingMap, DocumentRange scrollRange)
 at JetBrains.PsiFeatures.UIInteractive.Core.Tree.CodePreview.CodePanel.ShowDefaultMessage()
 at JetBrains.ReSharper.Feature.Services.Tree.TreeModeBrowserDescriptorWithPreview.PreviewUpdate(IPreviewControl previewControl, TreeModelNode modelNode)
 at JetBrains.Platform.UIInteractive.Ide.TreeGridBrowser.Revised.TreeModelBrowserView.SynchronizePreview()
 at JetBrains.Threading.GroupingEvent.Execute()


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Object reference not set to an instance of an object.”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = <NULL>
Data.LastExtension = cs
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.2 EAP 7 D Build 182.0.20180803.15757-eap07d”
Data.SubProducts.#0 = “JetBrains dotCover 182 Build 182.0.20180803.23824-eap07d”
Data.SubProducts.#1 = “JetBrains dotTrace 182 Build 182.0.20180803.23825-eap07d”
Data.SubProducts.#2 = “JetBrains ReSharper C++ 182 Build 182.0.20180803.40054-eap07d”
Data.SubProducts.#3 = “JetBrains ReSharper 182 Build 182.0.20180803.24105-eap07d”
Data.SubProducts.#4 = “JetBrains dotMemory 182 Build 182.0.20180803.40054-eap07d”
Data.SccRevisionEnv = “
Platform\Core\Shell,
Platform\VisualStudio:
    git::refs/heads/182::ee1cb1004091454dd670e2de63841aa12962ddc4

Data.VsVersion = 15.7.27703.2047
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Threading.GroupingEvent.Execute()
 at JetBrains.Threading.GroupingEvent.Execute()
 at JetBrains.Threading.GroupingEventHost.ExecuteExpiredEvents()
 at JetBrains.Threading.GroupingEventHost.<OnClockTimerTick>b__22_0()
 at JetBrains.Threading.ReentrancyGuard.Execute(String name, Action action)
 at JetBrains.Threading.ReentrancyGuard.ExecuteOrQueue(String name, Action action, TaskPriority priority)
 at JetBrains.Threading.GroupingEventHost.OnClockTimerTick()
 at JetBrains.Threading.GroupingEventHost.ClockTimer.OnTimerTick(Object sender, EventArgs e)
 at System.Windows.Forms.Timer.OnTick(EventArgs e)
 at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
 at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

RSRP-471824: Unit test runner mangles the name of test function when it contains `(`, `)`, or `.`.

$
0
0
Reporter Josh (Buedel) Josh (Buedel)
Created Oct 12, 2018 2:19:12 PM
Updated Oct 12, 2018 2:19:12 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

Functions declared in F# can include spaces and punctuation and so forth (via double backticks). These names do not appear correctly in the unit test session window. Specifically, the rest of the name after the first ( gets truncated and a . is treated as if the stuff after the dot is a child test.

So, as I was setting up VS to create that image, the names actually changed again on me. Still mangled, but mangled slightly differently. Stuff after the ( was getting treated as a subtest, like . does. But then I did a Run All and it went back to what you see now.

RSRP-451723: Invert 'if' statement to reduce nesting inside lambda produces (deeply nested and) invalid code

$
0
0
Reporter Daniel Knittl-Frank (dknittl_frank_eurofunk_com) Daniel Knittl-Frank (dknittl_frank_eurofunk_com)
Created Dec 11, 2015 11:26:28 AM
Updated Oct 12, 2018 2:30:11 PM
Resolved Oct 12, 2018 2:30:11 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Obsolete
Type Bug
Fix version No Fix versions
Affected versions 10.0.1
Fixed In Version ReSharper Undefined
VsVersion All Versions
When using the "Invert 'if' statement to reduce nesting" quick action inside certain lambdas, ReSharper will

  1. Not actually reduce the nesting. The complete statement containing the lambda is copied into the lambda
  2. Produce invalid code, such as returning a value from an Action lambda or re-using variable names

I'm not sure if there are any gotchas, considering closed-over variables and such.

Here's a quick code sample I came up with (not necessarily containing sane logic):

private Executor GetExecutor()
{
    var random = new Random();

    return new Executor(
        executor =>
        {
            if (random.Next() > 1)
            {
                executor.DoSomething("inside if");
                return;
            }

            executor.DoSomething("outside if");
        }
    );
}

internal class Executor
{
    private readonly Action<Executor> action;

    public Executor(Action<Executor> action)
    {
        this.action = action;
    }

    public void DoSomething(string text)
    {
        Console.WriteLine(text);
    }

    public void Execute()
    {
        this.action?.Invoke(this);
    }
}

ReSharper will highlight the if statement inside the lambda, offering the above-mentioned quickfix. Applying the fix will result in the following (invalid, more nested) code:

private Executor GetExecutor()
{
    var random = new Random();

    return new Executor(
        executor =>
        {
            if (random.Next() <= 1)
            {
                return new Executor(
                    executor =>
                    {
                        if (random.Next() > 1)
                        {
                            executor.DoSomething("inside if");
                            return;
                        }
                        executor.DoSomething("inside if");
                        return;

                        executor.DoSomething("outside if");
                    }
                );
            }
            executor.DoSomething("inside if");
            return;

            executor.DoSomething("outside if");
        }
    );
}

  1. Re-used variables: executor lambda input parameter
  2. Invalid code: returning a value from a void Action
  3. Unreachable code: return; before last line
  4. More levels of nesting
  5. The same quick-fix is still suggested. Applying it another time will copy the complete statement again

RSRP-451841: "Convert to method call with '?:' expression inside" evaluating parameters incorrectly

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Dec 15, 2015 5:04:02 PM
Updated Oct 12, 2018 2:34:21 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 10.0.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Performing "Convert to method call with '?:' expression inside" on the IF below...

if (isError)
            {            
                ShowFieldInfo(string.Join("<br/>", errorList), true);
            }
            else
            {
                ShowFieldInfo("Fields are valid.", success: true);
            }
//..
        private void ShowFieldInfo(string info, bool error = false, bool success = false)
        {
//...
        }
...results in...

ShowFieldInfo(isError ? string.Join("<br/>", errorList) : "Fields are valid.", true); 
...so it's handling the first parameter correctly, but it's not perceiving the difference in the second parameters.

RSRP-252325: Generics inside the 'code' tag of xml doc: the correct quick fix to wrap in CDATA is missing; quick fixes for tags are shown instead

$
0
0
Reporter Andrey Simanovsky (ands) Andrey Simanovsky (ands)
Created Apr 8, 2011 5:16:42 PM
Updated Oct 12, 2018 2:37:37 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
When you have the following code:
    /// <summary>
/// usage:
/// <code>
/// var x = new X<int>();
/// </code>
/// </summary>
class X<T>
{
}
the quick fixes that are shown for '<int>' are useless because they treat <int> as a tag.
Expected behavior: ReSharper should understand that <int> is used inside the '<code>' tag and suggest 'Wrap in CDATA' quick fix rather than quick fixes for tags. The 'Wrap in CDATA' quick fix should wrap the code with generics into CDATA construct:

    /// <summary>
/// usage:
/// <code>
/// <![CDATA[
/// var x = new X<int>();
/// ]]>
/// </code>
/// </summary>
class X<T>
{
}

RSRP-451898: XMLDoc support

$
0
0
Reporter Nikita Raba (nikita.raba) Nikita Raba (nikita.raba)
Created Dec 17, 2015 7:27:15 PM
Updated Oct 12, 2018 2:37:37 PM
Subsystem XML
Assignee Alexander Shvedov (shvedov)
Priority Major
State Submitted
Type Feature
Fix version Backlog
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

RSRP-451902: Quick fixes for XMLDoc

$
0
0
Reporter Nikita Raba (nikita.raba) Nikita Raba (nikita.raba)
Created Dec 17, 2015 7:56:15 PM
Updated Oct 12, 2018 2:38:54 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Examples:
"a < b" => "a &lt; b"
"A && B" => "A &amp;&amp; B"
"<item>text</item>" => "<item><description>text</description></item>"

RSRP-471595: Not initialized

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Sep 20, 2018 6:00:31 PM
Updated Oct 12, 2018 2:39:46 PM
Subsystem Platform - Project Model
Assignee Nikita Popov (poksh)
Priority Normal
State Submitted
Type Exception
Fix version No Fix versions
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion VS10 (2010)
ReSharperPlatformVs10 Wave 183 Hive ProjectModel — JetBrains ReSharper Ultimate 2018.3 EAP 1 D Build 183.0.20180918.154710-eap01d

JetBrains ReSharper 2018.3 EAP 1 D Build 2018.3.20180918.160255-eap01d

Not initialized

— EXCEPTION #1/2 [InvalidOperationException]
Message = “Not initialized”
ExceptionPath = Root.InnerException
ClassName = System.InvalidOperationException
HResult = COR_E_INVALIDOPERATION=80131509
Source = JetBrains.Platform.RdCore
StackTraceString = “
 at JetBrains.Platform.RdFramework.Util.Maybe`1.OrElseThrow(Func`1 func)
 at JetBrains.Platform.RdFramework.Util.Maybe`1.OrElseThrow(Func`1 func)
 at JetBrains.Platform.RdFramework.Util.RProperty`1.get_Value()
 at JetBrains.Platform.RdFramework.Impl.RdProperty`1.get_Value()
 at JetBrains.PsiFeatures.VisualStudio.SinceVs10.NuGet.Common.NuGetApi.get_IsNuGetAvailable()
 at JetBrains.PsiFeatures.VisualStudio.SinceVs10.NuGet.ReferenceAnnotations.ReferenceAnnotationsPackageProvider.<GetActions>d__2.MoveNext()
 at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
 at JetBrains.ReSharper.Feature.Services.QuickFixes.QuickFixTable.CreateCustomWarningActions(IHighlighting highlighting, ISolution solution, DocumentRange highlightingRange)
 at JetBrains.ReSharper.Intentions.Bulbs.QuickFixesProvider.CollectQuickFixesUnderCaret(BulbItemsCache bulbItemsCache, IntentionsBulbItems intentionsBulbItems, ITextControl textControl, HighlightingsData highlightingsData)
 at JetBrains.ReSharper.Intentions.Bulbs.QuickFixesProvider.CollectActions(IntentionsBulbItems intentionsBulbItems, BulbItemsCache bulbItemsCache, ITextControl textControl, Lifetime caretPositionLifetime, IPsiSourceFile psiSourceFile, Object precalculatedData)
 at JetBrains.ReSharper.Intentions.Bulbs.BulbItems.<>c__DisplayClass21_0.<BuildAvailableActionsList>b__1()
 at JetBrains.Application.Threading.InterruptableReadActivityThe.Work()
 at JetBrains.Application.Threading.InterruptableReadActivity.DoWork()
 at JetBrains.Application.Threading.InterruptableReadActivity.WorkerThreadProc()
 at JetBrains.Util.Logging.Logger.Catch(Action action)


— Outer —

— EXCEPTION #2/2 [LoggerException]
Message = “Not initialized”
ExceptionPath = Root
ClassName = JetBrains.Util.LoggerException
Data.ManagedThreadName = “JetPool(S) #6”
Data.SccRevisionShell = “<there are no packages matching the criteria>”
Data.HostProductInfo = “JetBrains ReSharper Ultimate 2018.3 EAP 1 D Build 183.0.20180918.154710-eap01d”
Data.SubProducts.#0 = “JetBrains ReSharper 2018.3 EAP 1 D Build 2018.3.20180918.160255-eap01d”
Data.SccRevisionEnv = “
Platform\Core\Shell:
    git::refs/heads/183-deferred-projects::f881e303bc575e4fd458361426a27fbf97c94603


Platform\VisualStudio:
    git::refs/heads/183-deferred-projects

Data.VsVersion = 10.0.40219.1
InnerException = “Exception #1 at Root.InnerException”
HResult = COR_E_APPLICATION=80131600
StackTraceString = “
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Util.Logging.Logger.Catch(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHostEx.<>c__DisplayClass2_0.<RunSafe>b__0()
 at JetBrains.Application.Threading.Tasks.TaskHost.AccessViolationCatcher(Action action)
 at JetBrains.Application.Threading.Tasks.TaskHost.<>c__DisplayClass33_0.<Create>b__1(Object state)
 at System.Threading.Tasks.Task.InnerInvoke()
 at System.Threading.Tasks.Task.Execute()
 at System.Threading.Tasks.Task.ExecutionContextCallback(Object obj)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot)
 at System.Threading.Tasks.Task.ExecuteEntry(Boolean bPreventDoubleExecution)
 at System.Threading.Tasks.TaskScheduler.TryExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetScheduler.ExecuteTask(Task task)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.EnqueueNextTask()
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.ThreadPoolProc()
at ANNOTATED: JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread #5.JetPool(S) #6(Action )
 at JetBrains.Util.Reflection.CallStackAnnotation.InvokeAnnotated(String classNameOfNewFrame, String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Util.Reflection.CallStackAnnotation.CatchAnnotatedInvocation[TClassOfNewFrame](String methodNameOfNewFrame, Action actionToAnnotate)
 at JetBrains.Application.Threading.Tasks.Scheduler.JetSchedulerThread.<Start>b__20_0()
 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
 at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
 at System.Threading.ThreadHelper.ThreadStart()

RSRP-124397: CA or Refactoring to collapse sequential asignments into one expression

$
0
0
Reporter Vladimir Reshetnikov (nikov) Vladimir Reshetnikov (nikov)
Created Oct 8, 2009 12:21:16 PM
Updated Oct 12, 2018 2:54:17 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
using System;

class A
{
    public static int Foo()
    {
        var x = Bar(1);
        x += Bar(2);
        x += Bar(3);
        return x;
    }

    private static int Bar(int i)
    {
        throw new NotImplementedException();
    }
}

Expected result:

    public static int Foo()
    {
        return Bar(1) + Bar(2) + Bar(3);
    }

Maybe, existing 'Inline variable' refactoring can be modified to allow this kind of transformations.

RSRP-451951: Option to change addition assignment operator to standard assignment and vice versa

$
0
0
Reporter Angelina Elycheva (Angelina.Elycheva) Angelina Elycheva (Angelina.Elycheva)
Created Dec 21, 2015 5:01:32 PM
Updated Oct 12, 2018 2:54:17 PM
Subsystem Context Actions
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Submitted
Type Feature
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Please change += to + and vise versa and for other operators..

RSRP-451998: Do not modify parameterless constructor when adding property/field initialization

$
0
0
Reporter Vlad Taranov (Vlad.Taranov) Vlad Taranov (Vlad.Taranov)
Created Dec 23, 2015 3:42:16 PM
Updated Oct 12, 2018 2:55:46 PM
Resolved Oct 12, 2018 2:55:46 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Duplicate
Type Improvement
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
May be create a new constructor instead but only if there are no other constructors?

Make it default behavior for [Serializable] (ProtoContract, etc...) classes and optional for others.

RSRP-452359: Join declaration and assignment deletes comment

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Dec 24, 2015 2:09:07 PM
Updated Oct 12, 2018 2:57:23 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.1, 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
int foo; 
foo = 1; //some important comment
Now if I press "Joint declaration and assignment" my important comment is deleted.

RSRP-471825: Invalid InvalidOperationException warning for anonymous objects

$
0
0
Reporter Thomas Lange (radioactiveman) Thomas Lange (radioactiveman)
Created Oct 12, 2018 3:12:36 PM
Updated Oct 12, 2018 3:13:12 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

ReSharper 2018.2.3 shows an invalid warning about a possible System.InvalidOperationException when using int? in an anonymous object. Please see the attached file. The warning is not shown when using a proper "Item" class with two properties. The version before did not show this warning (I guess it was 2018.1, but I am not completely sure).

RSRP-452368: Implementation of suggestion is wrong

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Dec 25, 2015 5:00:32 PM
Updated Oct 12, 2018 3:40:30 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Current code is:
IEnumerable<string> values; 
if(headers.TryGetValues(headerName, out values) || values.Any())
{
value = values.First();
return true;
}

Suggestion is:
Possible multiple enumaration of IEnumarble

Code after suggestion implementation:
IEnumerable<string> values; 
var enumerable = values as string[] ?? values.ToArray();
if(headers.TryGetValues(headerName, out values) || enumerable.Any())
{
value = enumerable.First();
return true;
}

Bug is:
it puts the line to cast "values" as string[] before actually data is populated (in TryGetValues)

RSRP-452871: Make return type 'void' produces broken code

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jan 12, 2016 6:35:52 PM
Updated Oct 12, 2018 3:42:24 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.3
Fixed In Version ReSharper Undefined
VsVersion All Versions
Example:
public static IEnumerable<int> Foo() 
{
yield return 1;
yield return 2;
}
public static void Bar()
{
Foo();
}
There is 'Method return value is never used' suggestion at the IEnumerable<int>.

After refactoring "Make return type 'void'" Foo() method looks like:
public static void Foo() 
{
yield return 1;
yield return 2;
}

RSRP-452950: Incorrect join declaration and assignment

$
0
0
Reporter Kendall Bennett (Kendall_Bennett) Kendall Bennett (Kendall_Bennett)
Created Jan 14, 2016 8:18:43 PM
Updated Oct 12, 2018 3:48:30 PM
Resolved Oct 12, 2018 3:48:30 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Normal
State Fixed
Type Bug
Fix version Unidentified prior version
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
I have the following basic unit test code, and R# wants me to join the declaration and assignment for cacheEntry. It will not try to do it automatically for me as it knows it cannot be done, but it still warns about it which is wrong.

Code
        public void Test()
{
object cacheEntry;
const string cacheKey = "dtcb-0";
const string cacheDir = CacheGroups.CategoriesBox;
_mockCacheStore.Setup(p => p.Read(out cacheEntry, cacheDir, cacheKey)).Returns(false);

var ticks = DateTime.Now.Ticks;
var cb = _categoryDepot.GetDepartmentTreeCacheBuster(0);
Are.Equal(ticks, cb);

cacheEntry = DateTime.Now.Ticks;
_mockCacheStore.Setup(p => p.Read(out cacheEntry, cacheDir, cacheKey)).Returns(true);

cb = _categoryDepot.GetDepartmentTreeCacheBuster(0);
Are.Equal(ticks, cb);
}

RSRP-453415: "Convert to local variable (inline in case of simple initialization)" doesn't work when field references are prefixed with "this"

$
0
0
Reporter Alexander Kurakin (Alexander.Kurakin) Alexander Kurakin (Alexander.Kurakin)
Created Jan 28, 2016 5:00:09 PM
Updated Oct 12, 2018 3:53:25 PM
Resolved Oct 12, 2018 3:53:25 PM
Subsystem Quick Fixes
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Duplicate
Type Bug
Fix version 2017.2
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions
In the attached file, try to use "Convert to local variable" on the "field". You'll find that the field references in the constructor are not replaced.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace InlineFieldBug
{
public class Primary
{
int field;

Secondary secondary;

public Primary(int field)
{
this.field = field;

this.secondary = new Secondary(this.field);
}
}

class Secondary
{
public Secondary(int ignored)
{
}
}
}
Viewing all 106942 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>