text:
[Bug] 1.18.1 不支持 vmess + tcp + tls 吗? JMS的 tcp vmess 没有特殊header 需要忽略ssl验证. proxy-providers好像有bug..

Verify steps

[X]  确保你使用的是本仓库最新的的 mihomo 或 mihomo Alpha 版本 Ensure you are using the latest version of Mihomo or Mihomo Alpha from this repository.
[ ]  如果你可以自己 debug 并解决的话，提交 PR 吧 Is this something you can debug and fix? Send a pull request! Bug fixes and documentation fixes are welcome.
[X]  我已经在 Issue Tracker 中找过我要提出的问题 I have searched on the issue tracker for a related issue.
[X]  我已经使用 Alpha 分支版本测试过，问题依旧存在 I have tested using the dev branch, and the issue still exists.
[X]  我已经仔细看过 Documentation 并无法自行解决问题 I have read the documentation and was unable to solve the issue.
[X]  这是 Mihomo 核心的问题，并非我所使用的 Mihomo 衍生版本（如 OpenMihomo、KoolMihomo 等）的特定问题 This is an issue of the Mihomo core per se, not to the derivatives of Mihomo, like OpenMihomo or KoolMihomo.

Mihomo version
docker 最新版本 1.18.1
What OS are you seeing the problem on?
openwrt + docker
Mihomo config
openwrt docker tun 部署 docker pull metacubex/mihomo:latest
直接使用的官方页面配置: https://wiki.metacubex.one/example/conf/

######### 锚点 start #######
# 策略组相关
pr: &pr {type: select, proxies: [默认,香港,台湾,日本,新加坡,美国,其它地区,全部节点,自动选择,直连]}

#这里是订阅更新和延迟测试相关的
p: &p {type: http, interval: 3600, health-check: {enable: true, url: https://www.gstatic.com/generate_204, interval: 300}}

######### 锚点 end #######

# url 里填写自己的订阅,名称不能重复
proxy-providers:
  provider1:
    <<: *p
    url: "这里是JMS官方订阅url....忽略不写..."

ipv6: true
allow-lan: true
mixed-port: 7890
unified-delay: false
tcp-concurrent: true
external-controller: 127.0.0.1:9090
external-ui: ui
external-ui-url: "https://github.com/MetaCubeX/metacubexd/archive/refs/heads/gh-pages.zip"

geodata-mode: true
geox-url:
  geoip: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geoip-lite.dat"
  geosite: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/geosite.dat"
  mmdb: "https://mirror.ghproxy.com/https://github.com/MetaCubeX/meta-rules-dat/releases/download/latest/country-lite.mmdb"

find-process-mode: strict
global-client-fingerprint: chrome

profile:
  store-selected: true
  store-fake-ip: true

sniffer:
  enable: true
  sniff:
    HTTP:
      ports: [80, 8080-8880]
      override-destination: true
    TLS:
      ports: [443, 8443]
    QUIC:
      ports: [443, 8443]
  skip-domain:
    - "Mijia Cloud"

tun:
  enable: true
  stack: mixed
  dns-hijack:
    - "any:53"
  auto-route: true
  auto-detect-interface: true

dns:
  enable: true
  listen: :1053
  ipv6: true
  enhanced-mode: fake-ip
  fake-ip-filter:
    - "*"
    - "+.lan"
    - "+.local"
  nameserver:
    - https://doh.pub/dns-query
    - https://dns.alidns.com/dns-query
  proxy-server-nameserver:
    - https://doh.pub/dns-query
  nameserver-policy:
    "geosite:cn,private":
      - https://doh.pub/dns-query
      - https://dns.alidns.com/dns-query
    "geosite:geolocation-!cn":
      - "https://dns.cloudflare.com/dns-query#dns"
      - "https://dns.google/dns-query#dns"
proxies:
- name: "直连"
  type: direct
  udp: true
proxy-groups:
  - {name: 默认, type: select, proxies: [自动选择, 直连, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点]}
  - {name: dns, type: select, proxies: [自动选择, 默认, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点]}
  - {name: Google, <<: *pr}
  - {name: Telegram, <<: *pr}
  - {name: Twitter, <<: *pr}
  - {name: Pixiv, <<: *pr}
  - {name: ehentai, <<: *pr}
  - {name: 哔哩哔哩, <<: *pr}
  - {name: 哔哩东南亚, <<: *pr}
  - {name: 巴哈姆特, <<: *pr}
  - {name: YouTube, <<: *pr}
  - {name: NETFLIX, <<: *pr}
  - {name: Spotify, <<: *pr}
  - {name: Github, <<: *pr}
  - {name: 国内, type: select, proxies: [直连, 默认, 香港, 台湾, 日本, 新加坡, 美国, 其它地区, 全部节点, 自动选择]}
  - {name: 其他, <<: *pr}

#分隔,下面是地区分组
  - {name: 香港, type: select , include-all-providers: true, filter: "(?i)港|hk|hongkong|hong kong"}
  - {name: 台湾, type: select , include-all-providers: true, filter: "(?i)台|tw|taiwan"}
  - {name: 日本, type: select , include-all-providers: true, filter: "(?i)日|jp|japan"}
  - {name: 美国, type: select , include-all-providers: true, filter: "(?i)美|us|unitedstates|united states"}
  - {name: 新加坡, type: select , include-all-providers: true, filter: "(?i)(新|sg|singapore)"}
  - {name: 其它地区, type: select , include-all-providers: true, filter: "(?i)^(?!.*(?:🇭🇰|🇯🇵|🇺🇸|🇸🇬|🇨🇳|港|hk|hongkong|台|tw|taiwan|日|jp|japan|新|sg|singapore|美|us|unitedstates)).*"}
  - {name: 全部节点, type: select , include-all-providers: true}
  - {name: 自动选择, type: url-test, include-all-providers: true, tolerance: 10}

rules:
  - GEOIP,lan,直连,no-resolve
  - GEOSITE,biliintl,哔哩东南亚
  - GEOSITE,ehentai,ehentai
  - GEOSITE,github,Github
  - GEOSITE,twitter,Twitter
  - GEOSITE,youtube,YouTube
  - GEOSITE,google,Google
  - GEOSITE,telegram,Telegram
  - GEOSITE,netflix,NETFLIX
  - GEOSITE,bilibili,哔哩哔哩
  - GEOSITE,bahamut,巴哈姆特
  - GEOSITE,spotify,Spotify
  - GEOSITE,pixiv,Pixiv
  - GEOSITE,CN,国内
  - GEOSITE,geolocation-!cn,其他

  - GEOIP,google,Google
  - GEOIP,netflix,NETFLIX
  - GEOIP,telegram,Telegram
  - GEOIP,twitter,Twitter
  - GEOIP,CN,国内
  - MATCH,其他

Mihomo log
其实vmess+tls 完全没有报错就是测速没有延迟, 节点连不上, 打开任何网页也打不开.. Windows v2rayN客户端没有问题..(JMS 官方建议的v2rayN客户端版本是V5.18...对应===Xray 1.5.4 (Xray, Penetrates Everything.) Custom (go1.17.7 windows/386)一直用到今天...)
stdout: time="2024-02-17T03:19:48.688862936Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.689216723Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.689504594Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.689836505Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.690146251Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.69085499Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.69158473Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.692339844Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.692712005Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.693056458Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.693321579Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.693547326Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.693759656Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.694004361Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.694237691Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.694517978Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.694790683Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.695031596Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.69528855Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.695617545Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.696779237Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.69709569Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.697573142Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.698719375Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"
stdout: time="2024-02-17T03:19:48.699847817Z" level=warning msg="To use xtls-rprx-vision, ensure your server is upgrade to Xray-core v1.8.0+"

stdout: time="2024-02-17T04:25:14.816407271Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:15.002071779Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:15.197407939Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:15.489233119Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:15.804417554Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:16.120199322Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:17.277260804Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:18.420052516Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43472 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:19.527322323Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:19.669251481Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:20.877100507Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:21.071899418Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:21.261579002Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:21.511552119Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:21.888827917Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:22.405146834Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:23.197550287Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"
stdout: time="2024-02-17T04:25:24.321044482Z" level=warning msg="[TCP] dial Google (match RuleSet/google_domain) 192.168.2.103:43475 --> www.google-analytics.com:443 error: tls: failed to verify certificate: x509: certificate is not valid for any names, but wanted to match example.com"

Description
配置里自动订阅的:
proxy-providers:   provider1:     <<: *p     url: "https://jjsubmarines.com/members...
没有其他问题，所有节点全部是TLS的...毕竟JMS节点比较简单, 但是它大厂不怕墙啊...
JMS官方订阅b64解码得到的是:
 {   ps: 'JMS-xxxxx@XXs4.jjcruises.com:xxx',   port: 'xxxx',   id: 'xxxxxxx',   aid: 0,   net: 'tcp',   type: 'none',   tls: 'tls',   sni: 'example.com',   add: '42.xxxxx' }
JMS的tls sni 是固定的 example.com
ss节点可以测速有反应，所有 vmess tls 的不通..
看log是需要机场那边支持Xray-core v1.8.0+??? 这....用户角度无解?

面板里面看到 vemss tls tcp的节点 标记的是 vmess:: xudp , ss: udp
其中ss: udp 都能正常使用,
vmess:: xudp都不行, 而且其实配置是错的, JMS的vemss 只支持 tcp.. net: 'tcp'

verify certificate: x509: certificate is not valid for any names, but wanted to match example.com
手动选择没有测速反馈的 JMS vmess tls 节点用的tls example.com, log第二段请求google 触发了verify certificate: x509

你这个可以在provider1的url后面加override配置项，设置skip-cert-verify: true

repo: MetaCubeX/mihomo


text:
fix: clear encryption salt and key

Explanation

Currently, when a user locks the app and then resets their password, they are not able to log in wth their new password.
This is because the encryption key was generated with the old password and not cleared.
The solve this we will remove the encryption key from state when the user locks the wallet as well as when #createNewVaultWithKeyring is called.
This allows for a new encryption key to be generated with the new password when the user logs in again and submitPassword is called.

References

Fixes https://github.com/MetaMask/metamask-extension/issues/25696
Moves path from this PR into the KeyringController

Changelog

@metamask/keyring-controller

FIXED: Reset encryption key when wallet is locked or when new vault is created to ensure that encryption key is always based on most recent password.

Checklist

[x] I've updated the test suite for new or updated code as appropriate
[x] I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
[x] I've highlighted breaking changes using the "BREAKING" category above as appropriate

@MajorLift good suggestion. I have made those changes in the latest commit.

This makes sense when the intention is to create a new vault with createNewVaultAndKeychain. But wouldn't the user be best served using the changePassword method? The purpose of this method is exactly changing only the password, as opposed to recreating the entire vault manually.
On the other hand, caching the encryption key allows us to make decryption faster as we skip derivation (the most time-consuming step), so clearing it out on lock would lose its purpose

But wouldn't the user be best served using the changePassword method? The purpose of this method is exactly changing only the password, as opposed to recreating the entire vault manually.

changePassword is for when the wallet is unlocked. In the "forgot password" flow, the wallet is locked so we cannot use that method.

source: gharchive/pull-request

authors: Gudahtt mikesposito owencraston

repo: MetaMask/core

license: MIT

license_type: permissive

license_source: github-api


text:
Where can I find typings for this?

provide a way to get typings for typescript projects.

Yea

@aksdevac I apologize for the delay on this. Types will be added to this package via #11, which will close this issue. We will publish an update to this package as soon as that's merged.
It uses types from: https://github.com/MetaMask/inpage-provider

Please merge this PR!  Thanks!

We shipped types via #18 in 1.2.0.

Thanks for providing types.
I just noticed that the return type of the detectEthereumProvider is Promise<unknown>
Shouldn't it be something like this?: https://github.com/MetaMask/inpage-provider/blob/main/index.d.ts#L29

source: gharchive/issue

authors: Lukasz257 aksdevac pointtoken rekmarks schoenwaldnils

repo: MetaMask/detect-provider

license: ISC


text:
Improve on WCAG "Robust" category - a11y audit

Go through the following criteria for WCAG's Robust section and improve their issues to meet WCAG requirements:
Level A

4.1.1 Parsing (used this html validator):

[ ] PDFs are structured a bit strangely and it affects screen reader performance. Instead of a paragraph being it's own div, one word or a whole phrase in the middle of a sentence will be.
[x] The calendar pdf also reads things out of order, but it doesn’t look like we have control over that.
[x] We’ve got some img and other tags that have stray, unneeded ending tags, like the Metro logo img tag
[x] There are buttons that have href attributes. Let's try to change those to just a tags
[x] Figure out if we need autocomplete attributes on radio buttons. If we do then keep them. If not, we can remove.
[x] Many small tags are encasing divs, whereas the divs should encase the smalls
[x] Some table elements are missing a scope attribute
[x] The board report search bar has an aria-describedby that doesn’t lead to anything. This is identical to the issue for 3.3.2 Labels or Instructions
[x] Run the validator again to see what else can use some improvement.

4.1.2 Name, Role, Value:

[x] Consider replacing the title attribute on various elements with a tooltip instead. Suggestion taken from this site.
[x] Many divs may be able to be changed into more semantic tags like sections, articles, etc.
[x] The buttons above the board members listing page map are labels instead of buttons. Consider making changing that to be more semantic. These labels contain inputs, so this is semantically correct.

Level AA

4.1.3 Status Messages:

[x] Can add an aria role of alert to errors

Connects #1012

Closed by #1088

repo: Metro-Records/la-metro-councilmatic


text:
explain edge cases where a route skips stops

see, for example, route 29 in SF. at the start of peak periods it skips some stops but not others (e.g. stop_id 16557), making the stop_sequence for this stop within the am_peak period take multiple values (27 (twice) and 62(28 times)) after this subset:
https://github.com/MetropolitanTransportationCommission/RegionalTransitDatabase/blob/master/R/r511.R#L138

started this here:

see https://github.com/MetropolitanTransportationCommission/RegionalTransitDatabase/commit/bfc80a26fdf9620f73f4be22eda8dbd675ad5271

license_source: bigquery


text:
Woe kntl.js itu bermasalah

kntl.js itu bermasalah masa folder tempat chrome nya nye suain dari sananya laptop orang kan beda beda

gabisa di edit lagi :( hum

Parah ganti inside heartz aja lah
Pada tanggal Sen, 31 Agt 2020 12:07, dzakijo1 notifications@github.com
menulis:

gabisa di edit lagi :( hum
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/MhankBarBar/whatsapp-bot/issues/1#issuecomment-683551461,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQYMFGJAKKLBGA3IU6TTBTDSDMVYRANCNFSM4QQC2K6A
.

bukan ane yang buat bang :( ane ikutan ngoment doang

Jadi gabisa ni? Masalahnya folder chrome gw di Program Files bukan Program Files (x86) Pada tanggal Sen, 31 Agt 2020 12:09, dzakijo1 notifications@github.com menulis:
…
bukan ane yang buat bang :( ane ikutan ngoment doang — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub <#1 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQYMFGISRDX5245P2T2GLYLSDMWCNANCNFSM4QQC2K6A .

Install Ulang Chromenya Aja Bro Pasti Bisa

authors: MFarelSyahtiawan ZefianAlfian dzakijo1

repo: MhankBarBar/whatsapp-bot


text:
Nothing is changing

I installed the app and when I run it nothing changes. I restarted the computer, ran it in administrator etc but nothing changed. Can anybody help?

Turning off Windows'  the "Show Accent Color in Title Bar and Window Border" setting fixed it. Thanks anyway!

repo: MicaForEveryone/MicaForEveryone


text:
'Remove Rule' button not showing when sidebar is not collapsed and language set other than English

Describe the bug
The Remove Rule button only shows in the sidebar when the window is resized narrow so the sidebar collapses, with every language set except English (the default). It will not show when the window is wider and the sidebar is not collapsed. Also the text for Add Rule flashes when resizing.
To Reproduce

Set other language than English
Resize window window wider so that the sidebar isn't collapsed
Remove Rule button is not being shown
Resize window window narrower so that the sidebar is collapsed
Remove Rule button is being shown in sidebar

Expected behavior
The Remove Rule button being shown regardless of set language, size of window or if the sidebar is collapsed
Screenshots
n/a, See video: https://youtu.be/VNO2wyX9_44
Windows Version
Windows 11 22H2 build 22621.1105 (Main Release)

Forgot to mention (I point it out in the video), but I can resize the window but maximize button is disabled??

Thanks for reporting.
Maximize button is disabled on purpose.
I'll check what's wrong with the remove button. I guess it's because there's not enough space for it to show up.

It only happens in some languages (i.e. English and Chinese works fine, but not Nederlands)

Weird. The button is completely missing.

@xmine64 your hypothesis is right. When the button labels get long enough, the remove button will move into the secondary commands section. However, we have hidden the entry way to secondary commands (via disabling the overflow button), then it shows up to the user as being completely missing.

When the button labels get long enough, the remove button will move into the secondary commands section.

We need to hide labels. We will need some room to add increase/decrease priority buttons anyway.

I'm not quite sure about the flashing text though.

It happens during resize👀

How about moving the CommandBar outside the SplitPane when the pane is visible without an overflow button?

Using English here and it still doesnt show, i think it affects all languages

This is a bug that can potentially affect all languages, though some are hit harder than others.

This is a bug that can potentially affect all languages, though some are hit harder than others.

i see, just wanted to confirm this though, hope it gets fixed soon

Maybe this also has to do with dpi scaling perhaps? (Looking at the flashing, just a guess).
And also a solution could be to make the sidebar a little more wider. (would also but better cuz some process rules could be long strings)

I don't think that DPI scaling affects this, since the sidebar width is static and uses logical pixels (which is not affected by DPI) instead of physical pixels.

authors: GitExploraa dongle-the-gadget toineenzo xmine64


text:
Added proper User-Agent string to Facebook calendar call, and various…

This should only have the fixes for the calendar module, as well as spelling fixes for the word 'exist'. Finger crossed, and time to branch ...

Crap, I forgot to update the CHANGELOG file. I can create a new PR (after closing this one), or you'll see it with other future changes ...

Thanks! No worries, I'll update the changelog.

repo: MichMich/MagicMirror

license: mit


text:
Table Field Groups

Hi,
is it possible from AL to extend i.e the table Item's Field Group: Like add field "Description 2" to the list.

This is currently not possible. The work to add this support is tracked by #143 but we don't have a timeline for when it will be available yet.

Closing as duplicate

repo: Microsoft/AL


text:
Caption doesn't show in Dyn365 sandbox

Appears that the translation-feature doesn't work (anymore) on a D365 sandbox: I'm using the latest docker image "microsoft/dynamics-nav:devpreview-finus"
Situation:

We enabled the translation feature
We use labels in our notification

used in:

Also we have a wizard, where we have our label for the assisted setup.  But many (not all) captions nor labels show up empty.  The notification is not shown in this case (probably because it has an empty message), and pages are like:

and the wizard:

Just for the record:

All ApplicationAreas are in place!
We tested it on the previous release (D365 sandbox), and that did work!
We tested with all the "user experiences"

When you use the "old" "CaptionML" property, it does show, like:

does show:

Hi @waldo1001 . We are working on a new feature where if the label text differs from the translation item source (this means that the source string changed in the source code since the translation file was last updated) then we ignore that translation item. This was a requested feature to make sure you aren't using outdated source strings by accident (if you change the source string you want to update the translations as well). I'm working on adding warnings for the cases when this is happening. Could you check if this might be causing your behavior? Otherwise, could you please give us some kind of repro so that we can investigate?

Same issue here. Some observations:

Only happens with feature TranslationFile enabled in app.json.
When translation file is generated during publish it is ok. But when you publish a second time (with no changes at all), then the labels become empty.
Labels are also empty van you first build (with Ctrl+Shift+B) and then publish.
Removing the .xlf file helps, it gets recreated and labels appear again. But only one time.

Just to make sure we are on the same page:

Are you sure you renamed the xliff file which was generated and now you are adding translations to the renamed file and not the one which was generated? The one which is generated gets emptied on each build so that one is only for reference.

No, I did not rename the xliff file at all. The most simple flow is like this:

Enable TranslationFile feature
Create a label or caption
Publish the app (xliff is generated, captions are displayed fine)
Publish the app without any change, now the captions are gone

Could you please check that you have the build 20643 or later? What is your current version?

Current version is Feb preview, build 20723

@waldo1001 @ajkauffmann I'm afraid I'm stuck right now as I cannot repro your issue. Could you please make a zip of an extension which demonstrates this issue? I tried but it simply works for me.
Also, there is a chance you're issue was fixed in the mean time. Could you please try getting a more recent build? 20723 is now 2 weeks old and I made some fixes in the mean time. Could you try with a 20937 or newer?

@DominikDitoIvosevic tested again with build 20901. That works like expected, so it seems the issue has been solved along the road.

I suppose this was fixed then. I'll close it and if you guys still experience issues please open a new issue


text:
Button To Edit List Pages in BC

Hello Everyone,
When I get to some list pages through search in Dynamics Business Central I don't see an option to Edit /Manage the page:

If I refresh/reload this page the option appears:

Is it a bug of some sort or a matter of incorrect settings? Can this be fixed?
Thanks

Did you try clicking on Home tab which opens actions tab? in your first screenshot.

Got it. Indeed actions are hiding under the Home tab. Thank you

authors: Anna-Gudimova pmohanakrishna


text:
Txt2Al not handling CAL option fields with enum assigned

Issue:
When using Txt2AL to convert a table that contains an option field that has an Enum assigned, the resulting AL file contains compile errors. Example below.

Expected Result
Would be nice if the option field was changed to an enum field in the AL file. Would also be great if the enum object file was also created. Example below.

Hi @MikeGlue are you using our latest developer preview? This bug should have been fixed there some time ago.

I tried this with the BC on prem CU1 Docker image. I can try with the latest daily build if you think it's fixed there.

Yes this does work as expected in the daily build image I'm using. My mistake for not trying that first. :(

authors: MikeGlue qutreson


text:
max() arg is an empty sequence

Traceback (most recent call last):
File "Test.py", line 17, in
best_model = max(models, key=os.path.getctime)
ValueError: max() arg is an empty sequence
The model was trained with an error of 0.00022
but testing the model throws this error

Please use the issue template when reporting issues. It gives us the needed information to help solve your problem. For example, what version of keras / tensorflow / python / numpy / pandas are you using?

Probably a duplicate of this one. https://github.com/Microsoft/AutonomousDrivingCookbook/issues/63.

authors: mitchellspryn vighnesh-balaji

repo: Microsoft/AutonomousDrivingCookbook


text:
Cannot mv a file from inside of /tmp to non-/tmp and non-/ directory, for example, /root

Cannot move any file in /tmp to /root, for example.
My operation log is here.
=== === === === === ===
root@localhost:~# pwd
/root
root@localhost:~# touch /tmp/test
root@localhost:~# /bin/mv /tmp/test .
/bin/mv: cannot move ‘/tmp/test’ to a subdirectory of itself, ‘./test’
root@localhost:~#
=== === === === === ===
And I have found '/bin/mv /tmp/test /' works fine.
And '/bin/mv /tmp/test /tmp/test2' works fine too.

Thank you for the bug.
We have a fix internally on one of our dev branches.  Should hit the insiders builds before too long.

root@RUSSALEX-DESK:~# pwd
/root
root@RUSSALEX-DESK:~# touch /tmp/test
root@RUSSALEX-DESK:~# mv /tmp/test .
root@RUSSALEX-DESK:~# ls | grep test
test

authors: russalex ryoon

repo: Microsoft/BashOnWindows


text:
Can't Install both Oracle JDK and OpenJDK due to so many reason.

Pattern 1:
add-apt-repository ppa:webupd8team/java
apt-get update
apt-get install oracle-java8-installer
172032K ........ ........ ........ ........ ........ ........ 98% 3.43M 0s
175104K ........ ........ ........ .......                   100% 4.51M=41s
2016-04-12 18:22:29 (4.17 MB/s) - ‘jdk-8u77-linux-x64.tar.gz’ saved [181365687/181365687]
Download done.
Removing outdated cached downloads...
sha256sum mismatch jdk-8u77-linux-x64.tar.gz
Oracle JDK 8 is NOT installed.
dpkg: error processing package oracle-java8-installer (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up gsfonts (1:8.11+urwcyr1.0.7~pre44-4.2ubuntu1) ...
Setting up x11-common (1:7.7+1ubuntu8.1) ...
dmesg: klogctl failed: Invalid argument
/bin/df: cannot read table of mounted file systems: No such file or directory
initctl: Unable to connect to Upstart: Failed to connect to socket /com/ubuntu/upstart: No such file or directory
runlevel:/var/run/utmp: No such file or directory

Setting up X socket directories...                                                             [ OK ]
Processing triggers for ureadahead (0.100.0-16) ...
Setting up xfonts-encodings (1:1.0.4-1ubuntu1) ...
Setting up xfonts-utils (1:7.7+1) ...
Setting up gsfonts-x11 (0.22) ...
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
Errors were encountered while processing:
oracle-java8-installer
E: Sub-process /usr/bin/dpkg returned an error code (1)

Pattern 2:
wget --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u77-b03/jdk-8u77-linux-x64.tar.gz"
tar xvfz jdk-8u77-linux-x64.tar.gz
jdk1.8.0_77/jre/lib/fontconfig.SuSE.10.properties.src
jdk1.8.0_77/jre/lib/fontconfig.SuSE.11.bfc
jdk1.8.0_77/jre/COPYRIGHT
jdk1.8.0_77/jre/THIRDPARTYLICENSEREADME-JAVAFX.txt
jdk1.8.0_77/jre/Welcome.html
jdk1.8.0_77/jre/README
jdk1.8.0_77/README.html
tar: jdk1.8.0_77/jre/lib/amd64/server/libjsig.so: Cannot create symlink to ‘../libjsig.so’: Invalid argument
tar: Exiting with failure status due to previous errors
root@localhost:/tmp#
root@localhost:/tmp/jdk1.8.0_77/bin#
root@localhost:/tmp/jdk1.8.0_77/bin# ./java -version
<---- In this time, Hung up no response
Pattern 3:
apt-get install default-jdk
Setting up policykit-1-gnome (0.105-1ubuntu4) ...
Setting up gconf-service (3.2.6-0ubuntu2) ...
Setting up libgnome2-bin (2.32.1-4ubuntu1) ...
Setting up libgconf2-4:amd64 (3.2.6-0ubuntu2) ...
Setting up openjdk-7-jre-headless:amd64 (7u95-2.6.4-0ubuntu0.14.04.2) ...
the java command requires a mounted proc fs (/proc).
dpkg: error processing package openjdk-7-jre-headless:amd64 (--configure):
subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of default-jre-headless:
default-jre-headless depends on openjdk-7-jre-headless (>= 7~u3-2.1.1); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
dpkg: error processing package default-jre-headless (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre:amd64:
openjdk-7-jre:amd64 depends on openjdk-7-jre-headless (= 7u95-2.6.4-0ubuntu0.14.04.2); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
dpkg: error processing package openjdk-7-jre:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-jre:
default-jre depends on default-jre-headless (= 2:1.7-51); however:
Package default-jre-headless is not configured yet.
dpkg: error processing package default-jre (--configure):
dependency problems - leaving unconfigured
Setting up gconf-service-backend (3.2.6-0ubuntu2) ...
dmesg: klogctl failed: Invalid argument
Setting up gconf2 (3.2.6-0ubuntu2) ...
/bin/df: cannot read table of mounted file systems: No such file or directory
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
update-alternatives: using /usr/bin/gconftool-2 to provide /usr/bin/gconftool (gconftool) in auto mode
(gconftool-2:8236): GConf-WARNING **: Client failed to connect to the D-BUS daemon:
Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
Setting up libgnomevfs2-common (1:2.24.4-1ubuntu6) ...
Setting up libgnomevfs2-0:amd64 (1:2.24.4-1ubuntu6) ...
Setting up libgnome2-common (2.32.1-4ubuntu1) ...
Setting up libgnome2-0:amd64 (2.32.1-4ubuntu1) ...
dpkg: dependency problems prevent configuration of openjdk-7-jdk:amd64:
openjdk-7-jdk:amd64 depends on openjdk-7-jre (= 7u95-2.6.4-0ubuntu0.14.04.2); however:
Package openjdk-7-jre:amd64 is not configured yet.
dpkg: error processing package openjdk-7-jdk:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of default-jdk:
default-jdk depends on default-jre (= 2:1.7-51); however:
Package default-jre is not configured yet.
default-jdk depends on openjdk-7-jdk (>= 7~u3-2.1.1); however:
Package openjdk-7-jdk:amd64 is not configured yet.
dpkg: error processing package default-jdk (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of ca-certificates-java:
ca-certificates-java depends on openjdk-7-jre-headless (>= 7~u3-2.1.1~pre1-1) | java6-runtime-headless; however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
Package java6-runtime-headless is not installed.
Package oracle-java8-installer which provides java6-runtime-headless is not configured yet.
Package default-jre-headless which provides java6-runtime-headless is not configured yet.
Package openjdk-7-jre-headless:amd64 which provides java6-runtime-headless is not configured yet.
dpkg: error processing package ca-certificates-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libatk-wrapper-java:
libatk-wrapper-java depends on default-jre | java2-runtime; however:
Package default-jre is not configured yet.
Package oracle-java8-installer which provides default-jre is not configured yet.
Package java2-runtime is not installed.
Package default-jre which provides java2-runtime is not configured yet.
Package oracle-java8-installer which provides java2-runtime is not configured yet.
Package openjdk-7-jre:amd64 which provides java2-runtime is not configured yet.
dpkg: error processing package libatk-wrapper-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libatk-wrapper-java-jni:amd64:
libatk-wrapper-java-jni:amd64 depends on default-jre | java2-runtime; however:
Package default-jre is not configured yet.
Package oracle-java8-installer which provides default-jre is not configured yet.
Package java2-runtime is not installed.
Package default-jre which provides java2-runtime is not configured yet.
Package oracle-java8-installer which provides java2-runtime is not configured yet.
Package openjdk-7-jre:amd64 which provides java2-runtime is not configured yet.
libatk-wrapper-java-jni:amd64 depends on libatk-wrapper-java (>= 0.30.4-4); however:
Package libatk-wrapper-java is not configured yet.
dpkg: error processing package libatk-wrapper-java-jni:amd64 (--configure):
dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.19-0ubuntu6.7) ...
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Errors were encountered while processing:
oracle-java8-installer
openjdk-7-jre-headless:amd64
default-jre-headless
openjdk-7-jre:amd64
default-jre
openjdk-7-jdk:amd64
default-jdk
ca-certificates-java
libatk-wrapper-java
libatk-wrapper-java-jni:amd64
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@localhost:~#

The first error in "apt-get install default-jdk" output is "the java command requires a mounted proc fs (/proc)." So it can be connected with #105

The second error is due to #9 (tar's current inability to handle symlinks).  I believe they've fixed that in the current code, but we won't see it until the next flight.  The third issue is a duplicate of #49.  Seems they've gotten Oracle's Java running on their internal builds but, again, we have to wait a while.  I'm just grateful for all the attention they're pouring into this!

Support for installing Java manually is inbound.  See #49.
Everything else is in bugs we're tracking.
I'm going to close this one as a dup of #49.

authors: mphaney niqolay russalex yoshioterada


text:
BotBuilder download blob file

Bot Info
.NET
Issue Description
Hello I made a bot and want to download a file from my azure blob storage. But the bot just stops working. There is no Exception, it just hangs at that position. Here is the code:
Code Example
public async static Task<byte[]> download(IDialogContext dialog)
  {
     try
     {

        return await new WebClient().DownloadDataTaskAsync(new Uri("https://storageName.blob.core.windows.net/container/file.pdf"));
     }
     catch (Exception ex)
     {

        await dialog.PostAsync(ex);
        return null;
     }

  }

Which channel(s) are you using? Some channel only allow for bots to send certain types of files.

authors: JasonSowers mantaplatte

repo: Microsoft/BotBuilder


text:
Fix #798 hide upload button

New prop showUploadButton to hide upload button. It is default to true.

Where should this property be used in frame or within the node code .

Is there anyway to enable upload button using the backhannel feature that, when a specific event was triggered, i show it to the user?

@ernestoguimaraes Yes it's possible.
I assume you are embedding Web Chat using React. If you set the props.showUploadButton to false, the upload button will hide right away. The switch is on-the-fly and does not re-render the control.
So you will listen to backchannel, when you get the signal, you set it in your React code, done. 😃

Is there anyway to disable the upload button when using the webchat iframe?

still im not clear with that..how can i remove the image upload button from the chat withdow?

still im not clear with that..how can i remove the image upload button from the chat window?

window.WebChat.renderWebChat({
...
styleOptions: { hideUploadButton: false }
}, document.getElementById('bot'));

@nmssalman

still im not clear with that..how can i remove the image upload button from the chat window?

window.WebChat.renderWebChat({
    ...
    styleOptions: { hideUploadButton: false }
}, document.getElementById('bot'));

This did not work for me :/

@ernestoguimaraes Yes it's possible.
I assume you are embedding Web Chat using React. If you set the props.showUploadButton to false, the upload button will hide right away. The switch is on-the-fly and does not re-render the control.
So you will listen to backchannel, when you get the signal, you set it in your React code, done. 😃

@compulim Hello William,
Is there a way to do the configuration for a iframe like the following?

@CharingJC iframe Web Chat does not have a way to modify style options. Only default iframe props can be assigned (width, etc).

Greetings
Thank you so much
Get Outlook for iOShttps://aka.ms/o0ukef

From: Corina @.>
Sent: Saturday, March 13, 2021 2:49:07 AM
To: microsoft/BotFramework-WebChat @.>
Cc: CharingJC @.>; Mention @.>
Subject: Re: [microsoft/BotFramework-WebChat] Fix #798 hide upload button (#883)
@CharingJChttps://github.com/CharingJC iframe Web Chat does not have a way to modify style options. Only default iframe props can be assigned (width, etc).
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/microsoft/BotFramework-WebChat/pull/883#issuecomment-797677932, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AR3M2NTEUOJW5WJ4MM4YVULTDJHZHANCNFSM4EUEJHWA.

authors: AndrewTilson CharingJC compulim corinagum deepanigi ernestoguimaraes jvanderbiest lumayara nmssalman

repo: Microsoft/BotFramework-WebChat


text:
Support SQL Local DB 2016

In my SQLLocalDB-2016-only setup (this is what you get by installing VS2015 Update 3 on a fresh machine), CC fails to connect to default cache. I tracked down to this; I am not sure if you would consider the current approach tenable. I would rather try to connect to (LocalDb)\MSSQLLocalDB to see what happens. But I think this is how CC worked pre- b4b89e6a and there was a reason it was changed to be like it is now.
I kinda fixed it by creating an empty "12.0" subkey there, but this is just a hotwired workaround, mostly to confirm that I did find the correct spot.
/cc @tom-englert

Thanks! Looks good.

repo: Microsoft/CodeContracts


text:
Navigate to an App?

Is there a way to navigate to a specific app that was built with the new app model?

At this point there is no API that will open the new apps.  You would need to use the generic Document API's or the base driver for this.   I've added this as a work item to add these API's but just no timetable at this moment.
Thanks for the feedback

repo: Microsoft/EasyRepro


text:
SetValue results in blank field even with the bugfix

When setting a value in text field in CRM V9 the value seems to blank out again.
Using V9 branch at line 147 I can see there is a note about the bugfix, but looks to be still occurring in our case.
https://github.com/Microsoft/EasyRepro/blob/e34b5cae67393f7cc789313fd60536ae326f4fdb/Microsoft.Dynamics365.UIAutomation.Api/XrmPage.cs#L147

I'll take a look at it.

@KiavashS - I attempted to reproduce this on the latest versions using both Chrome and Internet Explorer and both Single Line of Text and Multiple Lines of Text field types, but have been unsuccessful. The supplied input values are saved successfully. My Dynamics organization is running version v9.0.1.459
Please try again and if you can still reproduce this then reopen the issue and supply the following:

Dynamics org version
Browser type/version
Code used during your test

Thanks,
Tyler

authors: KiavashS TYLEROL dtu11


text:
GraphEngine importing GML

I have a project where I need to import a large road network that is expressed/exported as GML is/are there: -

any existing or plans to create tools that can import terabytes of GML data.
any plans to provide GraphEngine extensions to perform geospatial/routing queries on graph data

@grahamehorner

the importer prototype in the repo is already capable of chewing terabytes of RDF data. So GML support could also be built upon that (relatively easily). contributions are welcomed :)

very interesting idea, but outside the scope of this repo (base GE system).

authors: grahamehorner yatli

repo: Microsoft/GraphEngine


text:
what's the Sharding strategy of GraphEngine? Can I use other db backends ?

what's the Sharding strategy of GraphEngine? Can I use other db backends ?

@BenDerPan the default sharding function is simple: (long id) => (int)(id / 8 % Global.CloudStorage.PartitionCount
You can override this with Global.CloudStorage.SetPartitionMethod(.) and align with the other backend.

@yatli thanks, and how many replicas of each shard ? can we config it in trinity.xml ? :)

use "AvailabilityGroup" to specify the availability group id.
see:
https://github.com/Microsoft/GraphEngine/wiki/config-v2#server

thanks, great!  close this now.

authors: BenDerPan yatli


text:
Dart - very poor accuracy

When I use dart as a booster I always get very poor performance in term of l2 result for regression task.
Even If I use small drop_rate = 0.01 or big like 0.3.
When I use dart in xgboost on same dataset, with similar setting (same learning rate, similiar num_trees) dart alwasy give me boost for accuracy (small but always).
But here accuracy is poor badly, like there is a bug, not just dart is not suitable for my task.
Can anyone confirm that dart is working for regression task in term of better accuracy?
My setting is as follows (part of the Python code for ramdom search of params):
lr = np.random.choice([0.01, 0.005, 0.0025])
list_count = np.random.choice([250, 500, 750, 1000])
min_in_leaf = np.random.choice([25, 50, 100])
subF = np.random.choice([0.15, 0.22, 0.3, 0.5, 0.66, 0.75])
subR = np.random.choice([0.66, 0.75, 0.83, 0.9])
max_depth = np.random.choice([9, 11, 15, 25, 45, 100, -1])
dart_rate = np.random.choice([0, 0, 0, 0.01, 0.03, 0.1])
max_bin = np.random.choice([63, 127, 255, 511])
lambda_l1 = np.random.choice([0, 1., 10., 100.])
lambda_l2 = np.random.choice([0, 1., 10., 100.])
iterace = 10000
if only_testing:
min_in_leaf = 25
iterace = 10
boost_type = 'gbdt'
if dart_rate > 0:
boost_type = 'dart'
params = {
'task' : 'train',
'boosting_type' : boost_type,
'objective' : 'regression',
'metric' : 'l2',
'max_depth' : int(max_depth),
'num_leaves' : int(list_count),
'min_data_in_leaf' : int(min_in_leaf),
'learning_rate' : lr,
'feature_fraction' : subF,
'bagging_fraction' : subR,
'bagging_freq': 1,
'verbose' : 0,
'nthread' : nthread,
'drop_rate': dart_rate,
'max_bin': max_bin,
'lambda_l1' : lambda_l1,
'lambda_l2' : lambda_l2
}
model = lg.train(
params,
(matrix_learn, target_learn),
num_boost_round = iterace,
valid_datas = (matrix_test, target_test),
early_stopping_rounds = 50
)

What is working in XGB is probably not just drop_rate but also skip_drop. http://xgboost.readthedocs.io/en/latest/tutorials/dart.html
Can you please support this as well?

@wxchan
https://github.com/dmlc/xgboost/blob/master/src/gbm/gbtree.cc#L547-L711
can you check the code of implementation in XGBoost, and figure out why?

@guolinke I read these codes before. It's not hard to be added, but I have no idea where he came upon those parameters. Btw, is this line a bug? weight_drop[idx_drop[i]] *= factor;?.

@gugatr0n1c

Can you provide how you set up skip_rate etc. for xgboost?
Do you know where xgboost gets the ideas of skip_rate, sample_type and normalize_type?
Can you show accuracy comparisons between xgboost and lightgbm (both gbdt & dart) for your task?

@wxchan, I am not familiar with XGBoost.
Following is my guess:

weight_drop is the weights of all trees, not just dropped trees, right? If yes, I think the line you refer to is a bug. it should be weight_drop[idx_drop[i]] *= factor . If this is a bug, I am not sure why XGBoost can preform better....
It seems drop tree logic is based on sum_weight in XGBoost, but LightGBM is just random. Maybe we can adapt this.

@guolinke I can add that option. I will do some investigations on this.

@wxchan
ad1] usually I run random search on parameters, and for xgboost on my datasets best setting is:
skip_rate = 0.3
drop_rate = 0.2
I use default for next two dart parameters.
ad2] actually dart for xgboost was done with my issue here
https://github.com/dmlc/xgboost/issues/809
And it seems to that marugari add skip_rate just like his idea.
On other two setting I do not know the source.
ad3]
my task is regression problem with 500k rows, 400 features, and RMSE on cross validation:
randomforest from scikit: 5.46
deepnet (5 hidden layers, prelu, adam, xavier) from mxnet 5.43
xgboost without dart: 5.421
xgboost with dart: 5.419
lightgbm without dart: 5.418
lightgbm with dart: 5.5  - not a chance to beat randomforest
For all methods I did some random search of parameters and method should be comparable in the sence of RMSE. Speed is best for deepnet - but it is different algorithm (also depends on settings and hardware).

@gugatr0n1c
Can you test two things on your dataset:

For lightgbm dart, set drop_rate to a very small number, such as drop_rate=1/num_iter; because your num_iter is big, each trees may be dropped too many times;
For xgboost dart, set learning rate=1. For dart, learning rate is a different concept from gbdt. In original paper, it's fixed to 1.

It's not so difficult to add skip_rate.
If there are users, I will PR.

@wxchan
ad1] I tried with 0.005, 0.0005, 0.0001 and got similar "bad" results... strange is that early stopping stop training very early (hundreds of iterations with compare two several thousands without dart)
ad2] I can do this tomorrow from work

@marugari where do you get the idea about skip_rate and normalize_type?
another question: when sample_type = weighted in xgboost, dparam.rate_drop * weight_drop.size() * weight_drop[i] / sum_weight (from here) can be bigger than 1, the probability of 'this' tree being selected is calculated as some number bigger than 1 but actually 1. Will it cause the expectation of dropped trees number smaller than rate_drop?

@wxchan Regarding skip_rate, All we have to do is leaving idx_drop empty.
In order to use learning_rate < 1 in dart, I propose the following:
/* dart.hpp L:103 */
if (normalize_type == 1) {
  shrinkage_rate_ = learning_rate_ / (1.0 + learning_rate_);
} else {
  shrinkage_rate_ = learning_rate_ / (drop_index_.size() + learning_rate_);
}
/* dart.hpp L:119 */
if (normalize_type == 1) {
  models_[curr_tree]->Shrinkage(-k / learning_rate_);
} else {
  models_[curr_tree]->Shrinkage(-1 / learning_rate_);
}

sample_type is very rough, since I think it's not involved in convergence.

@marugari sorry, what I meant is, is there some paper regarding skip_rate and normalize_type, because they are not shown in dart original paper?

@wxchan  sorry. They are my extensions, not published.

@marugari I see, thanks.

If you want to use skip_rate, you can arrange a callback with changing drop_rate.
Just my opinion on this: I think the parameters I add 'here' should be tested, I am not saying they are wrong, they can be wonderful ideas, but I want to be convinced before I add them 'here'. And I totally agree if other user would like to contribute to it.

@wxchan If I set in xgboost learning_rate to 1, accuracy is very bad as well, even worse than here...

@gugatr0n1c in original paper, they only use shrinkage_rate=1/(1+num_drop_trees); as marugari said, he set shrinkage_rate_ = learning_rate_ / (drop_index_.size() + learning_rate_); I think this is the main difference rather than skip_rate or sample_type.

As I wrote I did not used 'sample_type' parameter. I only used 'drop_rate' and 'skip_rate' (together with learning_rate << 1) in xgboost. And it was working nicely. I can not say now the influence of 'skip_rate'. But when I used random search for hyperparameters tuning, it always wanted to set 'skip_rate' to something non zero.
But, yes I agree that the main trick is to adapt shrinkage_rate as written.
But to be honest, if I can use below to simulate 'skip_rate', than it is not necessary to add this parameter, just maybe mention it as an example about callback? Actually it is even better solution, because I can then randomize drop_rate together with skip_rate (this is not even in xgboost) during learning process by some logic in generating drop_rate_list.
-->simulate 0.33 skip_rate
drop_rate_list = np.random.choice([0., 0.3, 0.3], iteration_count).tolist()
lg.train(
params,
data_train,
num_boost_round = iteration_count,
valid_sets = data_valid,
early_stopping_rounds = 50,
callbacks = [lg.reset_parameter(drop_rate = drop_rate_list)]
)
So I believe there are nice things to do: 1] allow change drop_rate in callback, should work now right?, 2] change shrinkage_rate as marugari wrote.

@wxchan Although weight_drop of new trees can be large, leaf values of that are scaled by learning_rate.
I think weight_drop * learning_rate = 1.0.

@marugari oh sorry, I didn't see the if (num_drop == 0) branch. My fault. I also didn't know xgboost calculates learning_rate in another place, I thought it's calculated only in CommitModel.
Then I think it's reasonable to change shrinkage_rate to see if it works. It is actually a combination of shrinkage_rate in gbdt and normalization weight in dart.

@gugatr0n1c  can you test again with latest code?

@guolinke I tried, but got error: Segmentation fault, I tried twice recompile from github
boostint_type = 'gbdt'  is OK
boostint_type = 'dart'  return Segmentation fault

@wxchan can you take a look about this?

@guolinke it seems caused by c_api because cmd line version is fine. I take a look at segfault log: it happened in Dart::Init, seems gbdt_config_ is still null after GBDT::ResetTrainingData.

@gugatr0n1c  @wxchan  fixed, can you try it again?

@guolinke training seems to be working, give you know about accuracy

@guolinke seems to be not working properly. It almost not converge (even worse than before). Seems to me that first tree is build with very large learning_rate, than additional trees has huge problem to converge.
Tried with dart_rate: 0.3, 0.05, 0.001 and with learning_rate = 0.004 and 0.1 - almost same result on all settings.

@gugatr0n1c  OK, I see.
@wxchan , I also try this, the training error is small. seems the learning rate is still wrong.

But all I change is to make learning rate a variable rather than fixed to 1. So if you set learning rate=1, it's same as before. The first tree is built with shrinkage_rate=1, it's also same as before.
I actually test this setting when I implemented dart and found it not work so well. So I didn't add it before.
Can you try to set learning rate to some number near 1 like 0.8 or 0.9? Because shrinkage_rate will divide num_drop in dart, I don't think it should set very small.

@wxchan ,
I think the weight of dropped trees is not correct now.
when learning_rate = 1.0:
weight of new tree: 1/(k+1)
weight of drop tree: 1/(k'+1) * k/(k+1).
sum of these weight is approx to 1.
current implementation:
weight of new tree: lr/(k+lr)
weight of drop tree:  lr/(k+lr)* k/(k+lr)
sum of these weights is still approx to 1.
However, I think if we add learning rate to DART, may be sum of these weights should approx to learning_rate.
So, maybe:
weight of new tree: lr/(k+1)
weight of drop tree:  lr/(k+1)* k/(k+1)
is better?

@guolinke that is exactly what I have tried before and I think it's better, that's why I said it's a combination of gbdt shrinkage rate (lr term) and dart dropped weight (1/(k+1) term).
Current implementation is according to xgboost. All we know here is xgboost dart works better on some datasets, I think we still need better theory.
By the way, I just fixed that bug of xgboost dart I mentioned it earlier, check out here.

I read the original paper and there is several thing to point out:
1] setting, where DART is beating MART is small number of trees (250), this is not typical in practice (maybe for randomforest, not for boosting on bigger datasets) - table 5., not sure if we can replicate results for 5k trees with small learning_rate (little bit questioning result from paper for bigger datasets).
2] 'core' idea is to built equivalently strong trees, this is interesting when lightgbm is building leaf_wise not level_wise - this can be different from xgboost - as in paper is shown different tree architecture figure 2.
3] Critical part for boosting is very small learning_rate, I do not believe this can substituted just by drop_rate for datasets where we need thousands of trees. Setting learning_rate to 1 kills convergence almost always after max hundreds of iterations.
4] What I believe is useful from the paper is idea of dropping trees. Because it works as next regularizer and this is what marugari did in xgboost implementation. But sure, there is no paper or something to backup this.
So bottom line: we need set learning_rate small and it is nice to have chance to drop trees as regularizer... but sure, it is little bit different against the paper. Up to you guys what to do.

@wxchan
I think xgboost using learning rate at [here](weight of new tree: lr/(k+1)
weight of drop tree: lr/(k+1)* k/(k+1)), not in GBTree.
So the learning rate of DRAT is not 1.0.

@gugatr0n1c  can you try the xgboost with latest code? @wxchan just fix bug in xgboost.

@guolinke but weight of the first tree is 1/(num_drop+lr) = 1/lr, it canceled out the lr.

@wxchan , I see.
Maybe we can do some experiments for these different settings.
I think we can choose our own algorithms, not limit to the implementation in xgboost.

I think:
weight of new tree: lr/(k+1)
weight of drop tree: lr/(k+1)* k/(k+1)

will be better. In this case, tree normalization is same as before, just new tree shrinks by lr.

@wxchan  I think this may be help

Dropped trees and new trees has similar leaf values.
It seems that shrinking just new trees is improper.

@marugari
In you implementation. if not trees are dropped, add new_tree with weight lr. Total delta weight is lr.
if trees are dropped, add new_tree with  lr/(k+lr), and shrink k trees by k/(k+lr). Total delta weight is lr/(k+lr) - k * lr/(k+lr)* w_j . w_j is the previous weight of drop tree j.
w_j can be lr * (k/(k+lr))^i  (if skipped) or lr/(k+lr)*(k/(k+lr))^i(not skip), i is drop count of this tree.
I think lr/(k+lr) - k * lr/(k+lr)* w_j  is far smaller than lr, since lr/(k+lr) < lr and it minus a positive number. And when k==0(means not drop), it equal to 1, this is not consist with your operation when not trees are dropped.
BTW,
In original paper, delta weight is:
1/(k+1) - k/((k+1)*(k+1)) = 1/((k+1)(k+1))
Do you think let delta wight approx to lr/((k+1)*(k+1)) is better?

This is a little inaccurate. I'm Sorry...
New trees and sum of dropped trees scaled by previous weights has similar leaf values.
Thus, the normalization factor is independent of previous weights.
If weights of dropped trees are small. new trees have also small leaf values.
I don't think the delta weight is suitable characteristic.

@marugari I think i understand your idea now.
You let weight of new tree approx to the sum of dropped trees,  and use skip_rate to add new tree and increase total weight?
It seems when skip_rate==0.5 has best accuracy.
My idea is let total weight to be increased at every iteration. I think this may save half of iterations while achieve same accuracy.

@guolinke You are right.
In the case of small learning_rate, skipping iterations are main sources of loss reduction.

I just push a commit at dart branch: https://github.com/Microsoft/LightGBM/commit/518bafd53570ebdf0db84aceefa989dd24a32394
It adds skip_drop and xgboost_dart_mode.
I also try some experiments, and it seems xgboost_dart_mode works well in small dataset.
@gugatr0n1c can you try this with your data?

love to test this, but have some xmas travelling now, so it will take some time..

@gugatr0n1c take you time and merry xmas!
@wxchan Do you have any comments?

It's better now. I think you can merge it to master and update docs for it.

@wxchan , I am not sure should we keep xgboost_dart_mode? And should give it a better name?

@guolinke merry xmas to you as well
I done some tests:
for xDart (xgboost_dart_mode = True) I got great accuracy - this is great for my datasets, beating 'gbdt'
for Dart (xgboost_dart_mode = False) still bad accuracy... (but done limited tests only with very small learning_rate)
But here both xDart and Dart have training very slow: 15mins (gdbt) vs. several hours for xDart, some iterations are very fast ~ 100ms, but some are about 15-20s (related to skip_drop?), DART in xgboost is not so slower to 'gbdt', is there space to speed it up?

@gugatr0n1c Really?
Yes, XGBoost-DART is very slow (espesially late in a training) because it doesn't use the buffer.
However, I seem LightGBM-(x)DART runs as fast as gbdt.

@gugatr0n1c what values of your drop_rate and skip_drop? this speed seems abnormal.

hi, erveryone, I have rencently trianed dart and gbdt model using same training data with some noise. For predictions, in general, the dart model is little better than gbdt model. I set all the same parameter learning_rate=0.0112.  I didn't try xgboost so I can't tell something.
@gugatr0n1c  I just don't know how to use mxnet to implement "deepnet (5 hidden layers, prelu, adam, xavier) ", can you provide some examples to me?  Thank you very much!

@guolinke my setting is this:
learning_rate = 0.006
up to 10k iterations with early_stopping = 50 (stopped around 5k-7k iters with 'gdbt')
drop_rate = skip_drop = 0.3
using xDART
First like 100 iterations are fast, but I can see still that some iterations are very fast some slower
But after 1k iterations it is like 100ms vs 20s
@marugari not detaily tested in xgboost, but never have this feeling that later in the training is difference so big..
@anddelu this is very big offtopic here... send me your email to my twitter PM... @gugatr0n1c

@gugatr0n1c
I know what happen now. I will try to optimize the speed.
The reason is it will drop much tree after trained many iterations, this will increase the computation cost of score.
A quick solution is reset drop_rate smaller during training.

@wxchan  if xgboost_dart_mode is better, I think we can just keep it and remove our version.
What do you think?

@guolinke It may depend on different task. Our version is based on original paper. I think it's better keep it for now.

@gugatr0n1c  I add an parameter max_drop to limit the number of dropped trees. This can help for the speed. But I am not sure how it will affect to the accuracy.
And if max_drop <= 0, it means not limit.
I will close this issue for now, feel free to open an new issue if it cannot speed up or have much loss on accuracy.

@guolinke thx, I will run some tests after New Year

authors: anddelu gugatr0n1c guolinke marugari wxchan

repo: Microsoft/LightGBM


text:
Pdb not found / mismatch so I can't debug

.NET Core 2.1.301 (Both windows and linux)
VS 15.7.4
Yes, I use <DebugType>portable</DebugType>
Command used:

Debug.MIDebugLaunch /Executable:"C:/Users/pc/Desktop/shared_linux_vm_folder/ConsoleApp1/Linux_MyApp/bin/Debug/netcoreapp2.1/Linux_MyApp.dll" /OptionsFile:"C:/Users/pc/Desktop/shared_linux_vm_folder/ConsoleApp1/Linux_MyApp/options.xml"

Output Window:

Using arguments
Version                    : 'vs2015u2'
Location                   : '/home/pc/.vs-debugger/vs2015u2'
SkipDownloads              : 'true'
LaunchClrDbgAfter          : 'true'
RemoveExistingOnUpgrade    : 'false'
Info: Using clrdbg version '15.0.26022.0'
Info: Last installed version of clrdbg is '15.0.26022.0'
Info: ClrDbg is upto date
Info: Skipping downloads
Info: Launching clrdbg
Loaded '/home/pc/workarea/software/dotnet/shared/Microsoft.NETCore.App/2.1.1/System.Private.CoreLib.dll'. Cannot find or open the symbol file.
Loaded '/mnt/hgfs/shared_linux_vm_folder/ConsoleApp1/Linux_MyApp/bin/Debug/netcoreapp2.1/Linux_MyApp.dll'. Cannot find or open the symbol file.
Loaded '/home/pc/workarea/software/dotnet/shared/Microsoft.NETCore.App/2.1.1/System.Runtime.dll'. Cannot find or open the symbol file.
Loaded '/home/pc/workarea/software/dotnet/shared/Microsoft.NETCore.App/2.1.1/System.Runtime.Extensions.dll'. Cannot find or open the symbol file.
Loaded '/home/pc/workarea/software/dotnet/shared/Microsoft.NETCore.App/2.1.1/System.Console.dll'. Cannot find or open the symbol file.
Loaded '/home/pc/workarea/software/dotnet/shared/Microsoft.NETCore.App/2.1.1/System.Threading.dll'. Cannot find or open the symbol file.
Hello World!
The program '' has exited with code 0 (0x0).

As you can see, it says: "Linux_MyApp.dll'. Cannot find or open the symbol file."
To diagnose this I dumpbin'ed the .dll headers out and it shows a windows path to the pdb, but even when I compile on linux (which then uses a windows path) it still wont find the pdb so it must be a mismatch of the pdb internal guid(?) or something, I'm not sure how to diagnose this any further, much less fix it.
I also tried enabling logging with Debug.MIDebugLog  /On /OutputWindow but it shows no further error messages or relevant info.
Weird: I can attach and the symbols will be loaded if I start the app on linux first manually and then attach to it via visual studio. Of course this is too cumbersome to constantly do manually.
It does say though "Breakpoint warning: A copy of C:\Users\pc\Desktop\shared_linux_vm_folder\ConsoleApp1\Linux_MyApp\Program.cs was found in Linux_MyApp.dll, but the current source code is different from the version built into Linux_MyApp.dll." which shouldnt be the case either.

@Meai clrdbg is no longer being maintained, and will not work correctly with .NET Core 2.1 applications. You want to switch over to using vsdbg. Instructions: https://github.com/Microsoft/MIEngine/wiki/Offroad-Debugging-of-.NET-Core-on-Linux---OSX-from-Visual-Studio

authors: Meai gregg-miskelly

repo: Microsoft/MIEngine


text:
Color Theme for PTVS

Hello,
Is there any good color theme for PTVS? I would prefer a dark theme, but many are not ready for Python syntax. If you like any color theme for working with PTVS please let me know.
Thank you,
Marcio

The built-in Dark theme in Visual Studio is probably the only one that properly handles Python syntax, since that's the one that we can update when we install PTVS.
If you look under Tools, Options, Fonts and Colors you'll find a number of "Python ..." items that can be modified. Other themes will need to set those as well to handle Python syntax, but you can always modify them yourself.
I'm sure the other theme developers would appreciate suggestions on what colours they could use there, but I don't know how best to get in contact with them. Chances are they don't even know about PTVS :)

authors: arqeco zooba

repo: Microsoft/PTVS


text:
Error when trying to connect to local workspace

I'm having trouble to connect to my local pbix files and the application reports an error message saying:
Analysis Server localhost:60343 is not running in Tabular mode

Both Source and Target files are open and I have verified that I actually can connect to the local workspaces using SSMS

Hi, it currently doesn't work with the local Power BI Desktop AS instance. When we open up the XMLA endpoint on Power BI (soon), it will work with the Power BI service in the first version

Ah!
Thanks for the info Christian!

No problem!

authors: MagAlp christianwade

repo: Microsoft/Power-BI-ALM-Toolkit


text:
Change tsconfig.json in TS template to match http://json.schemastore.…

tsconfig.json content should be {compilerOptions...} instead of { tsCompilerOptions.. } as specified in http://json.schemastore.org/tsconfig

@guillaumejenkins  can you review this?

This is correct, good catch
:+1:

I was just looking over this PR to see if we should merge it, but it looks like there are more references to tsCompileOptions in the code which might need to be modified as well. @guillaumejenkins can you look into this and verify that after we take the change everything still works? The other references might just be for our own compilation/gulp scripts.

What Jimmy means is that in src\build_config.json, src\gulpmain.ts and src\gulpfile.js, we have an object called "tsCompilerOptions". That object is an option bag that we give to gulp-typescript. Gulp-typescript only cares about the contents of the object, not its name, so nothing is broken by rido's change.
However, for the sake of consistency, we might as well rename our options bag object. I'll do this in a separate change to make sure we do the proper validation.

authors: MSLaguana guillaumejenkins nisheetjain rido-min

repo: Microsoft/TACO


text:
Enums

regular enums, Const enums, different in lining rules

https://github.com/Microsoft/TypeScript-Handbook/blob/master/pages/Basic Types.md#enum

#71

authors: DanielRosenwasser mhegazy

repo: Microsoft/TypeScript-Handbook


text:
Typescript crashes when a file starts with a comment and import statements are in it

TypeScript Version:  1.8.10
Code
/*
import { SomeImport } from 'example';

^
this import statement makes typescript crash,
but actually it's a comment..
*/

import { platformBrowserDynamic } from '@angular/platform-browser-dynamic';
import { AppModule } from './app.module';
platformBrowserDynamic().bootstrapModule(AppModule);

Problem
Comments with import statements at the beginning of the file let typescript crash. error is:
ERROR-Message:
zone.js:101 GET http://localhost:3000/traceur 404 (Not Found)
minimal-project-with-bug-typescript.zip
minimal project with this bug - source code
http://plnkr.co/edit/fdGzQPHSBy12rYdPwNNP?p=preview
Expected behavior:
a comment should not affect the behaviour
Actual behavior:
the code in the comment affects the behaviour

That error doesn't look like it comes from TypeScript at compile time. Isn't that a runtime error - a HTTP 404?

Hi @yortus,
I'm not sure if it's caused by typescript or any of the node_modules of the angular2 application, because there are absolutely no useful error logs.

I think the problem is related to SystemJS. When you change the SystemJS transpiler from Traceur to TypeScript you get an similar error message (http://localhost:3000/ts 404 instead of http://localhost:3000/traceur 404). I don't think that the problem is related to TypeScript because the code is compiling fine.

None of these errors come from TypeScript. Stack Overflow may be useful to help you identify a root cause; we cannot due external product support in the TS bug tracker.

authors: RyanCavanaugh phip1611 vkennke yortus

repo: Microsoft/TypeScript


text:
Bug: Recursive generic union type synonyms cause poor compiler performance

TypeScript Version: 1.8.10 and 2.1.0-dev.20160818
Code
type T = { a: TSynonym }
          | { b: TSynonym }
          | { c: TSynonym }
          //| { d: TSynonym }
type TSynonym = T

function f(): T {
    return g()
}
function g(): T {
    // return h()
}
function h(): T {

}

Expected behavior:
Type error, in a reasonable length of time (because g and h do not return a value).
Actual behavior:
This example takes over 7 seconds to (fail to) compile on my machine (a new, maxed-out MacBook Pro) and peaks at over 400MB of memory. Uncommenting the fourth line of T's declaration causes the compiler to crash with an out-of-memory error after about a minute. Uncommenting the call to h doubles the compilation time to 14 seconds and increases peak memory usage to over 1GB.
Removing TSynonym (so that the body of T uses T directly), or removing all the generic types, improves the performance significantly.
My guess is that the type-checker is recursively expanding the definitions of T and TSynonym when it tries to type-check the functions, resulting in a very large quantity of nested union types.
Here is the output of tsc with the --diagnostics flag:
Files:               2
Lines:           19030
Nodes:           98142
Identifiers:     35533
Symbols:        354868
Types:          755366
Memory used:   611459K
I/O read:        0.00s
I/O write:       0.00s
Parse time:      0.14s
Bind time:       0.10s
Check time:      6.73s
Emit time:       0.00s
Total time:      6.97s

Hi,
this issue can still be reproduced with current master (9afb07de5a0bcfba871ec8745d795b4f6359de7c). On my machine, the example takes 8 seconds to compile, and if the fourth line is commented out, node crashes with "JavaScript heap out of memory".

looks like a duplicate of the same underlying issue in https://github.com/Microsoft/TypeScript/issues/10759.
Anonymous types are not cached when doing generic instantiations, causing a lot of these to happen than there should be. the work around is to use named types. e.g.:
interface A<T> {
    a: TSynonym<T>
}
interface B<T> {
    b: TSynonym<T>
}
interface C<T> {
    c: TSynonym<T>
}
interface D<T> {
    d: TSynonym<T>
}
type T<V> = A<V> | B<V> | C<V> | D<V>;
type TSynonym = T

function f(): T {
    return g()
}
function g(): T {
     return h()
}
function h(): T {

}

This has been fixed by the type alias instantiation caching logic that was added in #12114. The OP example now type checks in effectively zero time.

authors: ahejlsberg benjamin-hodgson kpreisser mhegazy


text:
VisualStudio 2015 Update 3 - Comment/uncomment selection does not work for .ts files anymore.

TypeScript Version:  2.0.2 Beta
VisualStudio 2015 Update 3
Expected behavior:
The selected text/line we're on should be commented/uncommented
Works fine in the other file types I've tried it on (html, js, cs, scss)
Actual behavior:
Selected text/line is not commented/uncommented.
Visual Studio says:
"The key combination (Ctrl + K, Ctrl + C) is bound to command (Comment Selection) which is not currently available."

Seems working fine locally. do you see this on other machines? are other features impacted? do you have any extensions?

Thanks for the reply. Might be just my setup then :/
I've tried to disable all extensions that I can disable, and suspended ReSharper without any luck.
I haven't check any other machines, but I'll set up a clean VM and check it out.

Works as expected in the new clean VM.
Sorry for the false alarm.

This can be fixed without reinstalling on clean VM. Just use the solution provided here
https://github.com/Microsoft/TypeScript/issues/7519
Try deleting: %localappdata%\Microsoft\VisualStudio\14.0\ComponentModelCache,
And run devenv /setup from the Developer Command Prompt for VS2015 (as an admin).
I experienced the same CommentSelection command disappear after installation of TypeScript for Visual Studio 2015 tools on 20,11.2016 and fixed using method above.
https://www.microsoft.com/ru-ru/download/confirmation.aspx?id=48593

authors: RodionKulin mhegazy ruant


text:
instanceof with class-like variable RHS erroneously narrows "else"

TypeScript Version:  2.2-rc
Code
class Prop<T> {
    arg: T;
}

interface PropClass<T> {
    new(): Prop<T>;
    prototype: Prop<T>;
}

function check<T>(p: Prop<{}>, specialSubclass: PropClass<T>) {
    if (p instanceof specialSubclass) {
        p.arg; // ok, arg has type T
    } else {
        p.arg; // error here: Property 'arg' does not exist on type 'never'.
    }
}

Expected behavior:
p should have type Prop<{}> in the else block.
Actual behavior:
p has type never in the else block.
Because specialSubclass is a class-like object with instance type Prop, TypeScript is assuming that instanceof returning false implies the object is not a Prop. This is a bad assumption, because in this kind of code instanceof only returns true for members of some (unknown) subclass.
instanceof should narrow the false case only if the RHS is an actual class reference. If it's a variable of a class-like type, it should only narrow the true case.

This works in nightly.

This works in nightly.

I do not think so.

The Type system in TS is structural. so the checking for instanceof is rather an approximation to what happens at run time (which is nominal).
you could however, try and trick the compiler by using generic type parameters, these will not be narrowed to never since they are not assignable to the instance of your other argument. e.g.: function check<T, U extends Prop<{}>>(p: U, specialSubclass: PropClass<T>).

The Type system in TS is structural. so the checking for instanceof is rather an approximation to what happens at run time (which is nominal).
Right, I understand that due to structural typing {arg:string} is considered the same type as Prop<string>, and so TS acts as if instanceof Prop returns true on it. That's a tad unfortunate but it's actually not the issue here.

My issue is that a value that is (both structurally and nominally) of a class, is getting narrowed away due to instanceof on a subclass returning false. Even if class types were treated 100% nominally this would still be a problem.
If the RHS of instanceof is literally the class A, then it's correct to narrow A away when it returns false (other than the structural/nominal issue). But if it's a variable of type new() => A, it's generally some subclass of A, not A itself - so one can't reasonably assume anything about the object's type from instanceof returning false.

you could however, try and trick the compiler by using generic type parameters, these will not be narrowed to never since they are not assignable to the instance of your other argument. e.g.: function check<T, U extends Prop<{}>>(p: U, specialSubclass: PropClass<T>).

Prop<{}> is already unassignable to Prop<T>. Even though this issue has existed in some form since TS 1.8 (PR 5092), the non-assignability would prevent the false-side narrowing for this particular piece of code, until PR 13230. I don't think it makes any sense that Prop<{}> gets narrowed to Prop<T> on the true side and to never on the false side, or that one should have to make it "even more unassignable" to Prop<T> to prevent that.

The bug is still present in 2.3rc and in master

authors: aluanhaddad jeffreymorlan mhegazy


text:
Duplicate identifier error with readonly/getter, class and merged interface

TypeScript Version:  2.2.1
I'm having a lot of trouble finding an explanation for the errors below:
Code
// Co-named interface and class doesn't like readonly property implementation:

interface Foo {
  readonly x: number; // Error: Duplicate identifier 'x'
  y: number;
}

class Foo {
  get x(): number { // Error: Duplicate identifier 'x'
    return 0;
  }

  y = 1;
}

// Same as above, but different class name + explicit `implements`

class Bar implements Foo {
  get x(): number { // No error!
    return 0;
  }

  y = 1;
}

// Duplicating the first example, but explicitly implementing the co-named interface:

interface Baz {
  readonly x: number; // Error: Duplicate identifier 'x'
  y: number;
}

class Baz implements Baz {
  get x(): number { // Error: Duplicate identifier 'x'
    return 0;
  }

  y = 1;
}

Why does TypeScript complain about duplicate identifiers between a readonly field in an interface that merges with a class that implements that field as a getter?

An interface and a class with the same name "merge".
more information can be found at: http://www.typescriptlang.org/docs/handbook/declaration-merging.html

@mhegazy
I have the same question with this. For property and it's getter, type checker should not consider them as different during merging.
Also, there's some other question: when readonly property being merged, the property can not be assigned in constructor.
interface Rect {
    width: number;
    height: number;
    readonly area: number;
}

class Rect implements Rect {
    readonly area: number;
    constructor(public x: number,public y: number){
        this.area = this.width * this.height; // Error: Cannot assign to 'area' because it is a constant or a read-only property.
    }
}

authors: axefrog mhegazy uushuo


text:
Type inference for indexed array element

TypeScript Version:  2.6.1
Code
/* EXAMPLE 1 */
var a: (number | undefined)[] = [1, 2, undefined, 4];
var b = a[2];
if (b) {
    b;  // number
}
if (a[2]) {
    var c = a[2];  // SHOULD be number BUT is number | undefined
}

/* EXAMPLE 2 */

function aa(a: (number | undefined)[]) {
    for (var i=0; i<a.length; i++) {
        if (a[i]) {
            var p = a[i]; // SHOULD be number BUT is number | undefined
        }
    }
}

Part of #9998
(I thought there was something more specific to tracking array index accesses, but couldn't find it)

Duplicate of https://github.com/Microsoft/TypeScript/issues/10530

authors: kitsonk mhchem mhegazy


text:
ES6 Conversion error，

this is my code
[...Array(10).keys()]
The result is on the official website
Array(10).keys().slice();
But it is wrong
Uncaught TypeError: Array(...).keys(...).slice is not a function     at <anonymous>:1:18

TypeScript doesn't polyfill methods - if you are running on a runtime without Array#keys, you need to provide the polyfill yourself

Which runtime can run that ES5 output from Typescript? In Node v8.6.0, Firefox, and Chrome:

Array(10).keys() works
[...Array(10).keys()] works

but the transpiled ES5 output from the 2nd one there (Array(10).keys().slice()) causes TypeError: Array(...).keys(...).slice is not a function in Firefox, Chrome, and Node 8, even though the original ES6 does work.

@j127 that code is flagged as an error when targeting ES5

If you run with --target ES5 --lib es6 --downlevelIteration, which is the only way to have that code not issue a type error, then we emit a proper spread helper:
var __read = (this && this.__read) || function (o, n) {
    var m = typeof Symbol === "function" && o[Symbol.iterator];
    if (!m) return o;
    var i = m.call(o), r, ar = [], e;
    try {
        while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
    }
    catch (error) { e = { error: error }; }
    finally {
        try {
            if (r && !r.done && (m = i["return"])) m.call(i);
        }
        finally { if (e) throw e.error; }
    }
    return ar;
};
var __spread = (this && this.__spread) || function () {
    for (var ar = [], i = 0; i < arguments.length; i++) ar = ar.concat(__read(arguments[i]));
    return ar;
};
var p = __spread(Array(10).keys());

Thanks. Isn't that still a bug though? (or at least undesired behavior) I have it set to output ES5 in my tsconfig file, and it's compiling working JavaScript to non-working JavaScript.

Isn't that still a bug though?

If target is es5 then we can't just emit the spread as-is, because spreads are not legal ES6. What do you propose we do differently?

Sorry if I'm confused here. I'm not understanding why it would transpile code to Array(10).keys().slice(). Is there any ES5 interpreter that can run that code?
The output doesn't seem to match the target. If you're writing ES6/Typescript and transpiling to ES5, it seems like the transpired version should work in ES5 browsers. Node 9.5, Chrome 64, and Firefox 59 can't run that "ES5" snippet.

Under the constraints given, TS can't emit correct code, so it issues an error and tries to do the best it can.
What would you expect to be emitted instead?

What would you expect to be emitted instead?

I expect to write ES6 code and have it transpiled to code that runs in the most common ES5 interpreters. :)
Right now, I'm writing valid ES6 and Typescript doesn't transpile it to working ES5. The exact output doesn't matter -- just that it runs.
I don't know the best way to do it, but this is one way that works:
// ES6
[...Array(10).keys()]
// => [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]

// working ES5
Array.apply(null, Array(10)).map(function (_, idx) {return idx;});
// => [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]

I expect to write ES6 code and have it transpiled to code that runs in the most common ES5 interpreters. :)

I think your expectation has to be "TypeScript emits code that runs in the specified runtime, or issues an error when it can't". TypeScript issued an error in this case; you can't expect code to work if TS has told you (in one way or another) that it can't emit correct code.
Your proposed emit only works for the exact special case of spreading Array.keys; there are many other iterator-returning functions that can't be turned into a map call.

Thanks, I see the error now when running it from the command line. I missed it when compiling from VS Code. I only saw the broken output file, assuming that it was supposed to work. Sorry for my confusion.

authors: RyanCavanaugh j127 lwpersonal


text:
OpenExternalProjects command doesn't work in latest master (typescript@next)

We use integration with the typescript service. After a0190e397abd2ca7fbff948f869f6e9573c0b117
(editorServices.ts line 2615  I guess) the typescript service command "OpenExternalProjects" doesn't work properly. The open project always stands empty  because of "pendingReload".
The test case:

Call OpenExternalProjects for some tsconfig.json
Open file under the tsconfig (but tsconfig must be not in the same or parent directory). e.g.
project/config/tsconfig.json:
{ "include": [  "../foo.ts", ] }
project/foo.ts
class Foo {}

Expected: file is open as part of the project
Actual: file is open under "inferred" project
//cc @sheetalkamat

seems the problem was resolved in the current typescript@next.


text:
React StatelessComponent regression

TypeScript Version: 3.2.0-dev.20181103
Code
import React = require("react");
class C<P> extends React.Component<{ component: React.ComponentType<P> } & Partial<P>> {}
declare const myStatelessComponent: React.StatelessComponent;
<C component={myStatelessComponent} />

Expected behavior:
No error, as in ts3.1.
Actual behavior:
src/a.tsx:4:4 - error TS2322: Type 'StatelessComponent<{}>' is not assignable to type 'ComponentType<{ component: {}; }>'.
  Type 'StatelessComponent<{}>' is not assignable to type 'StatelessComponent<{ component: {}; }>'.
    Types of property 'propTypes' are incompatible.
      Type 'ValidationMap<{}> | undefined' is not assignable to type 'ValidationMap<{ component: {}; }> | undefined'.
        Type 'ValidationMap<{}>' is not assignable to type 'ValidationMap<{ component: {}; }>'.
          Property 'component' is missing in type 'ValidationMap<{}>'.

4 <C component={myStatelessComponent} />
     ~~~~~~~~~

  src/a.tsx:2:38
    2 class C<P> extends React.Component<{ component: React.ComponentType<P> } & Partial<P>> {}
                                           ~~~~~~~~~
    The expected type comes from property 'component' which is declared here on type 'IntrinsicAttributes & IntrinsicClassAttributes<C<{ component: {}; }>> & Readonly<{ children?: ReactNode; }> & Readonly<{ component: ComponentType<{ component: {}; }>; } & Partial<{ component: {}; }>>'

Found 1 error.

Discovered in redux-form on DefinitelyTyped.

The error is correct - you want myStatelessComponent to be a React.StatelessComponent<any> or React.StatelessComponent<{component: React.StatelessComponent<any>}> and not a React.StatelessComponent<{}>. Why, you ask? Because C claims that it takes a component which takes the same props it does. If you pass a stateless component that only takes {}, it does not take the component property that the component itself is passed in thru. 😄
The error being on the propTypes member rather than somewhere more useful is something the react .d.ts authors know of and are looking into.

authors: andy-ms weswigham


text:
New Website Logo: LiveBet

Please fill the following out:

Name: LiveBet
Homepage url: http://www.livebet.com/
Brand Guidelines/Licensing: Feel free to use the logo in white or black background
Logo: http://www.livebet.com/a/img/LiveBet_600x220.png

Example:
Name: Microsoft
Homepage url: https://microsoft.com
Brand Guidelines/Licensing: https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/logo.aspx
Logo: https://news.microsoft.com/microsoft-news-center-photos/msft_logo_rgb_c-gray/

Should be in the next site update in the next few days.

authors: mhegazy michalas


text:
Fixes to @augments handling

Fixes #18740
We will now get a superclass from @augments even if there is no extends.
Allows us to parse /** @augments A */ without the curly braces, because that seems to be the style.
We will no longer parse arbitrary types, only a class (qualified) name followed by type arguments. So you can't declare to inherit from () => void without parse errors.
Adds errors for:

@augments tag not on a class
@augments A but extends B

@andy-ms <> aren't legal characters on Windows file systems. I can't git pull after this commit:
E:\src\TypeScript>git pull upstream master
From https://github.com/Microsoft/TypeScript
 * branch                  master     -> FETCH_HEAD
error: unable to create file tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.<> characters.json: Invalid argument

Note: i can just update my .gitignore but FYI

authors: andy-ms minestarks


text:
Port generated lib files

Ports changes in https://github.com/Microsoft/TSJS-lib-generator/pull/383

@mhegazy This change broke my code because selectionStart: number is now selectionStart: number | null on interface HTMLInputElement. The same for selectionEnd.
However I don't believe this is correct because MDN doesn't mention that the property is nullable.
When would this return null?

Please file a new ticket and will get it fixed.

@mhegazy Thanks, I created #23094

authors: mhegazy styfle


text:
Use addRelatedInfo.

Addresses https://github.com/Microsoft/TypeScript/pull/25359#discussion_r199599823

@DanielRosenwasser Missing semicolon XD

authors: DanielRosenwasser weswigham


text:
[Salsa] Adding base indentation for script block formatting and smart indent

[Salsa] Adding base indentation for script block formatting and smart indent

@vladima @mhegazy: can you take a look at this?

can you also add fourslash tests for formatting/indentation that will use BaseIndentSize?

Good idea - will add some tests.

:+1:

authors: jramsay vladima


text:
RFC: Background object cache maintenance job

The (shared) object cache is growing to be large. This includes:

Number of loose objects.
Number of pack-files.
Size of pack-files.

There are some things we can do to improve this situation, with varying levels of difficulty and benefit. Here are the four items I believe will have a strong impact on our data size and performance:
I. Delete loose objects that exist in pack-files.
II. Place loose objects into pack-files.
III. Repack some prefetch packs into larger packs.
IV. Delete packs with no objects referenced by the multi-pack-index.
These are numbered by order of implementation, but they work together in an interesting way. If we place loose objects into pack-files (I), then the next time we delete loose objects (II) we will delete those objects that we just put into a pack-file. If we repack some prefetch packs into larger packs (III), the multi-pack-index will use the "newer" pack for all objects in those packs, and we can delete them (IV).
In order to perform this maintenance without disrupting users, we can actually do these interactions in two independent jobs, with their sub-actions in a particular order:
A. Loose Object Maintenance

Delete loose objects that exist in pack-files.
Place loose objects into pack-files.

B. Prefetch Pack Maintenance

Delete packs with no objects referenced by the multi-pack-index.
Repack some prefetch packs into larger packs.

Care must be taken to ensure that Git processes that initialized their object store before the maintenance   still succeed. Thus, we should never delete anything that those processes could be reading from. This is why we delete loose objects only if they are referenced by pack-files. This is why we delete prefetch packs only if they have no objects referenced by the multi-pack-index. Since a second run of these jobs could delete objects that were repacked in the previous run, we need to space our job runs such that no Git processes span both runs.
Loose Object Job
The loose object job can save users who have many loose object downloads. These loose objects are populated by several user activities: running git fetch will get loose commits and trees for the ref tips that are not covered by prefetch packs, hydrating a file will trigger a loose blob, and many other. Older enlistments have many loose commits and trees due to the behavior of git fetch before the --no-show-forced-updates option.
Delete loose objects that appear in a pack-file
By running git prune-packed -q with the environment variable GIT_OBJECT_DIRECTORY set to the object cache, Git will delete the loose objects that exist in a pack-file. This will use the multi-pack-index to test containment, so is only bound by the file-deletion operations.
Pack loose objects that do not appear in a pack-file
We can use git pack-objects -q <object-dir>/pack/loose-<timestamp> to create a pack-file filled with a list of loose objects. We can pass the list of loose objects to this command through stdin. We can choose to batch this operation by limiting the number of objects we pack at a time, if we want. We may also want to skip this step if the number of loose objects is low (< 1,000? < 10,000?)
By listing a timestamp in the pack-file name, we can store the "most-recent" time this job was run.
Note: While we are thinking about packing loose objects, we can consider deleting some loose blobs. It is easier to delete loose blobs than packed blobs. If we want to delete "stale" blobs, then we should add a step to this job.
Prefetch Pack Job
We store a list of prefetch packs as <object-dir>/pack/prefetch-<timestamp>-<sha>.[pack|idx]. These are downloaded at a regular cadence by the post-fetch job, and could have a new pack-file for every hour. In addition to these prefetch packs, some daily prefetch packs will appear and occasionally a very large prefetch pack covering everything more than 30 days old. This large prefetch pack appears on initial clone and sometimes again if a user does not prefetch for 30 days (this occurs less often now that background prefetch exists).
Delete pack-files with no objects referenced by the multi-pack-index
The multi-pack-index stores a single copy of every packed object. When an object appears in multiple pack-files covered by the multi-pack-index, we select the pack-file with the most-recent modified time as reported by the filesystem. For example, if someone downloads a second large prefetch pack when prefetching for the first time in 31 days, then that large prefetch pack is referenced and all older prefetch packs are "stale" and not referenced by the multi-pack-index.
We can extend the git multi-pack-index builtin to delete pack-files that have no objects referenced by the multi-pack-index. This should happen at the same time as we update the multi-pack-index since we don't want to have this list of pack-files in the multi-pack-index if they don't exist. We also don't want to remove them from the multi-pack-index while the pack-files still exist, because then a Git process will start referencing those pack-files in the packed_git linked list.
Repack the prefetch pack-files
We can reduce the number of prefetch packs and improve file locality by combining prefetch packs into new "repacked" pack-files. Use git show-index <object-dir>/pack/prefetch-<timestamp[i]>-<hash[i]>.idx to list the objects in the prefetch packs and pipe that output to git pack-objects -q <object-dir>/pack/repacked-<timestamp>.
We should refrain from packing the most-recent prefetch packs, as we don't want to get in the way of the prefetch machinery for determining the most-recent timestamp. We could, however, start repacking the prefetch packs from oldest-to-newest, stopping in the most-recent week, or when the prefetch packs are large enough to satisfy a batch. Some stopping conditions could include "pack-file size is above 1GB".
Running the Jobs
We already have a post-fetch job that is automatically queued in the background. We should rename this job to be a "maintenance" job that could trigger several actions. The maintenance job should run every 15 minutes (as the post-fetch job currently does) but then it should check each "sub-job" for a timing condition to run again.
For example:

The post-fetch job doesn't trigger if the most-recent prefetch pack timestamp is within the last 70 minutes.
The loose object job doesn't trigger if the most-recent "loose" pack timestamp is within the last 24 hours.
The prefetch repack job doesn't trigger if the most-recent "repacked" pack timestamp is within the last 7 days or the most-recent "repacked" pack is modified within the last 24 hours.

Each job that may delete data should take a file-based lock on the object cache. This could be a "maintenance lock".
In addition to this background activity, we can enable manually running these jobs as a verb, say gvfs maintenance.
Secondary Concerns
We will want to track some data improvements using logging. We could report the number of loose objects before and after the loose object job, for instance. We could report the number and total size of pack-files, possibly grouped by the prefix; we expect pack-files with prefixes including "pack", "prefetch", "loose", and "repacked".

Mentioning @jrbriggs, @sanoursa, @kewillford, @wilbaker, @jamill, @nickgra, @alameenshah, @jeschu1, @mjcheetham for feedback. Thanks!

Please use this PR review for comments.

Use #492 for further design discussion. The problems this design tries to solve are covered in #85.

Reopening, as this is rewritten to be about the new cleanup steps to add in the future. @jeschu1 is working on the loose object cleanup step next, I believe.

repo: Microsoft/VFSForGit