Enabled concurrency checks and constrained Store to MainActor

After I enabled concurrency checks, the Store had many warnings because self is not Sendable but it was passed to MainActor.run {} closures.
In SwiftUI, is generally recommended to mark ObservableObjects with @MainActor as far as I know.
After I made this change, some tests started to fail but I fixed them by making the init async. While this is a big change, I think it might make sense because when the Store is initialised, it loads the persisted state from disk, so until that happens, the Store is in an inconsistent state.
Some alternatives to @MainActor Store:

Constrain Store to a different global actor
Add @unchecked Sendable and hope everything is ok

Some alternatives to init async:

Store a reference to the task that performs allPersistedItems() in init and make sure all the other methods await this task before doing their work.

Also, I changed some tests to use XCTAssertEqual because it provides a better error message.

Heya @StefanCosminR! Thank you for all of this work across both repos, I really appreciate you doing this work to try and improve Boutique. I wanted to let you know that it's going to be a day or two before I look at this, there are quite a few changes here and I want to look at them on a fresh head after a big ramp up to launching this project, and all of the attention that it drew. I plan on reading over all of the PRs and incorporating the many pieces of feedback people have suggested, so please know that I've looked at this and will absolutely get to it, but need to do so with a little more energy and focus.
Thanks again, it really, really means a lot to me.

Hello!
I realise that these are substantial changes and you have to evaluate their impact.
I wanted to put this out there so maybe more people could take a look if it's a good direction, so it's ok by me to take as much time as you need.
One more thing, I appreciate a lot that you open sourced this, it was exactly what I was looking for these days.

Heya @StefanCosmina, I got a chance to look this over today and have few concerns with integrating this patch as is, but it's possible I didn't integrate it as you'd expected and maybe some context would help.

The first thing I noticed is that now objects have to conform to Sendable, which makes sense. I worry though that I have to add additional conformances, even to such common types as Date or URL, and this may provide some onus to users that they didn't expect or don't know how to deal with. I think this is more correct in the context of the actor model, but worry that it may be a bit burdensome.
Naturally this change also makes everything async. I'm not sure that's the direction I want to go, but I'm very open to all ideas. I've had quite a few thrown at me over the last couple of days and I'm taking the time to hear them all out and synthesize a plan of how I'd like to go forward, especially since some of them are directions I'd considered, and some of them are completely new ideas.
One question about @MainActor, I believe that annotating a class with @MainActor doesn't make everything in a class run on the main actor but only some operations like changing an @Published property. Is that right or am I mistaken? Because if I'm mistaken I worry about annotating the Store as @MainActor, since some things can be run on background actors for performance reasons.
Looking forward to your thoughts, and thank you again!

The first thing I noticed is that now objects have to conform to Sendable, which makes sense. I worry though that I have to add additional conformances, even to such common types as Date or URL, and this may provide some onus to users that they didn't expect or don't know how to deal with. I think this is more correct in the context of the actor model, but worry that it may be a bit burdensome.

They are sendable in Swift 5.7, so when it will get released, those warnings will go away. In the meantime, on way to silence them is to use @preconcurrency import Foundation

Naturally this change also makes everything async. I'm not sure that's the direction I want to go, but I'm very open to all ideas, though since @Stored(in: Store) accepts a synchronous Store, so I'm not sure how to pass an async Store into it.

I'll have to investigate this further. I have ways to keep the init sync, but I didn't explore this option much.

One question about @MainActor, I believe that annotating a class with @MainActor doesn't make everything in a class run on the main actor but only some operations like changing an @Published property. Is that right or am I mistaken? Because if I'm mistaken I worry about annotating the Store as @MainActor, since some things can be run on background actors for performance reasons.

Annotating a class with MainActor will indeed force all functions and properties to run on the main thread. However when you have an "await" call anywhere, if the function that is called (or property that is accessed) is not marked with @MainActor, then that call will be performed on a background thread, but the response will be returned back on the Main Actor. I think this thread will clear up some things, especially the replies from Doug Gregor https://twitter.com/krzyzanowskim/status/1538647537720209408
You can also run the following code in an app to see exactly how the execution hops threads.
struct ContentView: View {
    var obj = MainActorTest()

    var body: some View {
        VStack {
            Button("Run test") {
                Task.detached {
                    await obj.compute()
                }
            }
        }
    }
}

@MainActor
class MainActorTest {
    private var randomNumber: Int {
        print("randomNumber", Thread.current)
        return Int.random(in: 1...10)
    }

    private nonisolated func  constNumber() -> Int {
        100
    }

    func compute() async {
        print("compute-start", Thread.current) // MainThread
        try? await Task.sleep(nanoseconds: 100_000)

        let firstNumber = randomNumber
        print("compute-middle", Thread.current) // MainThread

        let secondNumber = await getSecondNumber()

        print("compute-end", Thread.current) // MainThread

        let _ = await addNumbers(a: firstNumber, b: secondNumber)
    }

    nonisolated func getSecondNumber() async -> Int {
        print("getSecondNumber-start", Thread.current) // Some background thread
        try? await Task.sleep(nanoseconds: 100_000)
        return 2
    }
}

func addNumbers(a: Int, b: Int) async -> Int {
    print("addNumbers", Thread.current) // Some background thread
    try? await Task.sleep(nanoseconds: 100_000)

    return a + b
}

I made some changes to the PR. The warnings should be fixed now in the current version of Xcode and I added back the sync initializer.

I tried removing @MainActor from the Store, but it's more complicated than I thought.
If the store is not on the MainActor, then it can't really be made Sendable. KeyPaths are not yet Sendable for example, so trying to conform the Store to Sendable generates a lot of warnings. And if it's not Sendable, then it can't be passed safely to self.$items.sink. You could also mark the Store with @unchecked Sendable and use locks to manage access, especially that they can offer better performance than actors, but I don't trust myself with these.

Marking the Store with a custom global actor didn't work either, because items should be marked with @MainActors to work with SwiftUI, but then the initializers can't be sync anymore.

However, I found in a talk from WWDC21 that Apple recommends marking ObservableObjects with @MainActor, so I wouldn't really want to fight that. (https://developer.apple.com/videos/play/wwdc2021/10019/ at 21:47)
I think the ideal way forward would be to make the Store be very simple and to move most of the logic in another class/actor, but personally I don't want to make changes that big to the project structure.
Here's how I image it. I'm using AsyncChannel to remove the dependency from Combine, but that won't compile until Swift 5.7 is released.

However, I think that we better close this PR and don't merge it as it is now. It was fun experimenting, but I feel a better solution will present itself as Swift concurrency tools evolve over time.


Migration to netstandard1.3 is tough bananas

What I have learned from this:

AppDomain.CurrentDomain.GetAssemblies(No AppDomain in general kills) bites hard. We need a clean way of doing this. Any learnings from Castle.Core we can apply? The only way forward I can see right now is to make a leap to netstandard1.6(https://github.com/dotnet/coreclr/issues/919).

[ Type.IsGenericType | Type.IsClass | Type.IsAbstract | Type.IsEnum | Type.IsInterface | Type.IsPrimitive | Type.ReflectedType | Type.IsGenericTypeDefinition | ... ad infinitum ... ] also bites pretty hard. Alot of these in netstandard1.3 have been moved out to Type.GetTypeInfo().[Insert Name Here]. Can we abstract this behaviour in the Desktop CLR version, so we can migrate it easier?

Attribute.GetCustomAttribute is not a thing. We need a tidy way of dealing with this.

Type.IsInstanceOfType has a substitution. System.Reflection.TypeExtensions has a replacement. Not sure if it works.

Type.Assembly has a substitution. System.Reflection.TypeExtensions has a replacement. Not sure if it works.

Type.GetInterfaces has a substitution(but Type.GetInterface does not). System.Reflection.TypeExtensions has a replacement. Not sure if it works.

We need a Array.ForEach extension. This also cause drama but should be easy to do.

BindingFlags.IgnoreReturn is not a thing. We need to understand what this means.

There is heaps of stuff here! My conclusion after a couple of goes at this, is that we need a design for dealing with the abstraction of "typing" and "attribute" mechanisms across the entire Desktop CLR version to make the migration easier.
What do you guys think?

Here was my earlier attempt at this: https://github.com/fir3pho3nixx/Windsor/commits/netstandard-1-6-port
Quite scary if you think about it.

This was applying 'grepWin' to get rid of SILVERLIGHT compile directives.
https://github.com/fir3pho3nixx/Windsor/tree/netstandard-1-6-port-brute-force-silverlight-replace

Any idea's guys?

I've tried to provide some pointers for each comment:

Don't we already abstract all GetAssemblies calls to ReflectionUtil because Silverlight is also missing this API? However what value would we get having Windsor target .NET Standard 1.3 rather than 1.6, looking at the compat table 1.6 sounds like the ideal option for Windsor: https://github.com/dotnet/standard/blob/master/docs/versions.md. Might be worth considering targeting .NET Standard 2.0 instead since it'll be RTM very soon.
All System.Runtime based assemblies have GetTypeInfo, and yes .NET Core drops the older properties. This is what I did in Castle Core to mostly hide TypeInfos: https://github.com/castleproject/Core/blob/master/src/Castle.Core/Compatibility/IntrospectionExtensions.cs. Have a look at usages of FEATURE_LEGACY_REFLECTION_API and the other files in the Compatibility directory.
Not sure if we were using Attribute.GetCustomAttribute in Castle Core, however I would have just changed the code to the newer extension methods. I've shimed/polyfilled those extension methods for .NET 3.5/4.0: https://github.com/castleproject/Core/blob/master/src/Castle.Core/Compatibility/CustomAttributeExtensions.cs, however it is probably time to drop support for .NET <4.5.
We are using IsInstanceOfType in Castle Core so it must work.
Just use GetTypeInfo.
Windsor has 2 usages of GetInterface, we might be able to change the usage to GetInterfaces.
We should just change to using the foreach keyword.
Only affects COM interop, so not a problem with .NET Core.

Ok,
Using your approach I have managed to get the entire code base to compile in dotnetstandard 1.6. Entire branch is here: https://github.com/fir3pho3nixx/Windsor/tree/dotnet-standard-1-6-compatibility

You were right it, is mostly inside the reflection util where this was used so it was not too bad. Things that did bleed out breaking changes were things I created wrappers for(AttributeWrapper,AssemblyWrapper, ConstructorWrapper, DelegateWrapper, TypeWrapper, ResourceManagerWrapper) in the shim class (https://github.com/fir3pho3nixx/Windsor/blob/dotnet-standard-1-6-compatibility/src/Castle.Windsor/Compatibility/DotNetStandard.cs). These are all considerations for net standard 1.6.

Grabbed your shim for this and made all the GetTypeInfo changes. Have not tried compiling with net40 yet.

This also breaks in dotnet standard.

OK.

That worked quite well.

Will look at that.

Great, this was tedious but it is most portable.

OK

Any other comments on https://github.com/fir3pho3nixx/Windsor/blob/dotnet-standard-1-6-compatibility so far? Quite happy to work through it and try and make the tests pass.

I had a quick skim read through DotNetStandard.cs and have got heaps of comments, especially things we also ran into with Castle Core and solved, however as I mentioned in #145 smaller PRs are the only way to get this done, one big PR is too time consuming to work through so it just stalls too easily.
I have no idea the status of #160, seems stalled, however a PR of that size is likely never going to get merged because so much is happening and it all falls on one person.
I'd love for you to get involved in #145, liven up the discussion and get things moving. I'm not wetted to any one specific person's playtime branches, heaps of people have attempted the low hanging fruit, and glossed over the tougher areas, and then you don't hear back from them.
This comment still applies:

It is up to you, but I think a good first step would be to get a build script set up (maybe like our Castle Core one) that we can set up on TeamCity even if the .NET Core build fails compilation, then submit smaller PRs working towards a working build rather than one giant PR which really slowed things down last time and made code review difficult. (https://github.com/castleproject/Windsor/issues/145#issuecomment-265058727)

Hi,
I agree. Had more time to think about this. I was not clear but this was mainly discovery to see what is involved(https://github.com/fir3pho3nixx/Windsor/blob/dotnet-standard-1-6-compatibility/src/Castle.Windsor/Compatibility/DotNetStandard.cs). I think I know enough to start actioning a few more PR's to get this going.
#160 is a monster! I would not do it. Just close the PR explaining why. Doing it in one hit simply too much work in one go. You were clear on this, I think it might have been accidental miscommunication issue.
Before we jump over to #145. Shall we distill some of our thoughts down until we get a tidy list of intended PR's?

Some initial thoughts in no particular order *

The liberal use of build flags everywhere is ugly.

Can this be corralled into the Compatibility folder for 'PROD' code?

For Example instead of:

// Class that lives outside compatibility folder
public class MeDoThing {

public void ManyThingsOnDifferentPlatformsWithBuildFlags(){

#if PLATFORM_A
 // ... Do This
#elif PLATFORM_B
 // ... Do That
#endif
}

}

We try instead for:

// Class that lives outside compatibility folder
using Castle.Windsor.Compatibility;
public class MeDoThing {

public void ManyThingsOnDifferentPlatformsWithBuildFlags(){
        MeDoThingCompatibility.Execute();
}

}

// Class that lives inside compatibility folder
namespace Castle.Windsor.Compatibility {
public class MeDoThingCompatibility {
public static void Execute(){
#if PLATFORM_A
 // ... Do This
#elif PLATFORM_B
 // ... Do That
#endif
}
}
}

This will help with things that cannot be polyfilled like the XWrapper's identified in (https://github.com/fir3pho3nixx/Windsor/blob/dotnet-standard-1-6-compatibility/src/Castle.Windsor/Compatibility/DotNetStandard.cs).

 Not sure how we tackle this. Guessing we go with a Polyfill first approach and then create abstractions for where we can't(like static methods)?

Core polyfills work well

I tested the GetTypeInfo() polyfill with great success. We could probably do this as a separate PR without even any changes to the build as it stands.

Get a build going with missing bits

Once all the PR's above have been implemented, effectively we should be in a position to automate a build which compiles but has tests failing because of missing bits which then only need to be filled out in the Comaptibility folder. An example of one that I got hit with was how to enumerate all assemblies in the current app domain :)

Implement compatibility one PR at a time.

This is then something we can probably raise issues for independently, mark them with a label 'up for grabs' and the entire community can get involved. We can rigorously monitor PR's for changes outside the Compatibility folder and questions those straight away.

Compatibility is done, time to pack and deploy it!

At this point we can think about a release, so some more PR's to get NuGet into shape and presto. We release it.

I agree that conditional compilation is ugly, however abstracting heaps of APIs behind more custom APIs also come at a maintenance cost. I'm not yet convinced of the XWrapper classes because I know so many APIs are coming back with .NET Standard 2.0, so I think this sort of thing will really be a case by case thing we'll just need to discuss to pick the less bad approach. For example, some cases it would be nicer to just add an extension method which we use everywhere to add missing functionality.
Just as I did with Castle Core I want to see the reduction in use of platform conditional compilation (e.g. NET40, NET35), and instead based on features available on the platform which will allow us to much more easily remove the conditional compilation as existing .NET Framework features are lit up in .NET Core.
Because the .NET Core surface area is much smaller we'll still have .NET Framework builds and a .NET Core/Standard build. We have supported Mono to some degree in the past, however with the latest work on Castle Core I removed all usage of __MonoCS__ and MONO symbols so the same built binary works on all operating systems, the unit tests still have to be rebuilt but I'd like for that to change too. I don't see any reason we couldn't do the same with Windsor.
Yes please, definitely submit a pull request for GetTypeInfo early. I did two sort of big PRs in the beginning with Castle Core to reduce the amount of churn in PRs for ports, one was reflection and the other remoting/binary serialization.
There are other smallish changes like replacing usages of ExpectedExceptionAttribute and others to get through too.
Looking forward to seeing what you can do with the Compatibility shims/adapters, it'll be much easier to discuss smaller diffs where we are focused on making a decision for one thing.
I'd close this, jump into #145, write down a brief plan, create some issues and begin. We've already got a v4.0 milestone. 🎉

Before we jump over to #145. Shall we distill some of our thoughts down until we get a tidy list of intended PR's?

Nah, I've listed a few PRs to start with which are obvious, further from that I'd prefer if you or others just opened an issue describing what you plan to do, or just send a PR and we can discuss it on the code.

Ok! ;)


HDDS-3281. (Addendum) add missing timeouts to the topology robot files.

What changes were proposed in this pull request?
Just an addendum to the already reviewed #723
What is the link to the Apache JIRA
https://issues.apache.org/jira/browse/HDDS-3281

Thanks the review @adoroszlai
As it's a small change based on the approach where we already agreed, I am committing without waiting for other time-zones (especially as it is required to have better feedback from builds).


Add input validation

Add input validation to existing pages (#96)

[x] Task creation (#115)
[x] Task update (#115)
[x] Taskboard creation
[x] Event creation
[x] Event update

I forgot to create subtasks, sorry about that.

Those will be fixed pretty soon. I'm pretty sure I only need like 4 lines of code to fix them.


[fix][broker] Topic policy reader can't recover when get any exception.

Fix #15891
Motivation
When creating the topic policy reader got any problem(maybe a network problem), and we can not clear the current state, which will let the broker can not retry to init the topic policy reader again until we unload the namespace.

Please see the details in the code. https://github.com/apache/pulsar/pull/17562/files#r966658816

Modifications

Fix the wrong logic and make the method more safety.

Verifying this change

[x] Make sure that the change passes the CI checks.

I think it's not a logical error. we don't need to add the unit test.
Documentation

[ ] doc-required
(Your PR needs to update docs and you will update later)

[x] doc-not-needed
(Please explain why)

[ ] doc
(Your PR contains doc changes)

[ ] doc-complete
(Docs have been already added)

@mattisonchao Do we have any plan to release 2.8.5 shortly?
This is issue is critical for us and we are currently working with Puslar 2.8.4.


Update routes.dart

Fixes: flutter#85031

@toly1994328 Any chance you can address the feedback from above?

Superseded by https://github.com/flutter/flutter/pull/86453.


checkpoint functions added to script

Now save and restore checkpoint functions have been added to git

Nice work @arunraja-hub We'll need to make couple more tweaks to this, so let PR hang till morrow


HDDS-1645 Change the version of Pico CLI to the latest 3.x release - 3.9.6

The version of Pico CLI used in the project is 3.5.2. The current stable release is 3.9.6 and it supports some good new features, such as being able to create sub-commands as methods rather than standalone classes.
We should increase the Pico CLI version in the project pom.xml to 3.9.6 to take advantage of these new features as the CLI code is refactored to use Pico CLI, such as in HDDS-1622.

/label ozone

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
32
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

-1
test4tests
0
The patch doesn't appear to include any new or modified tests.  Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch.

_ trunk Compile Tests _

+1
mvninstall
505
trunk passed

+1
compile
299
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
1592
branch has no errors when building and testing our client artifacts.

+1
javadoc
179
trunk passed

_ Patch Compile Tests _

+1
mvninstall
463
the patch passed

+1
compile
303
the patch passed

+1
javac
303
the patch passed

+1
mvnsite
0
the patch passed

+1
whitespace
0
The patch has no whitespace issues.

+1
xml
1
The patch has no ill-formed XML file.

+1
shadedclient
667
patch has no errors when building and testing our client artifacts.

+1
javadoc
181
the patch passed

_ Other Tests _

+1
unit
233
hadoop-hdds in the patch passed.

-1
unit
1318
hadoop-ozone in the patch failed.

+1
asflicense
58
The patch does not generate ASF License warnings.

5234

Reason
Tests

Failed junit tests
hadoop.ozone.TestMiniOzoneCluster

hadoop.ozone.ozShell.TestOzoneShell

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-909/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/909

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient xml

uname
Linux 45ff34a0085d 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 433e97c

Default Java
1.8.0_212

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/1/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/1/testReport/

Max. process+thread count
4564 (vs. ulimit of 5500)

modules
C: hadoop-hdds U: hadoop-hdds

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/1/console

versions
git=2.7.4 maven=3.3.9

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

The failure of TestOzoneShell seems to be related:
java.lang.AssertionError: Error of shell code doesn't contain the exception [For input string: "invalid-length"] in [Invalid value for option '--length': 'invalid-length' is not an int]
	at org.junit.Assert.fail(Assert.java:88)
	at org.junit.Assert.assertTrue(Assert.java:41)
	at org.apache.hadoop.ozone.ozShell.TestOzoneShell.executeWithError(TestOzoneShell.java:464)
	at org.apache.hadoop.ozone.ozShell.TestOzoneShell.testListVolume(TestOzoneShell.java:634)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
	at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

I think the default error message is changed and the assertion should be updated. Can you please fix this?

You are correct, the error message returned by Pico CLI seems to have been enhanced causing TestOzoneShell.testListVolume() to fail. I have fixed the test and re-tested locally so I will push the changes in a few minutes.

:broken_heart: -1 overall

Vote
Subsystem
Runtime
Comment

0
reexec
33
Docker mode activated.

_ Prechecks _

+1
dupname
0
No case conflicting files found.

+1
@author
0
The patch does not contain any @author tags.

+1
test4tests
0
The patch appears to include 1 new or modified test files.

_ trunk Compile Tests _

0
mvndep
66
Maven dependency ordering for branch

+1
mvninstall
503
trunk passed

+1
compile
287
trunk passed

+1
checkstyle
90
trunk passed

+1
mvnsite
0
trunk passed

+1
shadedclient
890
branch has no errors when building and testing our client artifacts.

+1
javadoc
181
trunk passed

0
spotbugs
330
Used deprecated FindBugs config; considering switching to SpotBugs.

+1
findbugs
517
trunk passed

_ Patch Compile Tests _

0
mvndep
36
Maven dependency ordering for patch

+1
mvninstall
467
the patch passed

+1
compile
305
the patch passed

+1
javac
305
the patch passed

+1
checkstyle
75
the patch passed

+1
mvnsite
0
the patch passed

+1
whitespace
1
The patch has no whitespace issues.

+1
xml
2
The patch has no ill-formed XML file.

+1
shadedclient
688
patch has no errors when building and testing our client artifacts.

+1
javadoc
153
the patch passed

+1
findbugs
543
the patch passed

_ Other Tests _

+1
unit
226
hadoop-hdds in the patch passed.

-1
unit
1665
hadoop-ozone in the patch failed.

+1
asflicense
49
The patch does not generate ASF License warnings.

6950

Reason
Tests

Failed junit tests
hadoop.ozone.container.common.statemachine.commandhandler.TestBlockDeletion

hadoop.ozone.client.rpc.TestFailureHandlingByClient

hadoop.hdds.scm.pipeline.TestSCMPipelineManager

Subsystem
Report/Notes

Docker
Client=17.05.0-ce Server=17.05.0-ce base: https://builds.apache.org/job/hadoop-multibranch/job/PR-909/2/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hadoop/pull/909

Optional Tests
dupname asflicense compile javac javadoc mvninstall mvnsite unit shadedclient xml findbugs checkstyle

uname
Linux 6272fdf82795 4.4.0-138-generic #164-Ubuntu SMP Tue Oct 2 17:16:02 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

Build tool
maven

Personality
personality/hadoop.sh

git revision
trunk / 0b1e288

Default Java
1.8.0_212

unit
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/2/artifact/out/patch-unit-hadoop-ozone.txt

Test Results
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/2/testReport/

Max. process+thread count
5007 (vs. ulimit of 5500)

modules
C: hadoop-hdds hadoop-ozone/integration-test U: .

Console output
https://builds.apache.org/job/hadoop-multibranch/job/PR-909/2/console

versions
git=2.7.4 maven=3.3.9 findbugs=3.1.0-RC1

Powered by
Apache Yetus 0.10.0 http://yetus.apache.org

This message was automatically generated.

Merged. Thanks @sodonnel the contribution.


UnauthorizedAccessException on YellowFlavor.Serialization.dll

Using Microsoft Visual Studio Enterprise 2022 (64-bit)
Version 17.9.6
Every time when I try to "Dump as" to any type.
Exception :

'System.Reflection.Assembly.LoadFile(@"c:\users\xxxxxxxxx\appdata\local\microsoft\visualstudio\17.0_607f993c\extensions\lzbpc2iq.5i1\InjectableLibs\net45\YellowFlavor.Serialization.dll")' threw an exception of type 'System.UnauthorizedAccessException'

I need more details. Windows version, dotnet version?

I can't reproduse, so, just waiting for the output from reporter.

Same bug was reported by Troy Loberger 10.04.23 in QA. netframework version of serialization library couldn't be loaded with the same exception.
I'm getting an authorization exception. I'm running VS as an administrator. Any thoughts?
'System.Reflection.Assembly.LoadFile(@"c:\users\MyName\appdata\local\microsoft\visualstudio\17.0_bc416d50\extensions\yt4v04nk.33h\InjectableLibs\net45\YellowFlavor.Serialization.dll")' threw an exception of type 'System.UnauthorizedAccessException'

OS : Windows 10 Entreprise 22H2
Intel(R) Core(TM) i5-10400 CPU @ 2.90GHz   2.90 GHz
16,0 Go RAM
Microsoft Visual Studio Enterprise 2022 (64-bit) Version 17.9.6
ASP.NET MVC app
Target Framework : .NET Framework 4.7.2
the code given on prevous comment here, did not raise exception

@salem-mdimegh
Could you please also run
var assembly = System.Reflection.Assembly.LoadFile(@"c:\users\xxxxxxxxx\appdata\local\microsoft\visualstudio\17.0_607f993c\extensions\lzbpc2iq.5i1\InjectableLibs\net45\YellowFlavor.Serialization.dll");

That could be related to CAS policy
caspol -all -lg
Try adding this library to fully trusted in the developer command prompt console under Administrator:
caspol -m -ag 1.2 -url "file:///c:/users/xxxxxxxxx/appdata/local/microsoft/visualstudio/17.0_607f993c/extensions/lzbpc2iq.5i1/InjectableLibs/net45/YellowFlavor.Serialization.dll" FullTrust

Hey, I added this to the caspol, but I still receive the same error; however, if I try a dump while running a test, it works. It doesn't work when I run the actual code in debug mode.

Hey, I added this to the caspol, but I still receive the same error; however, if I try a dump while running a test, it works. It doesn't work when I run the actual code in debug mode.

@furoTmark Is it run in IIS? If so, could you give IUSR read acces to folder with YellowFlavor.Serialization.dll?

@ycherkes  it is.
Added IUSR to file, then to folder, with read then full control, but still get the error.

@furoTmark
Please add the following accesses for \IIS_IUSRS group
Read-Write access to
%userprofile%\AppData\Local\Temp
Read access to
userprofile%\AppData\Local\Microsoft\VisualStudio\17.0_607f993c\extensions\lzbpc2iq.5i1\InjectableLibs

@furoTmark Feel free to reopen this issue if it persists after the steps above.

Thanks for the help @ycherkes, I just got to try it out.
Your suggestions worked!

You are welcome @furoTmark. Happy coding!


changes a indentation in file docs/index.rst

I am changed some python indentation in file docs/index.rst as a open source beginner

Hi @shubhadeepMH , I am going to close this PR. We should try to avoid commits that change indentation and formatting without justification and/or reproducibility. We will soon change the format of this documentation entirely (to markdown), and part of that will be adding a tool that automatically formats code snippets in line with the codebase's expectations. I encourage you to take a look at the issues, and see if you would like to make a contribution to them.


[RFC] Extending JSON API Serializer

Hi,
This PR changes the visibility of some methods of the JsonApiSerializer class, so that it's easier to extend from.
PS: Made a new PR to comply with the rules (i.e. do not PR from master branch).

Why do you extend? Just aggregate and implement the interface.

Hi @prolic,
Well, for starters, why implement a fullblown serializer, when what I need is already there, but just needs a minor tweak? And also, why not? And then there's the DRY thing, too.
Basically, I need to inject meta data into some of the items in relationships. That data comes from a pivot table that manages many-to-many relations.
Check here to see what I mean.
So, the current issue here is that besides having to make the change I want to the parseRelationships() method, I also have to implement exact copies of injectData(), isCollection(), isNull(), isEmpty(), fillRelationships() and shouldIncludeLinks() because their visibility on the parent is private.
And while injectData() is a public method, if you don't have your own implementation, the private fillRelationships() and parseRelationships() from the parent will be called instead.
I reckon the pull request should make more sense now.

You can implement the interface and proxy all methods to the aggregated original serializer. This is done in seconds. Than you can implement needed changes in your new class. Extending classes is a bad thing in most situation, that's also why there are private functions.
I would rather suggest making the JsonApiSerializer class final.
Further reading: http://ocramius.github.io/blog/when-to-declare-classes-final/

There are some valid points in that article you mentioned, and I do get that all the methods I had to reimplement are specific to the JsonApiSerializer class (hence being private). But do note that there's no actual Serializer contract/interface being implemented.
You could say that extending the SerializerAbstract class works as a contract, since it forces you to implement all the abstract methods, but then, so does an abstract method in a trait. Like I said, it works, but doesn't feel right.
Also, if we want to prevent the inheritance chain of doom, wouldn't the JsonApiSerializer and DataArraySerializer have to be extending the SerializerAbstract class or implementing a SerializerInterface instead of extending the ArraySerializer?
Anyway, I'll try your suggestion with proxying the methods and see how it goes.

Can you elaborate more on your suggestion, @prolic ? I've had a look at proxy design patterns, I also found this, and this seems to overcomplicate things when what I want is a simple change in the logic of a method.
To put it simply, how would you implement a new serializer the way you suggest?

The proxy manager is for other use cases.
Take a look at this gist. You can use it and change the methods you need.
Best

Thanks for your reply @prolic, although from what I can see, that's just a wrapper around the JsonApiSerializer and it's public methods.
The issue I'm facing is with the logic in the parseRelationships() method, which is private.
Currently the objects being created in the resulting relationships array only have a type and id property, but I also need to have a meta property with arbitrary data.
And I don't see other way of doing it without extending the class.

But the private method must be called from a public one. Otherwise it would never be called.

Just rewrite the public method, private methods are only an implementation detail.

But the private method must be called from a public one. Otherwise it would never be called.

Yes, I understand that, but there's no way to change the current behaviour of the private method from the outside, is there? Look at the code and tell me how do I add another property to go along with type and id, via a public method call.

Just rewrite the public method, private methods are only an implementation detail.

As it stands, this implementation detail is limiting us to a subset of the JSON API spec. Mind you, I'm well aware that the complete spec isn't yet implemented in the JsonApiSerializer, but what you suggest doesn't make sense (to me, anyway).
Do make an effort to understand that not all design patterns and ideologies apply to everything.
And if they do in this particular case, please explain why with concrete examples and fair reasoning, not links to blog posts and saying just because.
Can anyone else comment on this? @philsturgeon, @jasonlewis ?

I am not the component maintainer, don't care what I say.
Extend classes as you wish. It's bad practice, you can either learn to make better decision or keep bad design, extending everything you find. There is a reason, why lot's of classes are declared final and methods are private, properties are private, and so on.
Not all design pattern apply always, but this time it clearly does. The component maintainer can decide that they want to accept your PR, but I would rather make all classes final so extending is forbidden.
I'm out.

Hmm, the only thing @quetzyg want is to inject "meta" in the relationship part.
So adding an extension point there (public overwritable method)/setter callback that allows to filter the relationship part should solve this use-case, no?
I agree that just making all the private methods protected is overkill and makes it harder to change the class in the future (as now you have an BC promise for this class that can't be broken without a major version bump).

Appreciated @willishq!


Stat reloader CPU usage too high on Docker for Mac

After migration from Werkzeug 1.0.1 to 2.0.1 stat reloader consuming 100% of CPU. I used stat reloader because inotify doesn't have good support in docker for mac. Using Werkzeug from django-extensions with runserver_plus command. Returning back to Werkzeug 1.0.1 solves problem (cpu seems ok).
Environment:

Python version: 3.9.4
Werkzeug version: 2.0.1
django-extension: 3.1.3

It seems that the reloader generates a lot of syscalls to stat() for testing isfile()
Do you think we could cache the result of isfile(path) ? That would benefit to StatReloader and WatchdogReloader

Caching calls to os.path.isfile() doesn't appear to change the number of fstatat syscalls for either reloader. Not sure why.

Werkzeug 2.0 makes the stat reloader more accurate by walking all path directories, rather than only loaded module directories. This makes the stat reloader behavior match the watchdog behavior more, at the expense of higher CPU usage. I'm reluctant to undo that.
Here's some performance stats:

If I run the reloader for an example.py file in the werkzeug repo directory and venv, the stat reloader watches about 300 files every 1 second, at 3.5% CPU.
If instead I run it from somewhere very generic, such as my home directory with tons of unrelated folders and files, it is understandably much slower, watching 168388 files at 90% CPU.
If we go back to the Werkzueg directory, but ran tox which created a bunch of venvs under .tox/, it jumps up to 8000 files, 10% CPU.

There's probably a way for you to optimize what the reloader is watching for your project in your docker container. Perhaps you copied your code to /, when it could be installed in a /project/code directory that doesn't add a very broad tree to sys.path. Or perhaps you have a large amount of files in the tree that can be ignored by pattern, such as */.tox/*.
You can see how many paths the stat reloader is watching by running the following from the same venv and directory your project will run from:
from werkzeug._reloader import _find_stat_paths
print(len(_find_stat_paths(set(), set()))

You can print out the list as well and perhaps identify a subtree that has files that aren't relevant to reloader and can be excluded.
You can pass a list of fnmatch patterns to run_simple(..., exclude_patterns=[...]) which will tell the reloader to ignore all files matching those patterns. I'm not sure if runserver_plus exposes that, but flask run will expose that soon, or you can call run_simple directly for now.
The reloader already does a bit of optimization by always ignoring __pycache__, .git, and .hg folders. I can add some folders for common Python tools such as tox, nox, pytest, and mypy, as well as the Flask instance folder. Projects will still need to use exclude_patterns to tailor the list to their specific project structure.
I'm inclined to close this based on the reasoning and capabilities above, but post back about the number of files watched and if there's any exclude_patterns you can add.

I can do a few things to cut down on the number of files scanned by the stat reloader without meaningfully changing what is watched:

Ignore common Python tool cache directories (tox, nox, pytest, mypy)
Always ignore sys.base_prefix (it's the system Python files, not the venv, it shouldn't be changing)
Don't recurse into any directories if they or their parent do not have any Python files (not a package or data within a package)

In the case of running from my home directory, this cuts down from 16k to 800 files. In the case of running from a project directory, it cuts down from 300 (or 8k with tox) to 150.

@davidism thank you for the investigation. In my case, I see the problem in https://github.com/pallets/werkzeug/blob/73ed5efd401bd3b44cfbea67bba642c681fea6b0/src/werkzeug/_reloader.py#L71
os.walk is very CPU extensive because it walks through all frontend files in the project (node_modules). Probably your third suggestion  "Don't recurse into any directories if they or their parent do not have any Python files (not a package or data within a package)" would solve the issue.

Node modules shouldn't be in your flask project. Separate the python and node project files.

It is not Flask, but Django, but it doesn't matter. Yes, there are separate, but obviously not in the way Werkzeug would expect:
/app/project/backend/wsgi.py
/app/project/frontend/node_modules/
/app/project/manage.py

Would be great if Werkzeug reloader can handle any project structure and ignore folders without Python files. Or at least document how to prevent high CPU usage. For instance, it is possible to re-mount big directories with empty docker volume:
volumes:
  - /var/empty:/app/project/frontend/node_modules


x/tools/gopls: gopls doesn't recover easily if initial workspace loading fails

What version of Go are you using (go version)?

$ go version
go1.17rc1

$ golang.org/x/tools/gopls v0.7.1
<EMAIL_ADDRESS>h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=

What did you do?
Due to bad network connection, initial workspace loading failed to download necessary dependencies.
I manually ran go mod tidy and downloaded dependencies, but the error notification didn't go away.
How to repro:

go clean -modcache
turn off network
open vscode from golang.org/x/tools repo clone
see "Error loading workspace" message about missing modules. There is no actionable item
turn on network
run go mod tidy manually from the terminal
observe the error notification and the diagnostics messages don't update.

What did you expect to see?

Error notification & diagnostics get updated after go mod tidy run.
Better instruction on how to resolve the issue ---> I found if I use the "Run go mod tidy" codelens, eventually gopls error notification & diagnostics disappear.

What did you see instead?
Sticky error notification & diagnostics.

 gopls trace - ran go mod tidy manually around 7:23.

[Trace - 19:22:43.296 PM] Sending request 'initialize - (0)'.
Params: {"processId":9631,"clientInfo":{"name":"Visual Studio Code","version":"1.58.2"},"locale":"en-us","rootPath":"/Users/hakim/projects/editor/tools","rootUri":"file:///Users/hakim/projects/editor/tools","capabilities":{"workspace":{"applyEdit":true,"workspaceEdit":{"documentChanges":true,"resourceOperations":["create","rename","delete"],"failureHandling":"textOnlyTransactional","normalizesLineEndings":true,"changeAnnotationSupport":{"groupsOnLabel":true}},"didChangeConfiguration":{"dynamicRegistration":true},"didChangeWatchedFiles":{"dynamicRegistration":true},"symbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"tagSupport":{"valueSet":[1]}},"codeLens":{"refreshSupport":true},"executeCommand":{"dynamicRegistration":true},"configuration":true,"workspaceFolders":true,"semanticTokens":{"refreshSupport":true},"fileOperations":{"dynamicRegistration":true,"didCreate":true,"didRename":true,"didDelete":true,"willCreate":true,"willRename":true,"willDelete":true}},"textDocument":{"publishDiagnostics":{"relatedInformation":true,"versionSupport":false,"tagSupport":{"valueSet":[1,2]},"codeDescriptionSupport":true,"dataSupport":true},"synchronization":{"dynamicRegistration":true,"willSave":true,"willSaveWaitUntil":true,"didSave":true},"completion":{"dynamicRegistration":true,"contextSupport":true,"completionItem":{"snippetSupport":true,"commitCharactersSupport":true,"documentationFormat":["markdown","plaintext"],"deprecatedSupport":true,"preselectSupport":true,"tagSupport":{"valueSet":[1]},"insertReplaceSupport":true,"resolveSupport":{"properties":["documentation","detail","additionalTextEdits"]},"insertTextModeSupport":{"valueSet":[1,2]}},"completionItemKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25]}},"hover":{"dynamicRegistration":true,"contentFormat":["markdown","plaintext"]},"signatureHelp":{"dynamicRegistration":true,"signatureInformation":{"documentationFormat":["markdown","plaintext"],"parameterInformation":{"labelOffsetSupport":true},"activeParameterSupport":true},"contextSupport":true},"definition":{"dynamicRegistration":true,"linkSupport":true},"references":{"dynamicRegistration":true},"documentHighlight":{"dynamicRegistration":true},"documentSymbol":{"dynamicRegistration":true,"symbolKind":{"valueSet":[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]},"hierarchicalDocumentSymbolSupport":true,"tagSupport":{"valueSet":[1]},"labelSupport":true},"codeAction":{"dynamicRegistration":true,"isPreferredSupport":true,"disabledSupport":true,"dataSupport":true,"resolveSupport":{"properties":["edit"]},"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["","quickfix","refactor","refactor.extract","refactor.inline","refactor.rewrite","source","source.organizeImports"]}},"honorsChangeAnnotations":false},"codeLens":{"dynamicRegistration":true},"formatting":{"dynamicRegistration":true},"rangeFormatting":{"dynamicRegistration":true},"onTypeFormatting":{"dynamicRegistration":true},"rename":{"dynamicRegistration":true,"prepareSupport":true,"prepareSupportDefaultBehavior":1,"honorsChangeAnnotations":true},"documentLink":{"dynamicRegistration":true,"tooltipSupport":true},"typeDefinition":{"dynamicRegistration":true,"linkSupport":true},"implementation":{"dynamicRegistration":true,"linkSupport":true},"colorProvider":{"dynamicRegistration":true},"foldingRange":{"dynamicRegistration":true,"rangeLimit":5000,"lineFoldingOnly":true},"declaration":{"dynamicRegistration":true,"linkSupport":true},"selectionRange":{"dynamicRegistration":true},"callHierarchy":{"dynamicRegistration":true},"semanticTokens":{"dynamicRegistration":true,"tokenTypes":["namespace","type","class","enum","interface","struct","typeParameter","parameter","variable","property","enumMember","event","function","method","macro","keyword","modifier","comment","string","number","regexp","operator"],"tokenModifiers":["declaration","definition","readonly","static","deprecated","abstract","async","modification","documentation","defaultLibrary"],"formats":["relative"],"requests":{"range":true,"full":{"delta":true}},"multilineTokenSupport":false,"overlappingTokenSupport":false},"linkedEditingRange":{"dynamicRegistration":true}},"window":{"showMessage":{"messageActionItem":{"additionalPropertiesSupport":true}},"showDocument":{"support":true},"workDoneProgress":true},"general":{"regularExpressions":{"engine":"ECMAScript","version":"ES2020"},"markdown":{"parser":"marked","version":"1.1.0"}}},"initializationOptions":{"build.experimentalWorkspaceModule":true},"trace":"off","workspaceFolders":[{"uri":"file:///Users/hakim/projects/editor/tools","name":"tools"}]}
[Trace - 19:22:43.299 PM] Received response 'initialize - (0)' in 2ms.
Result: {"capabilities":{"textDocumentSync":{"openClose":true,"change":2,"save":{}},"completionProvider":{"triggerCharacters":["."],"completionItem":{}},"hoverProvider":true,"signatureHelpProvider":{"triggerCharacters":["(",","]},"definitionProvider":true,"typeDefinitionProvider":true,"implementationProvider":true,"referencesProvider":true,"documentHighlightProvider":true,"documentSymbolProvider":true,"codeActionProvider":{"codeActionKinds":["quickfix","refactor.extract","refactor.rewrite","source.fixAll","source.organizeImports"]},"codeLensProvider":{},"documentLinkProvider":{},"workspaceSymbolProvider":true,"documentFormattingProvider":true,"documentOnTypeFormattingProvider":{"firstTriggerCharacter":""},"renameProvider":{"prepareProvider":true},"foldingRangeProvider":true,"executeCommandProvider":{"commands":["gopls.add_dependency","gopls.add_import","gopls.apply_fix","gopls.check_upgrades","gopls.gc_details","gopls.generate","gopls.generate_gopls_mod","gopls.go_get_package","gopls.list_known_packages","gopls.regenerate_cgo","gopls.remove_dependency","gopls.run_tests","gopls.start_debugging","gopls.test","gopls.tidy","gopls.toggle_gc_details","gopls.update_go_sum","gopls.upgrade_dependency","gopls.vendor","gopls.workspace_metadata"]},"callHierarchyProvider":true,"workspace":{"workspaceFolders":{"supported":true,"changeNotifications":"workspace/didChangeWorkspaceFolders"}}},"serverInfo":{"name":"gopls","version":"{"path":"golang.org/x/tools/gopls","version":"v0.7.1","sum":"h1:Mh3Z8Xcoq3Zy7ksSlwDV/nzQSbjFf06A+L+F8YHq55U=","deps":[{"path":"github.com/BurntSushi/toml","version":"v0.3.1","sum":"h1:WXkYYl6Yr3qBf1K79EBnL4mak0OimBfB0XUf9Vl28OQ="},{"path":"github.com/google/go-cmp","version":"v0.5.5","sum":"h1:Khx7svrCpmxxtHBq5j2mp/xVjsi8hQMfNLvJFAlrGgU="},{"path":"github.com/sergi/go-diff","version":"v1.1.0","sum":"h1:we8PVUC3FE2uYfodKH/nBHMSetSfHDR6scGdBi+erh0="},{"path":"golang.org/x/mod","version":"v0.4.2","sum":"h1:Gz96sIWK3OalVv/I/qNygP42zyoKp3xptRVCWRFEBvo="},{"path":"golang.org/x/sync","version":"v0.0.0-20210220032951-036812b2e83c","sum":"h1:5KslGYwFpkhGh+Q16bwMP3cOontH8FOep7tGV86Y7SQ="},{"path":"golang.org/x/sys","version":"v0.0.0-20210510120138-977fb7262007","sum":"h1:gG67DSER+11cZvqIMb8S8bt0vZtiN6xWYARwirrOSfE="},{"path":"golang.org/x/tools","version":"v0.1.6-0.20210802203754-9b21a8868e16","sum":"h1:ZC/gVBZl8poJyKzWLxxlsmhayVGosF4mohR35szD5Bg="},{"path":"golang.org/x/xerrors","version":"v0.0.0-20200804184101-5ec99f83aff1","sum":"h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE="},{"path":"honnef.co/go/tools","version":"v0.2.0","sum":"h1:ws8AfbgTX3oIczLPNPCu5166oBg9ST2vNs0rcht+mDE="},{"path":"mvdan.cc/gofumpt","version":"v0.1.1","sum":"h1:bi/1aS/5W00E2ny5q65w9SnKpWEF/UIOqDYBILpo9rA="},{"path":"mvdan.cc/xurls/v2","version":"v2.2.0","sum":"h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A="}]}"}}
[Trace - 19:22:43.333 PM] Sending notification 'initialized'.
Params: {}
[Trace - 19:22:43.333 PM] Received request 'window/workDoneProgress/create - (1)'.
Params: {"token":"5577006791947779410"}
[Trace - 19:22:43.334 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go","languageId":"go","version":1,"text":"// Copyright 2020 The Go Authors. All rights reserved.\n// Use of this source code is governed by a BSD-style\n// license that can be found in the LICENSE file.\n\npackage cache\n\nimport (\n\t"bytes"\n\t"fmt"\n\t"os"\n\t"path/filepath"\n\t"strings"\n\t"syscall"\n\t"unsafe"\n)\n\nfunc init() {\n\tcheckPathCase = darwinCheckPathCase\n}\n\nfunc darwinCheckPathCase(path string) error {\n\t// Darwin provides fcntl(F_GETPATH) to get a path for an arbitrary FD.\n\t// Conveniently for our purposes, it gives the canonical case back. But\n\t// there's no guarantee that it will follow the same route through the\n\t// filesystem that the original path did.\n\n\tpath, err := filepath.Abs(path)\n\tif err != nil {\n\t\treturn err\n\t}\n\tfd, err := syscall.Open(path, os.O_RDONLY, 0)\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer syscall.Close(fd)\n\tbuf := make([]byte, 4096) // No MAXPATHLEN in syscall, I think it's 1024, this is bigger.\n\n\t// Wheeee! syscall doesn't expose a way to call Fcntl except FcntlFlock.\n\t// As of writing, it just passes the pointer through, so we can just lie.\n\tif err := syscall.FcntlFlock(uintptr(fd), syscall.F_GETPATH, (*syscall.Flock_t)(unsafe.Pointer(&buf[0]))); err != nil {\n\t\treturn err\n\t}\n\tbuf = buf[:bytes.IndexByte(buf, 0)]\n\n\tisRoot := func(p string) bool {\n\t\treturn p[len(p)-1] == filepath.Separator\n\t}\n\t// Darwin seems to like having multiple names for the same folder. Match as much of the suffix as we can.\n\tfor got, want := path, string(buf); !isRoot(got) && !isRoot(want); got, want = filepath.Dir(got), filepath.Dir(want) {\n\t\tg, w := filepath.Base(got), filepath.Base(want)\n\t\tif !strings.EqualFold(g, w) {\n\t\t\tbreak\n\t\t}\n\t\tif g != w {\n\t\t\treturn fmt.Errorf("case mismatch in path %q: component %q should be %q", path, g, w)\n\t\t}\n\t}\n\treturn nil\n}\n"}}
[Trace - 19:22:43.335 PM] Sending response 'window/workDoneProgress/create - (1)' in 1ms.
Result:
[Trace - 19:22:43.336 PM] Received notification '$/progress'.
Params: {"token":"5577006791947779410","value":{"kind":"begin","title":"Setting up workspace","message":"Loading packages..."}}
[Trace - 19:22:43.336 PM] Received request 'workspace/configuration - (2)'.
Params: {"items":[{"scopeUri":"file:///Users/hakim/projects/editor/tools","section":"gopls"}]}
[Trace - 19:22:43.350 PM] Sending response 'workspace/configuration - (2)' in 14ms.
Result: [{"build.experimentalWorkspaceModule":true}]
[Trace - 19:22:43.454 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:22:43 go env for /Users/hakim/projects/editor/tools\n(root /Users/hakim/projects/editor/tools)\n(go version go version go1.17rc1 darwin/amd64)\n(valid build configuration = true)\n(build flags: [])\nGOMOD=/Users/hakim/projects/editor/tools/go.mod\nGOPATH=/Users/hakim/go\nGOROOT=/Users/hakim/sdk/go1.17rc1\nGONOPROXY=\nGOPRIVATE=\nGOPROXY=https://proxy.golang.org,direct\nGOCACHE=/Users/hakim/Library/Caches/go-build\nGO111MODULE=\nGOMODCACHE=/Users/hakim/go/pkg/mod\nGOSUMDB=sum.golang.org\nGOFLAGS=\nGOINSECURE=\nGONOSUMDB=\n\n"}
[Info  - 7:22:43 PM] 2021/08/04 19:22:43 go env for /Users/hakim/projects/editor/tools
(root /Users/hakim/projects/editor/tools)
(go version go version go1.17rc1 darwin/amd64)
(valid build configuration = true)
(build flags: [])
GOMOD=/Users/hakim/projects/editor/tools/go.mod
GOPATH=/Users/hakim/go
GOROOT=/Users/hakim/sdk/go1.17rc1
GONOPROXY=
GOPRIVATE=
GOPROXY=https://proxy.golang.org,direct
GOCACHE=/Users/hakim/Library/Caches/go-build
GO111MODULE=
GOMODCACHE=/Users/hakim/go/pkg/mod
GOSUMDB=sum.golang.org
GOFLAGS=
GOINSECURE=
GONOSUMDB=
[Trace - 19:22:43.616 PM] Sending request 'textDocument/documentSymbol - (1)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Trace - 19:22:43.616 PM] Sending request 'textDocument/codeAction - (2)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"},"range":{"start":{"line":45,"character":28},"end":{"line":45,"character":28}},"context":{"diagnostics":[]}}
[Trace - 19:22:43.616 PM] Sending request 'textDocument/documentLink - (3)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Trace - 19:22:43.940 PM] Received notification 'window/logMessage'.

Params: {"token":"5577006791947779410","value":{"kind":"end","message":"Finished loading packages."}}
[Trace - 19:22:43.940 PM] Received notification 'window/logMessage'.

Params: {"registrations":[{"id":"workspace/didChangeWatchedFiles-0","method":"workspace/didChangeWatchedFiles","registerOptions":{"watchers":[{"globPattern":"/*.{go,mod,sum}","kind":7},{"globPattern":"/*.*tmpl","kind":7},{"globPattern":"{/Users/hakim/projects/editor/tools/gopls}","kind":7}]}}]}
[Trace - 19:22:44.038 PM] Sending request 'textDocument/foldingRange - (4)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Trace - 19:22:44.050 PM] Received request 'window/workDoneProgress/create - (4)'.
Params: {"token":"8674665223082153551"}
[Trace - 19:22:44.050 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 errors loading workspace: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error\n\tsnapshot=0\n\tdirectory=file:///Users/hakim/projects/editor/tools\n"}
[Trace - 19:22:44.050 PM] Sending request 'textDocument/codeLens - (5)'.

Params: {"id":5}
[Error - 7:22:44 PM] 2021/08/04 19:22:43 initial workspace load failed: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
[Trace - 19:22:44.121 PM] Sending response 'client/registerCapability - (3)' in 181ms.
Result:
[Trace - 19:22:44.124 PM] Received request 'client/registerCapability - (5)'.
Params: {"registrations":[{"id":"workspace/didChangeConfiguration","method":"workspace/didChangeConfiguration"},{"id":"workspace/didChangeWorkspaceFolders","method":"workspace/didChangeWorkspaceFolders"}]}
[Error - 7:22:44 PM] 2021/08/04 19:22:44 errors loading workspace: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
snapshot=0
directory=file:///Users/hakim/projects/editor/tools
[Trace - 19:22:44.185 PM] Sending response 'window/workDoneProgress/create - (4)' in 134ms.
Result:
[Trace - 19:22:44.185 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"begin","title":"Error loading workspace","message":"err: exit status 1: stderr: go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host : packages.Load error"}}
[Trace - 19:22:44.185 PM] Received notification 'textDocument/publishDiagnostics'.

Params: {"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"severity":1,"source":"go list","message":"err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error"}]}
[Trace - 19:22:44.222 PM] Sending response 'client/registerCapability - (5)' in 98ms.
Result:
[Trace - 19:22:44.414 PM] Received response 'textDocument/documentSymbol - (1)' in 798ms.
Result: []
[Trace - 19:22:44.415 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Trace - 19:22:44.415 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 DocumentSymbols failed: getting file for DocumentSymbols: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n: packages.Load error\n\tURI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go\n"}
[Trace - 19:22:44.453 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Error - 7:22:44 PM] 2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Error - Received] 19:22:44.550 PM #2 err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
[Trace - 19:22:44.551 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Error - 7:22:44 PM] 2021/08/04 19:22:44 DocumentSymbols failed: getting file for DocumentSymbols: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
URI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go
[Error - 7:22:44 PM] 2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Error - 7:22:44 PM] Request textDocument/codeAction failed.
Message: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
Code: 0
[Trace - 19:22:44.709 PM] Received notification 'window/logMessage'.

Params: {"type":1,"message":"2021/08/04 19:22:44 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error\n"}
[Trace - 19:22:44.716 PM] Received response 'textDocument/documentLink - (3)' in 1099ms.
Result: null
[Trace - 19:22:44.716 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Trace - 19:22:44.716 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 failed to compute document links: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n: packages.Load error\n\tURI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go\n"}
[Trace - 19:22:44.716 PM] Received response 'textDocument/foldingRange - (4)' in 677ms.
Result: [{"startLine":0,"startCharacter":54,"endLine":2,"endCharacter":49,"kind":"comment"},{"startLine":6,"startCharacter":8,"endLine":13,"endCharacter":9,"kind":"imports"},{"startLine":16,"startCharacter":13,"endLine":17,"endCharacter":36},{"startLine":20,"startCharacter":45,"endLine":57,"endCharacter":11},{"startLine":21,"startCharacter":71,"endLine":24,"endCharacter":42,"kind":"comment"},{"startLine":27,"startCharacter":16,"endLine":28,"endCharacter":12},{"startLine":31,"startCharacter":16,"endLine":32,"endCharacter":12},{"startLine":37,"startCharacter":73,"endLine":38,"endCharacter":74,"kind":"comment"},{"startLine":39,"startCharacter":120,"endLine":40,"endCharacter":12},{"startLine":44,"startCharacter":32,"endLine":45,"endCharacter":42},{"startLine":48,"startCharacter":119,"endLine":55,"endCharacter":3},{"startLine":50,"startCharacter":31,"endLine":51,"endCharacter":8},{"startLine":53,"startCharacter":13,"endLine":54,"endCharacter":87}]
[Error - Received] 19:22:44.716 PM #5 JSON RPC cancelled
[Error - 7:22:44 PM] 2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Trace - 19:22:44.737 PM] Sending request 'textDocument/documentSymbol - (6)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Trace - 19:22:44.737 PM] Sending request 'textDocument/codeLens - (7)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Error - 7:22:44 PM] 2021/08/04 19:22:44 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/gopls/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
[Error - 7:22:44 PM] 2021/08/04 19:22:44 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
[Error - 7:22:44 PM] 2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Error - 7:22:44 PM] 2021/08/04 19:22:44 failed to compute document links: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
URI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go
[Trace - 19:22:44.845 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"report","message":"err: exit status 1: stderr: go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host : packages.Load error"}}
[Trace - 19:22:44.845 PM] Received notification 'window/logMessage'.

Result: []
[Trace - 19:22:44.868 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Trace - 19:22:44.868 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:44 DocumentSymbols failed: getting file for DocumentSymbols: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n: packages.Load error\n\tURI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go\n"}
[Trace - 19:22:44.869 PM] Received response 'textDocument/codeLens - (7)' in 132ms.
Result: null
[Error - 7:22:44 PM] 2021/08/04 19:22:44 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Trace - 19:22:44.870 PM] Sending request 'textDocument/documentLink - (8)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Error - 7:22:44 PM] 2021/08/04 19:22:44 DocumentSymbols failed: getting file for DocumentSymbols: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
URI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go
[Trace - 19:22:45.003 PM] Received response 'textDocument/documentLink - (8)' in 132ms.
Result: null
[Trace - 19:22:45.003 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:45 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Trace - 19:22:45.003 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:22:45 failed to compute document links: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n: packages.Load error\n\tURI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go\n"}
[Error - 7:22:45 PM] 2021/08/04 19:22:45 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Error - 7:22:45 PM] 2021/08/04 19:22:45 failed to compute document links: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
: packages.Load error
URI=file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go
[Trace - 19:23:14.442 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:23:14 background imports cache refresh starting\n"}
[Info  - 7:23:14 PM] 2021/08/04 19:23:14 background imports cache refresh starting
[Trace - 19:23:14.561 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:23:14 background refresh finished after 140.725939ms\n"}
[Info  - 7:23:14 PM] 2021/08/04 19:23:14 background refresh finished after 140.725939ms
[Trace - 19:29:17.625 PM] Sending request 'textDocument/hover - (9)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"},"position":{"line":48,"character":50}}
[Trace - 19:29:17.764 PM] Received response 'textDocument/hover - (9)' in 138ms.
Result: null
[Trace - 19:29:17.764 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:29:17 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>module lookup disabled by GOPROXY=off\n\n\tsnapshot=1\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496\n\tquery=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]\n\tpackages=0\n"}
[Error - 7:29:17 PM] 2021/08/04 19:29:17 go/packages.Load: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>module lookup disabled by GOPROXY=off
snapshot=1
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod4162838496
query=[file=/Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go]
packages=0

[Trace - 19:31:38.210 PM] Sending request 'textDocument/documentSymbol - (10)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/internal/lsp/cache/os_darwin.go"}}
[Trace - 19:31:38.393 PM] Sending notification 'textDocument/didOpen'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","languageId":"go.mod","version":1,"text":"module golang.org/x/tools/gopls\n\ngo 1.17\n\nrequire (\n\tgithub.com/BurntSushi/toml v0.3.1 // indirect\n\tgithub.com/google/go-cmp v0.5.5\n\tgithub.com/google/safehtml v0.0.2 // indirect\n\tgithub.com/jba/templatecheck v0.6.0\n\tgithub.com/sanity-io/litter v1.5.0\n\tgithub.com/sergi/go-diff v1.1.0\n\tgolang.org/x/mod v0.4.2\n\tgolang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect\n\tgolang.org/x/sys v0.0.0-20210510120138-977fb7262007\n\tgolang.org/x/text v0.3.6 // indirect\n\tgolang.org/x/tools v0.1.0\n\tgolang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect\n\thonnef.co/go/tools v0.2.0\n\tmvdan.cc/gofumpt v0.1.1\n\tmvdan.cc/xurls/v2 v2.2.0\n)\n\nreplace golang.org/x/tools => ../\n"}}
[Trace - 19:31:38.393 PM] Sending request 'textDocument/codeAction - (11)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"context":{"diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"message":"err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error","severity":1,"source":"go list"}],"only":["quickfix"]}}
[Trace - 19:31:38.393 PM] Sending request 'textDocument/documentLink - (12)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:38.394 PM] Sending request 'textDocument/codeAction - (13)'.

Params: {"id":10}
[Trace - 19:31:38.394 PM] Sending request 'textDocument/documentSymbol - (14)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Error - Received] 19:31:38.410 PM #10 JSON RPC cancelled
[Trace - 19:31:38.411 PM] Received response 'textDocument/codeAction - (11)' in 17ms.
Result: null
[Trace - 19:31:38.411 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:31:38 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/gopls/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error\n"}
[Trace - 19:31:38.411 PM] Received response 'textDocument/documentLink - (12)' in 17ms.
Result: [{"range":{"start":{"line":5,"character":1},"end":{"line":5,"character":27}},"target":"https://pkg.go.dev/mod/github.com/BurntSushi/toml@v0.3.1?utm_source=gopls"},{"range":{"start":{"line":6,"character":1},"end":{"line":6,"character":25}},"target":"https://pkg.go.dev/mod/github.com/google/go-cmp@v0.5.5?utm_source=gopls"},{"range":{"start":{"line":7,"character":1},"end":{"line":7,"character":27}},"target":"https://pkg.go.dev/mod/github.com/google/safehtml@v0.0.2?utm_source=gopls"},{"range":{"start":{"line":8,"character":1},"end":{"line":8,"character":29}},"target":"https://pkg.go.dev/mod/github.com/jba/templatecheck@v0.6.0?utm_source=gopls"},{"range":{"start":{"line":9,"character":1},"end":{"line":9,"character":28}},"target":"https://pkg.go.dev/mod/github.com/sanity-io/litter@v1.5.0?utm_source=gopls"},{"range":{"start":{"line":10,"character":1},"end":{"line":10,"character":25}},"target":"https://pkg.go.dev/mod/github.com/sergi/go-diff@v1.1.0?utm_source=gopls"},{"range":{"start":{"line":11,"character":1},"end":{"line":11,"character":17}},"target":"https://pkg.go.dev/mod/golang.org/x/mod@v0.4.2?utm_source=gopls"},{"range":{"start":{"line":12,"character":1},"end":{"line":12,"character":18}},"target":"https://pkg.go.dev/mod/golang.org/x/sync@v0.0.0-20210220032951-036812b2e83c?utm_source=gopls"},{"range":{"start":{"line":13,"character":1},"end":{"line":13,"character":17}},"target":"https://pkg.go.dev/mod/golang.org/x/sys@v0.0.0-20210510120138-977fb7262007?utm_source=gopls"},{"range":{"start":{"line":14,"character":1},"end":{"line":14,"character":18}},"target":"https://pkg.go.dev/mod/golang.org/x/text@v0.3.6?utm_source=gopls"},{"range":{"start":{"line":15,"character":1},"end":{"line":15,"character":19}},"target":"https://pkg.go.dev/mod/golang.org/x/tools@v0.1.0?utm_source=gopls"},{"range":{"start":{"line":16,"character":1},"end":{"line":16,"character":21}},"target":"https://pkg.go.dev/mod/golang.org/x/xerrors@v0.0.0-20200804184101-5ec99f83aff1?utm_source=gopls"},{"range":{"start":{"line":17,"character":1},"end":{"line":17,"character":19}},"target":"https://pkg.go.dev/mod/honnef.co/go/tools@v0.2.0?utm_source=gopls"},{"range":{"start":{"line":18,"character":1},"end":{"line":18,"character":17}},"target":"https://pkg.go.dev/mod/mvdan.cc/gofumpt@v0.1.1?utm_source=gopls"},{"range":{"start":{"line":19,"character":1},"end":{"line":19,"character":18}},"target":"https://pkg.go.dev/mod/mvdan.cc/xurls/v2@v2.2.0?utm_source=gopls"}]
[Trace - 19:31:38.411 PM] Received response 'textDocument/codeAction - (13)' in 17ms.
Result: null
[Trace - 19:31:38.411 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:31:38 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/gopls/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error\n"}
[Trace - 19:31:38.411 PM] Received response 'textDocument/documentSymbol - (14)' in 17ms.
Result: []
[Trace - 19:31:38.411 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:31:38 DocumentSymbols failed: getting file for DocumentSymbols: no packages for non-Go file file:///Users/hakim/projects/editor/tools/gopls/go.mod\n\tURI=file:///Users/hakim/projects/editor/tools/gopls/go.mod\n"}
[Error - 7:31:38 PM] 2021/08/04 19:31:38 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/gopls/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
[Error - 7:31:38 PM] 2021/08/04 19:31:38 workspace packages: diagnosing file:///Users/hakim/projects/editor/tools/gopls/go.mod: err: exit status 1: stderr: go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
go<EMAIL_ADDRESS>requires
<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host
: packages.Load error
[Error - 7:31:38 PM] 2021/08/04 19:31:38 DocumentSymbols failed: getting file for DocumentSymbols: no packages for non-Go file file:///Users/hakim/projects/editor/tools/gopls/go.mod
URI=file:///Users/hakim/projects/editor/tools/gopls/go.mod
[Trace - 19:31:38.661 PM] Received notification 'window/logMessage'.

Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:38.672 PM] Sending request 'textDocument/codeLens - (16)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:38.672 PM] Sending request 'textDocument/codeAction - (17)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"context":{"diagnostics":[{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"message":"err: exit status 1: stderr: go<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\ngo<EMAIL_ADDRESS><EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host\n: packages.Load error","severity":1,"source":"go list"}]}}
[Trace - 19:31:38.673 PM] Received response 'textDocument/foldingRange - (15)' in 1ms.
Result: null
[Trace - 19:31:38.673 PM] Received response 'textDocument/codeLens - (16)' in 1ms.
Result: [{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"command":{"title":"Run go mod tidy","command":"gopls.tidy","arguments":[{"URIs":["file:///Users/hakim/projects/editor/tools/gopls/go.mod"]}]}},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"command":{"title":"Create vendor directory","command":"gopls.vendor","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Check for upgrades","command":"gopls.check_upgrades","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","Modules":["github.com/BurntSushi/toml","github.com/google/go-cmp","github.com/google/safehtml","github.com/jba/templatecheck","github.com/sanity-io/litter","github.com/sergi/go-diff","golang.org/x/mod","golang.org/x/sync","golang.org/x/sys","golang.org/x/text","golang.org/x/tools","golang.org/x/xerrors","honnef.co/go/tools","mvdan.cc/gofumpt","mvdan.cc/xurls/v2"]}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Upgrade transitive dependencies","command":"gopls.upgrade_dependency","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","GoCmdArgs":["-d","-u","-t","./..."],"AddRequire":false}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Upgrade direct dependencies","command":"gopls.upgrade_dependency","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","GoCmdArgs":["-d","github.com/BurntSushi/toml","github.com/google/go-cmp","github.com/google/safehtml","github.com/jba/templatecheck","github.com/sanity-io/litter","github.com/sergi/go-diff","golang.org/x/mod","golang.org/x/sync","golang.org/x/sys","golang.org/x/text","golang.org/x/tools","golang.org/x/xerrors","honnef.co/go/tools","mvdan.cc/gofumpt","mvdan.cc/xurls/v2"],"AddRequire":false}]}}]
[Trace - 19:31:38.674 PM] Received response 'textDocument/codeAction - (17)' in 1ms.
Result: null
[Trace - 19:31:38.674 PM] Received notification 'window/logMessage'.

Params: {"token":"8674665223082153551","value":{"kind":"report","message":"err: exit status 1: stderr: go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host go<EMAIL_ADDRESS>requires<EMAIL_ADDRESS>Get<EMAIL_ADDRESS>dial tcp: lookup proxy.golang.org: no such host : packages.Load error"}}
[Trace - 19:31:38.819 PM] Received notification 'window/logMessage'.

Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:38.880 PM] Received response 'textDocument/foldingRange - (18)' in 3ms.
Result: null
[Trace - 19:31:39.512 PM] Sending request 'textDocument/documentSymbol - (19)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:39.513 PM] Received response 'textDocument/documentSymbol - (19)' in 1ms.
Result: []
[Trace - 19:31:39.513 PM] Received notification 'window/logMessage'.
Params: {"type":1,"message":"2021/08/04 19:31:39 DocumentSymbols failed: getting file for DocumentSymbols: no packages for non-Go file file:///Users/hakim/projects/editor/tools/gopls/go.mod\n\tURI=file:///Users/hakim/projects/editor/tools/gopls/go.mod\n"}
[Error - 7:31:39 PM] 2021/08/04 19:31:39 DocumentSymbols failed: getting file for DocumentSymbols: no packages for non-Go file file:///Users/hakim/projects/editor/tools/gopls/go.mod
URI=file:///Users/hakim/projects/editor/tools/gopls/go.mod
[Trace - 19:31:39.978 PM] Sending request 'textDocument/codeLens - (20)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}}
[Trace - 19:31:39.979 PM] Received response 'textDocument/codeLens - (20)' in 0ms.
Result: [{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"command":{"title":"Run go mod tidy","command":"gopls.tidy","arguments":[{"URIs":["file:///Users/hakim/projects/editor/tools/gopls/go.mod"]}]}},{"range":{"start":{"line":0,"character":0},"end":{"line":0,"character":31}},"command":{"title":"Create vendor directory","command":"gopls.vendor","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Check for upgrades","command":"gopls.check_upgrades","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","Modules":["github.com/BurntSushi/toml","github.com/google/go-cmp","github.com/google/safehtml","github.com/jba/templatecheck","github.com/sanity-io/litter","github.com/sergi/go-diff","golang.org/x/mod","golang.org/x/sync","golang.org/x/sys","golang.org/x/text","golang.org/x/tools","golang.org/x/xerrors","honnef.co/go/tools","mvdan.cc/gofumpt","mvdan.cc/xurls/v2"]}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Upgrade transitive dependencies","command":"gopls.upgrade_dependency","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","GoCmdArgs":["-d","-u","-t","./..."],"AddRequire":false}]}},{"range":{"start":{"line":4,"character":0},"end":{"line":20,"character":1}},"command":{"title":"Upgrade direct dependencies","command":"gopls.upgrade_dependency","arguments":[{"URI":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","GoCmdArgs":["-d","github.com/BurntSushi/toml","github.com/google/go-cmp","github.com/google/safehtml","github.com/jba/templatecheck","github.com/sanity-io/litter","github.com/sergi/go-diff","golang.org/x/mod","golang.org/x/sync","golang.org/x/sys","golang.org/x/text","golang.org/x/tools","golang.org/x/xerrors","honnef.co/go/tools","mvdan.cc/gofumpt","mvdan.cc/xurls/v2"],"AddRequire":false}]}}]
[Trace - 19:31:42.601 PM] Sending request 'textDocument/codeAction - (21)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"range":{"start":{"line":4,"character":9},"end":{"line":4,"character":9}},"context":{"diagnostics":[]}}
[Trace - 19:31:42.602 PM] Received response 'textDocument/codeAction - (21)' in 0ms.
Result: null
[Trace - 19:31:43.340 PM] Sending request 'textDocument/hover - (22)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"position":{"line":0,"character":9}}
[Trace - 19:31:43.340 PM] Received response 'textDocument/hover - (22)' in 0ms.
Result: null
[Trace - 19:31:45.271 PM] Sending request 'textDocument/hover - (23)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"position":{"line":4,"character":9}}
[Trace - 19:31:45.272 PM] Received response 'textDocument/hover - (23)' in 0ms.
Result: null
[Trace - 19:31:46.058 PM] Sending request 'workspace/executeCommand - (24)'.
Params: {"command":"gopls.tidy","arguments":[{"URIs":["file:///Users/hakim/projects/editor/tools/gopls/go.mod"]}]}
[Trace - 19:31:46.059 PM] Received request 'window/workDoneProgress/create - (6)'.
Params: {"token":"6129484611666145821"}
[Trace - 19:31:46.059 PM] Sending response 'window/workDoneProgress/create - (6)' in 0ms.
Result:
[Trace - 19:31:46.060 PM] Received notification '$/progress'.
Params: {"token":"6129484611666145821","value":{"kind":"begin","title":"Running go mod tidy","cancellable":true,"message":"Running..."}}
[Trace - 19:32:14.702 PM] Received notification '$/progress'.
Params: {"token":"6129484611666145821","value":{"kind":"end","message":"completed"}}
[Trace - 19:32:14.703 PM] Received response 'workspace/executeCommand - (24)' in 28644ms.
Result: null
[Trace - 19:32:15.379 PM] Sending notification 'workspace/didChangeWatchedFiles'.
Params: {"changes":[{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.sum","type":2}]}
[Trace - 19:32:35.852 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:35 go/packages.Load\n\tsnapshot=3\n\tdirectory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod2643537537\n\tquery=[builtin golang.org/x/tools/... golang.org/x/tools/gopls/...]\n\tpackages=550\n"}
[Info  - 7:32:35 PM] 2021/08/04 19:32:35 go/packages.Load
snapshot=3
directory=/var/folders/bw/6r6k9d113sv1_vvzk_1kfxbm001py5/T/gopls-workspace-mod2643537537
query=[builtin golang.org/x/tools/... golang.org/x/tools/gopls/...]
packages=550
[Trace - 19:32:37.309 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:37 discovered missing identifiers: map[memRecordCycle:true pageBits:true]\n\tpackage="runtime"\n"}
[Info  - 7:32:37 PM] 2021/08/04 19:32:37 discovered missing identifiers: map[memRecordCycle:true pageBits:true]
package="runtime"
[Trace - 19:32:37.390 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:37 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.17rc1/src/internal/buildcfg/exp.go:24:38: 2-valued (func() (goexperiment.Flags, goexperiment.Flags) literal)() (value of type (goexperiment.Flags, goexperiment.Flags)) where single value is expected] or still-missing identifiers: map[]\n\tpackage="internal/buildcfg"\n"}
[Trace - 19:32:37.394 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:37 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:200:19: int not declared by package C /Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:203:16: bufferKind(C._SC_GETPW_R_SIZE_MAX) (value of type bufferKind) is not constant /Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:204:16: bufferKind(C._SC_GETGR_R_SIZE_MAX) (value of type bufferKind) is not constant] or still-missing identifiers: map[]\n\tpackage="os/user"\n"}
[Info  - 7:32:37 PM] 2021/08/04 19:32:37 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.17rc1/src/internal/buildcfg/exp.go:24:38: 2-valued (func() (goexperiment.Flags, goexperiment.Flags) literal)() (value of type (goexperiment.Flags, goexperiment.Flags)) where single value is expected] or still-missing identifiers: map[]
package="internal/buildcfg"
[Info  - 7:32:37 PM] 2021/08/04 19:32:37 falling back to safe trimming due to type errors: [/Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:200:19: int not declared by package C /Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:203:16: bufferKind(C._SC_GETPW_R_SIZE_MAX) (value of type bufferKind) is not constant /Users/hakim/sdk/go1.17rc1/src/os/user/cgo_lookup_unix.go:204:16: bufferKind(C._SC_GETGR_R_SIZE_MAX) (value of type bufferKind) is not constant] or still-missing identifiers: map[]
package="os/user"
[Trace - 19:32:37.833 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:37 discovered missing identifiers: map[message:true]\n\tpackage="internal/profile"\n"}
[Info  - 7:32:37 PM] 2021/08/04 19:32:37 discovered missing identifiers: map[message:true]
package="internal/profile"
[Trace - 19:32:37.885 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:37 discovered missing identifiers: map[options:true]\n\tpackage="vendor/golang.org/x/text/unicode/bidi"\n"}
[Info  - 7:32:37 PM] 2021/08/04 19:32:37 discovered missing identifiers: map[options:true]
package="vendor/golang.org/x/text/unicode/bidi"
[Trace - 19:32:38.269 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:38 discovered missing identifiers: map[markdown:true]\n\tpackage="github.com/yuin/goldmark"\n"}
[Info  - 7:32:38 PM] 2021/08/04 19:32:38 discovered missing identifiers: map[markdown:true]
package="github.com/yuin/goldmark"
[Trace - 19:32:38.473 PM] Received notification 'window/logMessage'.
Params: {"type":3,"message":"2021/08/04 19:32:38 discovered missing identifiers: map[parser:true]\n\tpackage="golang.org/x/net/html"\n"}
[Info  - 7:32:38 PM] 2021/08/04 19:32:38 discovered missing identifiers: map[parser:true]
package="golang.org/x/net/html"
[Trace - 19:32:39.802 PM] Received notification '$/progress'.
Params: {"token":"8674665223082153551","value":{"kind":"end","message":"Done."}}
[Trace - 19:32:39.871 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/editor/tools/go.mod","diagnostics":[]}
[Trace - 19:32:39.871 PM] Received notification 'textDocument/publishDiagnostics'.
Params: {"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod","version":1,"diagnostics":[]}
[Trace - 19:32:40.128 PM] Sending request 'textDocument/codeAction - (25)'.
Params: {"textDocument":{"uri":"file:///Users/hakim/projects/editor/tools/gopls/go.mod"},"range":{"start":{"line":4,"character":9},"end":{"line":4,"character":9}},"context":{"diagnostics":[]}}
[Trace - 19:32:40.128 PM] Received response 'textDocument/codeAction - (25)' in 0ms.
Result: null

This is certainly plausible misbehavior, but did you by any chance have the go.mod file open in your workspace? That could have suppressed any reloading from on-disk changes.
I can of course try to reproduce, but thought I'd check this first :)

I didn't have the go.mod file open (and reproduced it after making sure no file was open).
But another news: this initial workspace loading failure occurs only if I have the experimental workspace module feature enabled.
When it's not enabled, the initial workspace loading finishes and sends diagnostics about all the missing modules for imports.

I understand why this issue comes up--I think it's because running go mod tidy doesn't actually modify the go.sum file, since in a fresh clone, it should already be correct. (Technically this isn't true right now because the go.mod file has to be tidy for both 1.16 and 1.17.) I'm not sure exactly how to address this issue, but maybe we need a quickfix option to re-run the workspace load with a user action?

Rather than adding a special reload workspace quick fix, we should improve the error message and make it clear that the load failed because of a lack of internet (downloading failed).

FWIW this is at least partially resolved by https://go.dev/cl/419500. Now a go mod tidy, or even just touch go.mod, will resolve the errors.
We can still do a better job with error messages though.


make build always builds if there's no bundle.json file in the directory

As it says in the title, in modular projects, make always rebuilds submodules that don't have a bundle.json.
If I add a bundle.json to the submodule, then make build will not rebuild unless the code has changed.
pinging @dipinhora for some advice on this.

Thanks @dipinhora!


KDE/Spectacle: update kimageannotator to enable annotation in screenshots

Description of changes
With kImageAnnotator version 0.6.0, this tool can be used by current Spectacle 22.04 to annotate and perform basic editing tasks on screenshots. It's already included as build dependency of spectacle, so just updating it and its dependency kcolorpicker is enough to trigger the rebuild and enable the feature.
Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

[ ] For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[ ] Tested basic functionality of all binary files (usually in ./result/bin/)
22.05 Release Notes (or backporting 21.11 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module
[ ] (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes

[x] Fits CONTRIBUTING.md.

Yes, you're right, the annotation was already present, what got added were options to crop, undo, redo, rotate and modify canvas:
https://bugs.kde.org/show_bug.cgi?id=430465

Merged as issues raised by maintainer were addressed.