Solves circular import error

Hi, congrats for your paper! I think that your approach is very interesting and simple, good work. I was trying to reproduce your results and I got the following minor bug.
Bug
When trying to run the src/train.py script (with the TSUNAMI dataset), I get the following error:
Traceback (most recent call last):
  File "train.py", line 15, in <module>
    from model import model_dict
  File "/app/src/C-3PO/src/model/__init__.py", line 9, in <module>
    from model.FCN import resnet18_mtf_msf_fcn, biresnet18_mtf_msf_fcn, resnet18_msf_fcn
  File "/app/src/C-3PO/src/model/FCN.py", line 11, in <module>
    from model.Backbone import unibackbone_fpn, backbone_mtf_msf, bibackbone_mtf_msf, bibackbone_mtf_msf
  File "/app/src/C-3PO/src/model/Backbone.py", line 13, in <module>
    from model.resnet import ResNet
  File "/app/src/C-3PO/src/model/resnet.py", line 6, in <module>
    from model.Backbone import Backbone
ImportError: cannot import name 'Backbone' from partially initialized module 'model.Backbone' (most likely due to a circular import) (/app/src/C-3PO/src/model/Backbone.py)

Fix
This PR moves the Backbone class definition to a new backbone_base module in order to avoid the circular import error.
This happens when model.resnet and model.vgg modules try to import the Backbone class from model.Backbone, since model.Backbone also tries to import from model.resnet and model.vgg, it creates a circular import problem.
Since the Backbone class is not used in other parts of the model.Backbone module, it can be moved to a new  module (model.backbone_base) that does not import anything from model.resnet and model.vgg. Thus, by making model.resnet and model.vgg import from model.backbone_base, we solve the circular import problem.

Thanks!


When editting multiple occurences(Ctrl+F2), pressing end causes cursor to be out of sync in some cases

Do you have a question? Please ask it on Stack Overflow with vscode tag
(Use Help > Report Issues to prefill these)

VSCode Version: 1.13.1
OS Version: Windows 7

Steps to Reproduce:

Create sample file:
Hello
Hello
/Hello/
Put cursor after 'H' and press ctrl+F2
Press end button.

Notice that the cursor for the 3rd line (commented out Hello) goes to the end (after '/'). This makes it difficult to rename all occurences of "Hello" when accidentally pressing end because the cursor is out of place for items like in line 3 above.

This works as expected for me. Perhaps there is something else to it? Can you reproduce when running code --disable-extensions ?

Sorry for the incomplete info. I think it could be my understanding of the feature.
My understanding for "Change All Occurrences" is that the highlighting and modification is localized to the word being modified. Here's a better example:

Notice that I want to change the class Symbol to SymbolChangeThis. To do that, I press Ctrl+F2 on the Symbol. Suppose, I want to add a suffix to the class name. My tendency for that would be to press the end button so I go straight to the end of the class name. But in line 7, because there are extra characters at the end, the cursor goes straight there.
To me, it would make sense for the end button on line 7 to go to the end of Symbol instead of after the semi-colon.

Thank you for getting back to me.
This is as designed. Ctrl+F2 is a language agnostic feature that adds multiple cursors at all occurrences of a word (including in comments, i.e. it is not semantic based). Multiple cursors can be added from a number of actions (such as alt/ctrl + clicking -- depending on a setting, using ctrl+d, ctrl+alt+up/down, searching for something and while in the find input pressing alt+enter, etc. etc.). In all cases, multiple cursors behave the same way, there is no special context that e.g. multiple cursors were created from ctrl+f2 and that then they should behave in a special way.
The ctrl+F2 is "a poor man's rename". It can be used to work around languages where there is no rename provider implemented by an extension. The rename, F2, is the "real" rename. It is semantic and works across files and is, IMHO, what you currently expect ctrl+F2 to be. However, since F2 is semantic, it will only be present for languages where there is an extension implementing it.
e.g. TypeScript / JavaScript, where when pressing F2 on a symbol, a textbox where a new symbol name can be entered is shown:


It works when I disable the vendor experiment
export GO15VENDOREXPERIMENT=0

What is main.go?
I think this is fixed, now that we stopped using vendor for std.

Please try with tip. I'm pretty sure this is fixed now.

The problem still exits in go1.6rc1

You still didn't answer my original question, so I'm going to leave this closed.
Please provide enough information for us to reproduce the problem.

Sorry for that. It's the example from the mobile repo
https://github.com/golang/mobile/blob/master/example/basic/main.go
But it happens for me with all main packages when you try to run them in a symlink outside of the gopath.

Where are you when you try to symlink?

This is my setup:
$GOPATH=/home/me/gopath
CWD=/home/me/
I think it happens anywhere outside of gopath, but works with a symlink inside the gopath.

I see. Maybe this should work. Go generally isn't too friendly towards symlinks. @rsc?

Please try applying this diff to cmd/go and rebuild cmd/go:
diff --git a/src/cmd/go/pkg.go b/src/cmd/go/pkg.go
index 5ecfcb8..85f2a50 100644
--- a/src/cmd/go/pkg.go
+++ b/src/cmd/go/pkg.go
@@ -406,8 +406,20 @@ func vendoredImportPath(parent *Package, path string) (found string) {
 	if parent == nil || parent.Root == "" {
 		return path
 	}
+	// go/build decided that hasSubdir(parent.Root, parent.Dir) is true,
+	// and that computation applies EvalSymlinks to both before
+	// doing the string comparison.
+	// Do the same here so that the strings match up below.
+	// See golang.org/issue/14054.
 	dir := filepath.Clean(parent.Dir)
-	root := filepath.Join(parent.Root, "src")
+	if p, err := filepath.EvalSymlinks(dir); err == nil {
+		dir = p
+	}
+	root := parent.Root
+	if p, err := filepath.EvalSymlinks(root); err == nil {
+		root = p
+	}
+	root = filepath.Join(root, "src")
 	if !hasFilePathPrefix(dir, root) || len(dir) <= len(root) || dir[len(root)] != filepath.Separator {
 		fatalf("invalid vendoredImportPath: dir=%q root=%q separator=%q", dir, root, string(filepath.Separator))
 	}

If it fixes your problem (it seems to on my machine) I will work up a test case and try to get it into the final release. Thanks.

@rsc Thanks, this patch fixed the problem

Sorry, testing discovered a few problems with that patch. New approach at https://go-review.googlesource.com/19102. If you can try that, it'd be great, but I've verified that it fixes the mobile example above.

@rsc works for me as well, thanks for the quick fix


Finetuning the pretrained model on MSR-VTT

Hi,
Thanks for your excellent work!
When I finetune the pretrained model that you provide on MSR-VTT, there is a warning shown as below:
"Some weights of the model checkpoint at distilbert-base-uncased were not used when initializing DistilBertModel: ['vocab_projector.bias', 'vocab_transform.bias', 'vocab_transform.weight', 'vocab_layer_norm.weight', 'vocab_projector.weight', 'vocab_layer_norm.bias']"
Is it expected?
Thanks!
Yuying

I don't seem to encounter this warning, are you using the conda environment given? Whats your huggingface / transformers version?

I also see this warning following the setup described in the README.
It should be reproduced with:
from transformers import AutoModel
model = AutoModel.from_pretrained("distilbert-base-uncased")

But I believe it can be safely ignored. It says that some weights were not used by the loaded architecture, so some weights from the checkpoint are ignored. This is probably because it was trained with DistilBertForMaskedLM but it's loading with DistilBertModel. The extra params of the MLM version are vocab_transform, vocab_layer_norm, and vocab_projector, which make sense with the ones printed by the warning. These are used by the MLM training but aren't used in a vanilla model.

Ok, yeah that's expected - closing this issue :)


Install check-mk

Currently only narwhal, orca will have to wait for #21

No immediate objections, but perhaps better for @kennethgillen to also sign-off?

Got thumbs up from @kennethgillen, merging.


Add: Teve1

Channel Name
Teve1
Alternative Names (optional)
Tëvë1
Network (optional)
No response
Owners (optional)
No response
Country
XK
Subdivision (optional)
No response
City (optional)
Pristina
Broadcast Area
c/XK
Languages
sqi
Categories (optional)
general
NSFW
FALSE
Launched (optional)
No response
Closed (optional)
No response
Replaced By (optional)
No response
Website (optional)
https://teve1.info/
Logo
https://teve1.info/wp-content/uploads/2023/01/Logo-light-mode-1-test-2.png
Notes
No response

https://iptv-org.github.io/channel?id=Teve1.xk


[Feature Request] Don't convert __id to objectID by default.

Is your feature request related to a problem?
I'm working with existing data and ObjectID are not used, it's just strings.
If I have to use ObjectID's I have to update all existing data and the entire API.
Describe the solution you'd like
I would like to have the option to not use objectID's, or not even use a primary key.
Additional context
I believe the get and setAttribute functions are to blame. They have some pretty strange code inside.
    /**
     * {@inheritdoc}
     */
    public function setAttribute($key, $value)
    {
        // Convert _id to ObjectID.
        if ($key == '_id' && is_string($value)) {
            $builder = $this->newBaseQueryBuilder();

            $value = $builder->convertKey($value);
        } // Support keys in dot notation.
        elseif (Str::contains($key, '.')) {
            if (in_array($key, $this->getDates()) && $value) {
                $value = $this->fromDateTime($value);
            }

            Arr::set($this->attributes, $key, $value);

            return;
        }

        return parent::setAttribute($key, $value);
    }

Does anyone have any answer for me? Is this possible somehow? Even just as a temporary solution. I've tried overriding setAttribute method and when I dd Customer::create($customer) it seems to return the valid ID. However, when I look in the database, it has a different value so it's actually not saving that _id. Even looking through the whole package, I can't find how it's saving _id.

@vacoup96 do you want have possibility don't use primary keys with type ObjectID?

@vacoup96 do you want have possibility don't use primary keys with type ObjectID?

Yes!

https://docs.mongodb.com/manual/core/document/#the-id-field mongodb storage creates automatically index for _id field, if client doesn't send field _id

https://docs.mongodb.com/manual/core/document/#the-id-field mongodb storage creates automatically index for _id field, if client doesn't send field _id

Do you know if I can make it into a string instead of ObjectId?

What is root cause ? What do you want to do?

What is root cause ? What do you want to do?

I have a lot of old data and an API that is generating strings as _id's. To change it would take me several weeks because it's so much.

You can update all documents add new field with type string using (generate new ObjectId with castring string or copy from _id)https://docs.mongodb.com/manual/reference/operator/aggregation/toString/

You can update all documents add new field with type string using (generate new ObjectId with castring string or copy from _id)https://docs.mongodb.com/manual/reference/operator/aggregation/toString/

Do you have any exampleS? I can't get it done...

This is a duplicate of https://github.com/jenssegers/laravel-mongodb/issues/1761
Planned on version 4 https://github.com/jenssegers/laravel-mongodb/projects/2#card-33675919
Basically, we're having some huge problems with removal of auto-casting. See my explanation here: https://github.com/jenssegers/laravel-mongodb/issues/2023#issuecomment-615282098

This is a duplicate of #1761
Planned on version 4 https://github.com/jenssegers/laravel-mongodb/projects/2#card-33675919
Basically, we're having some huge problems with removal of auto-casting. See my explanation here: #2023 (comment)

If anyone else needs to an immediate  fix for this issue, you can create a Model.php and a Builder.php. In your Model change the imported extend Model with your model and overwrite the newBaseQueryBuilder() function and add use App\Query\Builder as QueryBuilder in the top of your Model.php like this:
namespace App\Query;

use Jenssegers\Mongodb\Eloquent\Model as BaseModel;
use App\Query\Builder as QueryBuilder;

abstract class Model extends BaseModel
{
    /**
     * {@inheritdoc}
     */
    protected function newBaseQueryBuilder()
    {
        $connection = $this->getConnection();

        return new QueryBuilder($connection, $connection->getPostProcessor());
    }
}

Create your own Builder.php at the namespace of the use above. use App\Query\Builder as QueryBuilder; and then you can overwrite for example the insertGetId....
namespace App\Query;

use Illuminate\Support\Str;
use Jenssegers\Mongodb\Connection;
use Jenssegers\Mongodb\Query\Builder as BaseBuilder;
use Jenssegers\Mongodb\Query\Processor;

class Builder extends BaseBuilder
{
    private function createId()
    {
        return Str::random(32);
    }

    private function injectId(&$values)
    {
        return $values['_id'] = $this->createId();
    }
    /**
     * {@inheritdoc}
     */
    public function insertGetId(array $values, $sequence = null)
    {
        $this->injectId($values);
        $result = $this->collection->insertOne($values);

        if (1 == (int) $result->isAcknowledged()) {
            if ($sequence === null) {
                $sequence = '_id';
            }

            // Return id
            return $sequence == '_id' ? $result->getInsertedId() : $values[$sequence];
        }
    }

}

Great! Closing it up because it's a duplicate.
Thanks!


How can I integrate kong-rbac to Kong(CE)?

Sorry, it's still in development, I will write a document and notify you when it's ready.

@mr5 Thank you for you contribution!


New API

This PR introduces a whole new API that I think is much easier to work with and understand.
All the nodes are broken down into small units that are overridable, and I think the terminology is much clearer now.
I'd like more eyes on the API in order to ensure that we get the API right this time and that we can port the same API to the other clients and libraries to provide a uniform way of rendering block content.
From the readme:
Usage
const React = require('react')
const ReactDOM = require('react-dom')
const BlockContent = require('@sanity/block-content-to-react')
const client = require('@sanity/client')({
  projectId: '<your project id>',
  dataset: '<some dataset>',
  useCdn: true
})

const serializers = {
  types: {
    code: props => (

        {props.node.code}

    )
  }
}

client.fetch('*[_type == "article"][0]').then(article => {
  ReactDOM.render(
    <BlockContent blocks={article.body} serializers={serializers} />,
    document.getElementById('root')
  )
})

PropTypes

className - When more than one block is given, a container node has to be created. Passing a className will pass it on to the container. Note that if only a single block is given as input, the container node will be skipped.
serializers - Specifies the React components to use for rendering content. Merged with default serializers.
serializers.types - Serializers for block types, see example above
serializers.marks - Serializers for marks - data that annotates a text child of a block. See example usage below.
serializers.list - React component to use when rendering a list node
serializers.listItem - React component to use when rendering a list item node
imageOptions - When encountering image blocks, this defines which query parameters to apply in order to control size/crop mode etc.

In addition, in order to render images without materializing the asset documents, you should also specify:

projectId - The ID of your Sanity project
dataset - Name of the Sanity dataset containing the document that is being rendered

Examples
Rendering custom marks
const input = [{
  _type: 'block',
  children: [{
    _key: 'a1ph4',
    _type: 'span',
    marks: ['s0m3k3y'],
    text: 'Sanity'
  }],
  markDefs: [{
    _key: 's0m3k3y',
    _type: 'highlight',
    color: '#E4FC5B'
  }]
}]

const highlight = props => {
  return (

      {props.children}

  )
}

<BlockContent
  blocks={input}
  serializers={{marks: {highlight}}}
/>

Specifying image options
<BlockContent
  blocks={input}
  imageOptions={{w: 320, h: 240, fit: 'max'}}
  projectId="myprojectid"
  dataset="mydataset"
/>

This is a huge improvement, looking very much forward to use this!
If I have one gripe, it's having to include projectId and dataset as props for <BlockContent../>. I see why they're needed, but I'm wondering if there is another way to access them, instead of pumping them in ever time BlockContent should render an image?

@thomax I agree, but I couldn't come up with a better design. I guess you could pass an instance of an instantiated sanity client, but not sure if that feels better or worse?
Alternatively, you can provide your own serializer for image, or materialize images ahead of time which will let you handle this without specifying them.
Any suggestions on how we could handle this more smoothly is very welcome.

@rexxars Yup, I see the problem. I guess something like https://www.npmjs.com/package/react-global-configuration could be done, and then have BlockContent load projectId and dataset from there. But if you have multiple datasets from which to grab images you have to name them somehow, and then we're full circle. Sooo, even though most use cases will be single dataset, it might not be worth contaminating the BlockContent component with the additional complexity of yucky global config.

Personally I would just create a reusable MyBlockContent-component with the project config, then pass on the props:
MyBlockContent.js:
const BlockContent = require('block-content-to-react')
const config = require('../my-thing/config')

const MyBlockContent = props =>
  <BlockContent
    projectId={config.projectId}
    dataset={config.dataset}
    {...props}
  />

module.exports = MyBlockContent


Unexpected command: 41

I'm getting "Unexpected command: 41" error each time I start my program, sometimes the program starts correctly but it stops after a few hours (~2h). After that if I try to start the program again I get the error.
I also get the same error when I try the readme example. I tried on a linux desktop computer and on a raspberry pi.
I can see that command 41 is not implemented yet but I haven't seen anyone with my same issue. Could be a problem with my home network? What does the 41 command do?
Thank you

Which hardware/os do you have? Please also provide your script code.

Hi, I'm using a raspberry pi 3 running Raspbian 9 stretch and Python 3.5.3.
Here is my code:
import serial
import yaml
import BlynkLib
from time import sleep

MENU = [[1], [2, 3], [4], [5], [2], [3], [1, 2, 3, 4, 5]]
BLYNK_AUTH = 'my token'
serial = serial.Serial("/dev/ttyACM0", 9600, timeout=1)
blynk = BlynkLib.Blynk(BLYNK_AUTH)

def read_config_file(conf=2):
    with open("config.yaml", "r") as codes_file:
        config = yaml.load(codes_file)
        if conf == 2:
            return config
        if conf == 1:
            return config["configuration"]
        if conf == 0:
            return config["persianas"]

def send_command(cmd):
    if not lock:
        for blind in current_blind:
            command = blind_config[blind-1][cmd]
            print(command)
            serial.write(command.encode())
            sleep(0.1)
            serial.write(command.encode())
            sleep(0.5)

@blynk.VIRTUAL_WRITE(0)
def lock_handler(status):
    global lock
    lock = int(status[0])

@blynk.VIRTUAL_WRITE(1)
def blind_handler1(sel):
    blind_read_handler1()
    sel = int(sel[0])
    global current_blind
    current_blind = []
    for i in range(len(MENU[sel-1])):
        current_blind.append(MENU[sel-1][i])

@blynk.VIRTUAL_WRITE(3)
def blind_handler2(sel):
    blind_read_handler2()
    sel = int(sel[0])+4
    global current_blind
    current_blind = []
    for i in range(len(MENU[sel-1])):
        current_blind.append(MENU[sel-1][i])

@blynk.VIRTUAL_READ(3)
def blind_read_handler2():
    blynk.virtual_write(1, 0)

@blynk.VIRTUAL_READ(1)
def blind_read_handler1():
    blynk.virtual_write(3, 0)

@blynk.VIRTUAL_WRITE(2)
def command_handler(cmd):
    cmd = int(cmd[0])
    if cmd == 1:
        send_command("up")
    if cmd == 2:
        send_command("down")
    if cmd == 3:
        send_command("stop")

full_config = read_config_file()
blind_config = full_config["persianas"]
setting_config = full_config["configuration"]
current_blind = []
lock = 1

while True:
    blynk.run()

It's been working now for a week without any error. The program remains unchanged.

I am facing the same issue and not solved.
I am using NodeMCU ESP8266 and micropython.
I get the error Unexpected command:  41 when using blynk:
"""
Blynk is a platform with iOS and Android apps to control
Arduino, Raspberry Pi and the likes over the Internet.
You can easily build graphic interfaces for all your
projects by simply dragging and dropping widgets.
Downloads, docs, tutorials: http://www.blynk.cc
Sketch generator:           http://examples.blynk.cc
Blynk community:            http://community.blynk.cc
Social networks:            http://www.fb.com/blynkapp
http://twitter.com/blynk_app
This example shows how to initialize your ESP8266/ESP32 board
and connect it to Blynk.
Don't forget to change WIFI_SSID, WIFI_PASS and BLYNK_AUTH ;)
"""
import BlynkLib
import network
import machine
WIFI_SSID = 'HamzaJraiwi'
WIFI_PASS = '123123123'
BLYNK_AUTH = 'TKMRZpNuGY28sLQt3gJ_uFUt30RawsZU'
print("Connecting to WiFi...")
wifi = network.WLAN(network.STA_IF)
wifi.active(True)
wifi.connect(WIFI_SSID, WIFI_PASS)
while not wifi.isconnected():
pass
print('IP:', wifi.ifconfig()[0])
print("Connecting to Blynk...")
blynk = BlynkLib.Blynk(BLYNK_AUTH)
@blynk.on("connected")
def blynk_connected(ping):
print('Blynk ready. Ping:', ping, 'ms')
def runLoop():
while True:
blynk.run()
machine.idle()
Run blynk in the main thread:
runLoop()
Or, run blynk in a separate thread (unavailable for esp8266):
#import _thread
#_thread.stack_size(5*1024)
#_thread.start_new_thread(runLoop, ())
Note:
Threads are currently unavailable on some devices like esp8266
ESP32_psRAM_LoBo has a bit different thread API:
_thread.start_new_thread("Blynk", runLoop, ())

I am facing the same issue and not solved.
I am using NodeMCU ESP8266 and micropython.
I get the error Unexpected command: 41 when using blynk:
Below is my code ....
import BlynkLib
import network
import machine
WIFI_SSID = 'HamzaJraiwi'
WIFI_PASS = ''
BLYNK_AUTH = ''
print("Connecting to WiFi...")
wifi = network.WLAN(network.STA_IF)
wifi.active(True)
wifi.connect(WIFI_SSID, WIFI_PASS)
while not wifi.isconnected():
pass
print('IP:', wifi.ifconfig()[0])
print("Connecting to Blynk...")
blynk = BlynkLib.Blynk(BLYNK_AUTH)
@blynk.on("connected")
def blynk_connected(ping):
print('Blynk ready. Ping:', ping, 'ms')
def runLoop():
while True:
blynk.run()
machine.idle()
Run blynk in the main thread:
runLoop()


Require Parts of Date

This was to address the issue I raised in #529.
I've added to the settings REQUIRE_PARTS which takes a string that can include 'day', 'month' and/or 'year'. I added the setting to the documentation and also realised that there was some docs missing from the README page (with links that didn't go anywhere), so I copied over the documentation from docs/usage.rst.

(closing and reopening to see if the Python 3.4 issue passes this time around)

Shouldn’t the value be a tuple, list or set, instead of a string?


BUG : jsconfig.json file in $HOME crash computer

From @DavidBabel on March 13, 2017 10:1

VSCode Version: 1.10.2
OS Version:

Steps to Reproduce:
linked to #22372

Close vscode
create jsconfig.json file in your $HOME directory with content :

{
    "compilerOptions": {
        "lib": [
            "es2015"
        ]
    }
}

launch any project of vscode and check your processor activity :

You will got huge performances problems identified, intellisense will completely crash in "loading ..." state, and the whole computer will slow down.
Processes stay as ghost even if vscode is closed.
Copied from original issue: Microsoft/vscode#22515

This seems to be one of the causes of the high CPU usage bug's we've seen. Here's the TSServer log:
Info 0    Binding...
Info 1    request: {"seq":0,"type":"request","command":"configure","arguments":{"hostInfo":"vscode"}}
Info 2    Host information vscode
Info 3    response: {"seq":0,"type":"response","command":"configure","request_seq":0,"success":true}
Perf 4    0::configure: async elapsed time (in milliseconds) 2.0247
Info 5    request: {"seq":1,"type":"request","command":"compilerOptionsForInferredProjects","arguments":{"options":{"module":"CommonJS","target":"ES6","allowSyntheticDefaultImports":true,"allowNonTsExtensions":true,"allowJs":true,"jsx":"Preserve"}}}
Perf 6    1::compilerOptionsForInferredProjects: elapsed time (in milliseconds) 1.2805
Info 7    response: {"seq":0,"type":"response","command":"compilerOptionsForInferredProjects","request_seq":1,"success":true,"body":true}
Info 8    request: {"seq":2,"type":"request","command":"getSupportedCodeFixes","arguments":null}
Perf 9    2::getSupportedCodeFixes: elapsed time (in milliseconds) 0.5533
Info 10   response: {"seq":0,"type":"response","command":"getSupportedCodeFixes","request_seq":2,"success":true,"body":["2304","2339","2377","2420","2503","2515","2653","2663","2686","2689","6133","6138","17009"]}
Info 11   request: {"seq":3,"type":"request","command":"getSupportedCodeFixes","arguments":null}
Perf 12   3::getSupportedCodeFixes: elapsed time (in milliseconds) 0.2386
Info 13   response: {"seq":0,"type":"response","command":"getSupportedCodeFixes","request_seq":3,"success":true,"body":["2304","2339","2377","2420","2503","2515","2653","2663","2686","2689","6133","6138","17009"]}
Info 14   request: {"seq":4,"type":"request","command":"open","arguments":{"file":"untitled:Untitled-1","fileContent":"var a = 10;","scriptKindName":"JS"}}
Info 15   Search path:
Info 16   Config file name: jsconfig.json
Info 17   event: {"seq":0,"type":"event","event":"projectLanguageServiceState","body":{"projectName":"jsconfig.json","languageServiceEnabled":false}}
Info 18   No plugins exist

Eventually it the TSServer disables the language service. Then a little while later it crashes and restarts. Here's one of the typings install logs that is triggered:
Global cache location '/Users/matb/Library/Caches/typescript', safe file path '/users/matb/projects/vscode/extensions/node_modules/typescript/lib/typingsafelist.json'
Processing cache location '/Users/matb/Library/Caches/typescript'
Trying to find '/Users/matb/Library/Caches/typescript/package.json'...
Loaded content of '/Users/matb/Library/Caches/typescript/package.json': {"devDependencies":{"@types/acorn":"^4.0.0","@types/alt":"^0.16.32","@types/ansi-styles":"^2.0.30","@types/applicationinsights":"^0.15.33","@types/argparse":"^1.0.30","@types/array-uniq":"^1.0.0","@types/assert-plus":"^1.0.2","@types/async":"^2.0.38","@types/aws-sdk":"0.0.42","@types/aws4":"^1.5.1","@types/benchmark":"^1.0.30","@types/bl":"^0.8.30","@types/bluebird":"^3.0.37","@types/boom":"0.0.33","@types/browserify":"^12.0.30","@types/buffer-equal":"0.0.30","@types/chai":"^3.4.35","@types/chalk":"^0.4.31","@types/chokidar":"^1.4.31","@types/clean-css":"^3.4.30","@types/clone":"^0.1.30","@types/code":"^4.0.1","@types/color":"^1.0.0","@types/colors":"^1.1.1","@types/combined-stream":"^1.0.0","@types/commander":"^2.3.31","@types/concat-stream":"^1.6.0","@types/core-js":"^0.9.35","@types/csv-parse":"^1.1.6","@types/dateformat":"^1.0.1","@types/debounce":"0.0.30","@types/debug":"0.0.29","@types/deep-extend":"^0.4.30","@types/diff":"0.0.31","@types/documentdb":"0.0.35","@types/duplexer2":"^0.1.0","@types/electron":"^1.4.33","@types/es6-weak-map":"^1.2.0","@types/escape-string-regexp":"0.0.30","@types/esprima":"^2.1.33","@types/event-stream":"^3.3.30","@types/exit":"^0.1.30","@types/expect.js":"^0.3.29","@types/express":"^4.0.35","@types/extend":"^2.0.30","@types/form-data":"0.0.33","@types/fs-extra":"0.0.37","@types/glob":"^5.0.30","@types/gm":"^1.17.29","@types/graceful-fs":"^2.0.29","@types/grunt":"^0.4.21","@types/gulp":"^3.8.32","@types/gulp-concat":"0.0.29","@types/gulp-filter":"^3.0.29","@types/gulp-istanbul":"^0.9.30","@types/gulp-json-editor":"^2.2.29","@types/gulp-mocha":"0.0.29","@types/gulp-rename":"0.0.31","@types/gulp-replace":"0.0.29","@types/gulp-shell":"0.0.29","@types/gulp-sourcemaps":"0.0.29","@types/gulp-tslint":"^3.6.30","@types/gulp-typedoc":"0.0.29","@types/gulp-uglify":"0.0.29","@types/gulp-util":"^3.0.30","@types/gulp-watch":"^4.1.29","@types/hammerjs":"^2.0.34","@types/handlebars":"^4.0.31","@types/hapi":"^16.0.0","@types/highlight.js":"^9.1.9","@types/hoek":"^4.1.1","@types/hooker":"^0.2.28","@types/iconv-lite":"0.0.1","@types/inherits":"0.0.29","@types/ini":"^1.3.29","@types/inquirer":"0.0.32","@types/is":"0.0.17","@types/is-binary-path":"^2.0.0","@types/is-my-json-valid":"0.0.19","@types/istanbul":"^0.4.29","@types/jade":"0.0.30","@types/jest":"^18.1.1","@types/js-beautify":"0.0.28","@types/js-yaml":"^3.5.29","@types/jsbn":"^1.2.28","@types/karma":"^0.13.33","@types/karma-coverage":"^0.5.30","@types/karma-jasmine":"0.0.29","@types/lab":"^11.1.0","@types/lazy.js":"^0.3.28","@types/lodash":"^4.14.54","@types/lodash.escape":"^4.0.1","@types/lodash.isarguments":"^3.1.1","@types/lodash.isarray":"^4.0.1","@types/lodash.keys":"^4.2.1","@types/lodash.template":"^4.4.1","@types/markdown-it":"0.0.2","@types/marked":"0.0.28","@types/micromatch":"^2.3.29","@types/mime":"0.0.29","@types/minimatch":"^2.0.29","@types/minimist":"^1.2.0","@types/mkdirp":"^0.3.29","@types/mocha":"^2.2.39","@types/mock-fs":"^3.6.30","@types/ms":"^0.7.29","@types/node":"^7.0.5","@types/nodeunit":"0.0.30","@types/nopt":"^3.0.29","@types/number-is-nan":"^1.0.0","@types/object-assign":"^4.0.30","@types/once":"^1.3.28","@types/optimist":"0.0.29","@types/parse-glob":"^3.0.29","@types/parse5":"^2.2.34","@types/path-is-absolute":"^1.0.0","@types/pify":"0.0.28","@types/prettyjson":"0.0.28","@types/progress":"^1.1.28","@types/proxyquire":"^1.3.27","@types/pump":"^1.0.0","@types/qs":"^6.2.30","@types/raw-body":"^2.1.3","@types/rc":"0.0.1","@types/react":"^15.0.14","@types/react-native":"^0.42.0","@types/react-native-fs":"^2.0.2","@types/react-router":"^3.0.6","@types/react-test-renderer":"^15.4.2","@types/replace-ext":"0.0.27","@types/request":"0.0.40","@types/requirejs":"^2.1.28","@types/resolve":"0.0.4","@types/resolve-from":"0.0.18","@types/rimraf":"0.0.28","@types/run-sequence":"0.0.28","@types/sax":"^1.0.0","@types/semver":"^5.3.30","@types/shelljs":"^0.7.0","@types/should":"^8.1.30","@types/sinon":"^1.16.35","@types/sinon-chai":"^2.7.27","@types/source-map":"^0.5.0","@types/source-map-support":"^0.2.28","@types/sshpk":"^1.10.2","@types/stream-to-array":"0.0.28","@types/string":"0.0.28","@types/strip-ansi":"^3.0.0","@types/strip-bom":"^3.0.0","@types/strip-json-comments":"0.0.28","@types/supports-color":"^3.1.0","@types/swig":"0.0.28","@types/table":"^4.0.1","@types/tape":"^4.2.29","@types/tar":"^1.0.29","@types/temp":"^0.8.29","@types/through":"0.0.28","@types/through2":"^2.0.32","@types/tmp":"0.0.32","@types/uglify-js":"^2.6.28","@types/underscore":"^1.7.36","@types/underscore.string":"0.0.30","@types/uuid":"^2.0.29","@types/v8-profiler":"0.0.5","@types/verror":"^1.9.2","@types/vinyl":"^2.0.0","@types/vinyl-fs":"^2.4.1","@types/winreg":"^1.2.30","@types/xmlbuilder":"0.0.29","@types/xtend":"^4.0.2","@types/xterm":"^2.0.2","@types/yargs":"^6.6.0","@types/zone.js":"0.0.27"}}
Adding entry into typings cache: 'acorn' =><EMAIL_ADDRESS>Adding entry into typings cache: 'alt' =><EMAIL_ADDRESS>Adding entry into typings cache: 'ansi-styles' =><EMAIL_ADDRESS>Adding entry into typings cache: 'applicationinsights' =><EMAIL_ADDRESS>Adding entry into typings cache: 'argparse' =><EMAIL_ADDRESS>Adding entry into typings cache: 'array-uniq' =><EMAIL_ADDRESS>Adding entry into typings cache: 'assert-plus' =><EMAIL_ADDRESS>Adding entry into typings cache: 'async' =><EMAIL_ADDRESS>Adding entry into typings cache: 'aws-sdk' =><EMAIL_ADDRESS>Adding entry into typings cache: 'aws4' =><EMAIL_ADDRESS>Adding entry into typings cache: 'benchmark' =><EMAIL_ADDRESS>Adding entry into typings cache: 'bl' =><EMAIL_ADDRESS>Adding entry into typings cache: 'bluebird' =><EMAIL_ADDRESS>Adding entry into typings cache: 'boom' =><EMAIL_ADDRESS>Adding entry into typings cache: 'browserify' =><EMAIL_ADDRESS>Adding entry into typings cache: 'buffer-equal' =><EMAIL_ADDRESS>Adding entry into typings cache: 'chai' =><EMAIL_ADDRESS>Adding entry into typings cache: 'chalk' =><EMAIL_ADDRESS>Adding entry into typings cache: 'chokidar' =><EMAIL_ADDRESS>Adding entry into typings cache: 'clean-css' =><EMAIL_ADDRESS>Adding entry into typings cache: 'clone' =><EMAIL_ADDRESS>Adding entry into typings cache: 'code' =><EMAIL_ADDRESS>Adding entry into typings cache: 'color' =><EMAIL_ADDRESS>Adding entry into typings cache: 'colors' =><EMAIL_ADDRESS>Adding entry into typings cache: 'combined-stream' =><EMAIL_ADDRESS>Adding entry into typings cache: 'commander' =><EMAIL_ADDRESS>Adding entry into typings cache: 'concat-stream' =><EMAIL_ADDRESS>Adding entry into typings cache: 'core-js' =><EMAIL_ADDRESS>Adding entry into typings cache: 'csv-parse' =><EMAIL_ADDRESS>Adding entry into typings cache: 'dateformat' =><EMAIL_ADDRESS>Adding entry into typings cache: 'debounce' =><EMAIL_ADDRESS>Adding entry into typings cache: 'debug' =><EMAIL_ADDRESS>Adding entry into typings cache: 'deep-extend' =><EMAIL_ADDRESS>Adding entry into typings cache: 'diff' =><EMAIL_ADDRESS>Adding entry into typings cache: 'documentdb' =><EMAIL_ADDRESS>Adding entry into typings cache: 'duplexer2' =><EMAIL_ADDRESS>Adding entry into typings cache: 'electron' =><EMAIL_ADDRESS>Adding entry into typings cache: 'es6-weak-map' =><EMAIL_ADDRESS>Adding entry into typings cache: 'escape-string-regexp' =><EMAIL_ADDRESS>Adding entry into typings cache: 'esprima' =><EMAIL_ADDRESS>Adding entry into typings cache: 'event-stream' =><EMAIL_ADDRESS>Adding entry into typings cache: 'exit' =><EMAIL_ADDRESS>Adding entry into typings cache: 'expect.js' =><EMAIL_ADDRESS>Adding entry into typings cache: 'express' =><EMAIL_ADDRESS>Adding entry into typings cache: 'extend' =><EMAIL_ADDRESS>Adding entry into typings cache: 'form-data' =><EMAIL_ADDRESS>Adding entry into typings cache: 'fs-extra' =><EMAIL_ADDRESS>Adding entry into typings cache: 'glob' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gm' =><EMAIL_ADDRESS>Adding entry into typings cache: 'graceful-fs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'grunt' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-concat' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-filter' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-istanbul' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-json-editor' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-mocha' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-rename' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-replace' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-shell' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-sourcemaps' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-tslint' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-typedoc' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-uglify' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-util' =><EMAIL_ADDRESS>Adding entry into typings cache: 'gulp-watch' =><EMAIL_ADDRESS>Adding entry into typings cache: 'hammerjs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'handlebars' =><EMAIL_ADDRESS>Adding entry into typings cache: 'hapi' =><EMAIL_ADDRESS>Adding entry into typings cache: 'highlight.js' =><EMAIL_ADDRESS>Adding entry into typings cache: 'hoek' =><EMAIL_ADDRESS>Adding entry into typings cache: 'hooker' =><EMAIL_ADDRESS>Adding entry into typings cache: 'iconv-lite' =><EMAIL_ADDRESS>Adding entry into typings cache: 'inherits' =><EMAIL_ADDRESS>Adding entry into typings cache: 'ini' =><EMAIL_ADDRESS>Adding entry into typings cache: 'inquirer' =><EMAIL_ADDRESS>Adding entry into typings cache: 'is' =><EMAIL_ADDRESS>Adding entry into typings cache: 'is-binary-path' =><EMAIL_ADDRESS>Adding entry into typings cache: 'is-my-json-valid' =><EMAIL_ADDRESS>Adding entry into typings cache: 'istanbul' =><EMAIL_ADDRESS>Adding entry into typings cache: 'jade' =><EMAIL_ADDRESS>Adding entry into typings cache: 'jest' =><EMAIL_ADDRESS>Adding entry into typings cache: 'js-beautify' =><EMAIL_ADDRESS>Adding entry into typings cache: 'js-yaml' =><EMAIL_ADDRESS>Adding entry into typings cache: 'jsbn' =><EMAIL_ADDRESS>Adding entry into typings cache: 'karma' =><EMAIL_ADDRESS>Adding entry into typings cache: 'karma-coverage' =><EMAIL_ADDRESS>Adding entry into typings cache: 'karma-jasmine' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lab' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lazy.js' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash.escape' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash.isarguments' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash.isarray' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash.keys' =><EMAIL_ADDRESS>Adding entry into typings cache: 'lodash.template' =><EMAIL_ADDRESS>Adding entry into typings cache: 'markdown-it' =><EMAIL_ADDRESS>Adding entry into typings cache: 'marked' =><EMAIL_ADDRESS>Adding entry into typings cache: 'micromatch' =><EMAIL_ADDRESS>Adding entry into typings cache: 'mime' =><EMAIL_ADDRESS>Adding entry into typings cache: 'minimatch' =><EMAIL_ADDRESS>Adding entry into typings cache: 'minimist' =><EMAIL_ADDRESS>Adding entry into typings cache: 'mkdirp' =><EMAIL_ADDRESS>Adding entry into typings cache: 'mocha' =><EMAIL_ADDRESS>Adding entry into typings cache: 'mock-fs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'ms' =><EMAIL_ADDRESS>Adding entry into typings cache: 'node' =><EMAIL_ADDRESS>Adding entry into typings cache: 'nodeunit' =><EMAIL_ADDRESS>Adding entry into typings cache: 'nopt' =><EMAIL_ADDRESS>Adding entry into typings cache: 'number-is-nan' =><EMAIL_ADDRESS>Adding entry into typings cache: 'object-assign' =><EMAIL_ADDRESS>Adding entry into typings cache: 'once' =><EMAIL_ADDRESS>Adding entry into typings cache: 'optimist' =><EMAIL_ADDRESS>Adding entry into typings cache: 'parse-glob' =><EMAIL_ADDRESS>Adding entry into typings cache: 'parse5' =><EMAIL_ADDRESS>Adding entry into typings cache: 'path-is-absolute' =><EMAIL_ADDRESS>Adding entry into typings cache: 'pify' =><EMAIL_ADDRESS>Adding entry into typings cache: 'prettyjson' =><EMAIL_ADDRESS>Adding entry into typings cache: 'progress' =><EMAIL_ADDRESS>Adding entry into typings cache: 'proxyquire' =><EMAIL_ADDRESS>Adding entry into typings cache: 'pump' =><EMAIL_ADDRESS>Adding entry into typings cache: 'qs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'raw-body' =><EMAIL_ADDRESS>Adding entry into typings cache: 'rc' =><EMAIL_ADDRESS>Adding entry into typings cache: 'react' =><EMAIL_ADDRESS>Adding entry into typings cache: 'react-native' =><EMAIL_ADDRESS>Adding entry into typings cache: 'react-native-fs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'react-router' =><EMAIL_ADDRESS>Adding entry into typings cache: 'react-test-renderer' =><EMAIL_ADDRESS>Adding entry into typings cache: 'replace-ext' =><EMAIL_ADDRESS>Adding entry into typings cache: 'request' =><EMAIL_ADDRESS>Adding entry into typings cache: 'requirejs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'resolve' =><EMAIL_ADDRESS>Adding entry into typings cache: 'resolve-from' =><EMAIL_ADDRESS>Adding entry into typings cache: 'rimraf' =><EMAIL_ADDRESS>Adding entry into typings cache: 'run-sequence' =><EMAIL_ADDRESS>Adding entry into typings cache: 'sax' =><EMAIL_ADDRESS>Adding entry into typings cache: 'semver' =><EMAIL_ADDRESS>Adding entry into typings cache: 'shelljs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'should' =><EMAIL_ADDRESS>Adding entry into typings cache: 'sinon' =><EMAIL_ADDRESS>Adding entry into typings cache: 'sinon-chai' =><EMAIL_ADDRESS>Adding entry into typings cache: 'source-map' =><EMAIL_ADDRESS>Adding entry into typings cache: 'source-map-support' =><EMAIL_ADDRESS>Adding entry into typings cache: 'sshpk' =><EMAIL_ADDRESS>Adding entry into typings cache: 'stream-to-array' =><EMAIL_ADDRESS>Adding entry into typings cache: 'string' =><EMAIL_ADDRESS>Adding entry into typings cache: 'strip-ansi' =><EMAIL_ADDRESS>Adding entry into typings cache: 'strip-bom' =><EMAIL_ADDRESS>Adding entry into typings cache: 'strip-json-comments' =><EMAIL_ADDRESS>Adding entry into typings cache: 'supports-color' =><EMAIL_ADDRESS>Adding entry into typings cache: 'swig' =><EMAIL_ADDRESS>Adding entry into typings cache: 'table' =><EMAIL_ADDRESS>Adding entry into typings cache: 'tape' =><EMAIL_ADDRESS>Adding entry into typings cache: 'tar' =><EMAIL_ADDRESS>Adding entry into typings cache: 'temp' =><EMAIL_ADDRESS>Adding entry into typings cache: 'through' =><EMAIL_ADDRESS>Adding entry into typings cache: 'through2' =><EMAIL_ADDRESS>Adding entry into typings cache: 'tmp' =><EMAIL_ADDRESS>Adding entry into typings cache: 'uglify-js' =><EMAIL_ADDRESS>Adding entry into typings cache: 'underscore' =><EMAIL_ADDRESS>Adding entry into typings cache: 'underscore.string' =><EMAIL_ADDRESS>Adding entry into typings cache: 'uuid' =><EMAIL_ADDRESS>Adding entry into typings cache: 'v8-profiler' =><EMAIL_ADDRESS>Adding entry into typings cache: 'verror' =><EMAIL_ADDRESS>Adding entry into typings cache: 'vinyl' =><EMAIL_ADDRESS>Adding entry into typings cache: 'vinyl-fs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'winreg' =><EMAIL_ADDRESS>Adding entry into typings cache: 'xmlbuilder' =><EMAIL_ADDRESS>Adding entry into typings cache: 'xtend' =><EMAIL_ADDRESS>Adding entry into typings cache: 'xterm' =><EMAIL_ADDRESS>Adding entry into typings cache: 'yargs' =><EMAIL_ADDRESS>Adding entry into typings cache: 'zone.js' =><EMAIL_ADDRESS>Finished processing cache location '/Users/matb/Library/Caches/typescript'
Process id: 61166
Npm config file: /Users/matb/Library/Caches/typescript/package.json
Updating types-registry npm package...
Parent process has exited, shutting down...

And here's the process info:
61164  98.8  2.6  3617780 442536 s000  R+    3:55PM   2:18.39 /Users/matb/projects/vscode/.build/electron/Code - OSS.app/Contents/Frameworks/Code - OSS Helper.app/Contents/MacOS/Code - OSS Helper /Users/matb/projects/vscode/extensions/typescript/out/utils/electronForkStart /Users/matb/projects/vscode/extensions/node_modules/typescript/lib/tsserver.js --useSingleInferredProject --enableTelemetry

A jsconfig.json with no include will attempt to load all .js files recursively under current folder. while we should not crash, loading all files is what is expected. I would recommend adding include or moving the file to a separate directory.

This is kinda related to the other issue where the user doesn't know where the root of the project was set to. We could expose the information somewhere on the UI, so that the user can know if the t/jsconfig.json that current in effect is the expected one.

Actually I just saw https://github.com/Microsoft/vscode/pull/20571
I wonder how to enable it? And does clicking on "tsconfig" gives you the full path of that config file?

Microsoft/vscode#20571 was reverted as there were concerns about polluting the status bar. Instead we added some commands to jump to the current config file.
One other problem I noticed when having a tsconfig.json in my home directory: opening a d.ts file installed by TypeScript in ~/Library/... would cause the home directory tsconfig.json to be loaded as a project by the TSServer. On the VSCode side, in my view we should never load a project that is outside of the user's root workspace. Is there a way we can tell TypeScript to only load projects under the VSCode root workspace?

What about just opening loose files? VS supports those too. I understand that we should limit the number of files scanned/included.

@mhegazy Yes, limiting the scanning would be the more complete fix here
I still am wondering though: for loose files, should we really automatically load the project corresponding to the file when a user opens it? My thinking for VSCode is that if you have a workspace open and then open a file outside the workspace, we could just treat the opened file as a standalone file. If you are only opening loose files in VSCode (and have not opened any workspaces) then perhaps we should try to load the project for the files as well. This would be a regression in behavior though

We can add a projectRootPath parameter to the file open API, so that the searching for project config file stops at the projectRootPath. This way VSCode can decide what to do for loose files, as it can choose to pass the current folder path as the projectRootPath so searching wouldn't go up-level.

@mjbvz there is some work here for VSCode to use this change, you will need to pass the projectRootPath as appropriate.

Great! I've opened https://github.com/Microsoft/vscode/issues/25040 to track this on our side. Please let me know when a new insiders build with this fix is available


Filtering syntax with first and orderBy operators

Is it possible to combine below 2 filters?
List.first(filter?) - Return the first item from a list. Optionally by a filter
List.orderBy(field) - Order the list by a given field

My table has a related one-to-many foreign table and I would like to get the max value of a field in foreign table, can I sort the foreign table field and get the first element?

You can, there are likely edge cases that may fail. That expression filtering needs a revisit for a few things.
What is it you want to do? Here is a weird example
query {
    projects(filter: "tasks.orderByDesc(hoursEstimated).first().hoursEstimated > 0") {
        name tasks { id }
    }
}

But this filters the list of projects. If you want to return the max in a query you likely want to add a field to the schema.
schema.UpdateType<Project>(type => {
    type.AddField("maxHoursEstimatedForSingleTask", project => project.Tasks.Max(t => t.HoursEstimated), "Get the max hours estimated for a single task");
});

I hope that helps, otherwise if you can share more details - data model, query you are trying - I can help further.

The custom field approach looks execilent, it's exactly what I want to do. Thanks for the suggestion.
Speaking of the example:
query {
    projects(filter: "tasks.orderByDesc(hoursEstimated).first().hoursEstimated > 0") {
        name tasks { id }
    }
}

do you mean "first()" returns only the first project object after sorting? What I wanted to do is return project list, in each project return the first task (I have many task linked to one project). the custom field approach looks good but it will be better if I don't need to add custom fields to the query.

The field projects will return a list of projects. The filter just filters them. The above example is like writing this
var projects = db.Projects.Where(p => p.Tasks.OrderByDesc(t => t.HoursEstimated).First().HoursEstimated > 0).ToList();

To only return the first task as a field, you need to define a field which is the AddField example above. Or to return the whole task
schema.UpdateType<Project>(type => {
    type.AddField("firstTasK", project => project.Tasks.First(), "Get the task"); // replace expression with what you need
});

Hmm, is it possible to add custom fields using something like GraphQLFieldAttribute? the attribute doesn't seem to support expression currently.

It is but it has limitations.
https://entitygraphql.github.io/docs/library-compatibility/expression-reuse
https://entitygraphql.github.io/docs/schema-creation/fields#note-about-method-execution-with-ef
Basically if you want the field to get compiled to something EF likes you'll need to use something similar to EntityFrameworkCore.Projectables as highlighted in the above links.

How to register sort after the field added? I'm using [UseSort] attribute to automatically add fields.
schema.UpdateType(type => {
type.AddField("firstTasK", project => project.Tasks.First(), "Get the task"); // replace expression with what you need
});

BTW it seems Sort feature doesn't respect GraphQLIgnore attribute. I tagged some fields as ignored but they still show up in the input type of sort

[UseSort] and the other attributes work when the schema is automatically built with SchemaBuilder. If you are adding fields manually - which is common. You call .UseSort()
schema.ReplaceField("people",
    ctx => ctx.People,
    "Return a list of people. Optional sorted")
    .UseSort();

There are options in that call to customise which fields are used in the sort input etc.
You're right the attribute way should respect the ignore attribute

Because I was using UseOffsetPagingAttribute it complains the return type is not a collection anymore when I call UseSort(). Some misalignment in schema is okay so far. The problem is Sort extension doesn't apply the custom expression I alternated for field firstTask.
I think I found a solution / work around by changing below line:
                        expression = Expression.Call(                             methodType!,                             method,                             new Type[] { listType!, schemaField.ReturnType.TypeDotnet },                             expression,                             Expression.Lambda(Expression.PropertyOrField(sortField, fieldInfo.Name), listParam)                         );
in https://github.com/EntityGraphQL/EntityGraphQL/blob/5.2.1/src/EntityGraphQL/Schema/FieldExtensions/Sorting/SortExtension.cs
to
                        expression = Expression.Call(                             methodType!,                             method,                             new Type[] { listType!, schemaField.ReturnType.TypeDotnet },                             expression,                             Expression.Lambda(schemaField.ResolveExpression!, schemaField.FieldParam!)                         );
But it seems latest code has been changed.

Paging changes the shape of the objects etc. as you see in the resulting schema. As outlined in the docs paging needs to be last.

When combining multiple extensions together on a single field order matters. The correct order is for the provided extensions is

Filter -> Sort -> Paging
Or are you saying you are are applying paging last and it still fails?

I changed to call UseSort() manually so trying to say I need to call UseOffsetPaging() manually as well.
Will you consider applying the fix which uses the expression registered to the field:
expression = Expression.Call( methodType!, method, new Type[] { listType!, schemaField.ReturnType.TypeDotnet }, expression, Expression.Lambda(schemaField.ResolveExpression!, schemaField.FieldParam!) );

Sorry, I am not fully following what is broken or not working, can you make a unit test that reproduces the issue? That way I can fix it and not break it in the future.
Using schemaField.ResolveExpression makes sense and doesn't break anything, however I'd still love to better understand what is failing today in a test.

Okay, I will make a UT to repro the issue and maybe submit a PR when I get some time.
Basically scenario is:
I registered a type 'Project' and then I added/updated a field using custom expression:
schema.UpdateType<Project>(type => {
    type.AddField("maxHoursEstimatedForSingleTask", project => project.Tasks.Max(t => t.HoursEstimated), "Get the max hours estimated for a single task");
});

And then I register Sort (It seems I need to register sort after field modifications to Project done, correct?)
schema.GetField("project").UseSort();
And then it seems when I sort on the field 'maxHoursEstimatedForSingleTask' the query uses the fields 'maxHoursEstimatedForSingleTask' as if it's a db column
query {
  project(sort: [maxHoursEstimatedForSingleTask: ASC]) {
    maxHoursEstimatedForSingleTask
  }
}

Got this error when I run the query:
The specified type member 'maxHoursEstimatedForSingleTask' is not supported in LINQ to Entities. Only initializers, entity members, and entity navigation properties are supported.
I think that's because the sort extension doesn't use expression "project.Tasks.Max(t => t.HoursEstimated)" so I tried to replace the code using schemaField.ResolveExpression and it worked.
I'm too new to this package thus wanna confirm whether the fix is good before I submit a PR.

Ahh thanks. I get it now. I think this is a test the hits the issue
[Fact]
    public void TestSortCustomField()
    {
        var schema = SchemaBuilder.FromObject<TestDataContext>();
        var data = new TestDataContext();
        data.FillWithTestData();

        schema.UpdateType<Project>(type =>
        {
            type.AddField("maxHoursEstimatedForSingleTask", project => project.Tasks.Max(t => t.HoursEstimated), "Get the max hours estimated for a single task");
        });
        schema.Query().GetField("projects", null).UseSort();
        var gql = new QueryRequest
        {
            Query =
                @"query {
                    projects(sort: [{maxHoursEstimatedForSingleTask: ASC}]) {
                        maxHoursEstimatedForSingleTask
                    }
                }",
        };

        var result = schema.ExecuteRequestWithContext(gql, data, null, null);
        Assert.Null(result.Errors);

        dynamic projects = result.Data["projects"];
    }

The fix you suggest is part of the solution. But I believe the other part is UseSort creates a ProjectSortInput type in the schema with the fields from the dotnet type Project not from the schema type Project. This is in MakeSortType in SortExtension.

See the PR #374 which adds an option to do that. Note because it needs to build the type then it will only take what is currently in the schema for that type.
Also, because of that it doesn't make sense to have it on the attribute as when the SchemaBuilder is building fields it will only have the dotnet properties at that time anyway.

That makes sense. Thanks for addressing the issue


jenkins: 2.426.3 -> 2.440.1

Automatic update generated by nixpkgs-update tools. This update was made based on information from passthru.updateScript.
meta.description for jenkins is: An extendable open source continuous integration server
meta.homepage for jenkins is: https://jenkins.io/
meta.changelog for jenkins is: https://www.jenkins.io/changelog-stable/#v2.440.1
Updates performed

Ran passthru.UpdateScript

To inspect upstream changes
Impact
Checks done

built on NixOS
The tests defined in passthru.tests, if any, passed
found 2.440.1 with grep in /nix/store/028ajnhm6zmi7j64j40rjddmd41lxmvm-jenkins-2.440.1
found 2.440.1 in filename of file in /nix/store/028ajnhm6zmi7j64j40rjddmd41lxmvm-jenkins-2.440.1

Rebuild report (if merged into master) (click to expand)

1 total rebuild path(s)

1 package rebuild(s)

First fifty rebuilds by attrpath
jenkins

Instructions to test this update (click to expand)

Either download from Cachix:
nix-store -r /nix/store/028ajnhm6zmi7j64j40rjddmd41lxmvm-jenkins-2.440.1 \
  --option binary-caches 'https://cache.nixos.org/ https://nix-community.cachix.org/' \
  --option trusted-public-keys '
  nix-community.cachix.org-1:mB9FSh9qf2dCimDSUo8Zy7bkq5CX+/rkCWyvRCYg3Fs=
  cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=
  '

(The Cachix cache is only trusted for this store-path realization.)
For the Cachix download to work, your user must be in the trusted-users list or you can use sudo since root is effectively trusted.
Or, build yourself:
nix-build -A jenkins https://github.com/r-ryantm/nixpkgs/archive/7c55954843c9ab9ca04f709e34277fc410c553e3.tar.gz

Or:
nix build github:r-ryantm/nixpkgs/7c55954843c9ab9ca04f709e34277fc410c553e3#jenkins

After you've downloaded or built it, look at the files and if there are any, run the binaries:
ls -la /nix/store/028ajnhm6zmi7j64j40rjddmd41lxmvm-jenkins-2.440.1
ls -la /nix/store/028ajnhm6zmi7j64j40rjddmd41lxmvm-jenkins-2.440.1/bin

Pre-merge build results
We have automatically built all packages that will get rebuilt due to
this change.
This gives evidence on whether the upgrade will break dependent packages.
Note sometimes packages show up as failed to build independent of the
change, simply because they are already broken on the target branch.
Result of nixpkgs-review run on x86_64-linux 1

1 package built:

jenkins

Maintainer pings
cc @coreyoconnor @earldouglas @NeQuissimus @ajs124 @dasJ for testing.

Manual backport PR: https://github.com/NixOS/nixpkgs/pull/303180


Angle: Improved code quality

fixed potential bugs
improved src code formatting
improved documentation
improved tests

Looks good, modulo my 2 comments.  I'll go ahead and approve.

Why so many changelogs are getting removed?

GitHub bugged out. Fixed.


Add support for concurrency safe file operations.

The purpose of the openat() function is to enable opening files in directories other than the current working directory without exposure to race conditions. Any part of the path of a file could be changed in parallel to a call to open(), resulting in unspecified behavior. By opening a file descriptor for the target directory and using the openat() function it can be guaranteed that the opened file is located relative to the desired directory.
openat() is part of POSIX.1-2008.
New Dir methods:
open, open_file, exists?, stat, lstat, mkdir, rmdir, rename, delete

The build failure is from OS/X 10.9.  Is there any way to upgrade to 10.10?

No, there's no way to upgrade, Travis only offers this version: http://docs.travis-ci.com/user/osx-ci-environment/

http://blog.travis-ci.com/2015-09-09-xcode7-gm/
But then do we want to ditch 10.9 support?

Can't we fallback to combining the dir path with the file path if openat is not available?

@waj falling back to full paths is almost the same unless chdir is performed.  I have a compatible module that does that (for ruby).  The only issue is checking if openat is available.  How do I do that without autoconf?

almost the same unless chdir is performed

You mean the behaviour would be different if we fallback to joining the dir path and the file path? How?

The only issue is checking if openat is available. How do I do that without autoconf?

No! No autoconf!!.... :-P We've been thinking about this for https://github.com/manastech/crystal_lib and we'll probably come up with a better solution. But in the meantime I think the HAVE_OPENAT works just fine.

We can probably do this in the future, once we have a way to detect, at compile time, if a certain C function is present. So for now I'll close this (won't be merged any time soon).

Can we resurrect this now? 10.10 is the minimum macOS on Travis now, so it should be safe to assume that there are no relevant unixes without openat.
openat is important for more than just concurrency — openat is the only way to open files under Capsicum sandboxing: you open file descriptors to directories you need, call cap_enter(), and now you can only open files under the directories you have descriptors to.


Adds GetKnownDevicesByIds-Method to get paired devices without the need of connecting to them

Such a method was missing for iOS as GetSystemConnectedOrPairedDevices returned only the currently connected devices. Androids GetSystemConnectedOrPairedDevices works just fine.
Introduces a new method to introduce no breaking change for GetSystemConnectedOrPairedDevices on iOS, if that method would start to return non-connected, paired devices too.

Somehow the GHA build failed here, but the logs are not available any more. I just made some GHA fixes on master. Could you rebase this, in order to see if the problem goes away? (Also: Sorry for the late review! 🙈)

how does this work for IOS
GetKnownDevicesByIds??
having a bit of trouble getting it to return devices.  this should return paired devices whether or not they are actively connected?  basically if i can see them in settings as bluetooth devices i would be interested to return them


Please help make it more obvious when pub detects a file collision

I'm trying to help the new vanilla Dart of TodoMVC, but when I run pub build, I get this error:
--- Dec 12, 2013 3:57:28 PM Running pub build ... ---
Pub build failed, [65] Building todomvc_dart.....
[Info in Dart2JS]:
Generated todomvc_dart|web/dart/app.dart.js (127618 characters) in 0:00:07.610880
Build error:
Transforms {Dart2JS on todomvc_dart|web/dart/app.dart} all emitted asset todomvc_dart|web/dart/app.dart.js.
Build failed.
A couple of questions:
* Not sure what "all emitted asset" means. Was that an error? That is, is that good or bad? :)
* I think I see one transform in there (Dart2JS) but I also see the word "all".
* I'm not clear what the | means here. Why do we include the name of the project, and not just the path to the file/asset in question?
* No exception is emitted, so not sure how to give you more info. I ran this by right-clicking on pubspec.yaml and selected "pub build"
For the record, no build directory was created.

This issue has been moved to dart-lang/pub#783.


dscvit.com/morelinks - images look stretched vertically

Also, the link for Idea Hub has a trailing period (.)
and Github shows a 404

@Nirmitjatana

@Geek-ubaid still not fixed

Will make sure this is done today only.

@BRO3886 You can close this issue now!

Also, the link for Idea Hub has a trailing period (.)
and Github shows a 404

@BRO3886 Can you tell more about it, couldn't find this issue

@Nirmitjatana there is a trailing period in the link that is why the link is showing 404. Remove these unwanted characters!

Also, the link for Idea Hub has a trailing period (.)
and Github shows a 404

@BRO3886 Can you tell more about it, couldn't find this issue

Try clicking on the idea hub image, you'll understand

Also, the link for Idea Hub has a trailing period (.)
and Github shows a 404

@BRO3886 Can you tell more about it, couldn't find this issue

Try clicking on the idea hub image, you'll understand

Has been fixed in #48 . Work is being done to avoid streching still.

Is the issue resolved @Nirmitjatana ?

Is the issue resolved @Nirmitjatana ?

Yes.. for now it is resolved


I would like to use the dw1000 module with an Arduino Pro Mini. I have already seen the schematic on the wiki and was wondering how to connect the Arduino to the PC. Can I just use a USB to TTL converter to load the code onto the Arduino? And could this also be used as a power supply?
Thanks a lot in advance.

No problems, all of us were beginners.

Can I just use a USB to TTL converter to load the code onto the Arduino?

Yes, you can. There are a lot of examples of how to connect USB-TTL to Arduino Pro Mini. However, you need to know what is the version of your Arduino: 3,3V or 5V, and based on the version choose the right voltage from the converter.
This is an example:

And could this also be used as a power supply?

Absolutely not. You can't use the Arduino alimentation. DWM1000s require almost 300 mA and the Arduino does not provide enough current from the current regulator. DWM1000 requires 3,3V as input and I suggest an external power supply for either (remember to not connect Vcc of USB-TTL converter in this case).
Very important note: With 5V Arduino you have to use a logic level converter from 5V to 3,3V SPI communication.

Thanks @Sonic0 for your quick reply. Really appreciate it.
So did I understand that correctly: I have a power connector on a pcb (to which I connect a 3.3V DC power supply) and from that I go to pin 5 and 24 on the DWM1000 and to VCC and GND on the Arduino. And VCC of the USB-TTL Converter is not connected.
And one more thing: Why exactly is there a resistor connecting pin 22 (DWM1000) with ground? Is it because you dont want the module to go in SLEEP/ DEEPSLEEP mode? And its an 330 Ohm Resistor right?

So did I understand that correctly: I have a power connector on a pcb (to which I connect a 3.3V DC power supply) and from that I go to pin 5 and 24 on the DWM1000 and to VCC and GND on the Arduino. And VCC of the USB-TTL Converter is not connected.

Yes. However, based on the datasheet, I think 3,3V is necessary on pins 5,6,7 and GND on pins 8,16,
21,23,24 (I don't remember well, I used this board)

Why exactly is there a resistor connecting pin 22 (DWM1000) with ground? Is it because you dont want the module to go in SLEEP/ DEEPSLEEP mode? And its an 330 Ohm Resistor right?

It is a pull-down resistor. That pin will float in SLEEP and DEEPSLEEP states and may cause spurious interrupts unless pulled low. I remember we used 10k pull-down resistor though.

okay, thank you really much @Sonic0 !!


[Question]: Can I install the module for llama_index with Googlecolab?

Question Validation

[X] I have searched both the documentation and discord for an answer.

Question
When running llama_index with Googlecolab, I am having trouble installing the module "QuestionAnswerPrompt" and the library "langchain". Is there anyone who can get it working with Googlecolab now? #Bug

Can you give more explanation? You might have to downgrade langchain slightly if I had to guess

Hi Logan,
Thank you for your reply.
The error log is below
ImportError traceback (most recent call)
 in <cell row: 9>()
----> 9 from llama_index import QuestionAnswerPrompt, SimpleDirectoryReader, OpenAIEmbedding
ImportError: Cannot import name 'QuestionAnswerPrompt' from 'llama_index' (/usr/local/lib/python3.10/dist-packages/llama_index/init.py)

@YYana93 I think you might be following an outdated guide. There is only one prompt type now
from llama_index.prompts import PromptTemplate
But you can achieve the equivalent import with from llama_index.prompts.prompts import QuestionAnswerPrompt

https://docs.llamaindex.ai/en/stable/module_guides/models/prompts.html#prompts


Route under multiple optional parameters is not matched correctly in every case

Describe the bug
In case of the following route structure:

/[[culture=culture]]/[[year=year]]/program      // Program route
/[[culture=culture]]/[[year=year]]/[...content]   // Content route

The following links will go correctly to Program route:

/program   ✓
/en/program  ✓
/en/2022/program  ✓

But
/2022/program  ✘ will instead go to Content route, practically turning the optional parameter culture into a required parameter when year is set which is not in my opinion the expected behaviour

Content route as rest parameter:

Expected behaviour:

/2022/program   ->  Program route

Actual behaviour:

/2022/program   ->  Content route

Additionally
When changing /[[culture=culture]]/[[year=year]]/[...content]  to  /[[culture=culture]]/[[year=year]]/[content],
The following links will go correctly to Content route:

/content ✓
/en/content ✓
/en/2022/content ✓

But

/2022/content ✘
/2022/program  ✘

will both be met by 404 Not Found.

Content route as parameter:

Expected behaviour:
/2022/program   ->  Program route
/2022/content     ->  Content route
Actual behaviour:
/2022/program   ->  404
/2022/content     ->  404
Reproduction
Stackblitz Reproduction
Logs
No response
System Info
System:
    OS: Windows 10 10.0.22621
    CPU: (12) x64 AMD Ryzen 5 3600 6-Core Processor
    Memory: 17.48 GB / 31.93 GB
  Binaries:
    Node: 18.16.0 - C:\Program Files\nodejs\node.EXE
    npm: 9.5.1 - C:\Program Files\nodejs\npm.CMD
    pnpm: 8.6.0 - C:\Program Files\nodejs\pnpm.CMD
  Browsers:
    Edge: Spartan (44.22621.2134.0), Chromium (116.0.1938.76)
    Internet Explorer: 11.0.22621.1
  npmPackages:
    svelte: ^4.2.0 => 4.2.0

Severity
serious, but I can work around it
Additional Information
No response

I've also encountered this issue in my project that's using "@sveltejs/kit": "^2.0.0"" and "svelte": "^4.2.7"".
My structure looks like this:
src/

  routes/

  [[lang=lang]]/

      [explore=explore]/
        +page.server.js

          [offer_type=offer_type]/

              [[city=city]]/

                  [[district=district]]/

                      [[subdistrict=subdistrict]]/
                         +page.server.js

                          [view_mode=view_mode]/
                             +page.svelte

Routes that work for me are:

/en/explore/sale/map — here city, district and subdistrict params are not present
/en/explore/sale/warszawa/srodmiescie/powisle/map — here all 3 optional parameters are present

Routes that are returning 404:

/en/explore/sale/warszawa/map — here we are missing district and subdistrict optional params
/en/explore/sale/warszawa/srodmiescie/map — here we are just missing subdistrict optional param

Closing this one as I can no longer reproduce it after upgrading Kit to the latest version.


Add load csv db and batch add labeled items.

Hello, I made some changes to this project, they are as follows:

add a "load_csv_db" method using some source file from the origin apsi cli folder.
finish a TODO item, the add_items function in LabeledServer now use a batch function in c++.

Cautious: I changed the CmakeList.txt for some new source files were added, but some configs may become different from old, so you may need merge it by hand or repeat this file with your own version.

Hi @xiaohan2909, thanks for reaching out. I'm curious to dive into your proposed changes. Would you meanwhile be open to elaborate a bit what motivated the changes; Specifically, why you were missing an option to load a CSV file as a database? Seeing that this contribution round about doubles the size of this repo's code base, I'd like to understand the motivation thoroughly :relaxed:

Thank you for your reply. I really should explain the reason. In some situations, I need to directly import a large amount of data into SenderDB, which is saved in a CSV file. Due to cross language reasons, the batch addition method(add_items) in the project requires reading the data into a list in Python first, and then converting types before using the methods in C++ to import. So I added the CSV import method in the hope of achieving a more efficient and direct import of a large amount of data. Of course, this function seems a bit redundant because the batch method in the project is sufficient to complete this function. So, I hope to use this submission as a supplement or reference, perhaps a better way is to optimize the batch addition method itself.


Change way to provide IERC20

Why?

@rzadp remove dependency from another projects for move EnoghtTokenValidator to commons


NPM

Would be nice if it was submitted to NPM so it could be properly versioned, auto-udpated as a dependency, simpler installation, etc. 😸

Agreed.
@byt3smith Is the easiest way to submit to npm, here?

Sure is. 💯

@byt3smith  npm install --save botkit-mock


Use log home instead of ..

@millerdev this'll probably fix what you were seeing. going to update tomorrow
elf: @snopoke

Can you let me know when it's updated? I'd like to deploy staging asap.

Its updated

cheers, thank you


Virtio-FS failing on hosts with AppArmor

/kind bug
What happened:
Trying out snapshot build 20200928 with #3493. virtio-fs is setup to map a cephFS backed PVC.
Ubuntu 18.04. Host kernel: 5.4.0-47-generic. No SELinux. Apparmor enabled.
The docker-default AppArmor profile is too restrictive for Virtio-FS to work.
Qemu fails to start with:
{"component":"virt-launcher","level":"error","msg":"internal error: qemu unexpectedly closed the monitor: 2020-09-30T21:08:34.249505Z qemu-kvm: -device vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=sharedfs,bus=pci.1,addr=0x0: Failed to read msg header. Read 0 instead of 12. Original request 1.","pos":"qemuProcessReportLogError:2064","subcomponent":"libvirt","thread":"56","timestamp":"2020-09-30T21:08:34.250000Z"}
qemu-kvm: -device vhost-user-fs-pci,chardev=chr-vu-fs0,queue-size=1024,tag=sharedfs,bus=pci.1,addr=0x0: vhost_dev_init failed: Operation not permitted

virtiofsd logs:
[617100180193229] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617101334792332] [ID: 00000194] virtio_session_mount: Waiting for vhost-user socket connection...
[617101363029043] [ID: 00000194] virtio_session_mount: Received vhost-user socket connection
[617101384956914] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617102539847175] [ID: 00000205] virtio_session_mount: Waiting for vhost-user socket connection...
[617102575292582] [ID: 00000205] virtio_session_mount: Received vhost-user socket connection
[617102593016668] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617103827655704] [ID: 00000216] virtio_session_mount: Waiting for vhost-user socket connection...
[617103856087607] [ID: 00000216] virtio_session_mount: Received vhost-user socket connection
[617103872973299] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied

Workaround
Annotate the VMI with:
      annotations:
        container.apparmor.security.beta.kubernetes.io/compute: unconfined

Since new app armor profiles can't easily be created a reasonable fix to this bug is to have virt-controller add this annotation to the Pod. This might fail if AppArmor is enabled in Kubernetes but the kernel module is not loaded. Test on a non-apparmor enabled system before merging a change like this. It should be included in the (hopefully upcoming) documentation for the Virtio-FS implementation at least.

Log from virtiofsd:
tail tenant-themolecule_centos-p100-1-fs0-virtiofsd.log
[617100180193229] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617101334792332] [ID: 00000194] virtio_session_mount: Waiting for vhost-user socket connection...
[617101363029043] [ID: 00000194] virtio_session_mount: Received vhost-user socket connection
[617101384956914] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617102539847175] [ID: 00000205] virtio_session_mount: Waiting for vhost-user socket connection...
[617102575292582] [ID: 00000205] virtio_session_mount: Received vhost-user socket connection
[617102593016668] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied
[617103827655704] [ID: 00000216] virtio_session_mount: Waiting for vhost-user socket connection...
[617103856087607] [ID: 00000216] virtio_session_mount: Received vhost-user socket connection
[617103872973299] [ID: 00000001] mount(/, MS_REC|MS_SLAVE): Permission denied

This is related to apparmor. When I disable apparmor on the node it works.

This is related to apparmor. When I disable apparmor on the node it works.

Hi @salanki , thanks for testing this!
I'm wondering what kind of host OS are you testing this on?
Also, there is an additional log file, that is not being collected right now that we can look at.
If you'd exec into the virt-launcher pod kubectl exec -it [virt-launcher-pod-name] -c compute -n [namespace] a virtiofsd log file will appear the moment it starts (it may take some time, depending on the infra) - please look in /var/log/libvirt/qemu/[domain_name]-virtiofsd.log

This is related to apparmor. When I disable apparmor on the node it works.

ah! missed this comment :) good to know!

Ubuntu 18.04. I’m running default apparmor settings for Kubernetes / Ubuntu / Docker so I would imagine anyone running Ubuntu on the host will have the same issue as me.

Adding container.apparmor.security.beta.kubernetes.io/compute: unconfined on the pod spec should solve (or at least workaround) this.

@vladikr: I have confirmed that annotating the VMI with unconfined solves the problem. I'll leave it up to you if you want to add that annotation in the virt-controller automatically when virtio-fs is enabled or just let the user add it on the VMI.
Thank you for implementing virtio-fs, the timing couldn't have been better for me!

/reopen

/reopen

/reopen

/reopen
/life-cycle-frozen

Is there any update on this? It now affects the Passt network binding since it calls out to mount:
mount /: Permission denied
Failed to sandbox process, exiting


base yarn.lock off upstream

This PR reverts to the yarn.lock provided by metamask, and then makes the changes we need for things to work and to avoid vulnerabilities.
This fixes the issues with yarn test:unit. It also fixes the issues with material-ui throwing a fit about react 16 when using yarn dev:brave. Finally, it fixes the weird infura network errors that prevent some stuff from working (like loading erc20 tokens).
There are 10 low-severity vulnerabilities left after these changes.

3 are web3, for which a patch hasn't been released.
2 are marked, and 5 are braces. These can't be resolved without heavy modification to the dependency tree. I tried.
These are all also present in master, except for the marked package that jsdoc depends on (which is present anyway via another package).

The commits are separated to make this easier to review. The first commit can be ignored, it just copies the yarn.lock from metamask. The other commits are incremental changes that you should be able to make sense of.

Thanks, nice work.


Webpack plugin arguments[i].apply is not a function

I want to try out tailwind in a sideproject I'm building.
It's a Vue.js app using Webpack to transpile everything.
I followed the installation section instructions but I'm stuck with this error while running webpack:
/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/bin/webpack.js:345
			throw e;
			^

TypeError: arguments[i].apply is not a function
    at Compiler.apply (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/tapable/lib/Tapable.js:375:16)
    at webpack (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/lib/webpack.js:33:19)
    at processOptions (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/bin/webpack.js:335:15)
    at yargs.parse (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/bin/webpack.js:393:2)
    at Object.Yargs.self.parse (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/node_modules/yargs/yargs.js:533:18)
    at Object.<anonymous> (/Users/ruigomes/Projects/Javascript/feedbeaver-frontend/node_modules/webpack/bin/webpack.js:152:7)
    at Module._compile (module.js:624:30)
    at Object.Module._extensions..js (module.js:635:10)
    at Module.load (module.js:545:32)
    at tryModuleLoad (module.js:508:12)
    at Function.Module._load (module.js:500:3)
    at Function.Module.runMain (module.js:665:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
error Command failed with exit code 1.

My webpack.config.js file is: https://pastebin.com/recnnbDH
I might be missing something obvious but I can't for the life of me figure it out.
Thanks in advance!

I managed to get it running using the postcss.config.js file instead, as in the tailwindcss/webpack-starter repo. Maybe that could be in the docs?

 The docs do talk about that file, is there anything you think we should change?

Oh, I completely missed that, I just assumed it should go into the webpack config. My bad, it's super clear in the docs!
Thanks @adamwathan, I'm closing the issue.
Just as a side note, I pretty much hate doing any CSS work and with Tailwind I'm quite enjoying a redesign I'm doing in a sideproject, so kudos to you and the rest of the team!

Also just made the same mistake. Love the docs but that one part might be a little deceiving. Eventually solved it by studying the example here: https://github.com/tailwindcss/webpack-starter

Putting // in postcss.config.js at the top of the code snippet would help a lot. I also overlooked that sentence. It looks very very much like a webpack config file...


Update

Update requiered
Hey, i just wanto to ask if the mod will be updated or it's abandoned, because geode it's already updated

Hello. No, the mod is not abandoned. I'm just working on another mod porting update. But I actually think I gonna update this mod pretty soon 😉


Error: 'az role assignment list --assignee' yields "Unsupported or invalid query filter clause"

Describe the bug
Issuing az role assignment list --assignee on a resource yields the following error:
Unsupported or invalid query filter clause specified for property 'servicePrincipalNames' of resource 'ServicePrincipal'.

To Reproduce

Obtain the full resource ID of a resource in your subscription
Execute az role assignment list --assignee YOUR_RESOURCE_ID to pull the assigned roles for the resource

Example:
$ az role assignment list --assignee $ACR_REGISTRY_ID
Unsupported or invalid query filter clause specified for property 'servicePrincipalNames' of resource 'ServicePrincipal'.
Traceback (most recent call last):
  File "/opt/az/lib/python3.6/site-packages/knack/cli.py", line 197, in invoke
    cmd_result = self.invocation.execute(args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 369, in execute
    six.reraise(*sys.exc_info())
  File "/opt/az/lib/python3.6/site-packages/six.py", line 693, in reraise
    raise value
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 343, in execute
    result = cmd(params)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/commands/__init__.py", line 182, in __call__
    return self.handler(*args, **kwargs)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/core/__init__.py", line 436, in default_command_handler
    result = op(**command_args)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/role/custom.py", line 231, in list_role_assignments
    include_inherited, include_groups)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/role/custom.py", line 485, in _search_role_assignments
    assignee_object_id = _resolve_object_id(cli_ctx, assignee, fallback_to_object_id=True)
  File "/opt/az/lib/python3.6/site-packages/azure/cli/command_modules/role/custom.py", line 1312, in _resolve_object_id
    filter="servicePrincipalNames/any(c:c eq '{}')".format(assignee)))
  File "/opt/az/lib/python3.6/site-packages/msrest/paging.py", line 131, in __next__
    self.advance_page()
  File "/opt/az/lib/python3.6/site-packages/msrest/paging.py", line 117, in advance_page
    self._response = self._get_next(self.next_link)
  File "/opt/az/lib/python3.6/site-packages/azure/graphrbac/operations/service_principals_operations.py", line 159, in internal_paging
    raise models.GraphErrorException(self._deserialize, response)
azure.graphrbac.models.graph_error.GraphErrorException: Unsupported or invalid query filter clause specified for property 'servicePrincipalNames' of resource 'ServicePrincipal'.

Expected behavior
The roles assigned to the resource should be returned.
Environment summary

Install Method: apt
CLI version: 2.0.44
OS version: Ubuntu 18.04
Shell Type: bash

Additional context
The --all argument works as expected:
$ az role assignment list --all
[
  {
    "canDelegate": null,
    "id": "/subscriptions/875cbdd8
...

--assignee is supposed to be an identity say a user, service principal, etc. Resource id will not be valid.
I will submit a PR to make the error better w/o stack traces, but you still need to put in the right value

@yugangw-msft Ah, of course. You know, think I actually knew that at one point, and had since forgotten. Thanks!


Refactor for Server Initialization Options

This PR refactors the initializationOptions interface for language server, and make language clients based on the v0.x version no longer available.
For language clients that do not support multiple servers, just need to change typescript.serverPath, typescript.localizedPath to typescript.tsdk.
initializationOptions = {
	typescript: {
-		serverPath: '/usr/local/lib/node_modules/typescript/lib/tsserverlibrary.js'
-		localizedPath: '/usr/local/lib/node_modules/typescript/lib/ja/diagnosticMessages.generated.json'
+		tsdk: '/usr/local/lib/node_modules/typescript/lib'
	}
}

For multiple servers supports, we don't have languageFeatures and documentFeatures anymore, and you need to modify language client capabilities of InitializeParams for hint to language server which features should not be active.
But server diagnostic is use push model by default and do not care about client capabilities, to disable diagnostic, you can setup { serverMode: 2 } to create language server that only active syntactic features, or config { diagnosticModel: 0 } to disable diagnostic for semantic features server.
You can refer to:

https://github.com/johnsoncodehk/volar/pull/1916/files#diff-8a8a6eca18ec4f7e2bd65ea5cf9453c756893cfafe2a816d45f4e5d12cacd9e8R233-R275
https://github.com/johnsoncodehk/volar/pull/1916/files#diff-8a8a6eca18ec4f7e2bd65ea5cf9453c756893cfafe2a816d45f4e5d12cacd9e8R283-R284

cc @yaegassy, @sethidden, @tsukkee, @predragnikolic, @rchl, @kabiaa, @jadestrong, @tommasongr, @yoyo930021, @xiaoxin-sky

Just curious... did you consider having a single Volar server (process) and have it start additional processes, if needed, and route requests accordingly?
That would quite convenient for the clients (at least for ST) since this approach of starting multiple servers is not supported very well.
Though I see that you are not running typescript server in a separate process so that's probably why you are not doing that. It would all be blocking the main process...

This is an interesting idea. Maybe there could be a generic routing language server to support multiple servers for any languages.
But honestly multiple servers are not the ultimate solution and because it's increase memory usage with TS language service in large project, a better way is optimize IDE request strategy to mitigate the impact of request blocking, usually the biggest trouble is that slow diagnostic requests blocking next autocomplete request, I think IDE can record the language server diagnostic time and change the diagnostic request interval dynamically to reduce chance of blocking autocomplete.
An another major problem is LSP cancel token is useless for TS, because the TS API is synchronous and the cancel token cannot receive updates from the LSP until the TS API execution is complete.
If we can solve either of the above, I hope to avoid use multiple servers.

An another major problem is LSP cancel token is useless for TS, because the TS API is synchronous and the cancel token cannot receive updates from the LSP until the TS API execution is complete.

But I guess that's the consequence of Volar using Typescript API synchronously. It could spin up a separate process for it like https://github.com/typescript-language-server/typescript-language-server does and communicate through IPC. Then it wouldn't be blocking the main process.

I do want to migrate to tsserver, I'm still waiting for https://github.com/microsoft/TypeScript/issues/47600, but just found out it's just closed...

I just found how TS supports cancellation token for tsserver (https://github.com/Microsoft/TypeScript/wiki/Standalone-Server-(tsserver)#cancellation, https://github.com/microsoft/TypeScript/blob/663b19fe4a7c4d4ddaa61aedadd28da06acd27b6/src/cancellationToken/cancellationToken.ts#L11-L20), and implement in https://github.com/johnsoncodehk/volar/commit/2e1108ca04e3380680eace2ab2b9c1d3c36ed73e. Now we're down from 3 servers to 2 servers.
We have a new VueServerInitializationOptions#cancellationPipeName option, this is for implement server cancellation token that similar to tsserver. For support it, language client need to write a tmp file when editor editing vue document (or also TS document if enable takeover mode) and pass the file name to cancellationPipeName, language server will check the mtime (modify time) of the tmp file to know if language server should cancel current request working in synchronous API.

https://github.com/johnsoncodehk/volar/blob/183a6c7670199e130a30cad7f6c852e61ed83dda/extensions/vscode-vue-language-features/src/nodeClientMain.ts#L12-L19
https://github.com/johnsoncodehk/volar/blob/183a6c7670199e130a30cad7f6c852e61ed83dda/extensions/vscode-vue-language-features/src/nodeClientMain.ts#L30

Why does client have to do it rather than the language server creating a temporary, random file?

Sorry, didn't look at your code carefully and didn't noticed that the client is supposed to write to the file also on file changes.
I must say that I don't like pushing this responsibility to the client but I'm guessing it's optional so it should be fine not to implement it.

This is optional not requirement, at least for now it can only be implemented on the client side.

I must say that I don't like pushing this responsibility to the client but I'm guessing it's optional so it should be fine not to implement it.

Yes, here is just to provide a solution, it is up to the client whether to use it or not. Actually typescript-language-server also has this, but you may not use it in client yet.

typescript-language-server creates the file itself. It doesn't need to come from the client. But it makes sense since it doesn't use typescript API synchronously so it isn't blocked by it.

Sorry i didn't make it clear, The "blocking" mean in my words is that outdated requests cannot be cancel while executing a synchronous API, thus blocking new incoming requests, not mean blocking the main process. If client do not implement cancellationPipeName typescript-language-server also has same problem.
You can reference to VSCode for how it implement and provide cancellationPipeName to tsserver: https://github.com/microsoft/vscode/blob/61f8dee571efac71035000f4c57f1c42ada04e46/extensions/typescript-language-features/src/tsServer/cancellation.electron.ts#L27

typescript-language-server does use cancellation tokens for some requests. For example for requesting diagnostics here: https://github.com/typescript-language-server/typescript-language-server/blob/7f69c27eb8cce71d3db006623757a74f93d76dd3/src/lsp-server.ts#L330-L337
And the client doesn't need to do anything because the "cancellationPipeName" is created by the server and is utilized whenever client sends a standard LSP requests (though most requests don't care about canceling old requests currently).

Thanks for the clarification. I can see that typescript-language-server seems is a LSP server version of typescript-language-features.

Yes, exactly.

@johnsoncodehk With nvim-lspconfig now certain features like goto definition or hover don' work anymore. I assume it has to do with this change.

For multiple servers supports, we don't have languageFeatures and documentFeatures anymore, and you need to modify language client capabilities of InitializeParams for hint to language server which features should not be active.

But server diagnostic is use push model by default and do not care about client capabilities, to disable diagnostic, you can setup { serverMode: 2 } to create language server that only active syntactic features, or config { diagnosticModel: 0 } to disable diagnostic for semantic features server.

I have problems to follow this.
If I understand right you ignore client capabilities now? Your explanation sounds like you only need extra configuration if you want to turn capabilities off - but that's not what I found.
Can you explain a bit more what configuration we need to enable these capabilites again?

@johnsoncodehk Cool, thanks. Looking forward to the next release so I can test it.

@johnsoncodehk I finally compiled vue-language-server.js from the latest master and it really seems to fix the issue.
Would you consider creating a 1.0.10 release to make this easier to install? There's quite some people affected by this bug and thay all can't update to 1.x due to this problem.


Album feature

Hey, I love this project. It's cool and saved me tons of hours updating our wordpress site to host about 300 photos.
I have one question and i'm not quite sure if i overread the answer. Is there some sort of album feature? That only specific photos are show if for example a special path is called or in what way so ever.  Then I would build a small html site that links to the specific paths with the photos.
We would love to host photos of specific events in one page alone (so that other photos are not shown).
Thanks in advance for your help ❤

Hi Tobias, thanks for the awesome feedback. @maxvoltar did a really nice job with photo-stream and I am happy to keep it going. Recently @boerniee joined and that did push productivity a lot. :)
Anyway, regarding the feature you have been asking for, I am afraid there's currently no album support in photo-stream and it is also not planned. I actually want to keep the project rather simple.
I was thinking about albums before though and what I ended up as an idea was more like a separate project to achieve that by using photo-stream to build albums. It could contain several config files and running the build command for each, moving files from _site to other folders, maybe even generating a static page containing links to each folder.
Well, maybe that could also just be a bash script, then it could end up in _scripts?

Please keep us updated in case you make progress on that as we might take a look at it as well. ;)

Sadly not, too busy with other projects as always :D

Hi, I just stumbled over this project and I love the idea of just pictures with nothing else distracting.
However I too was wondering about albums or really just subfolders.
I'd be happy to provide my own "start page" that links to galleries or albums. I'm thinking Photo Portfolio here with a few categories.
From what I understood, I could use a docker container to build this static site. So with the scripts one could in theory iterate over subfolders in original and deploy into subfolders of _site and then use something like nginx to map that to proper urls and put a landing page on top of it?
Has anyone tips regarding the script? Right now I'm thinking multiple docker containers with slightly different env/volume configs.

Unclear if this is helpful/relevant, but there is a fork/port of the original from maxvoltar which supports Hugo and folders/albums. Maybe some of the code could be backported here?
https://github.com/nmasse-itix/photo-stream


Fixes #4282 - project/app creation to honor umask

Co-authored-by<EMAIL_ADDRESS>

For reference:
Python issue #38417 Add support for settting umask in subprocess children


Maturity ladder relationship to community

I like the ideas around the proposed maturity ladder as it relates to an individual project. However, it appears to be almost entirely focused on how the project is executed and misses what I think is an opportunity to define maturity partly in the context of a project’s community. In other words, the maturity of a project isn’t just about what the maintainers of that project are doing and how they relate to the community, but also what the community is doing on it’s own and how it relates amongst itself. For example, a “mature” project might include a robust ecosystem of blog posts and community support resources irrespective of anything provided by the maintainers directly.
I also want to loop in @SeanKilleen since he’s done some work and thinking in this area. His OSS Participation Maturity Model described at https://awider.net/ focuses on maturity as it relates to participation by consumers, but I think there are some good ideas there that could be adapted to this maturity model as well.

I agree. That's what the first "Health" characteristic for level 3 is intended to talk to, as follows:

The ecosystem has adopted this project at a significant scale, demonstrated by one or more key metrics, such as package downloads, number of dependent projects on GitHub, or community activity on the project repo(s).

Certainly, the community activity might not be "on" the community repo. If we change the text to "on or related to", does that cover it?
I hadn't seen that site before. That's looks cool, and I like the name. The whole point of this pilot period is to entertain good work and ideas that already exist.

Ah, somehow totally missed the external community callout there (it’s obvious, I just didn’t see it). Yeah, that’s definitely similar to what I was thinking.

If we change the text to "on or related to", does that cover it?

I think that one little change could be a big improvement. A project doesn’t exist in isolation and maturity is partly measured by what happens within the community and totally outside the control of the project IMO.


Turn theming on or off

Adding an IsThemed property to everything would be great, so we can turn the theming on or off.  By which I mean, either to use the colors/design in this library (dark theme) or default, e.g., Windows system colors, or some other theme.

@astrohart hey, I'd like you to know that since it looks like this project has gone stole I've forked it here. This is likely going to be a feature I will add. If you like, just log an issue over on my fork :)


⚠ Bofrost.es has degraded performance

In 68f48ff, Bofrost.es (https://www.bofrost.es) experienced degraded performance:

HTTP code: 200
Response time: 1909 ms

Resolved: Bofrost.es performance has improved in 0a0cb94 after 9 minutes.


Add new wiki to list

I've attempted to set everything up as described in https://links.tiddlywiki.com/pages/about/ and added a test link.

Looks good, thanks @sobjornstad!


ociBlob/ociArtifact and ociImage/ociArtifact needs clarification

From the current spec it is not clear why we need two types and what their difference is. This needs clarification and an example in what situation what type is used. This happens for artifact types and access types

@jensh007 , please check https://github.com/open-component-model/ocm-spec/blob/f68b746949815b25930c7a50c83077bb7015e2ab/doc/01-model/02-elements-toplevel.md?plain=1#L48