Rule of clock-timer does not match on end of the day

Describe the bug
The clock timer with from date civilDusk and untilDate civilSet as the two rules, does not match the rule from date civilDusk if the time is around 23:23. A short debug shows me that the rule gets the day of tomorrow on validation, which is at that time not correct.
To Reproduce
Steps to reproduce the behavior:

Use this flow
[{"id":"b3d46b12.0cd328","type":"debug","z":"fa2cb05e.65849","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","x":870,"y":880,"wires":[]},{"id":"232b5b83.34cc84","type":"clock-timer","z":"fa2cb05e.65849","name":"","topic":"","positionConfig":"873fdd2c.6a528","outputs":2,"autoTrigger":false,"autoTriggerTime":1200000,"storeName":"","overwriteExpire":"","rules":[{"index":0,"name":"","isValid":false,"valid":{},"timeValue":"sunriseEnd","timeType":"pdsTime","timeOp":0,"timeOpText":"↥ bis","offsetValue":"","offsetType":"none","multiplier":60000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"payloadValue":"true","payloadType":"bool","payloadOffsetValue":"","payloadOffsetType":"none","payloadOffsetMultiplier":60000,"payloadFormat":99,"topic":"","validOperandAValue":"","validOperandAType":"none","validOperator":"true","validOperatorText":"ist true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"ist true","valid2OperandBValue":"","valid2OperandBType":"num","description":"
 ↥ bis <var>Sonnenaufgang Ende</var>

 Payload: <var>true</var>

","timeMinOp":0,"timeMaxOp":0},{"index":1,"name":"","isValid":false,"valid":{},"timeValue":"civilDusk","timeType":"pdsTime","timeOp":1,"timeOpText":"↧ von","offsetValue":"","offsetType":"none","multiplier":60000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"payloadValue":"true","payloadType":"bool","payloadOffsetValue":"","payloadOffsetType":"none","payloadOffsetMultiplier":60000,"payloadFormat":99,"topic":"","validOperandAValue":"","validOperandAType":"none","validOperator":"true","validOperatorText":"ist true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"ist true","valid2OperandBValue":"","valid2OperandBType":"num","description":"
 ↧ von <var>bürgerliche Abenddämmerung</var>

 Payload: <var>true</var>

","timeMinOp":0,"timeMaxOp":0}],"payloadDefault":"false","payloadDefaultType":"bool","payloadDefaultTimeFormat":0,"payloadDefaultOffset":0,"payloadDefaultOffsetType":"none","payloadDefaultOffsetMultiplier":60000,"x":700,"y":880,"wires":[[],["b3d46b12.0cd328"]]},{"id":"b88757ba.4b66f8","type":"change","z":"fa2cb05e.65849","name":"","rules":[{"t":"set","p":"ts","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":510,"y":880,"wires":[["232b5b83.34cc84"]]},{"id":"b4fe02d0.0a642","type":"inject","z":"fa2cb05e.65849","name":"2323","topic":"","payload":"1582323780000","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":330,"y":880,"wires":[["b88757ba.4b66f8"]]},{"id":"873fdd2c.6a528","type":"position-config","z":"","name":"Home","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]

Start the injection

clock-timer does not match any rule

Expected behavior
The clock-timer should match with rule 2, because from date civilDusk (Rule 2) is valid with the time 23:23.
Screenshots

System information:

Version 1.0.4
Node-Red Version 1.0.3
Hardware RaspberryPi 4

Best regards
Chris

I have already seen the error in my productive system. Unfortunately, I haven't been able to re-create it in the development system (maybe it is because it has to be just before midnight).
Therefore, it may take some time before I can investigate this further.

If you take my test flow, you can recreate the bug.

As a quick and dirty fix for me, i removed following check:
https://github.com/rdmtc/node-red-contrib-sun-position/blob/7acf1d2996ba207fdd0d9dd385f000113484ca4e/nodes/clock-timer.js#L451
to
if (num >=0  && cmp(num)) {

This does work. However on the end of the day, the rule "until civilSet" is choosen, which is not correct. But it does nevertheless work for me.

I have implemented this in<EMAIL_ADDRESS>This is a test release and needs to be installed explicit over command line.

Thanks for the quick update. First tests looking good. Awesome work.

Ok did a second test with following flow:
[{"id":"8e941ff6.87598","type":"clock-timer","z":"207f7b57.14eb84","name":"Zeitschaltuhr Licht","topic":"","positionConfig":"873fdd2c.6a528","outputs":1,"autoTrigger":false,"autoTriggerTime":1200000,"startDelayTime":"0","storeName":"","overwriteExpire":"","rules":[{"index":0,"name":"Morgens Dunkel","isValid":false,"valid":{},"timeValue":"blueHourDawnStart","timeType":"pdsTime","timeOp":0,"timeOpText":"↥ bis","offsetValue":"","offsetType":"none","multiplier":60000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"payloadValue":"true","payloadType":"bool","payloadOffsetValue":"","payloadOffsetType":"none","payloadOffsetMultiplier":60000,"payloadFormat":99,"topic":"","validOperandAValue":"","validOperandAType":"none","validOperator":"true","validOperatorText":"ist true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"ist true","valid2OperandBValue":"","valid2OperandBType":"num","description":"
 ↥ bis <var>Blaue Morgenstunde Begin</var>

 Payload: <var>true</var>

","timeMinOp":0,"timeMaxOp":0,"timeDateStart":"","timeDateEnd":""},{"index":1,"name":"Abends Dunkel","isValid":false,"valid":{},"timeValue":"sunset","timeType":"pdsTime","timeOp":1,"timeOpText":"↧ von","offsetValue":"","offsetType":"none","multiplier":3600000,"timeDays":"*","timeMonths":"*","timeOnlyEvenDays":false,"timeOnlyOddDays":false,"timeMinValue":"","timeMinType":"none","offsetMinValue":"","offsetMinType":"none","multiplierMin":60000,"timeMaxValue":"","timeMaxType":"none","offsetMaxValue":"","offsetMaxType":"none","multiplierMax":60000,"payloadValue":"true","payloadType":"bool","payloadOffsetValue":"","payloadOffsetType":"none","payloadOffsetMultiplier":3600000,"payloadFormat":99,"topic":"","validOperandAValue":"","validOperandAType":"none","validOperator":"true","validOperatorText":"ist true","validOperandBValue":"","validOperandBType":"num","valid2LogOperator":0,"valid2LogOperatorText":"N/A","valid2OperandAValue":"","valid2OperandAType":"msg","valid2Operator":"true","valid2OperatorText":"ist true","valid2OperandBValue":"","valid2OperandBType":"num","description":"
 ↧ von <var>Sonnenuntergang Ende</var>

 Payload: <var>true</var>

","timeDateStart":"","timeDateEnd":"","timeMinOp":0,"timeMaxOp":0}],"payloadDefault":"false","payloadDefaultType":"bool","payloadDefaultTimeFormat":0,"payloadDefaultOffset":0,"payloadDefaultOffsetType":"none","payloadDefaultOffsetMultiplier":60000,"x":520,"y":1340,"wires":[[]]},{"id":"c6cb3f67.282d8","type":"inject","z":"207f7b57.14eb84","name":"","topic":"","payload":"1582415100000","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":120,"y":1340,"wires":[["f962ebb8.c27a88"]]},{"id":"f962ebb8.c27a88","type":"change","z":"207f7b57.14eb84","name":"","rules":[{"t":"set","p":"ts","pt":"msg","to":"payload","tot":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":310,"y":1340,"wires":[["8e941ff6.87598"]]},{"id":"873fdd2c.6a528","type":"position-config","z":"","name":"Home","isValide":"true","longitude":"0","latitude":"0","angleType":"deg","timeZoneOffset":99,"timeZoneDST":0,"stateTimeFormat":"3","stateDateFormat":"12"}]
Sadly now it doesn't work on the start of the day. It shoud evaluate to "untill civilSet".

In my case it seems to work:

In your second example the first rule (Morgens Dunkel) is used.
Independently I have found an other problem which will cause no output at all.

I've tried again, with the same flow. It didn't worked again.  Then i added a debug node after the inject node to check if the time is right. And then it worked.
Removed the debug node and it still works.
Thats weird.
Now i cannot reproduce the problem.
I will see if this happens again.
Thanks for investigating.

There seems still problems to investigate.

Yes. Now i can reproduce the issue again. Let me know if you need some assistance.

I'm still testing.
I found out that I had a knot in my head when implementing the starting time for calculating the solar time. That should fit with version 1.0.9.
I still worry that the error does not always occur. This may indicate that there are other bugs.

still testing

thanks for looking into it. Just tested with the same flow and version 1.0.10.
I does work for the next day (ex. 27.2.2020, 00:46:40). But if you use a past day (ex. 23.2.2020, 00:46:40), it does not work.

Ok, in my tests it now seems to be that the calculation of the sun time is for the correct day before and after midnight (local time).
I needed so many attempts to solve this because the behavior in my development environment (Windows) and my productive (Linux) was completely different (same Nodejs version).
Which I unfortunately do not understand at all, because the operating system should be completely irrelevant due to node js.
I'm not coming to test today.
My tests are still ongoing. I have never tested appointments in the past.  I'll take a look at that.  It will probably not be until the weekend.

My first test does not show any Problem before Midnight and after Midnight the last two years ago:

here is my test setup:
[
    {
        "id": "f14e22f9.2401f",
        "type": "clock-timer",
        "z": "959733ce.a50c2",
        "name": "",
        "topic": "",
        "positionConfig": "650223e.daba8dc",
        "outputs": 2,
        "autoTrigger": false,
        "autoTriggerTime": 1200000,
        "startDelayTime": "0",
        "storeName": "",
        "overwriteExpire": "",
        "rules": [
            {
                "index": 0,
                "name": "",
                "isValid": false,
                "valid": {},
                "timeValue": "sunriseEnd",
                "timeType": "pdsTime",
                "timeOp": 0,
                "timeOpText": "↥ bis",
                "offsetValue": "",
                "offsetType": "none",
                "multiplier": 60000,
                "timeDays": "*",
                "timeMonths": "*",
                "timeOnlyEvenDays": false,
                "timeOnlyOddDays": false,
                "timeMinValue": "",
                "timeMinType": "none",
                "offsetMinValue": "",
                "offsetMinType": "none",
                "multiplierMin": 60000,
                "timeMaxValue": "",
                "timeMaxType": "none",
                "offsetMaxValue": "",
                "offsetMaxType": "none",
                "multiplierMax": 60000,
                "payloadValue": "true",
                "payloadType": "bool",
                "payloadOffsetValue": "",
                "payloadOffsetType": "none",
                "payloadOffsetMultiplier": 60000,
                "payloadFormat": 99,
                "topic": "",
                "validOperandAValue": "",
                "validOperandAType": "none",
                "validOperator": "true",
                "validOperatorText": "ist true",
                "validOperandBValue": "",
                "validOperandBType": "num",
                "valid2LogOperator": 0,
                "valid2LogOperatorText": "N/A",
                "valid2OperandAValue": "",
                "valid2OperandAType": "msg",
                "valid2Operator": "true",
                "valid2OperatorText": "ist true",
                "valid2OperandBValue": "",
                "valid2OperandBType": "num",
                "description": "
 ↥ bis <var>Sonnenaufgang Ende</var>

 Payload: <var>true</var>

",
                "timeMinOp": 0,
                "timeMaxOp": 0,
                "timeDateStart": "",
                "timeDateEnd": ""
            },
            {
                "index": 1,
                "name": "",
                "isValid": false,
                "valid": {},
                "timeValue": "civilDusk",
                "timeType": "pdsTime",
                "timeOp": 1,
                "timeOpText": "↧ von",
                "offsetValue": "",
                "offsetType": "none",
                "multiplier": 60000,
                "timeDays": "*",
                "timeMonths": "*",
                "timeOnlyEvenDays": false,
                "timeOnlyOddDays": false,
                "timeMinValue": "",
                "timeMinType": "none",
                "offsetMinValue": "",
                "offsetMinType": "none",
                "multiplierMin": 60000,
                "timeMaxValue": "",
                "timeMaxType": "none",
                "offsetMaxValue": "",
                "offsetMaxType": "none",
                "multiplierMax": 60000,
                "payloadValue": "true",
                "payloadType": "bool",
                "payloadOffsetValue": "",
                "payloadOffsetType": "none",
                "payloadOffsetMultiplier": 60000,
                "payloadFormat": 99,
                "topic": "",
                "validOperandAValue": "",
                "validOperandAType": "none",
                "validOperator": "true",
                "validOperatorText": "ist true",
                "validOperandBValue": "",
                "validOperandBType": "num",
                "valid2LogOperator": 0,
                "valid2LogOperatorText": "N/A",
                "valid2OperandAValue": "",
                "valid2OperandAType": "msg",
                "valid2Operator": "true",
                "valid2OperatorText": "ist true",
                "valid2OperandBValue": "",
                "valid2OperandBType": "num",
                "description": "
 ↧ von <var>bürgerliche Abenddämmerung</var>

 Payload: <var>true</var>

",
                "timeMinOp": 0,
                "timeMaxOp": 0,
                "timeDateStart": "",
                "timeDateEnd": ""
            }
        ],
        "payloadDefault": "false",
        "payloadDefaultType": "bool",
        "payloadDefaultTimeFormat": 0,
        "payloadDefaultOffset": 0,
        "payloadDefaultOffsetType": "none",
        "payloadDefaultOffsetMultiplier": 60000,
        "x": 800,
        "y": 3675,
        "wires": [
            [],
            [
                "595a937a.f3692c"
            ]
        ]
    },
    {
        "id": "5a59a46d.8e9f8c",
        "type": "inject",
        "z": "959733ce.a50c2",
        "name": "",
        "topic": "start/stop",
        "payload": "23:30",
        "payloadType": "str",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 395,
        "y": 3735,
        "wires": [
            [
                "a614b584.933118"
            ]
        ]
    },
    {
        "id": "1a789cb0.97cfd3",
        "type": "inject",
        "z": "959733ce.a50c2",
        "name": "",
        "topic": "start/stop",
        "payload": "0:01",
        "payloadType": "str",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 385,
        "y": 3780,
        "wires": [
            [
                "a614b584.933118"
            ]
        ]
    },
    {
        "id": "595a937a.f3692c",
        "type": "switch",
        "z": "959733ce.a50c2",
        "name": "",
        "property": "payload.rule.id",
        "propertyType": "msg",
        "rules": [
            {
                "t": "eq",
                "v": "1",
                "vt": "num"
            },
            {
                "t": "eq",
                "v": "2",
                "vt": "num"
            },
            {
                "t": "else"
            }
        ],
        "checkall": "true",
        "repair": false,
        "outputs": 3,
        "x": 1000,
        "y": 3675,
        "wires": [
            [],
            [],
            [
                "d924c259.c3129"
            ]
        ]
    },
    {
        "id": "d924c259.c3129",
        "type": "debug",
        "z": "959733ce.a50c2",
        "name": "out",
        "active": true,
        "tosidebar": true,
        "console": false,
        "tostatus": false,
        "complete": "true",
        "targetType": "full",
        "x": 1165,
        "y": 3675,
        "wires": []
    },
    {
        "id": "9ce00576.f55238",
        "type": "inject",
        "z": "959733ce.a50c2",
        "name": "",
        "topic": "",
        "payload": "",
        "payloadType": "date",
        "repeat": "",
        "crontab": "",
        "once": false,
        "onceDelay": 0.1,
        "x": 375,
        "y": 3675,
        "wires": [
            [
                "f14e22f9.2401f"
            ]
        ]
    },
    {
        "id": "a614b584.933118",
        "type": "function",
        "z": "959733ce.a50c2",
        "name": "prepare",
        "func": "\nconst minutesEachLoop = 1440;\nconst loopCycle = 0.03 // sekunden\nlet timeObj = context.get(\"timeObj\");\n\nconst startYearOffset = -2;     // start two years ago:\nconst startMonthOffset = 0;\nconst startDayOffset = 0;\n\nif (timeObj && msg.topic.includes('stop')) {\n    clearInterval(timeObj);\n    context.set(\"timeObj\", null);\n    let d = new Date(context.get(\"date\"));\n    node.status({fill:\"red\",shape:\"ring\",text:\"off - \" + d.toLocaleTimeString()+' ' + d.getFullYear() + '-' + (d.getMonth() +1) + '-' + d.getDate()});\n} else if (!timeObj && msg.topic.includes('start')) {\n    context.set(\"message\", msg);\n    let d = new Date();\n    \n    d.setFullYear(d.getFullYear() + startYearOffset);\n    d.setMonth(d.getMonth() + startMonthOffset);\n    d.setDate(d.getDate() + startDayOffset);\n    \n    let num = msg.payload.split(':') || [0,0];\n    d.setHours(parseInt(num[0]) || 0);\n    d.setMinutes(parseInt(num[1]) || 0);\n    context.set(\"date\", d.getTime());\n    msg.lts = d.toLocaleTimeString();\n    msg.ts = d.getTime();\n    node.log(\"sending \" + d.toLocaleTimeString() + ' #### ' + d.toLocaleDateString() + ' ####################################### payload='+msg.payload+' topic='+msg.topic+' ts='+msg.ts);\n    node.send(msg);\n\n    let timeObj = setInterval(function(){\n        let msg = context.get(\"message\");\n        let d = new Date(context.get(\"date\"));\n        //d.setHours(d.getHours()+1);\n        d.setMinutes(d.getMinutes() + minutesEachLoop)\n        context.set(\"date\", d.getTime());\n        msg.lts = d.toLocaleTimeString();\n        msg.ts = d.getTime();\n        node.status({fill:\"green\",shape:\"dot\",text:d.toLocaleTimeString()+' ' + d.getFullYear() + '-' + (d.getMonth() +1) + '-' + d.getDate()});\n        node.log(\"sending \" + d.toLocaleTimeString() + ' #### ' + d.toLocaleDateString() + ' ####################################### payload='+msg.payload+' topic='+msg.topic+' ts='+msg.ts);\n        node.send(msg);\n\t}, (1000 * loopCycle));\n    context.set(\"timeObj\", timeObj);\n    node.status({fill:\"green\",shape:\"ring\",text:d.toLocaleTimeString()+' ' + d.getFullYear() + '-' + (d.getMonth() +1) + '-' + d.getDate()});\n} else {\n    let d = new Date(context.get(\"date\"));\n    d.setMinutes(d.getMinutes() + 1)\n    //d.setHours(d.getHours()+1);\n    msg.lts = d.toLocaleTimeString();\n    msg.ts = d.getTime();\n    node.status({fill:\"green\",shape:\"dot\",text:d.toLocaleTimeString()+' ' + d.getFullYear() + '-' + (d.getMonth() +1) + '-' + d.getDate()});\n    node.log(\"sending interrupt msg \" + d.toLocaleTimeString() + ' #### ' + d.toLocaleDateString() + ' ####################################### payload='+msg.payload+' topic='+msg.topic+' ts='+msg.ts);\n    node.send(msg);\n}\n\nreturn null;",
        "outputs": 1,
        "noerr": 0,
        "x": 600,
        "y": 3735,
        "wires": [
            [
                "f14e22f9.2401f"
            ]
        ]
    },
    {
        "id": "650223e.daba8dc",
        "type": "position-config",
        "z": "",
        "name": "",
        "isValide": "true",
        "longitude": "0",
        "latitude": "0",
        "angleType": "deg",
        "timeZoneOffset": 99,
        "timeZoneDST": 0,
        "stateTimeFormat": "HH:mm:ss",
        "stateDateFormat": "yyyy-MM-dd"
    }
]

I have found no problem and published 1.0.11.
The new version should not behave differently to this problem than version 1.0.10. I could now neither reproduce the problem with the past in my productive nor in my development system.

Thanks for the update.
Sadly it doesn't work.
Yesterday i updated to the version 1.0.10. On 00:36 the time-inject node triggered because of a new sun position. That signal goes directly to the clock-timer node (same configuration as the clock-timer node in my example flow). The clock-timer node evaluated the current sun position to false (Daylight).
After that i triggered right away my test flow (with the same time as in the nigt - 00:36) and also this one evaluated to false.
Today, after a node-red restart, the same test flow and the same time evauluated to true (correct behaviour).

Right now your test flow does also work.
Thats really weird.
I will try your testflow tonight on 00:36

The last couple of days i had no problems. Looks like it is fixed. Thanks for your help

Meanwhile I get the confirmation that a similar bug (# 98) has been fixed, so I am hopeful to have fixed the issue.


Add no-array-index-key to recommended configuration

This rule prevents the use of Array index in key. It seems useful enough to turn on as a recommended rule. Thoughts?

There seem to be some issues with this rule, so I'm going to hold off adding it to the recommended configuration just yet.

What issues are remaining (beside documentation) ? I think this is the last thing that is holding back the 7.0.0 right now.

I don't think this needs to hold back v7 either way; it can just be bumped to v8 if v7 is otherwise ready.
That said, I think the problem is more that conceptual issue that there are legitimate use cases for using an index as the key, and the rule can't statically determine them - so it might be too strong a rule to enable by default in a config.

Great! Then if there is no issues in RC1, I will release the v7 tomorrow.

(#1170 is an example of why I think this rule probably can't be in the recommended set)

It's WAY too strong of a rule, IMO. I've got an array of strings, how can I possibly concisely display it in a list of 's without using index as the key? It's simply the cleanest way to do it without React throwing a warning.
I still can't think of how you could determine if a component is "simple enough" to not have a useful id field. That would be best, if possible, but I don't think it is.

As a matter of fact, at the bottom of the Keys section in React docs, it explicitly says: "When you don't have stable IDs for rendered items, you may use the item index as a key as a last resort". For my use case above, which is not rare, what better alternative is there?

@jeffvandyke you can use the string itself as the key, if they're unique. Obviously if they're not unique, you'd need an index - at which point, you'd use an override comment.
It is definitely appropriate to have an eslint rule that works for the 99% case, but requires an override comment for the 1% case - it happens a lot.

So I've thought through this a bit, and I'm willing to grant that perhaps my project is a bit more unique, but I find that even after having some element-based keys as you suggested, about 40% of my project's map(...) calls are on arrays of simple data types that are unsuitable as keys due to their non-uniqueness. The arrays are mostly generated from processing raw data where the position in the array really does uniquely identify what that element's identifier is.
I can probably get by with eslint-disable comments, but it feels like a workaround, especially given that React's docs recognize this use case. I'm just not sure if it's that rare of a use case for most other projects either.

You could always disable the entire rule project-wide; since based on what you're describing, the rule isn't adding value for you.

@ljharb I'm curious, what is the reasoning behind this rule's existence? If one were to map over an array of strings, where there were some duplicates, wouldn't one have to include the array element's index as part of the component key to ensure uniqueness?

@PatNeedham yes, which is a place where you'd disable the rule. The rule assumes that the common case is for rendering arrays that do contain unique items.

Adding things to "recommended" is a breaking change, and i'm not sure this particular rule is reliable enough for inclusion.
However, if someone still thinks it should be included, we can open up a PR and let it sit until some future major version.


wrong datatype for eyesCenter in facealiner

>   	M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
E    TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type

the actual shape of eyesCenter is (np.int64, np.int64), but must be (int, int)
it can be easyly fixed by [int(x) for x in eyesCenter]
I will provide PR fixing that

Wow that's something why i can't fix this bug whenever i search on google. I think im gonna use haar cascade if this issue doesn't solve yet

Hey folks,
Thanks for the issue. Could you give us a reproducible bug to check? A colab notebook with the bug would do! TIA 😄

I can confirm that this is still an issue. I was following the face align tutorial, and kept running into this exact issue. I eventually added all of the facealigner.py code into my code and got the same error. Adding int() to the tuple fixed it:
eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2),
        int((leftEyeCenter[1] + rightEyeCenter[1]) // 2))

Maybe I'm using a bad version? This is what my pip reports:
Package               Version
--------------------- --------
cmake                 3.22.3
dlib                  19.23.1
imutils               0.5.4
numpy                 1.22.3
opencv-contrib-python <IP_ADDRESS>

Hi @ariG23498 this is still an issue as I got a ticket from a customer today about this

Tagging @abhishekthanki and @ritwikraha to this issue!

I had this issue too with opencv-python <IP_ADDRESS>.

det = dlib.get_frontal_face_detector()
pred = dlib.shape_predictor(r'...\shape_predictor_68_face_landmarks.dat')
alg = FaceAligner(pred, desiredFaceWidth = 256)
This tries to do face-normalisation
This makes this error 'Can't parse 'Center''
frame = cv2.imread('img.jpg')
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
rect = detector(gray,1)[0]
faceAligned = aligner.align(frame, gray, rect)
File ~\AppData\Local\Programs\Python\Python310\lib\site-packages\imutils\face_utils\facealigner.py:68, in FaceAligner.align(self, image, gray, rect)
64 eyesCenter = ((leftEyeCenter[0] + rightEyeCenter[0]) // 2,
65     (leftEyeCenter[1] + rightEyeCenter[1]) // 2)
67 # grab the rotation matrix for rotating and scaling the face
---> 68 M = cv2.getRotationMatrix2D(eyesCenter, angle, scale)
70 # update the translation component of the matrix
71 tX = self.desiredFaceWidth * 0.5
TypeError: Can't parse 'center'. Sequence item with index 0 has a wrong type

For me, casting the eyesCenter from <class 'numpy.int64> to type <class 'int'> instead of fixed it:
in faceAligner.py:64 I did:
eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2),
		int((leftEyeCenter[1] + rightEyeCenter[1]) // 2))

For me, casting the eyesCenter from <class 'numpy.int64> to type <class 'int'> instead of fixed it:
in faceAligner.py:64 I did:
eyesCenter = (int((leftEyeCenter[0] + rightEyeCenter[0]) // 2),
		int((leftEyeCenter[1] + rightEyeCenter[1]) // 2))

This works for me! Thanks @dunland

Hi Pyimagesearch/imutils,
We know how annoying auto-reply and email confirmation responses are, but
we wanted to send you a quick reply and let you know that your email has
safely landed in our inbox. Hooray!
We try to respond to emails within 72 hours, Monday-Friday.
In the meantime, here’s a few quick tips to help you out:

We prioritize customer emails. Full transparency, we receive tens
of thousands of emails a year, and we prioritize customer support emails.
If you’d like to become a customer, you can see our full catalog of
books and courses here https://www.pyimagesearch.com/books-and-courses/
.
Not sure which of our books/courses is right for you? Need a
personalized recommendation from us? No problem, we can get you
unblocked and moving forward in < 13.84 seconds (seriously, we’ve
tested it!) To start, take this short multiple choice survey
https://www.pyimagesearch.com/survey/ — it will compile your answers
and recommend our book/course best suited for you and your needs.
If you are not a customer and not interested in becoming a customer,
you probably won’t get a response. We do our best to respond to all
emails we receive, but there’s only so much time in the day to offer free
help and support and we continue to get more and more emails. Therefore, we
have elected to “do the most good” with our limited resources and serve the
computer vision and deep learning community at large by publishing weekly,
high-quality (and did we mention free) tutorials. We hope these give
you everything you need to be successful with your project or research.
If you are a customer, we can only help with questions directly
related to my books, courses, and blog posts. If you have a question
related to a topic covered in our books/courses, or have an issue with
code  error’ing out, we’ll be more than happy to help. Otherwise, if you
need targeted 1:1 help with your specific project, we've partnered with Dr.
Tim Oates, who offers office hours and consulting on behalf of
PyImageSearch. Here’s a quick survey
https://www.pyimagesearch.com/consulting/ you can fill out to start
the office hours/consulting request with Tim.

We really appreciate your understanding, we hope this email didn’t let you
down. See you at pyimagesearch.com!
PyImageSearch Team
{#HS:2604959745-309633#}


[Feature] New Date picker needs more default date options

The date picker only has 5 different date formats, we need more that users in the US use.

Tasks:

Identify and include more date options
Give examples of date options so that the user understands what the date type is like
Ensure date types in table widget, and date picker widget are consistent.

Note:

The control for the format will change to the new control we have for the text size in table widget
The main label will be today's formatted date. The sub-label will be the format string


Update README.md

Hey, I've updated the README.md file.
Just sharing, I added the Instagram badge in the social links section because it was there on your github profile, you can remove it if you wish or just update your Instagram page there, I didn't add it because it crashed for me.

Hope everything else fits well.
Thanks, that's it!

give a star if this repo was helpful

totally, yeah!
Do please add the hacktoberfest-accepted label.

hacktoberfest-accepted label is already present!!

hacktoberfest-accepted label is already present!!

the thing is that that the issue has not been closed in the issues section where i've been assigned it and so it's not actually added and counted in the prs for hacktoberfest. I hope you understand.
Thanks

can you mention the issue no which were you assigned

can you mention the issue no which were you assigned

sure, this is it:
https://github.com/saty-a/Hacktoberfest2022/issues/19

I've closed the issue

I've closed the issue

thanks a lot and sorry for bothering you again, i think it's this pr that you need to add the labels to...


YUI-documetation for external methods

Document the public-facing API for the router submodules.

Closing this for now, as it's a bit too generic.


RecurrentActorCriticPolicy Behaviour Not Clear

📚 Documentation
I am trying to understand how the RecurrentActorCriticPolicy works. Coming from an NLP background I am used to have tensors of the shape (batch_size, seq_len, feature_dim) as input to the LSTM (and optional starting hidden states). From what I am seeing, however, the LSTM implemented basically allows only to feed sequence of length 1 https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/blob/25b43266e08ebe258061ac69688d94144799de75/sb3_contrib/common/recurrent/policies.py#L198
In fact, by zipping features_sequence (with shape [seq_len, n_envs, feature_dims]) and episode_starts (with shape [n_envs, -1]), in the case of 1 environment, we only allow seq_len to be 1.
Is this intended and am I reading this correctly? Is the logic behind that since we keep propagating the state we are still happy with sequences of length 1?
Checklist

[X] I have checked that there is no similar issue in the repo
[X] I have read the documentation

tensors of the shape (batch_size, seq_len, feature_dim) as input to the LSTM (

that's correct
I think you missed: https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/blob/25b43266e08ebe258061ac69688d94144799de75/sb3_contrib/common/recurrent/policies.py#L189-L194
here we pass a full sequence as input.
and for the rest, we unroll the sequence manually because we need to reset the state of the lstm when a new episode starts:
https://github.com/Stable-Baselines-Team/stable-baselines3-contrib/blob/25b43266e08ebe258061ac69688d94144799de75/sb3_contrib/common/recurrent/policies.py#L202-L204


fix: Table widget pagesize in short row height mode

Fixes #15984
Type of change

Please delete options that are not relevant.

Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions, so we can reproduce.
Please also list any relevant details for your test configuration.

Test A
Test B

Checklist:

[x] My code follows the style guidelines of this project
[x] I have performed a self-review of my own code
[x] I have commented my code, particularly in hard-to-understand areas
[ ] I have made corresponding changes to the documentation
[x] My changes generate no new warnings
[x] I have added tests that prove my fix is effective or that my feature works
[x] New and existing unit tests pass locally with my changes

/ok-to-test sha=1082c3e

Tested and verified.

/ok-to-test sha=1082c3e1fee5775cc08a0961f2ddbf2e681cf7f5

/ok-to-test sha=c142572

/ok-to-test sha=a055bcd

/ok-to-test sha=a055bcd

/ok-to-test sha=9a8e3ee


Feature Requests: Make oom_score_adj configurable

Prerequisites

[x] Can you reproduce?
[ ] Are you running the latest version of SoftEtherVPN?

SoftEther version: Release v5.01.9666
Component: Server
Operating system: Linux
Architecture: 64 bit
Description
I was running a SoftEther VPN server on one of my servers. An other process was taking up a lot of memory and the server was running out. The SoftEther VPN server was taking about 1.5 Gb or RAM and the other process about 7 Gb. When OOM killer came by it killed the vpnserver and not the process taking up all the RAM.
I think this is because the oom_score_adj is hard coded to be 800 [source]. This is in my opinion way to high and maybe even not necessary. (oom_score_adj goes from -1000 to 1000 from less likely to be killed to very likely to be killed on memory shortage)
Feature Request
Make oom_score_adj configurable in the settings of vpnserver. Most process have oom_score_adj configured as 0 by default.

well, there are other solutions like respawn in systemd unit.
anyway, you are welcome to make PR, please leave current behaviour unchanged (but configurable)

I would even consider "turn off" switch for oom_score_adj  (just to keep it configurable via any external tool)


Users need to understand the relevance of GOV.UK Verify reuse links on the confirmation page

@EUzkuraityte @sanjaypoyzer suggest we reduce the links to 3 or 4, as per my content review. How will we determine the most relevant?

@lizziebruce Agreed on reducing.
The two life events associated with this service are Moving house and Buying a new car. I think we can use that to filter the list down. There aren't any services specifically related to moving, or really to buying a car, but there are a few relevant to driving:

renew your short-term medical driving licence
report a medical condition that affects your driving
view or share your driving licence information
check or update your company car tax

Another consideration is numbers of users for each service. Looking at internally held Verify data, Self-assessment is by far and away the most popular service currently integrated, by a very high margin. For that reason, I think we should definitely have that one.
To bring the list back down to 4, I reckon we remove "renew your short-term medical driving license" as it's the least used. So that leaves us with:

complete your Self Assessment
view or share your driving licence information
report a medical condition that affects your driving
check or update your company car tax

I think it would still be good to get rid of another to get this down to 3. Company car tax has more double the users of medical conditions. It's arguable that Company car tax is more relevant to people applying for a business permit rather than a residents, but I don't think it's hard to imagine someone getting a resident's parking permit for their company car.
For that reason, I'd suggest we reduce the list down to:

complete your Self Assessment
view or share your driving licence information
check or update your company car tax

@sanjaypoyzer happy with that.

Link to #569


[1.12.1] Enable on color stops controller from inserting into inventories that are not enabled on color?

xnet-1.12-1.4.1
I have two connectors enabled on red color.  Once red color is gone, the other inventories on the same channel stop getting their items.

Strangely only the clean filter insertions stop working on that channel but dirty filter extractions from the purifiers into trash can do not.

I will check this out


not working with google voice wifi-calling

shadowsocks-android 4.7.4 has fixed this problem, https://github.com/shadowsocks/shadowsocks-android/issues/2168
however, shadowsocks-andorid 4.7.4 with v2ray plugin enabled cannot work with GV wifi-calling.
the situation is:
v2ray plugin is setup correctly on my system (both android and windows)
I can use GV wifi-calling perfectly with v2ray plugin disabled on android
I can use GV wifi-calling perfectly with v2ray plugin enabled on windows
plugin's options: path=/mypath;host=mydomainl;tls
(websocket + tls)

Use UDP fallback.


[WIP] Add Datadog support

Description

Motivation and Context

How Has This Been Tested?

Checklist:

[ ] I have updated the documentation accordingly.
[ ] All new and existing tests passed.

Close since xray gives us the same information for now.


highlighting of meta literals

Stuff enclosed in backticks, e.g. see(`function foo`) has broken syntax highlighting.

Define broken?
I can see the correct colors, with the background color usually used to indicate "injected languages".

Hum yes, it seems to be working with the dark theme, but not the light theme.

Great, thanks, I'm happy now :)


Symbolic link causes problems with images in output cells

For example: http://pymc-devs.github.io/pymc3/notebooks/BEST.html
Tries to link to: http://pymc-devs.github.io/pymc3/notebooks/_build/doctrees/nbsphinx/notebooks_BEST_8_0.png
During compilation I get many warnings like:
/home/wiecki/working/projects/pymc/docs/source/notebooks/survival_analysis.ipynb:193: WARNING: image file not readable: notebooks/../_build/doctrees/nbsphinx/notebooks_survival_analysis_11_0.png
I have seen #9 which looks very related and installed from master to make sure #10 was included but those don't fix this issue.

No idea how to debug that - do you want to merge WIP already or wait for the fix?

I don't think #9 and #10 have anything to do with that.
The problem seems to be that when Sphinx reads the intermediate reST file, which contains image links in the form notebooks/../_build/doctrees/nbsphinx/*.png, it apparently doesn't follow the symlink back to the source directory but it applies the .. to the symlink-free original location on the file system (which would actually make sense if this were in a real reST file). Therefore, it doesn't find the intermediate directory where the image files are stored.
This will hopefully be solved with #36, but I'm afraid this won't happen very soon.
In the meantime I guess I'll have to make some kind of work-around, any ideas how to tackle this?

Correction: The intermediate reST file contains links like this: ../_build/doctrees/nbsphinx/*.png, but Sphinx somehow prepends the directory notebooks, which contains the source file.
I guess it's actually the operating system that resolves the .. part.

Let me throw in a few random links:
https://unix.stackexchange.com/questions/83966/cp-somefile-copies-to-a-different-directory-after-cding-via-a-symbolic-link
http://superuser.com/questions/749750/how-to-maintain-parent-path-of-symlinked-folder
http://stackoverflow.com/questions/10456784/behavior-of-cd-bash-on-symbolic-links

It seemed to ultimately work in #9, what is different about my usecase? Would it help if I moved the NBs out of the subdirectory? The same problem persists locally.

The problem is the symbolic link. It should work if you actually move the files to a "real" subdirectory docs/source/notebooks/. If you want, you can then make a symbolic link in the other direction, back to the original place pymc3/examples/notebooks/.

Oh nice, that works. http://pymc-devs.github.io/pymc3/notebooks/stochastic_volatility.html. Thanks.

Good to know that the work-around helps. I changed the title to mention that the problem occurs in output cells. There shouldn't be any problems with images in Markdown cells.

Any solution to this? Having the NB directory live in the doc subdir is a bit unwieldy.

Thanks for the suggestion. conf.py as well as Makefile, right?

The Makefile is optional and IMHO not necessary. But if you want to use the auto-generated Makefile as is, I guess you'll have to move it, too. But I don't think that's a good idea since people might think that's a Makefile for the whole program/library, not only for the docs.
You could of course create a custom Makefile and put it anywhere you want, or you could manually call sphinx-build every time, or create a simple shell script, or ...
The IMHO nicest solution would be to use BuildDoc in your setup.py, then you could generate the docs by simply running:
python3 setup.py build_sphinx

In this case, you wouldn't even need to move your conf.py, since you could specify its location in setup.py.
If you want to go that way and need more information, don't hesitate to ask.

Thanks @mgeier. I think I'm making some progress: https://github.com/pymc-devs/pymc3/pull/1245
The problem is that build/sphinx directory where the compiled docs get stored does not contain index.html and the other master level files in the root directory but build/sphinx/html/docs/source. Any idea on how to fix that?

I didn't think about this before, but I guess it makes sense that the output directory is laid out like this (mirroring the source directory).
You could try to move index.rst to the main directory, too, but at some point it will get crowded ...
To get nicer URLs for the other pages, you should probably get rid of the sources/ subdirectory.

It works for when I create a real directory notebooks/ in the sources/ subdirectory and in there have symlinks to the individual notebooks.
I think that's a feasible workaround.


IE10 and 9 with animations: block of white space at end of document, animation altering length of window

For IE9 and 10 (haven't tested in 11):
I'm seeing a block of whitespace added on both the demo page - http://svgjs.com/test/, as well as my own implementation that uses animation. I did notice that there's an SVG element created after the svg.js scripting, but have set that to position: absolute / left: -9999px to hide. This solved the problem for all browsers but IE, which still has large whitespace.
Additionally with an animation moving vertically I'm seeing the document height being altered as the animation moves. This is most easily seen by the scrollbar position moving with the animations.
Any workarounds for this? Is this just something inherent in IE9/10 that will occur with any SVG animations going along the Y-coordinate?

@scottbirdsey is this still a problem? plus could you create an example-fiddle please?


Webhooks sent in Discord carry over as a random user

Alright, so here I'm doing an experiment with "editing" other user's messages. You send a message, the bot records it, deletes the original, then posts a new message as a webhook under your name and avatar.
This works fine on the Discord side as you can see from the above screenshot, but the bridge gets confused with the webhook talking in the channel and prints it as (in my experience) some random user.
The webhook isn't a real user on either Matrix or Discord, so I can see why it would be confused, but we should be able to still get the avatar and name of the webhook to pass it over the bridge, right? Maybe just have a fake user on the Matrix side for posting webhooks? Perhaps that user would change their nick and avatar every time to match the webhook's? :P

Edit:

It seems that a new user is already created for the webhook, and it changes its name and avatar already based on the webhook. However if I spawn another webhook, the avatar and name isn't changed again (the Peppermint Lime#4801#0000 should be Violet Ray instead). Also I'm not sure what's up with the double #xxxx#xxxx's. Also my nick changed for some reason, when it shouldn't.

Right, only just got around to this but it's probably going to block any sort of release.
So the bug is down to you editing another users message on discord and that translates to the rando message in Matrix?

I've managed to have this happen in a test channel of mine before. No editing or anything fancy, just me saying "ping" and "pong" every once and a while. The channel is just me :(

Hmm, then I will need to put proper trace logs in for the entire chain between discord and matrix and see if we can spot something.

The above branch has enough tracing to hopefully work out the issue.

https://riot.im/app/#/room/!UcYsUzyxTGDxLBEvLz:matrix.org/$15193061904713vOlQo:t2bot.io got our smoking gun!

Got a lead: https://github.com/Half-Shot/matrix-appservice-discord/blob/develop/src/bot.ts#L534 doesn't catch webhook messages.

Exciting!

Merged. Go go go!

Closing. Will reopen if not fixed.


Can not compile on MacBook with Intel CPU

I followed the getting started operations step by step, I executed ./scripts/setup-macos.sh successfully, but when I executed the make command to compile this project I got the following errors:

velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:3165:49: error: use of undeclared identifier 'IndexSequenceFor'

new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(

I do not know what's wrong, who can give me help?

hi @zuochunwei, could you please post the whole stack trace as text instead of a screenshot? It will help us be able to copy&paste to investigate. Thanks.

hi @zuochunwei, could you please post the whole stack trace as text instead of a screenshot? It will help us be able to copy&paste to investigate. Thanks.

[71/902] Building CXX object third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
FAILED: third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/usr/local/opt/icu4c/include -I/Users/zuochunwei/velox/. -I/Users/zuochunwei/velox/third_party/googletest/googlemock/include -I/Users/zuochunwei/velox/third_party/googletest/googlemock -isystem /usr/local/include -isystem /Users/zuochunwei/velox/velox -isystem /Users/zuochunwei/velox/velox/external -isystem /Users/zuochunwei/velox/velox/external/duckdb -isystem /Users/zuochunwei/velox/velox/external/duckdb/tpch/dbgen/include -isystem /Users/zuochunwei/velox/third_party/googletest/googletest/include -isystem /Users/zuochunwei/velox/third_party/googletest/googletest -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk -fPIC -Wall -Wshadow -Werror -Wconversion -DGTEST_HAS_PTHREAD=1 -fexceptions -W -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wunused-parameter -Wcast-align -Wchar-subscripts -Winline -Wredundant-decls -std=c++17 -MD -MT third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o -MF third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o.d -o third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o -c /Users/zuochunwei/velox/third_party/googletest/googlemock/src/gmock-all.cc
In file included from /Users/zuochunwei/velox/third_party/googletest/googlemock/src/gmock-all.cc:39:
In file included from /Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock.h:61:
In file included from /Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-function-mocker.h:42:
In file included from /Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-spec-builders.h:75:
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:3165:49: error: use of undeclared identifier 'IndexSequenceFor'
new FieldsAreMatcherImpl<const Struct&, IndexSequenceFor<Inner...>>(
^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4291:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& str) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4299:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& str) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4307:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& str) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4315:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& str) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4324:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& substring) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4332:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& prefix) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:4340:21: error: no template named 'StringLike' in namespace 'testing::internal'
const internal::StringLike& suffix) {
~~~~~~~~~~^
/Users/zuochunwei/velox/third_party/googletest/googlemock/include/gmock/gmock-matchers.h:5150:54: error: no matching function for call to 'GetTypeName'
*listener << "throws an exception of type " << GetTypeName(typeid(err));
========
according to the error messages, I guess that I should upgrade the clang first,  I am doing so and will report the result, thank u.

I have upgraded Apple clang to version 14.0.0 (clang-14<IP_ADDRESS>), but I can not compile successfully, the same error messages appeared again.

I operated as the following steps
step1:

git clone --recursive https://github.com/facebookincubator/velox.git
cd velox
if you are updating an existing checkout
git submodule sync --recursive
git submodule update --init --recursive

step2:
./scripts/setup-macos.sh
step3:
make
when I executed make, I got the above error messages.
after checking the code, I found the identifiers such as 'IndexSequenceFor' is exist, why?

Can you try building googletest on isolation?
$ git clone git@github.com:google/googletest.git
$ git checkout e2239ee6043f73722e7aa812a459f54a28552929
$ cmake .
$ make -j4

These are the supposed requirements for googletest, I am trying to discard possible versioning issues:
Compilers

    gcc 5.0+
    clang 5.0+
    MSVC 2015+

macOS users: Xcode 9.3+ provides clang 5.0+.

oh! A colleague just pointed me out that on your first screenshot there seems to be a /usr/local/include/gtest on the last line. Do you have a different version of google test installed as a system local dependency?

git checkout e2239ee6043f73722e7aa812a459f54a28552929

yes, I did as you telled, I could compile googletest successfully.

oh! A colleague just pointed me out that on your first screenshot there seems to be a /usr/local/include/gtest on the last line. Do you have a different version of google test installed as a system local dependency?

I guess the files under /usr/local/include/gtest may be created by the script ./scripts/setup-macos.sh.
so, I need to uninstall the googletest and then reinstall it manually?

/usr/local/include/gtest

there are many other dirs and files under /usr/local/include/, such as fmt、folly、range、re2、gmock，I think they are generated by ./scripts/setup-macos.sh.

the full make report info
[zuochunwei@MacBook-Pro16 velox]$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release &&
cmake -B
"_build/release"
-DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release
-GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS=
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
\
-- Build type: Release
-- Disabling Codegen
Setting CMAKE_CXX_FLAGS=-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden
FINAL CMAKE_CXX_FLAGS= -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags
-- Found Bison keg installed by Homebrew at /usr/local/opt/bison
-- Found Flex keg installed by Homebrew at /usr/local/opt/flex
-- xsimd v9.0.1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/zuochunwei/velox/build/release
cmake --build build/release -j 12
[3/903] Building CXX object third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
FAILED: third_party/googletest/googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
ccache /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++  -I/usr/local/opt/icu4c/include -I/Users/zuochunwei/velox/.

I renamed the four sub-directories of /usr/local/include.
renamed gmock + googlemock + googletest + gtest to gmock2 + googlemock2 + googletest2 + gtest2 .
then compiled velox, I encounter the link error this time as following
[zuochunwei@MacBook-Pro16 velox]$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release && \
        /Applications/Xcode.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release && \
        cmake -B \
                "_build/release" \
                -DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release \
                -GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS= \
                -DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
                 \

-- Build type: Release
-- Disabling Codegen
Setting CMAKE_CXX_FLAGS=-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden
FINAL CMAKE_CXX_FLAGS= -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags
-- Found Bison keg installed by Homebrew at /usr/local/opt/bison
-- Found Flex keg installed by Homebrew at /usr/local/opt/flex
-- xsimd v9.0.1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/zuochunwei/velox/_build/release
cmake --build _build/release -j 1
[27/890] Linking CXX executable velox/common/caching/tests/cached_factory_test
FAILED: velox/common/caching/tests/cached_factory_test
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-flat_namespace velox/common/caching/tests/CMakeFiles/cached_factory_test.dir/CachedFactoryTest.cpp.o -o velox/common/caching/tests/cached_factory_test -L/usr/local/opt/icu4c/include/../lib -Wl,-rpath,/usr/local/opt/icu4c/include/../lib -Wl,-rpath,/usr/local/lib  lib/libgtest.a  lib/libgtest_main.a  /usr/local/lib/libglog.dylib  /usr/local/lib/libfolly.a  /usr/local/lib/libdouble-conversion.a  /usr/local/lib/libevent.dylib  /usr/local/lib/libsnappy.dylib  /usr/local/lib/libfmt.a  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/libbz2.tbd  lib/libgtest.a  /usr/local/lib/libgflags.2.2.2.dylib  /usr/local/lib/libboost_context-mt.dylib  /usr/local/lib/libboost_filesystem-mt.dylib  /usr/local/lib/libboost_atomic-mt.dylib  /usr/local/lib/libboost_program_options-mt.dylib  /usr/local/lib/libboost_regex-mt.dylib  /usr/local/lib/libboost_system-mt.dylib  /usr/local/lib/libboost_thread-mt.dylib  /usr/local/lib/libdouble-conversion.a  /usr/local/lib/libfmt.a  /usr/local/lib/libglog.dylib  /usr/local/lib/libevent.dylib  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd<EMAIL_ADDRESS><EMAIL_ADDRESS>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libbz2.tbd  /usr/local/lib/liblz4.dylib  /usr/local/lib/libzstd.dylib  /usr/local/lib/libsnappy.dylib && :
Undefined symbols for architecture x86_64:
  "fmt::v7::detail::vformat(fmt::v7::basic_string_view<char>, fmt::v7::format_args)", referenced from:
      folly::CacheLocality::readFromSysfsTree(std::__1::function<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > (std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)> const&) in libfolly.a(CacheLocality.cpp.o)
  "google::LogMessage::LogMessage(char const*, int, int, unsigned long long, void (google::LogMessage::*)())", referenced from:
      folly::RequestContext::setContextData(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_delete<folly::RequestData> >) in libfolly.a(Request.cpp.o)
      folly::RequestContext::setContextDataIfAbsent(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_delete<folly::RequestData> >) in libfolly.a(Request.cpp.o)
      folly::RequestContext::overwriteContextData(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_delete<folly::RequestData> >, bool) in libfolly.a(Request.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
make[1]: *** [build] Error 1
make: *** [release] Error 2

what's a difficult compile job!

Hi @zuochunwei , I am sorry to hear you are having a difficult time building Velox, we are trying to improve the build system, your feedback is really helpful to understand scenarios we haven't faced and trying to fix them.
I am slightly confused when you said folly and gtest where downloaded to /usr/include as part of ./scripts/setup-macos.sh as both of those libraries are not downloaded anymore as part of the setup_macos.sh script. GTest is a submodule on the repo and Folly, if not found as a system dependency, should be downloaded and built when building by CMake itself.

`
[zuochunwei@MacBook-Pro16 velox]$ make
/Applications/Xcode.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release &&
/Applications/Xcode.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release &&
cmake -B
"_build/release"
-DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release
-GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS=
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache
\
-- The C compiler identification is AppleClang <IP_ADDRESS>00029
-- The CXX compiler identification is AppleClang <IP_ADDRESS>00029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Build type: Release
-- Disabling Codegen
Setting CMAKE_CXX_FLAGS=-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden
FINAL CMAKE_CXX_FLAGS= -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags
-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.66.0") found components: program_options context filesystem regex thread system date_time atomic
-- Found glog: /usr/local/lib/libglog.dylib
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/libz.tbd (found version "1.2.11")
-- Found ICU: /usr/local/opt/icu4c/lib/libicuuc.dylib (found version "71.1.0")
-- Found BZip2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/libbz2.tbd (found version "1.0.8")
-- Looking for BZ2_bzCompressInit
-- Looking for BZ2_bzCompressInit - found
-- Found Protobuf: /usr/local/lib/libprotobuf.dylib (found suitable version "3.21.8", minimum required is "3.21.4")
-- Found Bison keg installed by Homebrew at /usr/local/opt/bison
-- Found Flex keg installed by Homebrew at /usr/local/opt/flex
-- Found BISON: /usr/local/opt/bison/bin/bison (found suitable version "3.8.2", minimum required is "3.0.4")
-- Found FLEX: /usr/local/opt/flex/bin/flex (found suitable version "2.6.4", minimum required is "2.5.13")
-- Found Python: /Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/bin/python3.9 (found version "3.9.6") found components: Interpreter
-- Found Threads: TRUE
-- xsimd v9.0.1
-- Configuring done
-- Generating done
-- Build files have been written to: /Users/zuochunwei/velox/_build/release
cmake --build _build/release -j 1
[44/927] Linking CXX executable velox/common/caching/tests/cached_factory_test
FAILED: velox/common/caching/tests/cached_factory_test
: && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags -O3 -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk -Wl,-search_paths_first -Wl,-headerpad_max_install_names -Wl,-flat_namespace velox/common/caching/tests/CMakeFiles/cached_factory_test.dir/CachedFactoryTest.cpp.o -o velox/common/caching/tests/cached_factory_test -L/usr/local/opt/icu4c/include/../lib -Wl,-rpath,/usr/local/opt/icu4c/include/../lib -Wl,-rpath,/usr/local/lib  lib/libgtest.a  lib/libgtest_main.a  /usr/local/lib/libglog.dylib  /usr/local/lib/libfolly.a  /usr/local/lib/libdouble-conversion.a  /usr/local/lib/libevent.dylib  /usr/local/lib/libsnappy.dylib  /usr/local/lib/libfmt.a  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX12.3.sdk/usr/lib/libbz2.tbd  lib/libgtest.a  /usr/local/lib/libgflags.2.2.2.dylib  /usr/local/lib/libboost_context-mt.dylib  /usr/local/lib/libboost_filesystem-mt.dylib  /usr/local/lib/libboost_atomic-mt.dylib  /usr/local/lib/libboost_program_options-mt.dylib  /usr/local/lib/libboost_regex-mt.dylib  /usr/local/lib/libboost_system-mt.dylib  /usr/local/lib/libboost_thread-mt.dylib  /usr/local/lib/libdouble-conversion.a  /usr/local/lib/libfmt.a  /usr/local/lib/libglog.dylib  /usr/local/lib/libevent.dylib  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libz.tbd<EMAIL_ADDRESS><EMAIL_ADDRESS>/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk/usr/lib/libbz2.tbd  /usr/local/lib/liblz4.dylib  /usr/local/lib/libzstd.dylib  /usr/local/lib/libsnappy.dylib && :
Undefined symbols for architecture x86_64:
"fmt::v7::detail::vformat(fmt::v7::basic_string_view, fmt::v7::format_args)", referenced from:
folly::CacheLocality::readFromSysfsTree(std::__1::function<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > (std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >)> const&) in libfolly.a(CacheLocality.cpp.o)
"google::LogMessage::LogMessage(char const*, int, int, unsigned long long, void (google::LogMessage::*)())", referenced from:
folly::RequestContext::setContextData(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_deletefolly::RequestData >) in libfolly.a(Request.cpp.o)
folly::RequestContext::setContextDataIfAbsent(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_deletefolly::RequestData >) in libfolly.a(Request.cpp.o)
folly::RequestContext::overwriteContextData(folly::RequestToken const&, std::__1::unique_ptr<folly::RequestData, std::__1::default_deletefolly::RequestData >, bool) in libfolly.a(Request.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
make[1]: *** [build] Error 1
make: *** [release] Error 2
`

I try to compile it on another mac book at home, and I failed again for various problems.

Hi @zuochunwei - It would probably be better if we figure this out in a more interactive medium. Please join the Velox oss community channel , details here : https://github.com/facebookincubator/velox#community . I and Raul will be there to help you out.

ok, I will join.

@raulcd @kgpai
I compiled on another macbook and failed again, this is the output info.
[zuochunwei@bogon ~/velox] make
/Applications/Xcode.app/Contents/Developer/usr/bin/make cmake BUILD_DIR=release BUILD_TYPE=Release && \
	/Applications/Xcode.app/Contents/Developer/usr/bin/make build BUILD_DIR=release
mkdir -p _build/release && \
	cmake -B \
		"_build/release" \
		-DTREAT_WARNINGS_AS_ERRORS=1 -DENABLE_ALL_WARNINGS=1 -DVELOX_BUILD_MINIMAL="OFF" -DVELOX_BUILD_TESTING="ON" -DCMAKE_BUILD_TYPE=Release \
		-GNinja -DMAX_LINK_JOBS= -DMAX_HIGH_MEM_JOBS= \
		-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
		 \

-- Build type: Release
-- Disabling Codegen
Setting CMAKE_CXX_FLAGS=-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden
FINAL CMAKE_CXX_FLAGS= -mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++17 -mbmi2 -fvisibility=hidden -fvisibility-inlines-hidden -D USE_VELOX_COMMON_BASE -D HAS_UNCAUGHT_EXCEPTIONS -Werror -Wall -Wextra -Wno-unused        -Wno-unused-parameter        -Wno-sign-compare        -Wno-ignored-qualifiers        -Wno-range-loop-analysis -Wno-mismatched-tags
-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.66.0") found components: program_options context filesystem regex thread system date_time atomic
-- Building Folly from source
CMake Warning (dev) at /usr/local/Cellar/cmake/3.24.2/share/cmake/Modules/FetchContent.cmake:1267 (message):
  The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
  not set.  The policy's OLD behavior will be used.  When using a URL
  download, the timestamps of extracted files should preferably be that of
  the time of extraction, otherwise code that depends on the extracted
  contents might not be rebuilt if the URL changes.  The OLD behavior
  preserves the timestamps from the archive instead, but this is usually not
  what you want.  Update your project to the NEW behavior or specify the
  DOWNLOAD_EXTRACT_TIMESTAMP option with a value of true to avoid this
  robustness issue.
Call Stack (most recent call first):
  ThirdpartyToolchain.cmake:69 (FetchContent_Declare)
  ThirdpartyToolchain.cmake:88 (build_folly)
  ThirdpartyToolchain.cmake:137 (build_dependency)
  CMakeLists.txt:282 (resolve_dependency)
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found Boost: /usr/local/lib/cmake/Boost-1.80.0/BoostConfig.cmake (found suitable version "1.80.0", minimum required is "1.51.0") found components: context filesystem program_options regex system thread
-- Found gflags from package config /usr/local/lib/cmake/gflags/gflags-config.cmake
-- Found libevent: /usr/local/lib/libevent.dylib
CMake Error at /usr/local/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
  Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
  system variable OPENSSL_ROOT_DIR (missing: OPENSSL_CRYPTO_LIBRARY
  OPENSSL_INCLUDE_DIR) (Required is at least version "1.1.1")
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.24.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.24.2/share/cmake/Modules/FindOpenSSL.cmake:599 (find_package_handle_standard_args)
  _build/release/_deps/folly-src/CMake/folly-deps.cmake:81 (find_package)
  _build/release/_deps/folly-src/CMakeLists.txt:118 (include)

-- Configuring incomplete, errors occurred!
See also "/Users/zuochunwei/velox/_build/release/CMakeFiles/CMakeOutput.log".
See also "/Users/zuochunwei/velox/_build/release/CMakeFiles/CMakeError.log".
make[1]: *** [cmake] Error 1
make: *** [release] Error 2

Can you try setting OPEN_SSL_ROOT_DIR to the installation folder for openssl 1.1:
export OPENSSL_ROOT_DIR=$(brew --prefix<EMAIL_ADDRESS>
See how we do it on our MacOS CircleCI build here: https://github.com/facebookincubator/velox/blob/main/.circleci/config.yml#L166

Can you try setting OPEN_SSL_ROOT_DIR to the installation folder for openssl 1.1:
export OPENSSL_ROOT_DIR=$(brew --prefix<EMAIL_ADDRESS>
See how we do it on our MacOS CircleCI build here: https://github.com/facebookincubator/velox/blob/main/.circleci/config.yml#L166

it works well, I compiled it successfully on my home MacBook.
for some compile errors report info, I delete the directory of folly manually and caused another compile problem.

Is this a duplicate of #2950? If so, let's close this one and consolidate the discussion in #2950.


reflect: incorrect String result from SliceOf type

At tip, this program
package main

import (
        "fmt"
        "reflect"
)

func main() {
        fmt.Println(reflect.SliceOf(reflect.TypeOf(struct{}{})).String())
}

prints ]struct {}
It should print []struct {}: https://play.golang.org/p/jx4hXcO41b

@crawshaw works as expected


Safari 16 on macOS fully supports WebM

Similar to WebP, Safari 16 requires macOS Big Sur or later, so it's impossible for it to run on a version of macOS that doesn't have WebM support. I've also update this note so it's very clear to web developers when it works or not.

But isn't this case special? Because per the note it requires a mid-cycle version namely macOS 11.3, i.e. somebody running macOS 11.0 - 11.2 could get Safari 16 without support for WebM?
Or is this version range, 11.0 - 11.2, not able to get Safari 16? Then it would be fine.

I'll find out.

I just confirmed that upon launch Safari 16 will require macOS 11.6 (Big Sur), macOS 12.6 (Monterey), or macOS 13.x (Ventura).

Cool, sounds like the changes are good to go as-is then. Thanks both!


separate vra / machine credentials

when creating vms using vRA it appears that there is no way to specify the username used to connect to the created vm.
sometimes those users are not the same, and in those cases it is necessary to connect to a kitchen machine as another user.

The username to use when connecting to a VM is set in the transport section of the .kitchen.yml and is not specific to the driver used to create the VM.
Just update your .kitchen.yml accordingly:
transport:
  username: myuser

Or you can set it on a per-platform basis:
platforms:
  - name: centos-7
    transport:
      username: centosuser
  - name: ubuntu-14.04
    transport:
      username: ubuntuuser

There are other transport-specific settings you can use, as well.  Check out the code for each transport plugin here for available config parameters: https://github.com/test-kitchen/test-kitchen/blob/master/lib/kitchen/transport/ssh.rb for the SSH transport, for example.


CLU - March SDK - Remaining issues

mainly

samples/tests for directTarget
default values for participantId and id in conversation item

/azp run python - cognitivelanguage - ci

API change check for azure-ai-language-conversations
API changes have been detected in azure-ai-language-conversations. You can review API changes here


user: compiling error

in rcore_plus/user
'RUST_BACKTRACE=1 make sfsimg arch=x86_64'
got error:
make[1]: Leaving directory '/media/chyyuu/chydata/thecode/rust-related/mytest/rcore_plus/user/biscuit/build'
mksfs zip build/x86_64 build/x86_64.img
thread 'main' panicked at 'no space', src/libcore/option.rs:1008:5
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:211
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::continue_panic_fmt
             at src/libstd/panicking.rs:398
   6: rust_begin_unwind
             at src/libstd/panicking.rs:325
   7: core::panicking::panic_fmt
             at src/libcore/panicking.rs:95
   8: core::option::expect_failed
             at src/libcore/option.rs:1008
   9: simple_filesystem::sfs::INodeImpl::_resize
  10: mksfs::zip_dir
  11: mksfs::zip_dir
  12: mksfs::main
  ...
  19: _start
Makefile:60: recipe for target 'build/x86_64.img' failed
make: *** [build/x86_64.img] Error 101

and I found the error was from mksfs.
mksfs zip build/x86_64 build/x86_64.img

How to fix it?

ANSWER: update mksfs
git clone https://github.com/wangrunji0408/rcore-fs.git
cd rcore-fs/
cargo build --bin mksfs --features=std
cp target/debug/mksfs ~/.cargo/bin/
cd ../../kernel
make run arch=x86_64

OK!!!

mksfs can be installed by cargo, one command is enough:
cargo install --git https://github.com/wangrunji0408/rcore-fs --features="std" --force


fix(helpers): add missing dir attribute for right-to-left languages

Resolves: https://prismic-team.slack.com/archives/C014VAACCQL/p1729780207755199
Description
This PR updates the default richtext serializer to honor the direction property of rich text nodes and adds the appropriate dir attribute on right-to-left text nodes. undefined should serialize to "no attribute" in React according to the types.
P.S. Are we considering releasing a major of this kit to eliminate the dependency on @prismicio/types/@prismicio/richtext? It's not that much of a big deal for now but might cause more issues later on.
Related:

@prismicio/client PR: https://github.com/prismicio/prismic-client/pull/357
@prismicio/svelte PR: https://github.com/prismicio/prismic-svelte/pull/24

Checklist

[x] If my changes require tests, I added them.
[x] If my changes affect backward compatibility, it has been discussed.
[x] If my changes require an update to the CONTRIBUTING.md guide, I updated it.

Preview

How to QA [^1]

[^1]:
Please use these labels when submitting a review:
:question: #ask: Ask a question.
:bulb: #idea: Suggest an idea.
:warning: #issue: Strongly suggest a change.
:tada: #nice: Share a compliment.

@lihbr: P.S. Are we considering releasing a major of this kit to eliminate the dependency on @prismicio/types/@prismicio/richtext? It's not that much of a big deal for now but might cause more issues later on.

Yes, we will want to move to pure @prismicio/client eventually. As it is not necessary right now, I'd prefer holding off from making a breaking change.


[TEST] test

Be sure to do all of the following checklist to help us incorporate
your contribution quickly and easily:

[ ] Any interfaces changed?

[ ] Any backward compatibility impacted?

[ ] Document update required?

[ ] Testing done
Please provide details on
- Whether new unit test cases have been added or why no new tests are required?
- How it is tested? Please attach test report.
- Is it a performance related change? Please attach the performance test report.
- Any additional information to help reviewers in testing this change.

[ ] For large changes, please consider breaking it into sub-tasks under an umbrella JIRA.

Build Failed  with Spark 2.3.2, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.3/829/

Build Failed with Spark 2.2.1, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.2/826/

Build Failed  with Spark 2.1.0, Please check CI http://<IP_ADDRESS>:12545/job/ApacheCarbonPRBuilder2.1/823/


Horizontal Scroll Bar is not visibile

Issue Type: Bug
Horizontal Scollbar is not always visible when cells are large.
Like Vertical scrollbar Horizontal Scroll bar should be always visible at the botton of screen, instead of bottom of cell.
For Cell that are very Tall, we have to scroll vertically to get to the Horizontal Scroll bar which is at the bottom of the Cell.
Horizontal scroll bar should be always visible and at the bottom of Screen and not at the bottom of the Cell.
Azure Data Studio version: azuredatastudio 1.10.0 (5fdb967ffcea41df0335ec17cfa396a694bb174e, 2019-08-14T18:28:10.311Z)
OS version: Windows_NT x64 10.0.18362

System Info

Item
Value

CPUs
Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz (8 x 2592)

GPU Status
2d_canvas: enabledflash_3d: enabledflash_stage3d: enabledflash_stage3d_baseline: enabledgpu_compositing: enabledmultiple_raster_threads: enabled_onnative_gpu_memory_buffers: disabled_softwareoop_rasterization: disabled_offprotected_video_decode: unavailable_offrasterization: enabledskia_deferred_display_list: disabled_offskia_renderer: disabled_offsurface_synchronization: enabled_onvideo_decode: enabledviz_display_compositor: disabled_offwebgl: enabledwebgl2: enabled

Load (avg)
undefined

Memory (System)
60.82GB (36.10GB free)

Process Argv

Screen Reader
no

VM
29%

Extensions (11)

Extension
Author (truncated)
Version

admin-pack
Mic
0.0.2

admin-tool-ext-win
Mic
0.0.1

agent
Mic
0.41.0

cms
Mic
0.4.0

dacpac
Mic
0.5.0

import
Mic
0.9.0

profiler
Mic
0.9.0

server-report
Mic
0.1.5

sql-dw
Mic
0.0.1

whoisactive
Mic
0.1.1

azdata-sanddance
msr
1.3.2

It would be handy to have horizontal scrollbar when we see a stored procedure on both side and have long lines of code which we have to use SHIFT+wheel to achieve that but it's not everybody that knows how to do horizontal scrolling like that.


Add NVIDIA BlueField 3 to supported NICs

Pull Request Test Coverage Report for Build<PHONE_NUMBER>

1 of 1 (100.0%)  changed or added relevant line in 1 file are covered.
12 unchanged lines in 3 files lost coverage.
Overall coverage decreased (-0.1%) to 25.566%

Files with Coverage Reduction
New Missed Lines
%

controllers/sriovnetwork_controller.go
2
67.62%

controllers/sriovibnetwork_controller.go
4
64.15%

api/v1/helper.go
6
41.32%

Totals

Change from base Build<PHONE_NUMBER>:
-0.1%

Covered Lines:
1931

Relevant Lines:
7553

💛  - Coveralls

Hi :)
can you please also update the doc with the supported nic and the capability?
from the code looks like it support legacy DPDK and HWoffload right?

Hi :) can you please also update the doc with the supported nic and the capability? from the code looks like it support legacy DPDK and HWoffload right?

AFAIK, BF3 should contain all features from BF2

LGTM


switch to forked readline lib which doesn't wreck the repl prompt

There's a bug in the readline library for non-Windows systems which causes the placeholder text to drop a character. This switches us over to a patched version temporarily.

hmm.. This appears to be broken on mac ... it step up one too many lines.

@arlaneenalra what platform are you using?

MacOs with both items and the native terminal.
On Fri, Sep 22, 2023, 19:34 Patrick Devine @.***> wrote:

@arlaneenalra https://github.com/arlaneenalra what platform are you
using?
—
Reply to this email directly, view it on GitHub
https://github.com/jmorganca/ollama/pull/578#issuecomment-1732149025,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACYAP2RLLWI5ZUJ7GOI4GDX3YVDBANCNFSM6AAAAAA5DQ6UCI
.
You are receiving this because you were mentioned.Message ID:
@.***>

I tested with both iterm2 and terminal and it seems to be working just fine. Is it possible to take a screen capture of what's happening? There is a bug w/ readline when the cursor is at the edge of the line that I noticed.

Here's what I'm seeing:
https://github.com/jmorganca/ollama/assets/360511/2a3343b4-b580-4cc1-989a-2aa021463098
I was seeing something very similar before this and there was a very short while where it seemed to work right, but I'm not sure which commit it was ..

@arlaneenalra ty for posting that! That's actually the bug I was referring to above which is an issue w/ the readline library. I'll see if I can get a fix for it.

I think I found it:
This block in https://github.com/pdevine/readline seems to be what's causing the extra up line:
diff --git a/runebuf.go b/runebuf.go
index 348cc8a..1a74acf 100644
--- a/runebuf.go
+++ b/runebuf.go
@@ -535,7 +535,8 @@ func (r *RuneBuffer) getBackspaceSequence() []byte {
                buf = append(buf, '\b')
                if sep[i] {
                        // up one line, go to the start of the line and move cursor right to the end (r.width)
-                       buf = append(buf, "\033[A\r"+"\033["+strconv.Itoa(r.width)+"C"...)
+                       //buf = append(buf, "\033[A\r"+"\033["+strconv.Itoa(r.width)+"C"...)
+                       buf = append(buf, "\r"+"\033["+strconv.Itoa(r.width)+"C"...)
                }
        }

At least for me, what I'm not sure how to do is patch around it for iterm/mac.

@arlaneenalra Oh! I will take a look. I should have mentioned it in here, but I did post a fix in main which added the " \b" back with #582 . Have you tried main?

Unfortunately I have .. and that does not seem to have fixed it after all :(

@arlaneenalra I finally repo'd this... are you seeing it with backspace or left arrow? I wasn't able to replicate it w/ backspace, but left arrow seems borked.

Left arrow is definitely what I'm having issues with. I hadn't tried the
backspace.
On Fri, Sep 29, 2023, 16:40 Patrick Devine @.***> wrote:

@arlaneenalra https://github.com/arlaneenalra I finally repo'd this...
are you seeing it with backspace or left arrow? I wasn't able to replicate
it w/ backspace, but left arrow seems borked.
—
Reply to this email directly, view it on GitHub
https://github.com/jmorganca/ollama/pull/578#issuecomment-1741517557,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AACYAP4657D3BRB46DQKJBDX4453NANCNFSM6AAAAAA5DQ6UCI
.
You are receiving this because you were mentioned.Message ID:
@.***>


Parameter isn't recognized in a filter + concat

GRLC does not recognize the parameter in this query.
The parameter is inside a concat inside a filter :
FILTER(?idrefuri = URI(CONCAT('http://www.idref.fr/', ?_idrefid, '/id')))
Here is a working example without the GRLC param :
SELECT ?oeuvre ?titre ?role
WHERE
 {
      ?oeuvre dcterms:title ?titre ; vivo:relatedBy [vivo:relates ?idrefuri ; v:hasRole ?role] .
      FILTER(?idrefuri = URI(CONCAT('http://www.idref.fr/', '184032997', '/id')))
 }
LIMIT 10

Endpoint : https://scienceplus.abes.fr/sparql
Cheers

Hi @yannnic,
Yes, unfortunately, ?_idrefid is not considered to be a variable when it is inside a CONCAT (grlc uses rdflib under the hood, and rdflib does not recognise it as a variable). We had come across this issue before (see #230).
As a workaround you could do something like this:
SELECT ?oeuvre ?titre ?role
WHERE
 {
      OPTIONAL { ?s ?p ?_idrefid }
      ?oeuvre dcterms:title ?titre ; vivo:relatedBy [vivo:relates ?idrefuri ; v:hasRole ?role] .
      FILTER(?idrefuri = URI(CONCAT('http://www.idref.fr/', ?_idrefid, '/id')))
 }
 LIMIT 10

The ?_idrefid is considered a variable inside the OPTIONAL clause, which allows for the variable replacement to happen.
Would this work for you?
Cheers

Hi @c-martinez,
the proposed workaround works perfectly. Astute trick :)
Thank you so much.
I love grlc. It is very useful and elegant.
Good night
Yann


Update Go version to 1.17

Description:
Go 1.17 has recently been released. We need to check about changes from 1.16 to 1.17 and reflect the changes on the Yorkie.
Why:

We can reflect on the latest Go improvements and keep an up-to-date code.

@hackerwins Could I try this issue?

@smoothbear sure.


Perfectly aligned fiber does not render

Description
If a fiber is aligned perfectly with an axis of the view, it does not render.
Expected Behavior
Fiber should render regardless of its subpoint positions.
Reproduction
The only difference between these two files is one of the fiber's z positions.
fiber_on_axis: filament at [-70, 0, 0] to [10, 0, 0]
fiber_off_axis: filament at [-70, 0, 0] to [10, 0, 0.001]
fiber.zip
Environment
Can reproduce on production and staging

Even a filament from [-70, 0, 0.001] to [10, 0, 0.001] will render correctly even though it is "on axis" by all definitions!
Curves from (x, 0, epsilon) to (x+length, 0, epsilon) seem to be fine.  Still testing and trying to figure out why this is ok.  I'm not above putting a tiny fudge factor in the code but will try to find a true solution first.

Tracked it down finally. Fix is coming up


Invoice Params "CustomerNotificationPreference" is not omittable in JSON. Thus impact no customer notifications being sent

Hi team, kindly look into your struct omitempty implementation. Concrete struct is not omittable, refer
There are some fields on Xendit API that expects clean omit from payload when there are no values inside of it. I've fixed on my fork by this commit for invoice params
Many thanks

Hello @pupleh4t, sorry for the delayed response. We apologize for this, we're a little bit resource constrained. If you're willing to create a pull request for this change with updated tests, we're happy to review! 🙏


Can't get mxnet function decorators

Description
I want to get mxnet function decorators in python. I can get the decorators for Tensorflow as follows:
Given that we have the following tensorflow API:
tf.math.floor(2.5)

When I run the code, the function arguments are set inside tensorflow object.
APIname = "tf.math.floor"
apit_split = APIname.split('.')
func_name = apit_split[-1]

module_obj = tf
if len(func_name_list) > 1:
   for module_name in apit_split[:-1]:
     module_obj = getattr(module_obj, module_name)
myfunction = getattr(module_obj, func_name)

And the output is:

As you can see, I have the decorators for the function. Now for mxnet, I have the following code snippet:
Given that we have the following mxnet API:
from mxnet import ndarray
x = ndarray.ones((2,3))

When I run the code, the function arguments are set inside ndarray object.
APIname = "ndarray.ones"
apit_split = APIname.split('.')
func_name = apit_split[-1]

module_obj = ndarray
if len(func_name_list) > 1:
   for module_name in apit_split[:-1]:
     module_obj = getattr(module_obj, module_name)
myfunction = getattr(module_obj, func_name)

The output is:

As you can see, there is no decorator for the function. Any idea? thanks.
References
https://fossies.org/linux/tensorflow/tensorflow/python/util/tf_decorator.py

Just found the answer.
The problem is that I should do the above stuff inside __init__.py located in the root folder of mxnet library (installed via pip).


issues dealing with self signed certificates?

I tried running some HTTPS requests against my server (just a simple GET request) but I do not see any request arriving.
Other than the "0" before the "0ms" on the output, I don't see anything indicating an issue.
I then tried pointing it to some non-existing server:
goku -t https://does_not_exist/ -v

the output doesn't seem to indicate any issue. Using -v provided very little extra information
[Client 0 Iteration 0] 0 0ms

Concurrency level 1
Time taken 0 seconds
Total requests  1
Mean request time 0 ms
Max request time 0 ms
Min request time 0 ms
95'th percentile: 0 ms
99.9'th percentile: 0 ms

If I switch to HTTP to my server, I do see requests arriving and instead of the "0" I do see the requests and some status code in goku's output.
Is it possible that since my server's certificate is not trusted (it's self signed) goku is not even sending the request? is there any way to confirm or try telling goku to still connect ignoring certificate checks?

Hello, thank you for using it and reporting the issue.
With the details you have provided, I have been able to reproduce it, so I need to apply a fix to handle self-signed certificates and also to provide more feedback on the status code. I will keep you informed.

Hi @hmacias-avaya
It's already solved at 1.1.6, sorry for the inconvenience.
thank you

no need to be sorry! thank you for the quick fix, it's working fine.


About sharing knowledge

What is the problem with Chinese README's
Firstly, we congratulate you for getting so much star by sharing this repository with humanity.
But it is very disappointing for non-Chinese speakers when one couldn't understand what a trending repository is about.
When we see such a repo on trending, our minds are blurring like Gollum's.

There is a way you can help to solve this disappointment which I believe is experienced by many people who want to know more about your valuable work and appreciate it.
What we want:

Please add English translation of your README so you are sharing your work and knowledge with more people.

How this will help you:

More feedback to fix and improve your project.
New ideas about your project.
Greater fame.

“Sharing knowledge is the most fundamental act of friendship. Because it is a way you can give something without loosing something.”
— Richard Stallman
Thank you!

This issue created by us/english-please script. Please report on any error. Thank you!

sorry about that


expose an api specific to goog.modules and their exports

For use by clutz. Roughly, the API should allow us to query the compiler post compilation and return the goog.modules seen, and per each the type shape of the exported var.

What's the use case? Is this goog.module specific or generalized to all module types?

The use case is clutz. It already gets all the goog.provides, but getting the goog.modules becomes trickier after a soon-to-be-submitted refactoring.

https://github.com/angular/clutz

If it gets the goog.provides prior to module rewriting (from raw source), then this would need generalized to all module types.

I think clutz is only concerned with goog.module for now, but you can ask the owners of that project; they may have plans related to other types of modules.

@radokirov for Clutz context.
I don't think we need support for anything but goog.module.

For goog.require/provides, we have visibility into all symbols through compiler.getTopScope().getAllSymbols()
Am I missing some other type of modularity construct other than goog.module, and goog.provide/require? The only thing that comes to mind is ES6 modules, but that is not a high concern for us right now.

@rkirov There are CommonJS modules and AMD modules, but I guess they are not high concerns as well?

ES6 and CommonJS modules are rewritten to goog.require/provide calls. So as long the calls are made after module rewriting (which happens very early), then they will be covered.

yep, we run as a synthetic last past, after all rewritings. Also, amd and commonjs are not a concern for our usecases.


Backlog grooming 2022-11-25

Backlog grooming.
Tasks

[x] Remove analysis label (merge to research) ✅2022-11-25
[x] Close https://github.com/flowershow/flowershow/issues/114 ✅2022-11-25

[x] update [[meta/design-cli]] with what we did (could ola do this?) - does it matter to update this? not really. ✅2022-11-25 - updated it

[x] Update high level [[meta/plan]] ✅2022-11-25 - partial

[x] make sure key items are issues in roadmap board? (as that is main overview now) ✅2022-11-25

[x] Review all unprocessed backlog https://github.com/orgs/flowershow/projects/1/views/15

Questions

[x] Get rid of "meta" section and merge with notes? ❌2022-12-10 👍 but someday maybe

FIXED. All tasks done.


Need info on backwards compatibility for movers

I'm thinking of fixing some gears here. One thing is a lot of them use the old body movers, and I was wondering if I should update them to the new movers or just leave them be.
The problem i'm facing is, if I update gear to new movers, they will not work as intended when people bring them to non-PGS games, however, according to the blog post on new movers they offer "dramatically improved performance", and even though the old movers aren't marked as deprecated in the API yet, I believe they are implied as deprecated.
I would like some input from the ROBLOX staff on this issue, for now I won't touch movers.

@JJRcop We would prefer that you spend your efforts fixing gear that are broken, especially with features like FilteringEnabled, AllowClientInsertModels, or R15. Converting gear to use body movers is not important especially considering it may break games.

@seranok I apologize for the wording of my issue, I am not trying to focus on updating body movers, but the issue is while I fix gear here, would also updating the body movers be encouraged or discouraged? Saying "not important" is not a sufficient answer to me, because it isn't explicit enough.

Updating gear to body movers at this point is discouraged.

Awesome, thanks!


Vertically stretched Cartesian grid

This PR adds a vertically stretched grid.
I'll start adding some tests to make sure it works as expected. Maybe a good starting point would be to ensure incompressibility and tracer conservation then make sure vertically stretched grid with constant grid spacing passes the regression tests.
Might also be good to add some operator tests to make sure the operators are doing what we expect.
Resolves #47
Works towards #471
Resolves #531
Resolves #544

If we're okay with merging a vertically stretched grid abstraction by itself with some tests that ensure the vertical levels are correctly computed then I think this PR is ready to be reviewed.
Pressure solver and full integration will come in a future PR.