text:
Ticking Block Entity Crash when entering Dim with Builder running as Silk Quarry

Getting this consistently.
Set up a builder with a clearing silk quarry card.  512, 256, 512 region, offset to quarry from sky to bedrock.  Work great, super fast.  Skips hives and draconic ore, but I can deal with that.  However, I'm consistently getting a crash if I log out for the day, and come back to what I assume is a finished quarry.  I get a ticking block entity on the builder when entering the dimesion, resetting the minecraf t instance. If the quarry hasn't finished yet, I'll sometimes get a ticking block entity, the server will crash, and when it comes back up, I'm able to get back into the dimension. If the quarry has (I assume, I've never been able to get in to check) finished, just consistent crash.  I've worked around this by removing my player data, coming back to the server, shutting down the dimesion, and rebuilding it with a different digit.  I suppose I could use the EIO quarry, but I'd rather use the speedy RFTools builder for that.  One caveat, the builder has two tesseracts on it, one for items and energy, the other for just energy.  Perhaps that's causing this. Additionally, I'm keeping the builder itself loaded with a Railcraft Admin Anchor. Here's the basic bits of the crashlog:
---- Minecraft Crash Report ----
// Why is it breaking :(
Time: 1/28/16 2:22 PM
Description: Ticking block entity
java.lang.NullPointerException: Ticking block entity
at net.minecraft.item.ItemStack.func_77976_d(ItemStack.java:187)
at net.minecraft.item.ItemStack.func_77985_e(ItemStack.java:192)
at mcjty.lib.container.InventoryHelper.mergeItemStackInternal(InventoryHelper.java:58)
at mcjty.lib.container.InventoryHelper.mergeItemStackSafe(InventoryHelper.java:38)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.checkAndInsertItems(BuilderTileEntity.java:1127)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.checkAndInsertItems(BuilderTileEntity.java:1112)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.silkQuarryBlock(BuilderTileEntity.java:973)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.handleSingleBlock(BuilderTileEntity.java:888)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.handleBlockShaped(BuilderTileEntity.java:797)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.checkStateServerShaped(BuilderTileEntity.java:661)
at mcjty.rftools.blocks.spaceprojector.BuilderTileEntity.checkStateServer(BuilderTileEntity.java:682)
at mcjty.lib.entity.GenericTileEntity.func_145845_h(GenericTileEntity.java:50)
at net.minecraft.world.World.func_72939_s(World.java:1939)
at net.minecraft.world.WorldServer.func_72939_s(WorldServer.java:489)
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:636)
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:334)
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:547)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:427)
at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:685)

Can't reproduce this but I did a blind fix that should hopefully fix this for 4.21 (soon to be released)

I recently crashed too, i shift r-clicked the builder clicked 2 points around 100 blocks from each other and tried to swap to the sphere shape since i wanted to make a sphere shield, but crashed. Confirmed in latest release weird it did not give me a crash report, but it gave me a log thing in the main folder.
Crash log thing.txt

maybe I should make my own issue . . . not sure if you will see this in a closed thread. . .

authors: Aoxmodeus McJty lAimBotl


text:
Broken texture image in sky for various dimensions

I've been seeing the magenta two offset squares thing in the sky somewhat often in various dimensions. First time, I thought it might be some sort of double moon/planet or something. But last night, there were giant ones wrapping around the sky, and it was quite obvious. Doing /rftdim info [dim number here] told me it was supposed to be the inferno sky. I do have a screenshot, but I'm pretty sure you know what the broken texture thing looks like. :)
rftools-1.10-5.26.jar, rftoolsdim-1.10-4.40.jar, mcjtylib-1.10-2.1.3.jar, on Forge 2094 and MC 1.10.2.

Hmm I'll check it out. Did you have any celestial bodies in your dimension?

I'll take a look shortly at the inferno one to find out. Just needed to MCEdit out some blocks because Chisel is causing Botania to crash the client on load. Yay.

The complete info is:
Dimension ID 7
Description string @Bminecraft:mutated_swampland,CSingle,#mminecraft:stone@0,TFlat
Owned by: Addle42
Base seed: 1956332983
World version: 1
Terrain: TERRAIN_FLAT
Base block: Stone
Base fluid: null
Biome controller: CONTROLLER_SINGLE
Biome: Swampland M
Sun brightness: 1.0
Star brightness: 1.0
Sky color: 0.0, 0.6, 0.6
Fog color: 1.0, 1.0, 1.0
Sky type: SKY_INFERNO
Weather rain: 1.0
Mob: net.minecraft.entity.monster.EntitySilverfish
Doesn't seem to say there, but looking around, all I have in the sky are giant magenta offset squares wrapping around the horizon. I see no celestial bodies.
A lovely dimension, isn't it? As a side note, I forgot to put it back in the Dimension Builder before going to look for celestial bodies, and died in a collapsing world. Go me. lol
P.S. Button doors still suck.

Fixed next release. Note try to report dimension issues in the RFTools Dimension issue tracker

Thanks! And oops, I derped. I did mean to report it in the RFTools Dimensions issue tracker, I swear. XD

source: gharchive/issue

authors: McJty RealGrep

repo: McJty/RFTools

license: mit

license_type: permissive

license_source: bigquery


text:
whe scaleSimMat?

Excuse me, I am confused about the fuction ScaleSimMat, why do you use this fucntion before RandSurf and GetPPMIMatrix, why not use the native adjMatrix?

I got it, it present the probability while random surfing . Sorry to bother u

repo: MdAsifKhan/DNGR-Keras


text:
Allow redirects in curl

Some PIP packages have canonical names that redirect to a secondary URL when polling pypi (e.g. https://pypi.org/simple/discord.py/ redirecting to https://pypi.org/simple/discord-py/) - this would allow curl to follow these redirections.

Hi there, thanks for the contributions!
One interesting note on this change.
I was a bit confused why this seemed to work without the need to add the --location option, it turns out plenary adds this by default: https://github.com/nvim-lua/plenary.nvim/blob/master/lua/plenary/curl.lua#L214.
I think making it explicit makes sense.

Huh, that's strange, because it didn't work for me before adding it for some reason. I looked through the plenary source before adding it, but must've missed it there.

Oh yeah, it's probably just the additional check for the 301 status that fixed it. But as you said, can't hurt to be explicit in the curl call as well.

source: gharchive/pull-request

authors: MeanderingProgrammer SWiegandt

license: MIT

license_source: github-api


text:
Add wait for on assert table

For https://github.com/Medology/stdcheck.com/issues/8085
Added waitFor to assert table contain values.

!force code review

Testing file changes were not found.
Paging @manuerumx to review the back-end work in this pull request!
Paging @smijo149 to review the testing work in this pull request!

authors: fortoulrodolfo healthlabs-bugman

repo: Medology/FlexibleMink


text:
Trying to store large xp amounts in experience crystal does nothing

Minecraft version
1.20.1
LibX version
1.20.1-5.0.1
UtilitiX version
1.20.1-0.8.0 - Commit 0c849aa
Forge version
47.1.3
The latest.log file
None
Issue description
Trying to place too much xp (e.g. 30000 levels) in the experience crystal does nothing
. This is due to https://github.com/MelanX/UtilitiX/blob/bc86782adffd1bd9b24d69ef8b243fa63ef80344/src/main/java/de/melanx/utilitix/util/XPUtils.java#L44 overflowing the int into a negative number.
Steps to reproduce

Place experience crystal
/xp set @p 30000 levels
Try to place the experience in the crystal: Nothing will happen

Other information
To fix this getExpPoints() should probably return a long in any case, but I'm not sure how you want to handle large amounts of experience: keep the current (int) maximum, and only fill the crystal to this maximum, or use a long for experience storage as well ?

Thanks for that additional information with code example! That helped a lot. I had some performance issues when using long for storing xp, that's why I used int instead. I think I found a solution for this performance issue, and will try to switch to long in 1.21. I don't want to risk anything in 1.20 with compatibility problems, and maybe deleted xp crystals.

authors: MelanX iTrooz

repo: MelanX/UtilitiX


text:
Use "preferred" podAntiAffinity instead of "required" for controller pod

This required to avoid problems with RollingUpdate on the single node cluster.
With the current affinity rule new pod instance will stuck in the pending state and this will block ipam-controller update.
network-operator already uses the right affinity rule, so the problem exist only in this repo.

coverage: 78.762%. remained the same when pulling 3149c6836fdfcb35dc9b34945db7593e06e2d389 on ykulazhenkov:controller-affinity into d45ca3fe56dd8fdf87d525b29c45bf1242e4b042 on Mellanox:main.

authors: coveralls ykulazhenkov


text:
Snapshot as? SpringImageView

I installed via a Spring (use_frameworks!), I did Spring import and trying to get a screenshot of as a SpringView, but it is always equal to kill.
What could I be wrong?
import UIKit
import Spring

class MyClass {
func getSnapshot() -> SpringView?{
 guard let snapshot = window.snapshotView(afterScreenUpdates: true) as? SpringView else{
            print("Error get SpringView")
            return nil
        }
return snapshot
}

}

You have to convert the snapshot to a SpringView. Currently you are essentially asking if it is a SpringView which it isn't so it will return nil.

repo: MengTo/Spring


text:
KeyError: 'Rank'

What would be the solution for an error like this?
Traceback (most recent call last):
File "tools/test.py", line 139, in
main()
File "tools/test.py", line 105, in main
init_dist(args.launcher, **cfg.dist_params)
File "/data/name/anaconda3/envs/EDTER/lib/python3.8/site-packages/mmcv/runner/dist_utils.py", line 18, in init_dist
_init_dist_pytorch(backend, **kwargs)
File "/data/name/anaconda3/envs/EDTER/lib/python3.8/site-packages/mmcv/runner/dist_utils.py", line 29, in _init_dist_pytorch
rank = int(os.environ['RANK'])
File "/data/name/anaconda3/envs/EDTER/lib/python3.8/os.py", line 675, in getitem
raise KeyError(key) from None
KeyError: 'RANK'

Do I just need to uncomment that line?

KeyError: 'BSDSDataset is not in the dataset registry'
Can you provide BSDSdataset as well?

am i supposed to provide the img suffix and seg map suffix?

Please check BSDSDataset class.

could you please elaborate on what I need to do in the BSDSDataset class?

What would be the solution for an error like this?
Traceback (most recent call last): File "tools/test.py", line 139, in main() File "tools/test.py", line 105, in main init_dist(args.launcher, **cfg.dist_params) File "/data/name/anaconda3/envs/EDTER/lib/python3.8/site-packages/mmcv/runner/dist_utils.py", line 18, in init_dist _init_dist_pytorch(backend, **kwargs) File "/data/name/anaconda3/envs/EDTER/lib/python3.8/site-packages/mmcv/runner/dist_utils.py", line 29, in _init_dist_pytorch rank = int(os.environ['RANK']) File "/data/name/anaconda3/envs/EDTER/lib/python3.8/os.py", line 675, in getitem raise KeyError(key) from None KeyError: 'RANK'

could you tell me how do you solve this problem?

Please check BSDSDataset class.

@MengyangPu could you please elaborate on what I need to do in the BSDSDataset class?

An incomplete environment may cause the above issue. Please check your environment, especially the following commands:
cd EDTER
pip install -e .  # or "python setup.py develop"
pip install -r requirements/optional.txt

repo: MengyangPu/EDTER


text:
feat: majority slash commands

This PR rewrites most of the bots core features to use slash commands + refactors a decent amount of code and removes the ability to play tictactoe using the bot.

Closes #61

Don't think the amount of work is worth it anymore, Pyro is more of "as-is" bot these days

repo: MenuDocs/Pyro


text:
ENH: Recursive filepath expansion

Make Input plugin recursively expand the string.  This enables having a formatting string defined within a formatting string.
We want to avoid at all cost referencing any environment variables within science configurations.  Note that filepath patterns can be constructed from environment variables and that's fine - these are then expanded by the plugin.  We simply don't want environment variables being used within the configuration itself).
What does this mean?
Defining filepaths within the orchestration layer, rather than hardcoding them within the configuration itself.
input_settings = {
    "call": (
        "graph_config.plugins.Input",
        {
            "current_cycle": None,
            "data_input_path": None,
            "filepath": "{data_input_path}",
        },

    )
}

Illustrative json template variables within the orchestration:
{%- set DATA_INPUT_PATH = {
    "config1": "/path/to/share/cycle/{cyclepoint:%Y%m%dT%H%MZ}/decoupler/bla/teacup*/level_1/{validitytime:%Y%m%dT%H%MZ}-{isoleadtime}-{diagnostic}.nc",
    "config2": "/path/to/share/cycle/{cyclepoint:%Y%m%dT%H%MZ}/decoupler/bling/bleh*/level_1/{validitytime:%Y%m%dT%H%MZ}-{isoleadtime}-{diagnostic}.nc",
    }
%}

Issues

https://github.com/MetOffice/improver_suite/issues/2253
https://github.com/MetOffice/improver_suite/issues/2079

of likely interest to you @JoshuaWiggs

repo: MetOffice/dagrunner


text:
Proxy Poviders界面无法测试延迟

使用了自定义的测速url：https://i.ytimg.com/generate_204

在Proxies界面测速正常：

版本 1.173.3

repo: MetaCubeX/metacubexd


text:
Reduce load on Infura in gas estimate fallback

Usually we use the MetaSwap API for gas fee estimates, but if that is
down for some reason, we fall back to hitting Infura directly.
A little while ago we were working on some UI improvements to the
extension around gas fees, and to support this some changes to the
MetaSwap API were made so that it requests the last 20,000 blocks from
the network and uses their data to obtain a baseline for base fees so
that we can display a network stability/congestion meter.
We made the same changes to the gas fee estimation fallback logic.
This ended up being a very bad decision. Because none of the the
requests to Infura that the fallback logic makes are cached, when the
MetaSwap API goes down, the number of requests made to Infura
skyrockets and Infura suffers performance-wise. This problem already
existed, but has been severely exacerbated by the new changes to the
fallback logic. In fact, recently the Infura team had to disable the
eth_feeHistory endpoint because some of the Ethereum nodes crashed
under all of the load.
To address this, this commit updates the part of the fallback logic
which is responsible for calculating network congestion to always return
0.5 instead of making the aforementioned 20,000-block request. This
means that the network stability meter in the extension will stay
static, but that is absolutely preferable to blasting Infura.

Related discussions for MetaMask folks:

https://consensys.slack.com/archives/GV90KPED9/p1644078901352499
https://consensys.slack.com/archives/GV90KPED9/p1646148794299829
https://consensys.slack.com/archives/GV90KPED9/p1646339312789189
https://consensys.slack.com/archives/C021UN08FBJ/p1646243162934619

@mcmire Happy to review this, let me know once it's ready.

I've tested this change directly with the extension and can confirm that this removes the call for 20,000 blocks. It does fix the stability slider to 50% as I mentioned in the PR description (see screenshot) but does not breaking any of the existing functionality around gas fees.

@FrederikBolding Ready for you to re-review!

authors: FrederikBolding mcmire

repo: MetaMask/controllers


text:
Update package.json

This should be MIT to match the LICENCE file

actually now i saw https://github.com/MetaMask/react-native-aes-crypto-forked/commit/397d5db5250e8e7408294807965b5b9fd4ca6a25 so idk if MIT is what was desired here?

LGTM!

authors: andrepimenta rickycodes

repo: MetaMask/react-native-aes-crypto-forked


text:
Doesn't Open

When I cloned it in the app no files appear

are you in the right folder?

repo: MeteorDevelopment/meteor-addon-template


text:
[Edit projects][UI]

Break edit/update wizard into multiple forms. Add 'Next' button to move between cards. Attach separate 'submit' functions to each next button

Add a change event to each 'Card' which triggers when an input is changes and shows a 'Save Changes' button?

Moving this to a later sprint as it will roll into the new UI styles.


text:
State wird im Deconz Adapter zwar korrekt gesetzt, wirkt sich aber nicht aus...

Ich habe bis vor kurzem über das Telegram-Menu meine Zigbee Lampen über den Deconz Adapter geschaltet, in dem ich das Object On im geweiligen Schalter auf true oder false gesetzt habe. Dies habe ich über das SetState Menue gemacht:

Seit einiger Zeit werden die Lampen aber nicht mehr geschaltet obwohl sich der State im Deconz Adapter entsprechend auf true/false stellt.
Wenn ich das Object On im geweiligen Schalter manuell setzt werden auch die Lampen an/aus geschaltet, nur wenn dies über telegram-menü passiert ignorieren die Lampen dies.
Ich habe mir jetzt darüber beholfen, das ich per Telegram-Menü einen user-data Werte setze und dieser per Blockly den Deconz Wert anpasst. Aber das kann es ja eigentlich nicht sein oder?
Muss ich in einem SetState Einträgen etwas anpassen oder ist das ein Bug?
Der andere Weg (GetState) funktioniert korrekt.
IOBroker Version ist: 10.8.2 und betreibe den IOBroker als Docker Container.

Adapter version:  1.7.4
JS-Controller version: 8.3.1
Node version: v18.20.4
Operating system: docker (official image - v9.1.2) unter Ubuntu 22.04

Nimm mal den Haken bei ack raus.

Nimm mal den Haken bei ack raus.

Super, ja dann klappt es wieder. Danke für die schnelle Hilfe.


text:
铁蛋的app源码

Brief modification description
铁蛋的app源码会有开源的计划吗？谢谢
Detailed information

Hi @mailonghua ，感谢关注本项目。
app源码因为涉及到一些token和小米内部库的原因，暂时没有开源计划。
如果想尝试用Android/iOS app控制铁蛋，可以直接使用grpc进行控制和信息获取。相关例程可以翻看readme的相关项目。

authors: homalozoa mailonghua


text:
Improve implementation of unique_by filter

Unsure what happened in #147 (I believe GitHub automatically changes the base branch when it get merged but failed now?), this is a PR for master branch.

Oops sorry, you're right. Let me merge this as well as min/max again.

authors: MiSawa itchyny

repo: MiSawa/xq


text:
Warning message about invalid jsonConfig

Describe the bug
A warning message about an invalid jsonConfig is logged by the Admin adapter
To Reproduce
Steps to reproduce the behavior:

Install Admin adapter 7.1.5
Open the settings dialog of the klf200 adapter.
Check the log.

Expected behavior
The warning shouldn't be logged.
Screenshots & Logfiles
klf200 has an invalid jsonConfig: [{"instancePath":"/items/optionstab/items/automaticRebootCronTime","schemaPath":"#/definitions/cronProps/oneOf","keyword":"oneOf","params":{"passingSchemas":[0,1]},"message":"must match exactly one schema in oneOf"},{"instancePath":"/items/optionstab","schemaPath":"#/properties/items/patternProperties/%5E.%2B/allOf/9/if","keyword":"if","params":{"failingKeyword":"then"},"message":"must match \"then\" schema"},{"instancePath":"","schemaPath":"#/if","keyword":"if","params":{"failingKeyword":"then"},"message":"must match \"then\" schema"}]

Versions:

Adapter version: 1.3.1
Admin version: 7.1.5

Additional context
Add any other context about the problem here.

Created an issue in admin adapter: https://github.com/ioBroker/ioBroker.admin/issues/2766

If the problem is suspected at the checking schema a issue should be placed here:
https://github.com/ioBroker/adapter-react-v5/issues/new?assignees=foxriver76&labels=schema+%3Abook%3A&projects=&template=schema.yml&title=[jsonConfig]%3A+

Moved issue to https://github.com/ioBroker/adapter-react-v5/issues/446


text:
Add cmake install

I have added cmake install commands to do a clean install of the library.
I have not used Conan before, but I think it can call cmake to do the installation.

I tested this out, but found a couple of issues:

the generated config file is named MoreConceptsTargetsConfig.cmake, but it should just be MoreConceptsConfig.cmake (now I have to do find_package(MoreConceptsTargets)).
the target path CMAKE_INSTALL_PREFIX/lib/cmake/ for the .cmake files does not seem to be the right one, as the config is not found by default when I do system installation, but must set -DCMAKE_PREFIX_PATH=/usr/local/lib in the consumer project.

Installation with no additional arguments makes find_package(MoreConcepts) work now.

Installation with no additional arguments makes find_package(MoreConcepts) work now.

Had to revert as it broke the build.
https://github.com/MiSo1289/more_concepts/runs/8295548432
Create a new PR if you have a fix (or I'll try to look at it later).


text:
Calendar don't shows "It xx days"

Hello, My Calendar module don't show "It xx days" "It xx weeks"

My config:
    {
      module: 'calendar',
      position: 'top_left',
      header: 'Calendars',
      config: {
        urgency: 7,
        timeFormat: "absolute",

          calendars: [
            {
              symbol: 'calendar-check',
              url: 'webcal://calendar.google.com'
            },
            {
              symbol: 'calendar',
              url: 'webcal://calendar.google.com'
            }
          ],
        }
    },

Please refer to http://forum.magicmirror.builders for support and troubleshooting.
I'm closing this issue for now. If you feel this issue should remain open, please let me know.

Please refer to http://forum.magicmirror.builders for support and troubleshooting.
I'm closing this issue for now. If you feel this issue should remain open, please let me know.

repo: MichMich/MagicMirror


text:
Run prettier over all files

I noticed that prettier seemed to not run over all files when PRs are submitted. This PR makes prettier run over all files and excludes the stuff that isnt worth it.

Codecov Report

Merging #2577 (68a06c3) into develop (cdc8db4) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff            @@
##           develop    #2577   +/-   ##
========================================
  Coverage    40.27%   40.27%
========================================
  Files           21       21
  Lines         1646     1646
========================================
  Hits           663      663
  Misses         983      983

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cdc8db4...68a06c3. Read the comment docs.

authors: codecov-commenter rejas


text:
Certain clubs display nothing when clicked

Describe the bug
I noticed on the club's page that when clicking on TAMS Culinary Society that nothing appears but the background gets blurry. I'm unsure if this is the intended behavior or not. After digging into the network logs it appears that the BE is throwing a 400 for 3 of the 4 clubs.
To Reproduce
Steps to reproduce the behavior:

Go to https://tams.club/clubs
Click on TAMS Culinary Society (TCS)

Expected behavior
I would expect some sort of dialog when clicking on one of the clubs.
Screenshots or Links

Environment

OS: Windows
Browser: Brave
Browser Version: 1.19.86

Ah yeah that shouldn't be an issue once we clean up the test data. Only the first club has actual data that can be displayed. All of the other clubs are just card placeholders. In the production environment, there should be no clubs that don't have data. We could fix this by closing the popup if no content is found.

Ah yeah that shouldn't be an issue once we clean up the test data. Only the first club has actual data that can be displayed. All of the other clubs are just card placeholders. In the production environment, there should be no clubs that don't have data. We could fix this by closing the popup if no content is found.

@MichaelZhao21 Sounds good, I'll close the issue. Thank you 👍

@MichaelZhao21 Sounds good, I'll close the issue. Thank you 👍


text:
MQTT Protocol Version variable doesn't seem to work

I have a problem because my MQTT Broker doesn't accept MQTT 5 Protocol Messages. When I start the MqDockerUp Container I get the following error messages:
mqdockerup  | Starting MqDockerUp V1.10.0 ...
mqdockerup  |
mqdockerup  | 16.08.2024 08:39:58 [info]        Connected to the database.
mqdockerup  | 16.08.2024 08:39:58 [error]       MQTT client connection error:  Connection refused: Unacceptable protocol version
mqdockerup  | 16.08.2024 08:39:58 [error]       MqDockerUp stopped due to an error
mqdockerup  | 16.08.2024 08:39:58 [error]       object
mqdockerup  | 16.08.2024 08:39:58 [error]       ErrorWithReasonCode: Connection refused: Unacceptable protocol version
mqdockerup  |     at handleConnack (/app/node_modules/mqtt/src/lib/handlers/connack.ts:47:15)
mqdockerup  |     at handle (/app/node_modules/mqtt/src/lib/handlers/index.ts:49:17)
mqdockerup  |     at work (/app/node_modules/mqtt/src/lib/client.ts:765:17)
mqdockerup  |     at Writable.writable._write (/app/node_modules/mqtt/src/lib/client.ts:789:4)
mqdockerup  |     at writeOrBuffer (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:334:12)
mqdockerup  |     at _write (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:283:10)
mqdockerup  |     at Writable.write (/app/node_modules/mqtt/node_modules/readable-stream/lib/internal/streams/writable.js:286:10)
mqdockerup  |     at Socket.ondata (node:internal/streams/readable:809:22)
mqdockerup  |     at Socket.emit (node:events:517:28)
mqdockerup  |     at Socket.emit (node:domain:489:12)
mqdockerup exited with code 0

when I change the MQTT Protocol Version in the Docker Compose file, MqDockerUp doesn't seem to try to connect at all.
I tried with the following command under the environment to see if it reacts  "MQTT_PROTOCOLVERSION: 5"
But then I only get the following output and nothing more happens:
mqdockerup  | Starting MqDockerUp V1.10.0 ...
mqdockerup  |
mqdockerup  | 16.08.2024 08:43:06 [info]        Connected to the database.
mqdockerup  | 16.08.2024 08:43:06 [info]        Database initialized successfully

It seems like the variable does something but I would expect the same error like before when forcing Version 5 but now it is not even trying to connect.
Anybody else with that issue?

Thanks for reaching out.
By default MqDockerUp establishes to connection using v5 so there is no need to change it.

authors: Hakzel MichelFR

repo: MichelFR/MqDockerUp


text:
Octane plugin for TFS 2015 -> PAT

Hi,
During the configuration the PAT is required, however this feature was introduced in TFS 2017?
What should be the option/solution when using TFS 2015?
Thanks!

We supports from 2015 update 4
For this case - our configuration allows to to authentication with user/password

authors: JeremyPicado radislavB

repo: MicroFocus/octane-tfs-plugin


text:
Maximum of 2100 parameters in dimension set filter

Hi
due to lack of possibility to change behaviour of standard flowfield and keys, I'm doing some stress test with standard code.
In a medium-complex database with:

400 stores
80 item categories
20 customer types

it's easy to have thousands of dimension set IDs till to maxium of 400 x 80 x 20 = 640.000 combinations.
With a simple stress-test codeunit I have generated only 10.000 randomic G/L entries but sufficients to crash dimension set filter due to maximum number of parameters (2100) supported by SQL Server:

In the past we could extend "G/L Entry" table with ""Global Dimension Code 3", 4 and so on; create the missing keys and alter the "Amount" flowfield of "G/L Account". But now?
I think this issue is partially related to #730 but anyway, in this scenario, Dimension Set Filter will never work. Maybe a new type of field such as "Filter on Related Table" can resolve the issue applying the WHERE clause in "Dimension Set Entry" table instead of passing thousand of parameters for "Dimension Set ID" in "G/L Entry".
S.

Hi,
Whether or not you will hit this SQL limit should depend on the filter you set. You may hit the limit with one filter and not with another. If you do hit the SQL limit there's unfortunately not much we can do at this time...
If you could share your repro, I can take a look if there's something else going wrong in this scenario.
br/Gert

Hi @grobyns
I'm sorry but you are wrong. Is not the user that sets 2100 parameters, but the Dimension Filter page!

and this is the result:

You need only 20K of G/L Entries and 30K of Dimension Set Entries to reproduce the issue or use a real customer database or use the stress test codeunit that I've attached.
Test.al.txt
Actually Dimension Filter is unusable in a real scenario:

I think this issue is partially related to #730 but anyway, in this scenario, Dimension Set Filter will never work. Maybe a new type of field such as "Filter on Related Table" can resolve the issue applying the WHERE clause in "Dimension Set Entry" table instead of passing thousand of parameters for "Dimension Set ID" in "G/L Entry".

S.

Hi,
You misunderstood my reply. The filter set by the page is determined by what the user enters on the Dimension Filter page, this is what I meant. Depending on what the user enters the filter may or may not exceed the SQL limit.
Knowing whether it will or will not exceed the SQL limit is not simple. The page will construct a simple filter by concatenating all the dimension set id's that match what the user put in. This can be in the hundreds of thousands of Dimension Set ID's, the number or length really doesn't matter. The server will take this simple filter and optimize it. As a simple analogy, if you pass in '1|2|3|4|5' the server will turn it into '1..5'. This optimized filter is then passed to SQL and if that contains more than 2100 elements, SQL rejects it.
In your case, if you are lucky, the filter ends up having a lot of consecutive ranges and the server can simplify it down to something SQL can manage. If you are unlucky, then it cannot. Of course you can help by putting in more specific filters. If you put in a specific value for Category then your filter is much more likely to pass. If instead you put in a specific value for Customer you will be less likely to get a filter SQL can handle.
The Dimension Filter page is meant to be a quick ad-hoc way of getting some insights out of the dimensions. It is not meant to replace Analysis by Dimensions or PowerBI to do analysis and reporting. If this feature doesn't work for you, you'll need to rely on these other reporting mechanisms to get the data you need.
br/Gert

Hi @grobyns
I hope you consider a new application enhancement, such as query optimizer for pages with flowfield / factboxes. The issue is caused by query generator, a simple JOIN could bypass the SQL limit.
We cannot answer to the customer: "Try... if you are lucky, you get the response!"
It's not a problem to have unusable function inside NAV/365BC ... is a problem if you remove us the possibility to maintain indexes and flowfield (#730) ... so a case like this is critical.
Thank you.
S.

authors: grobyns sgiordy

repo: Microsoft/AL


text:
Blob.Length not recognised

I get the below error message on the latest microsoft/dynamics-nav image
'Blob' does not contain a definition for 'Length'
Headers.Add('Content-Length', Format(TempBlob.Blob.Length()));

Do you get this as a compiler error or when running the code?  Could you provide a more complete sample, is TempBlob a variable of type Record TempBlob in your case?

Must have been resolved, I cannot seem to replicate this in the latest image.

authors: Joel-NAVDev StanislawStempin


text:
[.NET] RichTextBlock changes to host config for highlighting

Automatically generated task. Any updates to the title and body will be overwritten. Do NOT modify the labels.
.NET fix of #2721

Since highlighting hasn't been implemented for .NET yet, no changes are needed. Highlight implementation tracked by #2554.

authors: RebeccaAnne andrewleader

repo: Microsoft/AdaptiveCards


text:
How to Correlate Requests from client to server for cross domain calls

I would like to know what is the guide line to correlate request from client to server which are on different domains and set up with different instrumentation key.
On client I am using the library: import { AppInsights } from "applicationinsights-js";
Server is a .Net web app.
Existing documentation do not give a clear picture of how correlation should work .
I understand that x-ms-request-id header is not added for cross domain calls.
So what is the workaround?

Yes, correlation is only enabled for requests within the same domain. You can add ms-root-* headers manually by using a telemetry processor.

Hi Kamil,
You mentioned telemetry processor. Is it the same as Initializer? If so, addtelemetryInitializer function only gives an IEnvelope which does not expose  any fields where I can modify the headers? Is this a typescript definition error?
interface IEnvelope extends ISerializable {
ver: number;
name: string;
time: string;
sampleRate: number;
seq: string;
iKey: string;
flags: number;
deviceId: string;
os: string;
osVer: string;
appId: string;
appVer: string;
userId: string;
tags: {
[name: string]: any;
};
}

Yes, sorry my bad. The current API doesn't expose the headers. We need to change the SDK to allow users to set a custom list of external domains for which the correlation feature is enabled.
I'm changing this issue to an enhancement and will put it on our backlog.

Has there been any movement on this? We need to be able to correlate data between a client domain and ours, so cross domain correlation headers would be ideal.

Hi @KamilSzostak , any news so far? it's important for a SPA system.

Hi @iusafaro
Seems this has been moved to the 1.1.0 milestone.
I am currently wondering what a good workaround or alternative solution is? Not only do I want to correlate back-end and front-end, I also want to track the same user that is going from an home page to an order page (sub-domain). How would I currently do this?
Google Analytics uses a _ga url parameter when I switch from domain, is there something similar that application insights can do?
Or can I somehow configure application insights to set a cookie for the hostname (so that subdomains use the same cookie) just like cross subdomain authentication works (a little bit the same).
I know there is a cookieDomain inside the User object, is there something I can do to influence the behavior?
Last solution I could think of is asking my API for a session id and ask that on the telementryInitializer, the api endpoints is used for all server calls on the order page so that would be the same I guess...

Actually it's done, but you need to enable it in the configuration:
Feature for cross-component correlation between client AJAX and server requests is out but is disabled by the default because CORS limitation for request headers.

In order to connect client to the server, client needs to send two request headers Request-Id and Request-Context and the connection to the server will fail in case of CORS call and if Access-Control-Allow-Headers settings explicitly configured on the serv-side. So you’ll need to ensure that if you have allowed headers configured in Access-Control-Allow-Headers then you extended the list with Request-Id and Request-Context.

Access-Control-Allow-Headers: Request-Id, Request-Context,

For server back to client correlation, client needs to read Request-Id response header and allowing for client to read is included by the default in 2.6 SDK, so ensure that you have latest SDK on the server.

To enable it you need to extend config with enableCorsCorrelation equal to true. If any of your or third-party servers that client communicates with cannot accept headers listed above and you cannot update their configuration then you’ll need to put them into excluded list in correlationHeaderExcludedDomains config property. correlationHeaderExcludedDomains supports wildcards syntax.

Sorry to ask again @iusafaro but I'm a bit confused in your explanation.

I have updated Microsoft.ApplicationInsights.AspNetCore to v2.3.0 (latest stable), this one has a dependency on Microsoft.ApplicationInsights v2.6.4, so I should be good serverside.
Applications
I have a wordpress website at domain.com which includes the latest cdn of this javascript library and I have a shop.domain.com which is an AspNetCore application with above version, the front-end is angular, I have included appInsights via npm as well as inserted in the <head>, I should probably drop the <head> one.

So, according to your answer, I need to:

AllowRequest-Id and Request-Context headers at back-end server.

In Asp.Net Core I can enable CORS and allow any headers like so:
 app.UseCors(x => x.WithOrigins("https://domain.com").AllowAnyHeader());

Because I have SDK 2.6 installed I should be fine with correlating back-end to front-end.
So from shop.domain.com front-end angular to back-end AspNetCore, this should now by default include the Request-Id and Request-Context when I have config.enableCorsCorrelation = true, correct?

Sadly the enableCorsCorrelation is not in the typescript library (updated to 1.0.18 and @types/applicationinsights-js to 1.0.5.

But I guess disableCorrelationHeaders is the opposite setting?
But not the tricky part, how do I correlate (same userId, same sessionId) from domain.com to shop.domain.com honestly I am more concerned about both 'front-ends' sharing the same userId then the back-end, but maybe the back-end is needed as a 'AI user manager' or something to correlate things. It is important that one user who visits domain.com, leaves and later comes back at shop.domain.com is tracked as the same user. How?

authors: KamilSzostak NichUK Ruud-cb iusafaro shkrishms zhangpeng-kooboo

repo: Microsoft/ApplicationInsights-JS


text:
high cpu usage on conemu/wsl-terminal

If I use WSL as standalone bash.exe, I get an average of 0.00 cpu percentage usage for conhost process. But If I try using bash inside conemu or wsl-terminal, I get an average of 24 cpu percentage usage per conhost process.
I have Build 15007 and usually keep my ubuntu up to date.
Here is with standalone bash.exe: (I am running three instances of bash.exe and even running a mongod server service)

Here is the same environment with conemu:

There it reports ~60% of constant CPU usage and I am only running one tab (bash) inside conemu, no services running on WSL and no other difference with the previous scenario.
I can report a similar performace issue when using wsl-terminal and so, I think the issue is not with ConEmu neither wsl-terminal but with something windows/bash.exe related

Hi @ztrange -- if this were something Windows/bash.exe-related, wouldn't it show up in bash.exe when run on its own?
It seems to me that you should ask the developers of those apps why they are using WSL in such a way that it consumes this much of your CPU.  They may know the answer (and have a good answer, or even a fix) already.  Or they may not, in which case they should post here and there can be a more-informed discussion about what specific technical changes should be made to either WSL and/or the app to reduce its CPU consumption.

Just dido so, thanks
https://github.com/goreliu/wsl-terminal/issues/18

Yep, this definitely appears to be the same issue, @ztrange.
It should be resolved in rs_prerelease 15016 and higher, whenever those go out to Insiders.
Thanks for linking these up!

I can confirm this is fixed (I checke on conemu) on 15014

@ztrange Off topic, but can you help me setup conemu with wsl-terminel. I tried the following command but it's not working: $ set CHERE_INVOKING=1 & "%SystemDrive%\wsl-terminal\open-wsl.exe" -new_console:aC:%LOCALAPPDATA%\lxss\bash.ico"
It always opens up in a new window.

I actually don't remember exactly what I did, but here is a screen of my bash task:

Also I'd read all this
https://conemu.github.io/en/BashOnWindows.html

Just to clarify, you not referring to wsl-termianl?

Oh no, sorry I didn't read that right. I'm not using conemu with wsl-terminal. Im just using conemu with bash.

I see constant load 2-10% cpu on Windows 10, build 16299. Is this some kind of regression?

@michaelbaranov You will see some non-zero amount of CPU work from the console host due to the way ConEmu works: By polling the console APIs in an infinite loop to gather out the data and present it on its own interface.
If the console host window is consuming an entire core or multiple cores... there's likely a problem. But if you see a few percentage points attributed to Console Window Host while running ConEmu like the above, it's normal.

authors: DJviolin aseering michaelbaranov miniksa ztrange

repo: Microsoft/BashOnWindows


text:
[Node] qnaThreshold parameter

Hi,
The qnaThreshold parameter specified in the IQnAMakerOptions interface does not seem to have any effect on the recognizer. See below for detailed explanation.
Example:
Here I have configured a QnAMakerRecognizer with a simple intent dialog and have specified the value of 0.6 in qnaThreshold parameter in the options.
var bot = new builder.UniversalBot(connector);
bot.set("storage", new builder.MemoryBotStorage());

var intentRecognizer = new builder.LuisRecognizer(constants.modelUrl);

var qnaRecognizer = new cognitiveservices.QnAMakerRecognizer({
  knowledgeBaseId: constants.knowledgeBaseId,
  endpointHostName: constants.qnaEndpoint,
  authKey: constants.qnaAuthKey,
  top: 3,
  qnaThreshold: 0.6
});

var intents = new builder.IntentDialog({
  recognizers: [intentRecognizer, qnaRecognizer]
})
  .matches("qna", (session, args) => {
    console.log(args);
    var answer = builder.EntityRecognizer.findEntity(args.entities, "answer");
    session.endDialog(answer.entity);
  })
  .onDefault(session => {
    session.endDialog("This is the default dialog.");
  });

bot.dialog("/", intents);

Actual Response:
QnA Maker is also returning answers which are of lower scores than the specified qnaThreshold
restify listening to http://[::]:3978
ChatConnector: message received.
UniversalBot("*") routing "windows" from "emulator"
Session.beginDialog(/)
/ - Session.sendBatch() sending 0 message(s)
/ - IntentDialog.matches(qna)
/ - waterfall() step 1 of 1
{ answers:
   [ { questions: [Array],
       answer: '... omitted ...',
       score: 0.5489,
       id: 26,
       source: 'ChatQnA.pdf',
       metadata: [] },
     { questions: [Array],
       answer: '... omitted ...',
       score: 0.5162,
       id: 13,
       source: 'ChatQnA.pdf',
       metadata: [] },
     { questions: [Array],
       answer: '... omitted ...',
       score: 0.4851,
       id: 14,
       source: 'ChatQnA.pdf',
       metadata: [] } ],
  score: 0.5489,
  entities:
   [ ... omitted ... ],
  intent: 'qna' }
/ - Session.endDialog()
Session.sendBatch() sending 1 message(s)

Expected Response:
QnA Maker should have ignored answers which scored below specified qnaThreshold. (Which is 0.6 in this example)
Possible Causes:
It seems to me that, the parameter qnaThreshold in the IQnAMakerOptions interface is not being used in the actual request or anywhere else aside from being declared as an option. So, it is obvious that it has no effect on the responses being returned from QnA Maker.
Solutions:
We should send the threshold parameter in the request to QnA Maker's generateAnswer endpoint if it is supported on the server side (it should be). Since it is basically the same way top works, and we'll avoid downloading answers that are not required, thus saving data and time.
For this, I tried adding "qnaThreshold" parameter to the raw request and sent it through Postman. It is still returning the same answers, below threshold. So, maybe filtering based on threshold is not supported in the QnA Maker API v4.0 GA.
See:

https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/how-to/metadata-generateanswer-usage

https://docs.microsoft.com/en-us/azure/cognitive-services/qnamaker/quickstarts/nodejs#GetAnswers

Also, the strictFilters parameter in the API is only for using with metadata, so can't filter score through it.
Aside from few small descriptions at the above links, I can't seem to find any docs about the REST spec of the Endpoint (Runtime) API.
There are docs for v4 API Reference (https://westus.dev.cognitive.microsoft.com/docs/services/5a93fcf85b4ccd136866eb37/operations/5ac266295b4ccd1554da75ff), but it seems it's only for Management APIs and there is no information about the generateAnswer operation.
I would request that it should be documented clearly whether it is supported on the server side to filter answers based on threshold. And the client libraries should be updated to reflect that.
Possible Workarounds:
If due to any reason, it is not supported (yet) on the server side then, either the client libraries should filter the answers (for the time being, maybe based on a flag) on the client side after getting the response from QnA Maker (since the parameter is already specified in the IQnAMakerOptions interface).
Until we get the parameter working on the server side, we can use some kind of wrapper around the recognizer to filter out the answers that scored below the specified threshold before returning the response to the dialog.
Please look into this and update as this is an important feature and it is required in many scenarios.
EDIT: It appears that the .NET version of the SDK does actually filter the answers on the client side. (See: https://github.com/Microsoft/BotBuilder-CognitiveServices/blob/master/CSharp/Library/QnAMaker/QnAMaker/QnAMakerService/QnAMakerService.cs#L196). So I guess it would be fine to implement the same in the Node.js SDK as well. I would be happy to submit a PR once I get confirmation.
Thanks,
Afnan

Hi @afnan-ahmad,
'top' and 'qnaThreshold' are options to QnAMakerDialog, not QnAMakerRecognizer. Instead, if you were using QnAMakerDialog, you would apply them there. However, you are using IntentDialog which:

Does not offer a 'top' option
Takes 'intentTheshold' instead of 'qnaThreshold'

var intents = new builder.IntentDialog({
    recognizers: [intentRecognizer, qnaRecognizer],
    defaultMessage: 'No match! Try changing the query terms!',
    intentThreshold: 0.6

Please review the IntentDialog reference  for more information.

Hi @stevkan,
Thanks for your response. I would to like clarify here that if you look into QnAMakerRecognizer class, you would see that the options (including top and qnaThreshold) are part of the recognizer itself and not of the dialog. (There are other options for the dialog)

See: https://github.com/Microsoft/BotBuilder-CognitiveServices/blob/master/Node/src/QnAMakerRecognizer.ts#L56
The same options have also been defined in the TypeScript typings file as well.

And as you would have seen in my example that I have specified top as well, and it is working. Only qnaThreshold does not work as I have detailed in my original post.
You can also see my changes in PR #136
Thanks,
Afnan

You are right that IQnAMakerOptions is used in both QnAMakerRecognizer and QnAMakerDialog. Forgive my oversight on that. However, your code above shows you are trying to apply qnaRecognizer to IntentDialog which does not accept the qnaMaker recognizer options.
You can reference the IntentDialog class here and its associated options here.

authors: afnan-ahmad stevkan

repo: Microsoft/BotBuilder-CognitiveServices


text:
Urgent:: Tap action on thumbnail or hero card

Hi,
I want to open the image in full screen on a "TAP" over the HeroCard or ThumbnailCard.
What's the way to implement the above to open the cardImage in full-screen or in a large size?

Hi @afficionaddo, currently the behavior of URL open actions is defined by the chat service (e.g. Skype) and the client platform (mobile, Windows, web, etc.). We do not have a way to control this behavior.

Thinking about this more, some channels may expose this through their API and you could trigger it via ChannelData. Which channel are you using?

I'm using facebook messenger.
On Sun, Sep 18, 2016 at 9:20 PM, dandriscoll notifications@github.com
wrote:

Thinking about this more, some channels may expose this through their API
and you could trigger it via ChannelData. Which channel are you using?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/Microsoft/BotBuilder/issues/1234#issuecomment-247855474,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ATQanLtN7hp1pU-dCpgkVwoBsDpl2P2gks5qrV3EgaJpZM4J88BF
.

Hi @afficionaddo We send Hero cards to Facebook using the Generic Template. Images on the card are encoded in the template as an Element. The Element includes a field called item_url, which will be opened when the element is tapped, but we're only filling it out for the SignIn action type currently. Let me take this as a research item. We might be able to improve this.

Apologies, we are in fact assigning item_url when action type is ShowImage and others such as PlayVideo, PlayAudio, etc. We're doing the best we can within the limits of Facebook's schema. Have you tried sending Tap.Type = ActionTypes.ShowImage?

Thanks for the reply @eanders-MS !
I will try the above and let you know!

authors: afficionaddo dandriscoll eanders-MS

repo: Microsoft/BotBuilder


text:
Add an optional timeout for LUIS and QnA calls

LUIS and QnA calls dont have a timeout param
When making a LUIS or QnA calls, there is no timeout, except the default one defined with HttpClient.  One might want to limit time spent calling such services and 'abort' the call on timeout with an exception.
Proposed change
Add optional param for LUIS and QnA CTOR that includes timeout for each call, and throw an exception when it times out. This way customers can define a max timeout for calls and handle the error from their bot.   If not, a call can spin for the default HTTP timeout which is 100 sec (I think).
Component Impact
Update LUIS and QnA libraries.
Note: LUIS C# RecognizeAsync  already takes a cancelationToken. But QnA doesn't.  Not sure how JS handles timeouts.
Customer Impact
Additive functionality.
Tracking Status
Dotnet SDK

[x] PR
[ ] Merged

Javascript SDK

[x] PR
[ ] Merged

Java SDK

[ ] PR
[ ] Merged

Python SDK

[ ] PR
[ ] Merged

[dcr]

Node PR
Dotnet PR

authors: Zerryth yochay


text:
Disable dynamic import and put it behind the flag.

The host work is still pending so instead of showing this as a broken feature, it will be displayed as not supported feature.

@leirocks @aneeshdk

What’s the host work that’s still pending? I thought this worked fine after #3934
Unless you’re referring to the inconsistent name handling in ch #3964 which is an issue with static imports too.

@rhuanjl by host I meant Edge browser.

authors: akroshg rhuanjl

repo: Microsoft/ChakraCore


text:
Types.ps1 needs comments

Much of the code is uncommented and it is not immediately apparent what it's function is.
Example:
 [Cluster] NewChildCluster() {
        $indexes = ($this.GetChildren() | % {[Cluster]::new($_)}).Index
        for ($index = 0; $index -in $indexes; $index++) {}
        $cluster = [Cluster]::new("$this-$index")
        $cluster.Create()
        return $cluster
    }

All good now.  thanks.

repo: Microsoft/Cluster


text:
inf/nan from finite input -> TypeError: 'NoneType' object is not iterable

fail8.zip
$ python fail.py
True
True
True
True
True
[1]     valid_0's l1: inf
Training until validation scores don't improve for 20 rounds.
[2]     valid_0's l1: nan
[3]     valid_0's l1: nan
[4]     valid_0's l1: nan
[5]     valid_0's l1: nan
[6]     valid_0's l1: nan
[7]     valid_0's l1: nan
[8]     valid_0's l1: nan
[9]     valid_0's l1: nan
[10]    valid_0's l1: nan
[11]    valid_0's l1: nan
[12]    valid_0's l1: nan
[13]    valid_0's l1: nan
[14]    valid_0's l1: nan
[15]    valid_0's l1: nan
[16]    valid_0's l1: nan
[17]    valid_0's l1: nan
[18]    valid_0's l1: nan
[19]    valid_0's l1: nan
[20]    valid_0's l1: nan
[21]    valid_0's l1: nan
Traceback (most recent call last):
  File "fail.py", line 24, in <module>
    model.fit(X, y, sample_weight=sample_weight,eval_set=eval_set, eval_metric=eval_metric, early_stopping_rounds=early_stopping_rounds)
  File "/home/jon/.pyenv/versions/3.6.4/lib/python3.6/site-packages/lightgbm_gpu/sklearn.py", line 685, in fit
    callbacks=callbacks)
  File "/home/jon/.pyenv/versions/3.6.4/lib/python3.6/site-packages/lightgbm_gpu/sklearn.py", line 544, in fit
    callbacks=callbacks)
  File "/home/jon/.pyenv/versions/3.6.4/lib/python3.6/site-packages/lightgbm_gpu/engine.py", line 233, in train
    evaluation_result_list=evaluation_result_list))
  File "/home/jon/.pyenv/versions/3.6.4/lib/python3.6/site-packages/lightgbm_gpu/callback.py", line 223, in _callback
    best_iter[i] + 1, '\t'.join([_format_eval_result(x) for x in best_score_list[i]])))
TypeError: 'NoneType' object is not iterable

I have a2f5c50ca80dce9283b4170374d277799a4bad7b .  I'll try after your above fix.

I tried your latest and it is fixed:
$ python fail.py
True
True
True
True
True
[1]     valid_0's l1: 182411
Training until validation scores don't improve for 20 rounds.
[2]     valid_0's l1: 165610
[3]     valid_0's l1: 164698
[4]     valid_0's l1: 149949
[5]     valid_0's l1: 149912
[6]     valid_0's l1: 138177
[7]     valid_0's l1: 137767
[8]     valid_0's l1: 127428
[9]     valid_0's l1: 127350
[10]    valid_0's l1: 118425
[11]    valid_0's l1: 118662
[12]    valid_0's l1: 110786
[13]    valid_0's l1: 111103
[14]    valid_0's l1: 103831
[15]    valid_0's l1: 104056
[16]    valid_0's l1: 98700.9
[17]    valid_0's l1: 98771.5
[18]    valid_0's l1: 94816.8
[19]    valid_0's l1: 94573.7
[20]    valid_0's l1: 91350.6
[21]    valid_0's l1: 91044.4
[22]    valid_0's l1: 87491.6
[23]    valid_0's l1: 87551.7
[24]    valid_0's l1: 84492.5
[25]    valid_0's l1: 84582.4
[26]    valid_0's l1: 81884.4
[27]    valid_0's l1: 81834.7
[28]    valid_0's l1: 79482.2
[29]    valid_0's l1: 79278.4
[30]    valid_0's l1: 77046.4
[31]    valid_0's l1: 76973.6
[32]    valid_0's l1: 75105.7
[33]    valid_0's l1: 74675.3
[34]    valid_0's l1: 72925.2
[35]    valid_0's l1: 72833.4
[36]    valid_0's l1: 71305.9
[37]    valid_0's l1: 71569.2
[38]    valid_0's l1: 69371
[39]    valid_0's l1: 69227.3
[40]    valid_0's l1: 67813.9
[41]    valid_0's l1: 67467.3
[42]    valid_0's l1: 66347.5
[43]    valid_0's l1: 66438.7
[44]    valid_0's l1: 65463.3
[45]    valid_0's l1: 65455.2
[46]    valid_0's l1: 64737.9
[47]    valid_0's l1: 64866.9
[48]    valid_0's l1: 64341.3
[49]    valid_0's l1: 64397
[50]    valid_0's l1: 63816.4
[51]    valid_0's l1: 63729.4
[52]    valid_0's l1: 63252.3
[53]    valid_0's l1: 63356.2
[54]    valid_0's l1: 62844.9
[55]    valid_0's l1: 63021.2
[56]    valid_0's l1: 62601.6
[57]    valid_0's l1: 62820.5
[58]    valid_0's l1: 62410.6
[59]    valid_0's l1: 62463.5
[60]    valid_0's l1: 62241
[61]    valid_0's l1: 62420.2
[62]    valid_0's l1: 62229.1
[63]    valid_0's l1: 62086.9
[64]    valid_0's l1: 61816.2
[65]    valid_0's l1: 61914.2
[66]    valid_0's l1: 61641.6
[67]    valid_0's l1: 61641.6
[68]    valid_0's l1: 61519.9
[69]    valid_0's l1: 61612.9
[70]    valid_0's l1: 61397.9
[71]    valid_0's l1: 61650.5
[72]    valid_0's l1: 61633.9
[73]    valid_0's l1: 61783
[74]    valid_0's l1: 61570.5
[75]    valid_0's l1: 61524.6
[76]    valid_0's l1: 61417.1
[77]    valid_0's l1: 61553.3
[78]    valid_0's l1: 61471.3
[79]    valid_0's l1: 61579.5
[80]    valid_0's l1: 61493.5
[81]    valid_0's l1: 61580.3
[82]    valid_0's l1: 61403.5
[83]    valid_0's l1: 61451.2
[84]    valid_0's l1: 61507.2
[85]    valid_0's l1: 61682.9
[86]    valid_0's l1: 62019.2
[87]    valid_0's l1: 62086.2
[88]    valid_0's l1: 61968.3
[89]    valid_0's l1: 61891.3
[90]    valid_0's l1: 61784.1
Early stopping, best iteration is:
[70]    valid_0's l1: 61397.9

repo: Microsoft/LightGBM


text:
Fix build on macOS Mojave

Fixed #1898
Thanks to https://github.com/cryfs/cryfs/commit/08ed96680876c960d5aab0aabebb25206f0bda06

BTW, can't export LD_LIBRARY_PATH="/usr/local/opt/libomp/lib:$LD_LIBRARY_PATH" fix the issue on Mojave?

No, it doesn't fix the issue.
❯ LD_LIBRARY_PATH="/usr/local/opt/libomp/lib:$LD_LIBRARY_PATH" cmake ..
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
  Could NOT find OpenMP_C (missing: OpenMP_C_FLAGS OpenMP_C_LIB_NAMES)
Call Stack (most recent call first):
  /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
  /usr/local/Cellar/cmake/3.13.2/share/cmake/Modules/FindOpenMP.cmake:473 (find_package_handle_standard_args)
  CMakeLists.txt:80 (find_package)

-- Configuring incomplete, errors occurred!
See also "/Users/henry/.ghq/github.com/henry0312/LightGBM/build/CMakeFiles/CMakeOutput.log".

And what's the root of the issue on Mojave?

I don't know yet.

Homebrew has changed the libomp installation path or what?

No, homebrew seems to change nothing.

UPD: Naive question: can't the same result be achieved by
find_package(OpenMP REQUIRED PATHS /opt/local/lib/libomp /usr/local/opt/libomp)

PATHS affects paths of searching FindOpenMP.cmake, not libraries of libomp.


text:
Add Desktop.* configurations to CI build list

Add the new Desktop configurations to the list of items to be built when checkins / pull requests are made.

Please review @chuckries @mmitche
Is there a way to verify this before checking in?

@dotnet-bot test ci please

authors: andrewcrawley mmitche

repo: Microsoft/MIEngine


text:
VS 15 Preview 4 test adapter not discovering tests

VS 15 Build 25615.00
Data Science workload
Add New Item, Unit Test
Save project, close and reload solution, restart VS...  I was never able to get the tests detected.  I made sure it wasn't a case of wrong active interpreter (ie. tests run with startup file set to the test & F5).
Microsoft.VisualStudio.Default.err.txt

When I repro'd this, the analyzer process was stuck loading the DB for unresolved module imports, which was blocking any other analysis. Not sure whether this is the cause, but it may be related.

There's actually a FileNotFoundException being raised somewhere in the process of getting the tests back from the analyzer. I can't seem to break at it.

Okay, so the problem is we have to install an absolutely minimal extension into the TestWindow\Extensions folder for this to work properly. Right now, it isn't finding our test adapter from the out-of-proc process, and there are too many dependencies to make it find it.
I guess this is a recent change to VS 15 that's affected us. Probably won't be fixed for the next Preview.

authors: huguesv zooba

repo: Microsoft/PTVS


text:
Fixes #2869 Go to definition fails for named argument

Fixes #2869 Go to definition fails for named argument
Enable GTD for argument names.
Fixes bug in FindScopes where we were selecting function scopes incorrectly.

It looks like most of the other navigable tests are currently failing too. If nobody reviews this today, then I'll work on them tomorrow as part of this change (since it's probably going to be related issues).

@huguesv Worth another quick look. This is ready to merge now, barring any feedback

Still looks ok


text:
Revert "Moving .NET projects to multi target, requested by users"

Reverts Microsoft/Recognizers-Text#179

Closing this revert as the CI builds pass and the new proj definitions seem more robust upon testing.

authors: tellarin yiylin

repo: Microsoft/Recognizers-Text


text:
Language and Tone section in the wiki

As per this comment by @DanielRosenwasser I think we should put something related to
language and tone in the wiki section. How this sounds?

Sounds like a good idea, thanks @jamesxv7!

repo: Microsoft/TypeScript-wiki


text:
Super constructor spread

TypeScript Version:  2.0.3
Code
class A {
    constructor(a: number, b: string) { }
}

class B extends A {
    constructor(...args) {
        super(...args) // Supplied parameters do not match any signature of call target.
    }
}

Expected behavior:
It's possible to pass arguments to super constructor without specifying them explicitly.
E.g. when extending classes of external framework, like React, which calls constructors.
Actual behavior:
Error: Supplied parameters do not match any signature of call target

I think the compiler is correct to flag the example as non-type-safe. You could instantiate B with zero arguments, one argument, ten arguments, and each argument can be any type. Those same arguments will then be passed through to A's constructor. But A expects exactly two arguments of specific types, so this pattern is not type-safe at all.
You'd get the same error if you wrote new A(42) or new A(1, 'foo', true), even though B's constructor would allow any of those.

If the constructor of A can take an undetermined number of arguments, then it would make sense to use ...:
class A {
   values: any[];
    constructor(...args: any[]) {
        this.values = args;
    }
}

class B extends A {
    constructor(...args: any[]) {
        super(args);
    }
}

However, in this case it looks like the number of arguments of A is determined. So it would be better to do the following:
class A {
    constructor(a: number, b: string) {}
}

class B extends A {
    constructor(...args: any[]) {
        if (args.length < 2) throw new Error();
        let a: number = args[0];
        let b: string = args[1];
        super(a, b);
    }
}

If the number of constructor arguments in B can be determined, then I would recommend to avoid using ... on both A and B.
class A {
    constructor(a: number, b: string) {}
}

class B extends A {
    constructor(a: number, b: string) {
        super(a, b);
    }
}

The ... operator will save you writing some code but you are losing certain level of security provided by the type system.

For the record, if you just didn't write a constructor at all, TypeScript would just "inherit" the constructor. See here.

authors: DanielRosenwasser anvish remojansen yortus

repo: Microsoft/TypeScript


text:
Use contextual signature instantiation to compare signatures

Now that we have a heuristic algorithm for infinitely expanding generics, we can go back to comparing signatures using contextual signature instantiation. For example:
var f: (s: string) => number;
var g: <T>(s: T) => T;
f = g;
g = f;

Both of these should ideally fail. The reason we could not do this earlier was because we could not detect infinitely expanding generics properly. But the current algorithm would prevent us from blowing up in the cases where the previous algorithm failed.

@RyanCavanaugh @JsonFreeman thanks for the responses on #241
What needs to happen to move this forward?

I believe it's basically an expert-level "bug fix" in the checker code somewhere, plus some spec language. I'm not familiar with how contextual signature instantiation actually works so I don't have any more details.

The fix would be to replace the two calls to getErasedSignature in compareSignaturesRelated. Instead you would call instantiateSignatureInContextOf(source, target, undefined). I believe this would return an instantiated version of source that would then be assignable to target (in terms of parameters and return type).
There are a few other things that would need to be worked out though. You'd have to detect an instantiation failure, which would indicate that the signatures are not compatible. Another thing to consider is the type parameter constraints of the source signature, which is trickier than it used to be because of the new F-bounded polymorphism feature.
Contextual signature instantiation was indeed used to compare signatures before 1.0. We switched to a loose check for a few reasons. Chiefly, many users found it too strict - there were frequent errors on code that seems okay. And it is a more expensive check, particularly when comparing a generic signature member of an infinitely expanding generic type. These are two caveats to watch out for when trying this fix.

@JsonFreeman thanks for the notes, almost certainly well beyond my capabilities to even think about contributing to this one.
When combined with #7234, this is biting us pretty hard at the moment. So any progress on both issues would be massively appreciated!

This is essentially the same as https://github.com/Microsoft/TypeScript/issues/5616

authors: JsonFreeman RyanCavanaugh mhegazy myitcv


text:
private data with generic type is not correctly typed in .d.ts

TypeScript Version:  2.2.1
Code
export abstract class Model<T> {
  private _data: T;

  constructor(data: T) {
    this._data = data;
  }
};

Expected behavior:
generated .d.ts file contains the following:
export declare abstract class Model<T> {
    private _data: T;
    constructor(data: T);
}

Actual behavior:
generated .d.ts file contains the following:
export declare abstract class Model<T> {
    private _data;
    constructor(data: T);
}

tested with the following compiler options:
    {
      "module": "commonjs",
      "outDir": "lib",
      "sourceMap": true,
      "target": "es6",
      "noUnusedLocals": true,
      "experimentalDecorators": true,
      "emitDecoratorMetadata": true,
      "declaration": true
    }

The type is intentionally redacted to avoid exposing private state details.
A private property is only assignable to itself, so the type is not required.

authors: ajeffrey mhegazy


text:
JSX does not accept functional components that can return null types

TypeScript Version:  2.2.1
Code
import * as React from "react";

interface TestStatelessProps {
    output: boolean;
}

function TestStateless(props: TestStatelessProps): JSX.Element | null {
    if (props.output) {
        return
Hello World
;
    }
    return null;
}

const test = (

        1: {null}
        2: <TestStateless output />
        3: <TestStateless output={false} />

);
console.log(test);

Expected behavior:
Compiles. test has type JSX.Element. If test were rendered it would show

1:2:
Hello World
3:

Null wouldn't render anything, the first TestStateless would render it's content, the second wouldn't render anything.
Actual behavior:
If I try to use <TestStateless />, I get the following errors.
[ts] JSX element type 'Element | null' is not a constructor function for JSX elements.
  Type 'null' is not assignable to type 'ElementClass'.
[ts] JSX element class does not support attributes because it does not have a 'props' property

The {null} part of the JSX works correctly.
The same issue happens if the functional component returns undefined

The same problem:
function X <T extends Readonly<{ children?: React.ReactNode }>>({ children }: T): T | null> {
	return null;
}

The same problem:
let X: React.StatelessComponent<{}> = () => null;

Duplicate #11566

authors: RyanCavanaugh apexskier monolithed


text:
No reassign of parameters

Similar to the ESLint rule http://eslint.org/docs/rules/no-param-reassign
Using strictNullChecks causes issues with asynchronous events. Multiple control flow arguments need to be used.
function createLink(input: HTMLElement, options: LinkOptions) {
   // ...
  if (options.onClick) {
    input.addEventListener(() => {
      options.onClick && options.onClick()
    })
  }
}

The onClick method can be reassigned before the  onClick function line is executed, thus unable to infer that the property is defined. Enabling the ability to refuse mutations of parameters will improve the control flow.
Adding a flag noParamReassign could be the most elegant solution, as this enforces code standards and improves control flow.

that would not be sufficient. options can be aliased, so you need onClick to be declared as readonly as well.

Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.

authors: blake-newman mhegazy


text:
Cannot read property 'startRecordingFilesWithChangedResolutions' of undefined at InferredProject.Project.updateGraph

TypeScript Version:  nightly (2.5.0-dev.201xxxxx)
Request
getApplicableRefactors
Stack
TypeError: Cannot   read property 'startRecordingFilesWithChangedResolutions' of undefined
         at InferredProject.Project.updateGraph (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:79253:28)
         at InferredProject.Project.getLanguageService (c:\Program Files\Microsoft VS   Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:78994:26)
         at IOSession.Session.getApplicableRefactors (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:82616:32)
         at Session.handlers.ts.createMapFromTemplate._a.(anonymous function) (c:\Program   Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:81586:61)
         at c:\Program Files\Microsoft VS   Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:82799:88
         at IOSession.Session.executeWithRequestId (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:82790:28)
         at IOSession.Session.executeCommand (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:82799:33)
         at IOSession.Session.onMessage   (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:82819:35)
         at Interface.<anonymous>   (c:\Program Files\Microsoft VS Code   Insiders\resources\app\extensions\node_modules\typescript\lib\tsserver.js:83945:27)
         at emitOne   (events.js:96:13)
         at Interface.emit   (events.js:191:7)
         at Interface._onLine   (readline.js:241:10)
         at Interface._normalWrite   (readline.js:384:12)
         at Socket.ondata   (readline.js:101:10)
         at emitOne (events.js:96:13)
         at Socket.emit   (events.js:191:7)
         at readableAddChunk   (_stream_readable.js:178:18)
         at Socket.Readable.push (_stream_readable.js:136:10)
         at Pipe.onread (net.js:560:20)

Fixed by PR #19053

authors: aozgaa sheetalkamat


text:
typescript@next failing to compile lib.es6.d.ts

Steps to reproduce:
git clone https://github.com/frankwallis/plugin-typescript.git
cd plugin-typescript
npm i
tsc
npm install typescript@next
tsc

Ouput:
Heracles:plugin-typescript frank$ tsc
Heracles:plugin-typescript frank$ npm install typescript@next
plugin-typescript@2.5.1 /Users/frank/work/plugin-typescript
└── typescript@1.8.0-dev.20160124  invalid

Heracles:plugin-typescript frank$ tsc
node_modules/typescript/lib/lib.es6.d.ts(26,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(584,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(709,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(826,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(843,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(865,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(881,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(893,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(903,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(907,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(928,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(961,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(997,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1035,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1068,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1101,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1134,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1167,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1200,27): error TS1110: Type expected.
node_modules/typescript/lib/lib.es6.d.ts(1277,27): error TS1110: Type expected.

tsconfig.json:
{
	"compilerOptions": {
		"module": "system",
		"outDir": "lib",
		"target": "es5",
		"noLib": true,
		"removeComments": true,
		"moduleResolution": "node",
		"inlineSourceMap": true,
		"inlineSources": true,
		"rootDir": "./src"
	},
	"files": [
		"./node_modules/typescript/lib/lib.es6.d.ts",
		"./src/plugin.ts",
		"./src/type-checker.ts",
		"./src/transpiler.ts",
		"./src/compiler-host.ts",
		"./src/factory.ts",
		"./src/format-errors.ts",
		"./src/logger.ts",
		"./src/utils.ts",
		"./src/types.d.ts",
		"./typings/tsd.d.ts"
	]
}

Thanks

lib.es6.d.ts uses string literal types. You'll need to use the nightly TypeScript to compile it. Just run npm install -g typescript@next.

authors: DanielRosenwasser frankwallis


text:
VS release build does not generated content for _references.js

Hi,
Version:  1.8.0-beta / VS 2015
Attachments: test.zip
To reproduce,

Open up test.sln in the attached folder.
Ensure the development mode is "Debug"
Rebuild the solution.
Open up TypeScriptHTMLApp1\bin\_references.js and observe that is populated.
Change the development mode to "Release".
Rebuild the solution.
Open up TypeScriptHTMLApp1\bin\_references.js and observe that it is now empty.

We have systems in place that depend on _references.js in release mode for bundling and deployment. There should be no difference in the treatment of this file in the development and release modes.

I just opened the project and looked at the diagnostics log for both Debug and Release. The difference is that in 'Release' builds the default is to pass --removeComments, and /// <reference... directives (which is what _references.ts consists of) are comments.
If you want to keep this, then in the Project Properties, go the TypeScript page and select the Release configuration, and select the check box to Keep comments in JavaScript output.
Being that /// directives are specific to TypeScript, in the final JavaScript output they are just comments, so generally folks do want them removed along with all other comments in their final release builds.

I see. It could be argued that triple slashes are not the same as comments. We wanted to remove comments in the release build in order to help the minifier along.

authors: NoelAbrahams billti


text:
noImplicitAny option do not generate an error when the function generating this coercicion is passed as a function parameter.

TypeScript Version:
1.9.0-dev.20160523-1.0
Code (with noImplicitAny option turned ON)

class Foo {

  identity<T>(x: T): T {
    return x
  }

  bar<T>(g: (a: T) => T): (a: T) => T {
    return g;
  }

  constructor() {
    let v = a => this.identity(a)
    let w = this.bar(a => this.identity(a))
  }
}

Expected behavior:
The line binding an expression to w should error stating that 'a' implicitely has an 'any' type
OR (better)
v and w should be polymorphic (and have type (a:T) => T
Actual behavior:
v and w both have type (a:{}) => {} AND only the expression of v generates an error stating that 'a' implicitly has an 'any' type. (noImplicitAny option turned on)

The current behavior looks right to me.

a in let v = a => this.identity(a) implicitly has the type any,as there is no type annotation or a contextual type.
v does not have the type any, it is (a:any) => any, and it is not implicit. so no error should be reported here.
a in this.bar(a => this.identity(a)) has a contextual type, that is the result of the inference for T, which happens to get no useful type, so falls back to the {}. and a gets that. again nothing implicit about this.  see https://github.com/Microsoft/TypeScript/issues/5254 for this.
w does not have the type any, it is (a:{}) => {}, and it is not implicit. so no error should be reported here.

i think https://github.com/Microsoft/TypeScript/issues/5254 is the real culprit and not implictAny warnings.

authors: mhegazy sledorze


text:
Rework computed property name + decorator emit

Fixes #17028
Computed property names for properties were being elided if uninitialized, or, if initialized, run within the constructor of the class. This is incorrect - for reference, computed property names for methods/getters/setters execute outside the class, and only once. This change makes a computed property name be hoisted to outside of the class declaration if it is not "simple" (and could have observable side effects from being invoked multiple times on each construction of the class). Then, if hoisted, the hoisted identifier is used in the decorator emit if need be. If not hoisted, but still decorated (if the expression is simple), then the simple expression is duplicated into the decorator emit. As an added bonus, we also no longer omit a computed property name expression whose execution may have observable side effects if there is no initializer.
We issue errors on the usage of most complex expressions in computed property names today, but this brings the property computed name emit (when it could matter) in-line with the method/getter/setter computed name runtime behavior. This shouldn't be considered a breaking change, since we issue an error on computed names on properties which are not directly a string/number/symbol; but should now have correct emit for if/when we allow it as part of allowing local symbol types as computed property names or other proposals around expanding what we allow for computed property names.
As of now, a "simple" computed property is defined as a numeric literal, a string literal, a no substitution template literal, a keyword, or a syntactically well-known symbol - it is possible that there is room to expand this if anyone has further suggestions.

@rbuckton can you please review

@rbuckton I think I've refactored away all your concerns.

I was thinking something more like this:
// at the top of visitClassDeclaration/visitClassExpression
const allInitializedProperties = filter(node.members, isInitializedProperty);
const staticProperties = filter(allInitializedProperties, isStaticMember);
const nonStaticProperties = filter(allInitializedProperties, isNonStaticMember);
const hoistedMembers = filter(nonStaticProperties, hasComputedNameWhichRequiresHoisting);
const decoratedMembers = filter(node.members, isDecoratedClassElement);

// in visitClassDeclaration
const hoistingDeclarations = hoistComputedExpressions(hoistedMembers, createVariableDeclaration);
if (some(hoistingDeclarations)) {
    statements.push(createVariableStatement(hoistingDeclarations));
}

// in visitClassExpression
const hoistingAssignments = hoistComputedExpressions(hoistedMembers, hoistAssignment);
// prefix these before classExpression. hoistAssignment takes care of the temporary variables.

// in visitPropertyNameOfClassElement
if (hasComputedNameWhichRequiresHoisting(member)) {
    return updateComputedPropertyName(member.name, getGeneratedNameForNode(member.name));
}

// elsewhere in ts.ts
function isStaticMember(member: ClassElement) { return hasModifier(member, ModifierFlags.Static); }
function isNonStaticMember(member: ClassElement) { return !hasModifier(member, ModifierFlags.Static); }

function hoistComputedExpressions<T extends Expression | VariableDeclaration>(hoistedMembers: PropertyDeclaration[], createAssignmentCallback: (name: Identifier, expression: Expression) => T): T {
    let result: T[];
    for (const member of hoistedMembers) {
        const tempId = getGeneratedNameForNode(member.name);
        const assignment = createAssignmentCallback(tempId, visitNode((<ComputedPropertyName>member.name).expression, visitor, isExpression));
        result = append(result, assignment);
    }
    return result;
}

function hoistAssignment(name: Identifier, expression: Expression) {
    hoistVariableDeclaration(name);
    return createAssignment(name, expression);
}

@rbuckton The only issue with what you have there is that we have to hoist all computed names which could have sideeffects, not just initialized ones. So you have this matrix where:

You can have a property which is both computed and initialized - must hoist and transform the computed name and transform the initializer.
You have a property with a computed name - must hoist and transform the computed name (to ensure the expression still gets executed) and elide the property.
You have a property with an initializer - must transform the initializer (static and instance are transformed differently, one stays a member, the other becomes a statement in the constructor body).
You have a property with neither a computed name, an initializer - it is just elided.

Right now I'm just doing this by applying two (well, three) small transforms in succession - one to hoist and transform computed names, then one to handle all initialized properties (then one to write decorators, but that's mostly independent now except that it needs the output of the last transform to get its property name references right).
Thinking on it, transformDecoratedProperties is clearly the wrong name for that function - I'm going to rename it to transformComputedPropertyNames. Additionally, if the array allocations are an issue, I can modify it to take a callback to use to hoist the expressions, which should eliminate them.

@rbuckton I think this is much cleaner now.

After conversing with @rbuckton, we're going to change this to respect execution order in the event of an exetends clause which could depend on something executed within a computed property name.

Superseded by #19430.

authors: mhegazy rbuckton weswigham


text:
Disallow line terminator after arrow function parameters, before =>

Closes #2282

quick attempt at a fix, some things are probably missing / test in wrong place / error messages not that helpful

Could we get a few more expression-bodied tests?
We should be testing different parsing contexts as well, so kill two birds with one stone:

Certainly

However, the problem I ran into when I tried to fix this was that it's a real pain to work on the token-level in the checker. So I wonder if the benefit of the idea is actually worth the cost.

Maybe it would be fine to flag whether a newline occured before the => token and emit an error for that in the checker

I agree with @DanielRosenwasser   We shoudl continue parsing these, but report an appropriate error (likely in the checker, when we do grammar checks) that the arrow function isn't legal.

I'm not sure how to do this "work with tokens" thing in the checker, the approach I've taken is to add a boolean field to a new interface, and flag the error during parsing, but only report it during checking. It seemed like the simplest approach.

Just add the equalsGreaterThanToken to the ArrowFunction interface.  You can see how we parse tokens into the tree with helpers like parseExpectedToken.  (If we don't have an ArrowFunction interface, then make one).  Thanks!

@CyrusNajmabadi how does the presence of the node in the interface make it easier to figure out if there was a line terminator or not? It looks like it could produce a better error message though (or at least the position of the error would be better). From a glance, I'd have to use getLineAndCharacterOfPosition(), and compare the computed line positions of the end of the parameters with the beginning of the arrow token. That seems like more work than is really needed. But, why not

it doesn't necessarily make it easier.  But it's much more consistent with how we do the rest of our nodes.

From a glance, I'd have to use getLineAndCharacterOfPosition(), and compare the computed line positions of the end of the parameters with the beginning of the arrow token. That seems like more work than is really needed. But, why not

That sounds right to me.

Sorry.  That was a misreading on my part.  The change looks great.  Feel free to merge at any time.

hmm, I think it was slightly wrong though... the bottom branch won't ever be taken because a node is always created. I'll fix that.

done (I preferred the second approach). Sorry about the amended last commit, but it was a very minor change to use ternary instead of an if statement

:+1:   Awesome job.  Thanks!

Glad I realized it before signing off, but this is currently incorrect. We'll inappropriately give you an error in the following (I add the first just to iterate on):
// Should not be valid.
var func = (a: number): number
    => a;

// Should be valid.
var funk = (a: number
    ) => a;

// Should be valid.
var funkier = (a: number)
    : number => a;

// Should be valid.
var funkier = (a: number):
    number => a;

At least, I think these should be valid. @JsonFreeman and @CyrusNajmabadi can weigh in. Let's add that to the tests.
As for a fix, this is a bit of a hack - check whether or not the full start of the arrow (just .start) is on the same line as its end (.end).

you're right, I didn't consider the case with a type annotation for the return value at all (although I think the second case should have worked, since I was using the "end" position for the parameters).
Anyways, yeah, the suggested fix solves that, and the extra tests with return value types are good.

Yes, @DanielRosenwasser is correct, those latter 3 should be valid. funk is allowed per the ES6 grammar, and the other two can be allowed by our grammar if we put No LineTerminator Here after the type annotation.

I've made one last suggestion. After dealing with that and a merge conflict, I think this should be good to go.

done

This looks great, thanks for the PR @caitp!

authors: CyrusNajmabadi DanielRosenwasser JsonFreeman caitp


text:
Add command line flag to allow synthetic default exports

From #5285.
When --allowSyntheticDefaultImports is specified, it indicates that the module loader performs some kind of synthetic default import member creation not indicated in the imported .ts or .d.ts. We infer that the default member is either the export= member of the imported module or the entire module itself should that not be present. system has this flag on by default, however it can be overridden with allowSyntheticDefaultImports: false.

:+1:

One thing to note, with Babel dropping support for export default magic: https://github.com/babel/babel/issues/2212, do we still need this? i would expect systmjs/es6_module_loader to follow suite.

Also related https://github.com/systemjs/systemjs/issues/899

My understanding is that Babel will be removing it on the export side, but will be keeping the magic on the import side. SystemJS likewise has magic lifting on the import side. So, unless both Babel and SystemJS both drop the magic on the import side, we still need the flag.

So @mhegazy, do we want to merge this?

looks good, if you can to update the flag message that would be great.

We talked about making it an error to call the namespace import if this flag is on, as es6-module-loader copies the properties on it at run time, but not the prototype. this is however dependent on the implementation of the loader, it is possible that the loader changes the implementation to allow both to be callable.

@weswigham can you add a blurb for this in https://github.com/Microsoft/TypeScript/wiki/What's-new-in-TypeScript#typescript-18-upcoming

@mhegazy done.

thanks!

Is this the correct option to use when you want to import modules using the ES6 syntax where the definitions of the modules use exports in the form export = x?
For example, my code is targeting ES6 and I want to make use of the type definitions for Gulp. If I use:
import gulp from "gulp";

I get Module '"gulp"' has no default export.. However, if I set allowSyntheticDefaultImports to true, the error goes away.
I just want to make sure that this is one of the intended uses, as I don't quite understand the option's description.
Thanks.

You should only use this flag iff your loader will generate a default export for you if one does not exisit, e.g. using systemJs. All the flag does, it is mimics what SystemJs does at run time by creating a fake default export on modules that have the same shape as the module.
if you are not using system JS, and your loader does not do any of these tricks, e.g. AMD or commonJs do not use the flag.

@mhegazy D'oh. I'm targeting ES6 which is then being loaded by Gulp (via Babel [gulp.babel.js]).
As I mentioned here, I'm unsure as to what my options are. I'd like to use ES6 module import syntax, but then the existing type definitions (on DefinitelyTyped) will not work. Is there any guidance in this regard?

Have you tried import * as gulp from "gulp"? While in ES6 this technically shouldn't be callable/constructable, with many dts files and commonjs modules, it transpiles to the right thing (var gulp = require("gulp");) and we don't emit errors on constructing/calling it.

so lets step back a bit, ES6 introduced this new concept of a defualt export. it is a special property on the module. since ES6 modules are not supported by any engine, then there is a pre-ES6 implementation that you are using.
the question is the gulp module at runtime does not have a default property on it. if this is the case, then the fix is to update the typings to reflect that, and you can then import it as import gulp from "gulp";.
if this is not true, you can still use the ES6 imports, you just can not use the default import, i.e. import * as gulp from "gulp".
if it still does not have the default export but  your loader adds the it for you, then use this flag to avoid errors at compile time.

@weswigham I'm not at my PC at the moment, but IIRC, that syntax worked for some modules but not others, which was messy, and not really what I wanted in the first place. I will confirm this tomorrow.
@mhegazy Gulp was a bad example, since I'm actually switching to Gulp 4 which doesn't have any typings yet, but let's just pretend that I'm still using Gulp 3.x for now (because this applies to other modules as well): If I updated the typings from export = x to export default x, wouldn't this break existing code that uses the old-style import x = require("x") imports?
I will have another look tomorrow. Thanks for your help so far.

import d from "module" imports a property named default from that module.
import * as n from "module" imports all properties from the module. this is the closest equivalent to your import n = require("module").
As i mentioned earlier, default is a new thing in ES6, your existing node modules will probably not have a default export. some loaders, like SystemJs fake that by creating a fake default property on the modules on import if they do not have one.
so in short, if you want to use default, first check the module.js file if it exports a default, check the typing to verify they are accurate, and understand your loader. hope that helps.

@mhegazy,
Some things work with * as x, and some things don't (f.e. modules that export unnamed functions or object literals). It also changes the usage of the module, because you're essentially prefixing the exports, if I'm not mistaken. So, this is messy.
When I use Babel, I can import all these different types of exports in the same consistent ES6 style. I'm assuming that Babel adds the default export during import, so does this mean that it is in fact appropriate for me to use allowSyntheticDefaultImports, where the synthetic default import is done by Babel during run time?

yes.

Thanks, I really appreciate your help.

Many npm modules use module.exports = which in ES6 is equivalent to import x from 'y' (default import). import * as x from 'y' is something completely different, is results in a plain object that cannot be a function for example. So it would be really nice if TS allowed to use default imports for modules that use module.exports =  and exports =  typing.

You need a loader which loads such CommonJS modules, and creates the expected default property, for this to work at runtime. SystemJS does that, and the --allowSyntheticDefaultImports flag added in this pull request is on by default if your module type is SystemJS.

@billti I would like to use this with NodeJS. When transpiling with Babel, Babel adds this. I would like a flag to tell TS to do it too, because I don't like the import x = require('y') syntax

I don't understand what the goal of using ES6 syntax is if you're going to use it to do things it explicitly does not support? It just means if you ever do move to a real ES6 module runtime, you're going to be broken in nonobvious ways.

@RyanCavanaugh I think what @felixfbecker and I also want is just the syntax.  For example if I want to use jquery currently I can if I use import $ = require('jquery');.  Instead I would just like to use the ES6 syntax of import $ from 'jquery'.  I don't want to have type require for some libs and just ES6 import syntax for those libs that export a default.  I understand that a loader can do this by shimming a default, but why can't typescript just look and see if the lib has a default export and if not treat the import statement as if you had used the require statement instead.

@delebash I now use target: ES6 and then compile with Babel. Works perfectly with import default, in fact, import = require() is not even allowed with target: ES6.

@felixfbecker Yes this works, but one of the points of Typescript is not having to rely on babel or any other compiler and being able compile/convert it's unique code style to whatever js version and module format that you specify in the tsconfig.  This should not change just because we have an new version of javascript,  Javascript will continue to evovle ES6,7,8 and Typescript needs to support compiling to past and present versions of js.

@delebash I would argue with that, the main reason I use Babel is because TypeScript only allows async/wait for ES6 but ES6 will not transpile stuff that NodeJS does not support yet, default params for example. In Babel however I can use a preset that fits exactly what I need to transpile.

authors: RyanCavanaugh ahejlsberg billti delebash felixfbecker glen-84 mhegazy myitcv weswigham


text:
Don't crash if there's no JSX.Element during SFC resolution

Fixes #7286

:+1:

authors: RyanCavanaugh mhegazy


text:
[Transforms] Fix emit comment in synthesized function expression

Fix #8205 and #8209

:+1:

authors: mhegazy yuit


text:
Variable of type any has initial type any in control flow analysis

Fixes the following scenario that would previously produce an error:
function foo() {
    try {
    }
    catch (e) {
        console.log(e.message); // e should be of type any, not undefined
    }
}

Was there a failing test for this? If not, can we add the one above?

This is from a local branch converting the compiler itself to --strictNullChecks. Will add a regression test.

authors: DanielRosenwasser ahejlsberg


text:
fix: remove profile settings and active learning

Remove all unimplemented icons from view. This fix keeps any functionality required to add these features in the future.

Before:

After:

repo: Microsoft/VoTT