Using ComminJS modules with rollup

@adamdbradley I think you closed #3 in a rush.
angularfire2 and firebase are something you can't ignore when thinking ionic...
It's also not specific to them, it's a problem when using rollup, I think the rollup process needs to handle commonJS directories transparently.
I now have another, similar error with lodash
When I:
import { assign } from 'lodash';

I get:
[14:02:04]  bundle failed:  Error: Module /app/node_modules/lodash/lodash.js does not export assign (imported by /app/.tmp/data-source/some.service.js)

Again, there is a workaround but ionic developer shouldn't get hard time on simple tasks:
import assign from 'lodash/assign';

This is not perfect, there is a TS error:
[14:14:40]  src/data-source/feeding.service.ts(5,8): error TS1192: Module '"lodash/assign"' has no default export.

There's a switch in error between the 2, when TS is happy rollup isn't and vice versa.

BTW, rollup does a wired thing when doing:
import * as assign from 'lodash/assign';

assign will be the module, with a default property which is the assign function...
error_handler.js:45 EXCEPTION: Error in ./HomePage class HomePage - inline template:17:10 caused by: assign$2 is not a function

I know you considered #3 as someone else's problem but app-scripts is part of the ionic CLI and if the integration is not smooth you'll get ton's of complaints.
If you integrate rollup you need it to be transparent.

Hi @shlomiassaf,
We're not sure what you mean. We do support commonjs as we are using the latest version of the commonjs plugin.
https://github.com/driftyco/ionic-app-scripts/blob/master/config/rollup.config.js#L37
Please let me know if this fixes your issue. I'll re-open if needed.
Thanks,
Dan

@danbucholtz Why did you close the issue? is this a common behaviour for people contributing to your project? You didn't solve it...

I kindly ask you to try and integrate angularfire2 or lodash.
I'm trying to save you a lot of time and complaints later on, I'v spent a lot of hours on this beta, this is not how you should treat people who try to help.
This is insulting

Here's another issue for you:
In watch mode when using skip property in the nodeModules plugin for rollup (within rollup.config.js) the skip is only valid for the first run.
Save something and the next update will error since using cache for rollup causes an issue.
I'v managed to workaround the angularfire issue and now this cache thing you introduced broke it...
I know sometime people pollute the issues but this is not the case, anyone who could use the beta.12 without docs should be taken seriously, its across 4 repos of integration.

Hi,
I am seeing an issue here. I'll look into it. The goal is the user doesn't need to care if a 3rd party lib is commonjs or es2015 modules.
Thanks,
Dan

I know it's the goal and I also now that you'll get tons of complaints for these 2 libs only...
I'm trying to help.

@shlomiassaf we're looking into it and taking it seriously. This needs to Just Work or it won't be acceptable on our end. Apologies for the confusion.

@danbucholtz @mlynch This is really a core issue with the rollup bundling process.
I can't import any library.
Now moment is giving me hard time, see this issue comment, I can run in dev but I can't build to a device.
BTW, I had to use moment since the Intl polyfil is not present so iOS safari can't run angular 2 if for example i'll use the date pipe.

Hi @shlomiassaf,
We are aware of this issue and working on it. I don't have more to share right now but I hope to soon.
Thanks,
Dan

Hi @shlomiassaf,
I have successfully created a project with moment, lodash, node-uuid, localforage.  All commonjs modules.  You're right there is an issue here.  I've come up with a solution.  I'll have more details on it tomorrow.
In the meantime, the code changes to app-scripts to facilitate it are here:
https://github.com/driftyco/ionic-app-scripts/pull/29
Thanks,
Dan

@danbucholtz thanks!
I couldn't load moment via
import * as moment from 'moment'

I had to use default syntax:
import moment from 'moment'

This requires
    "allowSyntheticDefaultImports": true,

in tsconfig.json
Problem is i'm getting a new error now, in runtime...
I'm pretty sure it's not related to your change but if you have clues it will be great
EXCEPTION: Error in ./IonicApp class IonicApp - inline template:0:34 caused by: No provider for ParamDecorator!ErrorHandler.handleError @ error_handler.js:45
error_handler.js:47ORIGINAL EXCEPTION: No provider for ParamDecorator!ErrorHandler.handleError @ error_handler.js:47

@shlomiassaf,
Nice find with the allowSyntheticDefaultImports option. I'll play around with it - this sounds like the secret sauce that we need to make things work the way we want!
I'll have an update coming soon.
Thanks,
Dan

@shlomiassaf!
That option is working great so far!
Thanks,
Dan

I made my sample project public. Check it out.
https://github.com/driftyco/ionic-third-party-lib-example
Thanks,
Dan

@danbucholtz Thanks! great progress.
It looks like the bundling issue is solved.
The cache issue is still there.
The node UUID lib uses the 3rd partycrypto library that rollup treats as external dependency.
On the first run everything is fine but any code update done in watch mode will result in an error:
[21:23:35]  Error: Could not load crypto (imported by /Users/shlomiassaf/Desktop/Cisco/IONIC/ionic-third-party-lib-example/node_modules/node-uuid/uuid.js): ENOENT: no such file or directory, open 'crypto'

If we disable caching of the rollup bundle by commenting out this line code update works without a problem.
So, the problem is that caching somehow does not respect previous configuration.
For me this happened when using firebase as external module via the nodeModules plugin in rollup:
    nodeResolve({
      module: true,
      jsnext: true,
      main: true,
      browser: true,
      extensions: ['.js'],
      skip: [ 'firebase' ]
    })

@danbucholtz, still can't use angularfire2

@danbucholtz keep an eye on  angular/angularfire2#565

Hi @danbucholtz,
I am facing similar issues over using external libraries like lodash.. I tried cloning the project you linked earlier (https://github.com/driftyco/ionic-third-party-lib-example).. The application runs and the libraries seem to work fine.. But in my IDE (SublimeText), I'm getting the following issues:

For each Component ts file: Experimental support for decorators is a feature that is subject to change in a future release. Set the 'experimentalDecorators' option to remove this warning.

For each of the library imports: Module "....../ionic-third-party-lib-example/node_modules/moment/moment" has no default export. In addition, IDE autocomplete for these library symbols is not working..

 Could you please help in this regard?

I'm thinking the sublime plugin you're using likely does not support the latest major version of Typescript (2.0).  Give vscode a shot, it is maintained by Microsoft so it works incredibly well with Typescript.
Thanks,
Dan

@awe-sim As a rule of thumb I always check console errors when running the complication and only then take the IDE errors seriously.
It's hard for IDE plugins to keep up when changes are so often :)

@danbucholtz .. Thanks for pointing the issue out.. Yes the sublime plugin supported typescript v <2.0.. Using VSCODE now and its working good.. Thanks a lot.. =)

@shlomiassaf, any leads on what's going on with AngularFire? Sounds like they may use a dependency that rollup can't handle?  We may need to make WebPack an option if Rollup can't handle all libs.  That would be unfortunate as performance would suffer.
Thanks,
Dan

I'm also having a similar issue with moment-timezone.  I would love it if you guys reverted to webpack until rollup is more seriously vetted.  The collective amount of time the community has wasted battling with this new build system is a rough indictment of the quality of this release.  That, coupled with the general confusion on importing styles, iOS build failures with ionic package, et al...  is just not consistent with the quality you guys typically ship with :/
Sorry to rant here, as I know it's not the place; it's just be a super frustrating 48 hours trying to migrate my beta11 project to rc0.

@danbucholtz I think you should have a talk with the firebase guys.
I'm not sure the issue is with the rollup build process, and if it is it's unique to the firebase build...
Just to recap I will sum up...
There are 2 issues, one related to firebase the other is not.
Rollup can't handle firebase.
It should be noted that this happens when firebase is imported from angularfire2 I have not checked what happens if we omit angularfire2 and try to import firebase alone.
@danbucholtz This should hint, if you can go with firebase without angularfire2 you should go to the angularfire2 guys and vice versa :)
To workaround for now see this issue comment
Rollup watch not working when using skip option in rollup-plugin-node-resolve
Basically I used skip to workaround the firebase issue.
The problem is the cache bundle implemented in the bundle process, when cache is disabled there is no issue. When cache is enabled 1st compilation works fine but when updating the code rollup throws that he can't find firebase
Hope it helps, Thanks.

@danbucholtz About your note, moving to Webpack instead of Rollup I think it is the right place to go to and should have been used from the start.

Webpack is the best tool today for development, it will also be the fastest on live reload.
Webpack has AoT compilation plugin (built by @robwormald) that is not coupled to the cli.
Webpack has tree shaking (performance....)
Webpack is the de-facto tool for angular developers, the CLI uses it.
Webpack supports lazy loading with the angular router, out of the box.
Webpack's new DLL plugin will reduce build times since all ionic-angular will live there.

There are lot's of other reasons, really so many.
the app-scripts package is trying to implement things webpack does and does great!
I don't see any benefit of using a custom rollup procces when it's clear that the direction of the community (at least angular) is webpack.
The angular team is going to release a lot of tools used by the Angular CLI as decoupled webpack plugins (see npm namespace @ngtools), this is what they said in angular connect.
I really thing you should reconsider and move to webpack.
BTW: My angular 2 library is using webpack for development and Rollup for UMD bundling so I can deploy an AOT ready library and an ES5 (UMD) library... It's possible to integrate the 2

@shlomiassaf,
Don't use skip, used named exports to get Firebase working.  What we need here is documentation.  We've been able to get every library working with Rollup that we've tried, sometimes it has just taken a little configuration using named exports since the plugins have some weird dependency or weird way of exporting data that Rollup can't quite figure out.
Webpack is a nice tool but start-up time will be 2-3x slower from our tests.  Do we sacrifice speed for everyone for the subset of people that use commonjs libs? I'm honestly not sure. This question has weighed heavily for me for a few days now.
Thanks,
Dan

Hey @danbucholtz I got a big production app updated to RC0 with Firebase 3 and AF2, took me a while but I got it working following this tutorial https://playcode.org/getting-started-with-ionic-2-rc0-firebase-3-angularfire-2/
Also, whenever I want to use the regular JS SDK instead of doing:
import * as firebase from 'firebase'
I just do declare var firebase
Before the @Component declaration and it works so I think you guys could look into a solution incorporating this instead of going back to webpack.

Thanks for the tip @javebratt!

@danbucholtz, documentation/blog post will really help. Since you folks have been able to get most of the libraries working, I think it can save community some time figuring out things.
I faced issues with katex, providing named exports solved the issue. for me,  one of the recent rollup optimizations seems to be causing problems, https://github.com/rollup/rollup-plugin-commonjs/issues/115.
Was also facing issues with mathjs apparently related to node's built-ins.

@pskhodad,
That may explain why things were "working better" for me a few weeks ago in earlier testing of Rollup.  I was running my own custom branch of 4.x with the unambiguous grammar fix in.  Thanks for pointing this out to us!
Thanks,
Dan

Hi
My two cents on this.
I have been updating my own app as well using various libraries some not the most common e.g:

breeze.js
moment
lodash
google phone number lib

and a couple of others.
I must agree with @shlomiassaf there are a large number of issues with the move to rollup. I have this feeling right now most people are "hacking" libs or the config to get things working - almost a trial and error.
My rollup config file looks like a mess with all the 'named' libs i have had to add in and also the amount of libs i have had to manually add into index.html + assets folder.
I understand there are benefits of rollup but i feel we have jumped the gun a little on it and maybe those benefits are not going to be realised by the large majority of users at this point because of the challenges to hack things together.

There are couple of suggestions by @nolanlawson described in https://github.com/driftyco/ionic/issues/8356.
I guess this can provide best of both worlds,
"using Rollup in a very limited way (to produce a small CJS bundle), and then following up with Webpack/Browserify."
"Another possibility would be for the ionic-app-scripts to include a small whitelist of modules that are known to play nice with Rollup, and then use Browserify/Webpack for the rest."

@danbucholtz when you say 2-3x slower startup, any idea why this is? Maybe with some configuration web pack can achieve the same results and being more "compatible", maybe it makes sense to invest in that instead of investing in rollup play nice with everything. We have a lot to gain from webpack's popularity especially since it is being widely used in angular2.

@masimakopoulos, Webpack is slower because it doesn't hoist all dependencies into the same scope. Long story short, each dependency is in it's own closure with WebPack/Browserify.
Nolan Lawson, a good friend of Ionic and PouchDB dev, wrote a great article on the subject. It's essential reading in my opinion.
https://nolanlawson.com/2016/08/15/the-cost-of-small-modules/
The article shows not only the reduced bundle size of using something like Rollup, but also the performance improvement and startup time improvement.
We are not ruling out Webpack completely, but we're going to stick with Rollup for now.  That's not to say the community couldn't create a Webpack config that others use, it's just not something we're going to pursue at this time.  FWIW, we consulted with the Angular team before settling on Rollup.
Thanks,
Dan

@danbucholtz Will this repo ever support Webpack? i've been using it since alpha.43 and my project is basically binded to webpack at this point, changing to Rollup would mean scrapping up all my bundling pipeline so far and start learning Rollup, which basically means lots of time and effort will have to be invested in that process.
I honestly think it should be up to the developer which bundle tool to use, may ionic promote Rollup as the recommended way, but allow the developer the option to chose Webpack.
Is there a way for me to stick with Webpack right now with RC.0?

@Luchillo From a developer point experience should be constant, so if Rollup is the choice it should be fully functional and high quality so I think getting there is more important then supporting 2 build systems.
Once the Rollup CLI is stable I think a webpack solution might come up... I agree with @danbucholtz  on that.
I also believe the Webpack team will go towards performance improvements, at least getting close to rollup as much as possible but this will take some time.
@danbucholtz I solved all issues raised here with the new RC and the suggested solutions (named exports). I must admit, its not trivial and requires custom configurations which is a blocker for a lot of developers and will make them spend a lot of time on strange 3rd part integrations issues.
I think we can close this, maybe you can open a webpack issue for people to discuss...
Please close if you agree :)

Not sure it makes sense to close this as I don't think using named exports in a config file that's loaded in the node_modules directory is a valid fix for this. I would hope there is a better outcome that doesn't involve modding config files on a case by case basis every time we add a new library to our project.

@henry74 I agree with you. If we have to have a custom config for every single library, then rollup is not the right approach. However, what we're seeing is that many libraries have moved to the new, standard module format so they Just Work without you having to do anything. Additionally, many commonjs modules do work without extra configuration with default rollup plugins we're adding to app scripts by default. However, it's a few, admittedly important libraries, that get a bit too clever about their modules that make it difficult for rollup to understand them.
The way we look at it is, if es2015 is the standard approach, shouldn't we pick it going forward? We'll assume that the most popular, highly used libraries, will soon adopt it if they haven't already. For those that don't, we have ways to make it work, and we're continuing to add more plugins and configs out of the box for rollup so you don't have to have a custom config.
I know it sucks in many ways, but it's not about rollup vs webpack, it's about a standard module format that the industry is adopting as we speak, vs custom ones that will be irrelevant much the way coffeescript is now that we have ES6 :D
We gain a lot of awesome benefits by having a standard module format that rollup can efficiently bundle, especially when we consider progressive web apps where loading a 2MB bundle file is just not acceptable.
Anyways, that's the counter argument here that many Ionic team members believe in. It's not a universal opinion on the team, though, and even I have misgivings about it. However, in my testing, I've found that many if not most/all modules I've tested work fine, so I don't know.
That's my mini rant for the night :D

@Luchillo,
You're free to use Webpack but we won't actively support you, have docs, etc. I am confident the community will create some solid options here.  At this time, we are sticking with Rollup.
Yes, we did say we were going to go with Webpack 2. We weighed the pros and cons and settled on Rollup.
Thanks,
Dan

To add to what @danbucholtz said, the way we built all of this is that you can use other bundlers if you want. It won't be the official way, but you're entirely free to have any kind of script or build chain you want. If your code compiles and runs, that's all that matters if you're okay with the tradeoffs for your tool of choice!

@danbucholtz Ok Rollup it is, so if i would like to stick for the time being with Webpack i wouldn't be able to make use of ionic-app-scripts? would i have to provide both the live reloading for ionic serve as well as the compiling that ionic run <platform> does after the JS build?

@shlomiassaf

BTW: My angular 2 library is using webpack for development and Rollup for UMD bundling so I can deploy an AOT ready library and an ES5 (UMD) library... It's possible to integrate the 2

I'm just doing dev, learning ionic2 + angular2 right now, and fast debugging with ts source maps is far more important to me than than a compact deployment. I jumped directly from gulp so webpack is still new to me. Can you (or someone else) share a webpack config that works with the RC0 build process for dev?

@mlynch I see your point and sounds the way forward. Can we have some documentation for libraries that do not work out of the box with rollup today, on how we can make them work, so that we don't have to go through ten's of closed issues to find the solution each time?

@mixersoft I'm with you about wanting a webpack example working with RC.0.
However in my case this is a little more complex, i already have an app in the Play Store and IOS store, so i really would like to stick with what i already know (Webpack) instead of figuring out Rollup quirks.

@masimakopoulos,
I am writing that documentation as we speak. Expect for it to be posted today.
Thanks,
Dan

@danbucholtz awesome. Please add a link here when you are done.
Also @shlomiassaf could you fix the typo in the title so it can be found more easily in the future?

I gotchu

@masimakopoulos,
It is looking like it may be one more day on the docs.  I am doing a deep dive into the various issues and how to configure Rollup to circumvent them.
Thanks,
Dan

All,
What other libs are people having troubles with? I am trying to understand the breadth of the issues so I can document them well and come up with solutions.
Here's how you import Moment.
import moment from 'moment'

@shlomiassaf,
Here's an Angularfire2 sample.    Angularfire2 was not really any different of a solution than the pouchdb or some of the other commonjs libs getting clever with import/export. Using namedExport options in the rollup config is the solution. See the example here.
@mixersoft,
We are tracking the source map issue here.
Thanks,
Dan

The one that I need in particular is moment-timezone... It looks like this has been resolved with the latest ionic-app-scripts changes, but it may still be worth mentioning in the documentation you're working on.
Thanks for doing this by the way!  We definitely need it :)

@mlynch was able to get moment-timezone to work if I remember correctly.
I will add it to my list of libs to create a sample for.
Thanks,
Dan

@danbucholtz moment-timezone for me was actually a typescript error. It adds ts to the Moment object and for some reason TS didn't like that. Curious to see how you got it working without (myMoment as any).tz

@mlynch I also got it working in same way (moment as any).tz

@aggarwalankush,
Yep. This isn't a hack, this makes sense in the Typescript world.  I don't think there's a notion of type definition extension, so the moment instance is still typed according to the moment type definition.
If you don't want to use the as any, one could use an implicit any shorthand module declaration in a declarations.d.ts file that looked like this:
declare module 'moment';
declare module 'moment-timezone';

Thanks,
Dan

@danbucholtz Yes this is not a hack and it's just typing so doesn't matter much also. But that declarations.d.ts file seems interesting. Should I put it in root directory of project?

I always put it in src. It is pretty great. I use them occasionally for libraries that don't have type definitions.
When you import moment from 'moment', moment has an implicit any type then. It's pretty nice and flexible.

@danbucholtz Thanks for writing a doc on external library usage. With the Ionic 2 beta releases I had also problems with Chart.js ([http://www.chartjs.org/]) and ended up with a quick-and-dirty load in index.html. I could not test it with RC0 until now, because I am still struggling to get PouchDB started, which was fine in the Betas... For now, I will stop with this Ionic 2 project and wait until third party libs are more easily loaded into Ionic 2.

I have problem with angular-in-memory-web-api: https://github.com/angular/in-memory-web-api/issues/42

All,
We've posted some docs on the subject. Note: They match a version of @ionic/app-scripts that will be dropped in the next day or so. 95% of the concepts still apply.
http://ionicframework.com/docs/v2/resources/third-party-libs/
http://ionicframework.com/docs/v2/resources/app-scripts/
Here's an example with AngularFire2.
Here is a project I implemented that has most libraries in it that Ionic users have reported trouble with. Most of the libraries worked, but a couple did not. Here is the summary of the findings.
Please let me know how everything goes.
Thanks,
Dan

@danbucholtz i'm seeing you have that example with lodash, however what about lodash modules?
Say i'm importing it like this:
import { map, reduce } from 'lodash';

Then the freaking cli complains:
bundle dev failed:  Module /home/carlos/Carlos/OSGroup/startApp/node_modules/lodash/lodash.js does not export map (imported by /home/carlos/Carlos/OSGroup/startApp/src/providers/db.ts)

[12:27:34]  Error: Module /home/carlos/Carlos/OSGroup/startApp/node_modules/lodash/lodash.js does not export map (imported by /home/carlos/Carlos/OSGroup/startApp/src/providers/db.ts)

This was working with my Webpack setup right before i started transitioning to Rollup.

Try this:
import _ from "lodash";
_.map(...)
Some of the imports have to be modified to work with Rollup.

@Luchillo,
@Kobzol is correct.  If it's a third party module, it's best to just import the whole thing for now since most are commonjs.  See our docs on third party libraries here.
Thanks,
Dan

@shlomiassaf, you figure out the cache thing? I am trying to come up with a solution for it right now.
Thanks,
Dan

@Kobzol Yes i know that can be done, the objective of importing the individual modules was to limit the size of the lodash import, maybe three shaking takes care of it, idk but still this should work.
@danbucholtz for the time being i'm going to import the full lodash lib, is there any issue to track about those kind of sub-modules with Rollup or this repo?

 Commonjs modules aren't tree shakable.
If you want everything to just work nicely, lodash-es is the es2015 version.
The JS community is right on the verge of a massive shift from commonjs to go all in on the standard ES2015 modules. Once Node adopts it, which they are committed to and soon, it will be game on and ES2015 will be off the races.
We just need to get through the next few months to get there.
Thanks,
Dan

Ok so lodash-es is the next version, does it works with sub-modules (or however it is called)?
Also i don't see the @types for lodash-es, will the regular ones work?

Now here start my hell, i had a whole range of libs in my Webpack config, how am i supposed to import this libs or their equivalent in Rollup?:

Chart.js.
signature_pad.
comparev.
font-awesome (Previously done using the font-awesome-webpack package).
Define a variable's value in global scope.
intl
ng2-charts
web-animations-js

I also have 1 custom font i need to copy/paste, is that in the assets folder?

@Luchillo,
I don't think your code will have to change much at all.  For the most part, anything that was like this:
import * as something from 'someLib'

should become:
import something from 'someLib'

If the fonts go into a folder in assets it will automatically be copied over.
Thanks,
Dan

Ok that leaves moment, lodash, ng2-charts all green.
However intl, web-animations-js were called in a polyfills.ts file and in webpack was a separate entry, how would i do the same in Rollup, do i have to make a Rollup config file?
My webpack config used the ProvidePlugin to provide chart.js, signature_pad and comparev as global scope, just like an html script tag would load those libs, how to in Rollup?
Lastly i need to define a variable, what i do is to require the package.json, then use the version attribute to set the VERSION variable in the app's global scope with webpack's ProvidePlugin, Rollup?

@Luchillo,
Here is the documentation on customizing the build process. So far we only have it populated for bundling, which is what you'll want.
http://ionicframework.com/docs/v2/resources/app-scripts/
Thanks,
Dan

@danbucholtz So i started editing my Rollup config, it compiles with only a few warnings about unused vars, however in browser this error pop's in console:
Uncaught ReferenceError: IntlPolyfill is not defined

Which i've tested and it has an error with my polyfills that i'm trying to import in app.module,ts as:
import './polyfills';

I've tested commenting the imports in that file and error changes depending the lib that is first in the file, if i comment intl, then web-animations-js polyfill breaks, so this is not the way to import polyfills?

@Luchillo,
Maybe it is best to create a post on the Ionic forum. We're happy to help but I'm not sure this is the correct medium with all of the other subscribers.
I would need to see your code to help further. I don't have the necessary context.
Thanks,
Dan

Yes, i already have, however the response time of anyone that can really help in this new issues is close to 2+ weeks, here's the post, it has more context about how am i trying to import, i don't think is that complex to reason about: https://forum.ionicframework.com/t/how-to-rollup-pollyfils/66108

Hey folks, I have a couple projects with this setup so I created a post about how to get it working. Not ideal, but until the Firebase team updates their code base it's the best I could do.
http://alexmgrant.github.io/ionic/2016/10/06/ionic-rc0-&-firebase.html

@danbucholtz I'm having issues with ImmutableJS, getting a .../immutable.js does not export fromJS error on build. Any advice?

I was able to import and use immutable.
See here for an example, and see our docs on third party libs here.
Thanks,
Dan

I'm having trouble using d3 and d3-request specifically.
According to Mike Bostock the bundle process "is not importing the code from the ES2015 source, per the module (and jsnext:main) entry point defined in the package.json. Instead it appears to be pulling from the generated UMD bundle"
If anyone could help me resolve this, there's a 100 bounty on my stackoverflow question which I'm almost certain is related to this issue.
http://stackoverflow.com/questions/39909200/d3-4-0-import-statement-gives-moduleexports-wrapper

@parliament718,
d3 has a strange default export, so I had to use the full module import syntax:
import * as d3 from 'd3';
console.log('d3: ', d3);

The log statement should reveal what fields it has and the docs should reveal how to use them.
We are definitely importing the code from module, then jsnext:main, then main in that order.
Thanks,
Dan

Hello all,
Just as a follow up, we have a PR open right now adding Webpack support. Webpack 2 beta has come a long way and the start-up time gap is not nearly as long as it once was.
Hopefully this will be released sometime next week.
Thanks,
Dan

@danbucholtz Man i'm glad to hear that, i'll be the first (or at least i'll try) to implement it when the PR get's merged.

@danbucholtz I checked all the links and also your mega test. I am trying to use https://github.com/videogular/videogular2
This is used for videos on iOS. I just want to show video on autoplay on iOS and am not able to find a native plugin, so thought I would integrate videogular2. But I a not able to do so. Can you please take a look at this too?
Thanks

I have same issues.
Ionic bundles succesfully in case of 'out of the box' but customizing is painful.
I found not documented --dev  flag which only ables development build for ionic run.
Rollup still has lot of issues with external libraries. I cannot understand why it was choosen.
I tried to use webpack with Ionic2RC1 in my project.

ts-loader just stuck at 49%
awesome-typescript-loader built Ionic with a lot of errors. Result build was unrunnable.

I even tried to build Ionic2 from sources but I've met runtime error
Uncaught Error: Can't resolve all parameters for provideLocationStrategy: (PlatformLocation, ?, Config).
Few words about performance.
Webpack has code-splitting and CommonChuncks plugin which significaly improve development performance.
e.g
~700ms watch-rebuild for Webpack
~7s watch-rebuild for Rollup

@Dan: Thanks for adding webpack support. I am eagerly waiting for this support :-)
Thanks,
Deepak.

We have entered a beta testing phase with Webpack.
Please see this post if interested in testing.
https://forum.ionicframework.com/t/help-us-test-webpack-support-in-ionic-2-app-scripts/67507
Thanks,
Dan


Missing charger_connection_state

From https://github.com/skodaconnect/homeassistant-myskoda/issues/63:
Logger: myskoda.rest_api
Source: /usr/local/lib/python3.12/site-packages/myskoda/rest_api.py:43
First occurred: 12:01:54 (1 occurrences)
Last logged: 12:01:54

Failed to load data from url /v2/air-conditioning/. Return value was '{"estimatedDateTimeToReachTargetTemperature":"2024-10-02T10:01:54.223977733Z","state":"OFF","runningRequests":[],"targetTemperature":{"temperatureValue":21.0,"unitInCar":"CELSIUS"},"airConditioningAtUnlock":true,"windowHeatingEnabled":true,"steeringWheelPosition":"LEFT","seatHeatingActivated":{"frontLeft":true,"frontRight":true},"windowHeatingState":{"front":"OFF","rear":"OFF","unspecified":"INVALID"},"timers":[{"id":1,"enabled":false,"time":"00:00","type":"ONE_OFF","selectedDays":["SATURDAY"]},{"id":2,"enabled":false,"time":"00:00","type":"ONE_OFF","selectedDays":["SATURDAY"]}],"carCapturedTimestamp":"2024-10-02T10:01:26Z","errors":[{"type":"UNAVAILABLE_CHARGING_INFORMATION","description":"APIs for obtaining power cable connection/lock information are not available"}]}'
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/myskoda/rest_api.py", line 41, in _make_get_request
data = deserialize(response_text)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "", line 25, in mashumaro_from_json
mashumaro.exceptions.MissingField: Field "charger_connection_state" of type ConnectionState is missing in AirConditioning instance

I can handle thi in #73


How to process data with tab?

Since colbert works with tab-separated file, e.g.

Queries: each line is qid \t query text.
Collection: each line is pid \t passage text.

I'm wondering if my passage text already has a "\t" in it? Will these cause error?
What's the recommend way to handle this?

If you don't escape it, yes it'll cause a parsing error.  You can either escape the character manually, or use a library to save the TSV file (which will do the escaping for you).

If you don't escape it, yes it'll cause a parsing error. You can either escape the character manually, or use a library to save the TSV file (which will do the escaping for you).

Thanks. By the way, I found I can directly pass a data dict to Queries
Queries(data={q_id:q for q_id,q in zip(query_ids,queries)})

But for index, I can't do it this way. So I escaped the character.


refactor: rename state variable

GH card ticket "link": #ADD LINK TO GITHUB TICKET OR ISSUE
Description
Renamed isEntered to isConnected and removed TODO.

hmm I am not sure about changing name to isConnected. Because if I read a title "isConnected" I would think that the user is already connected to the sockets as well, but this is wrong


Replace all instances of using index in an array maps in React renders with a hash

Description
We use iteration indices as key's in our react renders it quite a few places (or we don't provide a key altogether).
This is not ideal for React, because React uses the key to de-dupe DOM updates, and all keys invalidate in an array if you re-order the array and use the indices as your key.
Considering, everywhere we use map we should be:

Providing a key on the top level JSX element
Creating the key by hashing the item being iterated to guarantee a unique, persistent key as long as that item doesn't mutate

Steps to reproduce
const toIterate =  [1,2,3];

export const IterateFail = () => {
  return (

      {toIterate.map((item, index) => (

{item}

      )}

  ));
}

Now if I reorder toIterate by adding [0,1,2,3] or by removing [0, 1] react will re-render everything.
We can improve this by doing:
import stringHash from "string-hash";

const JSONSafeStringify = (input: any): string => {
  let cache = [];
  const result = JSON.stringify(input, (key, value) => {
    if (typeof value !== "object" || value === null) {
      return value;
    }
    if (cache.includes(value)) {
      // Circular reference found, discard key
      return undefined;
    }
    // Store value in our collection
    cache.push(value);
    return value;
  });
  cache = null; // Enable garbage collection
  return result;
};

const hash = (obj) => {
  if (!obj) return 0;
  return typeof obj !== "string"
    ? stringHash(JSONSafeStringify(obj))
    : stringHash(obj);
};

const toIterate =  [1,2,3];

export const IterateWin = () => {
  return (

      {toIterate.map((item, index) => (

{item}

      )}

  ));
}

Now re-orders effect order of each item the DOM but not rendering of the contents of any item.
Expected result
Re-orders (e.g, in inline blocks) shouldn't trigger a re-render of the whole list.
Actual result
Re-orders (e.g, in inline blocks) shouldn't trigger a re-render of the whole list.
Environment
Tinacms Package Versions
N/A (for NDA reasons)

This issue is a bit over-broad IMO. The "steps to reproduce" section here demonstrates a principle in React but doesn't actually demonstrate any behavior in the TinaCMS code.
I realize using indices as keys is technically incorrect, but in some places that's the only identifier we have (hence the moderately complex solution you've proposed as the most reasonable alternative.) In some cases (though not likely for inline blocks,) a "dumb" re-render might be cheaper than serializing the object tree.
Additionally, I don't think "it unnecessarily triggers a re-render" is enough of a symptom to act on. End users won't notice re-renders unless (/until) it starts tanking framerates.
I'm closing this issue because "various parts of the codebase are not idiomatic" is not something we can or should tackle right now. If you believe this issue is causing a specific problem in a Tina implementation, I encourage you to post again!

@dwalkr to be more specific, any field implementation in Tina that handles arrays of anything is a problem, where we use index as a key.
Any re-order of this array has react lose its mind.
For example, in large Inline Blocks or Group lists, this can take seconds to propagate the result of the re-render, because it re-renders every child in the DOM.

Yeah we can change the key for InlineBlock to be blockName or something, since blocks do get re-ordered we should change this. If you can identify other specific instances of where index is being used as the key, we can fix as necessary.

This issue is broad though, let's trackdown the specific places where we need to make changes.

@kendallstrautman @dwalkr totally agree. The reframing of this should be: fix any instance where an end-user (developer) or their end-user (editor) can manipulate or re-order the array.
The most obvious offenders are any fields (inline or not) that can manipulate arrays.

"Fix any instance..." is still an unhelpful framing, particularly for a bug report.
I genuinely appreciate the legwork in identifying the likely culprit of what I imagine to be a bug you are experiencing in a Tina implementation, but an issue that requests us to make the code look like X anywhere it currently looks like Y is not very useful on its own. There is (I'm assuming) a real problem here, but it's stated so indirectly that I would struggle to evaluate the quality of a solution intended to address it.
Practically speaking, if there are areas of the codebase with poor key prop handling that don't have a noticeable impact on the functioning/performance of Tina, I don't think it's important to fix them.


Fix error in paths filtering for detekt-cli

Fixed errors in path filtering for gitlab-cli.
Changes made according to comments in PathFilters.kt
    /**
     * - If [includes] and [excludes] are not specified,
     *   return false.
     * - If [includes] is specified but [excludes] is not,
     *   return false iff [path] matches any [includes].
     * - If [includes] is not specified but [excludes] is,
     *   return true iff [path] matches any [excludes].
     * - If [includes] and [excludes] are both specified,
     *   return false iff [path] matches any [includes] and [path] does not match any [excludes].
     */
    fun isIgnored(path: Path): Boolean

@BraisGabin take a look, please, I guess there was a problem in #7007

@3flex would you mind reviewing the changes as well, please?

Warnings

:warning:
This PR is approved with no milestone set. If merged, it won't appear in the detekt release notes.

  Generated by :no_entry_sign: dangerJS against 0c78c21977827c08d05f9f120e9bc68381d178ed


Can't Push.  Upstream branch of your current branch does not match the name of current branch

Describe the bug
Commits work fine.  Pulling is fine.  Get's stuck pushing with this error.  I'm not sure if this is an ssh issue or what.  GitHub Desktop pushes the commit fine.  I'm using SSH without a passphrase.

Relevant errors (if available)
No response
Steps to reproduce
Set up automatic pushes.
Expected Behavior
No response
Addition context
No response
Operating system
macOS

Did you rename your local branch? I don't think git likes an upstream branch called differently from a local branch.

I don't think I renamed it?  How do I check this?  Both should be "main" correct?

correct

Do you know how I would check the branch names?

Just go to your remote repo on GitHub. The branch name is shown above the file list.

There is only one branch: main.

Maybe it is because my current branch in Obsidian Git Plugin options is "Master" not "main"?  I can't change it?

Could you run git branch in the terminal and share the output? I want to see which local branches you have.

So I actually deleted everything.  Uninstalled the plugin, and then I recloned my repo and then reinstalled the plugin.  Now the branch matches in the plugin main.   Which is the only branch that I have.  It must've been a setting I had in git for push HEAD:master or something from previous tinkering
But now it won't pull, says that I need to set my username.  I am using Github Desktop.


No model is configured. You must configure a model to use with the [Adldap\Laravel\Auth\DatabaseUserProvider].

I'm getting this error:
No model is configured. You must configure a model to use with the [Adldap\Laravel\Auth\DatabaseUserProvider].

in AdldapAuthServiceProvider.php (line 90)

at AdldapAuthServiceProvider->newUserProvider(object(BcryptHasher), array('driver' => 'adldap', 'table' => 'User::class'))
in AdldapAuthServiceProvider.php (line 37)

Any idea?
I have in auth.php:
'providers' => [
     'users' => [
         'driver' => 'adldap',
         'table' => 'User::class',
     ],
],

And in adldap_auth.php:
'provider' => Adldap\Laravel\Auth\DatabaseUserProvider::class,

Hi @pmirandaarias, you're using the wrong array key for specifying your model.
Also, you can't use class constants in single quoted strings.
It should be:
'providers' => [
     'users' => [
         'driver' => 'adldap',
         'model' => User::class,
     ],
],


WIP! Feature cn 1 book picker

Describe what your pull request addresses

[ ] Allows the user to select a book of the Bible to edit.

Test Instructions

[ ]

This approach is discarded in favor of how gateway admin selects books.


Change key-file property name

Purpose
Changing the property name into an existing value called keyFileLocation
Security checks

Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes
Ran FindSecurityBugs plugin and verified report? yes
Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes

Please merge only after https://github.com/wso2/testgrid/pull/972 PR is merged.


Font size in layout tree too small

On fedora 33, HIDPI laptop screen, 150 dpi,
the font size of the tree view is much too small: it is at the edge of legigibility and there seems
to be no way to make it larger, neither in the wxGlade preferences, not in in the OS appearance-font
preferences.
Is it possible to provide a preference to change it, or at least make the current size a bit larger?

I will look into this.
As workaround, you can insert a SetFont line into tree.py -> WidgetTree.__init__:
class WidgetTree(TREE_BASE):#, Tree):
    def __init__(self, parent, application):
        style = wx.TR_DEFAULT_STYLE|wx.TR_HAS_VARIABLE_ROW_HEIGHT
        style |= wx.TR_EDIT_LABELS
        if wx.Platform == '__WXGTK__':    style |= wx.TR_NO_LINES|wx.TR_FULL_ROW_HIGHLIGHT
        elif wx.Platform == '__WXMAC__':  style &= ~wx.TR_ROW_LINES
        TREE_BASE.__init__(self, parent, -1, style=style)
        self.SetFont( self.GetFont().Scaled(1.2) )

P.S.: Please try different values for the scaling factor and provide feedback about your prefered value.

I tried your new code. An optimal value (for me) would a scale factor of around 1.3 - 1.5. Of course there is a balance
between readability and the number of items on screen. I think I will stick with 1.5
The new gui option works as expected (after a restart).
Thanks for the speedy fix.

The font size will now be modified immediately.

pre-release 1.1.0a1 is online now


Docker image on ARM

I noticed that the ARM Docker image does not exist.
Is there any plan to do so?

You can find the source of this image here: https://gitlab.com/AnatomicJC/docker-images/-/blob/main/Dockerfiles/mailhog/Dockerfile
Cheers,

I LITERALLY just forked the image and ran
docker buildx build --push --platform linux/arm64,linux/amd64 -t arjenz/mailhog:latest .

to build and push it to Docker Hub. You're free to use it: https://hub.docker.com/r/arjenz/mailhog
If you want to try out a new project, created by a colleague of mine (in Rust), here's MailCrab: https://github.com/tweedegolf/mailcrab ! Also available on Docker Hub: https://hub.docker.com/r/marlonb/mailcrab

Yet another option with ARM64 support:
https://hub.docker.com/r/wyga/mailhog

Are there any plans to add this?


Suppot yml (encoding/decoding)

metafacture should support YML

Would #400 meet your needs?

Would #400 meet your needs?

I think in theory it would. Somehow I can't test the decode/encode-yaml-functions with an metafacture-core version of your branch that I build with ./gradlew installDist.

Thanks for the hint. The new YAML module has to be added to metafacture-runner (fixed in a30ee56).


Remove load_and_embed_v1 method since it is not used

Description
Since load_and_embed_v2 is the method that is being used, load_and_embed (v1) has been removed from the embedchain class.
Fixes #629
Type of change
Please delete options that are not relevant.

[ ] Bug fix (non-breaking change which fixes an issue)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
[x] Refactor (does not change functionality, e.g. code style improvements, linting)
[ ] Documentation update

How Has This Been Tested?
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Please delete options that are not relevant.

[ ] Unit Test
[ ] Test Script (please provide)

Checklist:

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

Maintainer Checklist

[ ] closes #629
[ ] Made sure Checks passed

@dev-ayush69 : can you please resolve the conflicts? and let me know when it done.

@dev-ayush69 : can you please resolve the conflicts? and let me know when it done.

@taranjeet I have resolved the conflicts.

Thanks.
Can you please make sure that all the tests pass?
@dev-ayush69

@taranjeet Done 👍🏼


dApp: add custom query parameter parsing

Closes #2839
Details in the commit message and code.

This just adds more abilities to parse the query. The old feature set remains as it was.
No CHANGELOG entry necessary I think.


Make Management API port configurable.

Currently, the port Management API listens on is hardcoded to 8080. This could cause port conflicts in certain deployments.
### Definition of Done
- [ ]  All OSS/DSE Docker images are built with a port that is configurable via setting an environment variable
- [ ] The current hardcoded port of 8080 should be used if the environment variable is not set/present
- [ ] The README is updated to document the environment variable for setting the port.

This is related to https://github.com/thelastpickle/cassandra-reaper/issues/1422


PayPal donate link returns error

Clicking on the donate button in the readme returns the following error:
Currently PayPal accounts in Ukraine are only able to send payments. This recipient is not eligible to receive funds.

Hi NoahAndrews
Thanks for letting me know.
Seems that for Ukrainian users there is no chance to use PayPal for receiving payments.
I will remove the Donation section in the next commit.
Have a nice day

Fixed in version 1.1.0


Update Candid Files

Motivation
The canisters APIs have been updated.
Changes

Updated the candid interface files for the canisters used in this library.
Updated the javascript bindings for the latest candid interfaces.

Tests

[ ] Please check the API updates for any breaking changes that affect our code.

I bumped the ic-mgmt size limit to 4kb instead of 3kb
{
    "name": "@dfinity/ic-management",
    "passed": false,
    "size": 3078,
    "sizeLimit": 3000
  }


Support for requirement parameter

Add support for the requirement parameter 14.5

Should be added to the Authentication and Sign payload structs.
Convenience methods constructing a valid "requirements map".

I think I've got this mostly working in the Auth payload: https://github.com/anfly0/exBankID/compare/master...davemenninger:support-requirement-parameter
@anfly0 Can you let me know if this approach seems good?  If so, I can continue onward with the Sign payload.
Also, can you give me an example of how you'd see a convenience method for the requirements map would work?

@davemenninger At first glance, this looks great!
I will take a closer look and run some tests as soon as possible.
Whenever you feel ready, please open a PR, and I will get back to you if there is anything that needs to be changed.
The convenience methods are not a hard requirement for this issue.
The general idea is to have a set of composable functions that can be used to construct a  "requirements map".
Example:
%{"certificatePolicies":["1.2.7<IP_ADDRESS>", "1.2.7<IP_ADDRESS>", "1.2.7<IP_ADDRESS>"], "tokenStartRequired":true} =
certificate_policies(%{}, :bank_id_on_file)
|> certificate_policies(:bank_id_on_smart_card)
|> certificate_policies(:mobile_bank_id)
|> token_start_required(:true)


[Plugin] ServiceNow

This plugin suggestion is for a new ServiceNow product that recently went into GA a few months ago called Site Reliability Operations  the app is free if you are already using ServiceNow’s event management module.
From ServiceNow Community:
Summary
Site Reliability Operations application automates the incident response lifecycle by monitoring, discovering, and alerting the responders and providing them actionable information to drive rapid resolution.
Key Features
With Site Reliability Operations, the SREs or Developers can register services, monitor service health, respond to alerts and incidents effectively using their preferred communication channels. This involves notifying the right experts to investigate the root cause, providing insights, and information to minimize the meantime to resolution (MTTR).
Register Service: Register applications and microservices managed by your teams. Provide business and operational information needed for supporting the service such as support team, environment, status, and dependencies.
Monitor Service Health: Provide visibility to the health and performance of services by connecting to monitoring solutions. Set up one or more integrations to transform incoming events from monitoring systems via webhook integration to ServiceNow events.
Respond to Incidents: Optimize your incident response workflow with automated alert and incident notifications. Leverage pre-built Notify workflows that integrate with on-call scheduling to shorten the timeline for mobilizing resources by alerting the right people at the right time.
Register Changes: Easily register changes using the new Site Reliability Operations (SRO) change type, approval policy, and workflow.

The plugin should work like the pagerduty plugin where engineers are able to open incidents, setup on call schedules, open change requests and register components as Business or Application Services once a component lifecycle is no longer in a spec.lifecycle experimental state.
Demo: https://youtu.be/YYrvI0FccPM
App Link

Typescript Sources for ServiceNow
Free Developer Instance Registration

The product was initially called Modern Ops and was changed prior to going GA to Site Reliability Operations (SRO)
Sample Curl example sending in a JSON payload using the CLI. The intent of the REST API is so you could register services from a Step in Jenkins or whatever CI you use. The jq at the end is for pretty formatting so not necessary. The user credentials can be your own as long as you are in the SRO Role:
$ NOW_API=https://{YOUR SERVICENOW HOST NAME}/api/sn_svc_ops_core/service_registration/builder $ curl -X POST -H "Content-Type: application/json" $NOW_API --user {YOURUSERID}:{YOURPASSWORD} -d @registration/payload.json | jq .
Sample JSON Payload that will create a Business Service and Application Service Relationship:
{
   "services": [
      {
         "$class": "Business Service",
         "name": "Backstage",
         "description": "Developer Portal"
      },
      {
         "name": "Techdocs",
         "description": "http://backstage.io/techdocs"
      },
      {
         "name": "APIDocs",
         "description": "http://backstage.io/apidocs"
      }
   ],
   "relationships": [
      {
         "parent": "Backstage",
         "child": "techdocs"
      },
      {
         "parent": "Backstage",
         "child": "APIDocs"
      }
   ]
}

Is this something you'd like to work on and contribute @regicsolutions? 🙏

Don’t have the bandwidth at the moment. Lets label this one as help wanted for now until I get backstage up and running in production 😁

No probs! +1


Problem card order when drag card between two lanes

I'm using customCards and when I drag a card from a column A to a column B I can drop my item in any position, but when I leave the item the items is added at the end of the list.
Is this the expected behaviour? I'm the only one with this problem?
thank you!

Right now due to the limitation of the library being used for drag-n-drop, a new card added to a lane will be added to the end of the lane. I am working on fixing this. Will keep you posted!

Thank you very much!! Another little problem moving a card to another lane:
If you have custom cards with different heights, when you try to drag and drop in the same lane, the placeholder for the card has the same height of the card you're trying to move (correct). But if you try to move the same card in another lane the height of the placeholder is wrong.


Use AvailableArrayName for sanity

Array name must only have digits after colon.
But the code is implemented to add "_reordered" string without check.
It makes error while using toco.

Nagging Reviewer @aselle: It has been 15 days with no activity and the awaiting review label was assigned. Can you please take a look?

Nagging Reviewer @aselle: It has been 30 days with no activity and the awaiting review label was assigned. Can you please take a look?

Nagging Reviewer @aselle: It has been 56 days with no activity and the awaiting review label was assigned. Can you please take a look?

Could you please add label for unit tests?

@pillarpond sorry for the delay. Testing now.

I think that the fails is not related with my changes. What should I do?

Nagging Assignee @rmlarsen: It has been 20 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Nagging Assignee @rmlarsen: It has been 35 days with no activity and this issue has an assignee. Please update the label and/or status accordingly.

Cloud you please let me know why this commit is not merged?
Should I wait more?


Intl.MessageContext

This is my attempt at making it easy to use MessageContext in different environments.  Instead of exporting the constructor (which is troublesome in Gecko's JSM), we expose it on the global Intl object.

With this change we only need to do import '../../intl/polyfill'; in the runtime and Intl.MessageContext becomes available everywhere.  Yay globals :)
@zbraniecki is this along the lines of what you've been thinking about?


New version: XMLParser v0.1.8

Registering package: XMLParser
Repository: https://github.com/baxmittens/XMLParser.jl
Created by: @baxmittens
Version: v0.1.8
Commit: 2b8085eee024c8d3d2334694a55a8dd0e7e00c45
Reviewed by: @baxmittens
Reference: https://github.com/baxmittens/XMLParser.jl/issues/1#issuecomment-1260586306
Description: A lightweight XML parser in the julia language

@baxmittens did you skip a version number on purpose?  What exactly do you want to do? (Please be clear, I can't read minds yet)
[noblock]

@giordano -- Oh, that is just a mistake by me. Can I revert this to 0.1.5 and trigger again?

Oh, that is just a mistake by me. Can I revert this to 0.1.5 and trigger again?

Sorry for the late reply.  If you want you can downgrade the version in Project.toml and trigger registration again, or we can just merge this, just let us know.
[noblock]

Sorry for the late reply. If you want you can downgrade the version in Project.toml and trigger registration again, or we can just merge this, just let us know.

Don't worry. I'm not in a rush. Also sorry for any inconviences caused by me.
I will have a look and then retrigger but it will take me a while since I am currently working at other projects
[noblock]


Add exercises for error handling

Add overview and exercises for error handling
First set of exercises cover try/except only
If there is more time, the second set of exercises cover error handling with else and finally

Thanks for the catch! @mcbullisisu


probe-run: init at 0.1.8

Motivation for this change
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[x] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[ ] Fits CONTRIBUTING.md.

Replaced libusb with libusb1, and rebased.

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or torch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 97481 run on x86_64-linux 1

1 package built:

probe-run

This is a semi-automatic executed nixpkgs-review which does not build all packages (e.g. lumo, tensorflow or torch)
If you find some bugs or got suggestions for further things to search or run please reach out to SuperSandro2000 on IRC.
Result of nixpkgs-review pr 97481 run on x86_64-linux 1

1 package built:

probe-run

closing as we now have 0.2.1 due to #119287


Error Handling: Master Issue

Following updates to the error handling is required:

[ ] Handling Typed BDK Errors
[ ] Dedicated BBError Type, that has fields like:
title, message, solution, stacktrace
[ ] General errors should be a snack box that doesnt take up screen real estate
[ ] Form specific errors can show underneath the input field where validation fails
[ ] Clearing cubit error states properly

[ ] Add catch for PanicException to catch errors in electrum server and attempt to resync client

Note panicexception is a general rust error, so it could be unrelated to electrum - but since we are noticing electrum causing panics, let us debug and check inputs going into the electrum related calls.

Closing this since most of the core stuff is done. Opening a new issue just for the Panic Exception.


fix : Remove menu icons from map fragment

Fixes #1752
Changes:

Removed menu icons from session details activity and locat
tion activity
Changed toolbar title from session name to location name when showing map fragment

Screenshots for the change:

@iamareebjamal @arp95 @rohanagarwal94 @shreyasnbhat Please review

@shailesh351 please squash commits.


Grindable ores

About the PR

If the refined material can be processed, so should the ore material. For balance reasons, ore produces one fifth of the amount of resources compared to the sheet or ingot version. This PR allows chemists to obtain basic materials from ore even if the ore processor is somehow lost, and or cargo is out of money. Even if not, this is just a useful feature to exist since variety should be possible.
This PR also properly completes #11320.
Media

[X] I have added screenshots/videos to this PR showcasing its changes ingame, or this PR does not require an ingame showcase

Changelog
:cl: Ubaser

add: Ore is now grindable to obtain basic chemicals.

I feel like there should be a variant of grinders that are upgraded and can grind ores, rather than the basic grinder doing it.

I feel like there should be a variant of grinders that are upgraded and can grind ores, rather than the basic grinder doing it.

maybe in the future, sure. For now, this works.

iron give iron and carbon(despite iron no longer being steel)? what about coal in all that

iron give iron and carbon(despite iron no longer being steel)? what about coal in all that

OHHH hold up yeah, goofed. Also, coal already has a grinding recipe so i didnt need to add it.


Cannot load image from CC3M

Get the following error:
PIL.UnidentifiedImageError: cannot identify image file '/home/ubuntu/data/CC3M/DownloadConceptualCaptions/validation/10481_3355970027'
The error is generated by this code in caption_dataset.py:
image = Image.open(ann['image']).convert('RGB')
BTW, I can only download 2.4M images from CC3M/training, how did you download 2.95M images? Thanks.

Hi, I used this code to download the dataset:
https://github.com/igorbrigadir/DownloadConceptualCaptions

Thanks. How about the first question? The code cannot identify CC3M images (the path is correct, and images do exists), while it can identify images from other datasets.

It could be because that the image is not downloaded correctly, so PIL cannot load it.

Thanks for your help!

Hi, I used this code to download the dataset: https://github.com/igorbrigadir/DownloadConceptualCaptions

How to down CC12M dataset ? can you share the download tool?

Hi, I used this code to download the dataset: https://github.com/igorbrigadir/DownloadConceptualCaptions

How to down CC12M dataset ? can you share the download tool?

Hi, I simply modified the download the code for CC3M, the format between the two is very similar.

Hi, I used this code to download the dataset: https://github.com/igorbrigadir/DownloadConceptualCaptions

How to down CC12M dataset ? can you share the download tool?

Hi, I simply modified the download code for CC3M, the format between the two is very similar.

This is for CC3M rather than cc12.

Hi, I used this code to download the dataset: https://github.com/igorbrigadir/DownloadConceptualCaptions

How to down CC12M dataset ? can you share the download tool?

Hi, I simply modified the download code for CC3M, the format between the two is very similar.

This is for CC3M rather than cc12.

Yes, you can slightly modify the code to download cc12.


Rename routes in device card

Hello,
this part wasn't fixed in #117

No worries, I'll include it. Once headscale gets into release candidate I plan to properly test and merge these changes.

This still needs merging, correct? I am running headscale v0.23.0 with newly released headscale-ui 2024.10.05 and I get a Not Found pop up every time I expand the details of a device on the devices page.
The browser indeed tries to GET https://headscale.example.com/api/v1/machine/2/routes. machine needs to be replaced by node according to https://headscale.example.com/swagger.


Case classes can be extended, final modifier helps expected behavior

So at work I've been using both scapegoat and wartremover (just another linting tool). And the final modifier is a place of divergence of the two. After some playing in the scala console it seems you can extend a case class. This inverts the inspection to look for the final modifier to be included, and changes the name of the inspection, but the name didn't seem obvious to me.

:+1:


Prevent multiple WS message broadcasts from clashing together

When broadcasting multiple WebSocket commands concurrently, it's possible for them to clash with one another (i.e. instead of cmd update "/channels" + cmd update "/players", cmd cmd update update "/channels" "/players" is sent instead).
This should prevent such situations by introducing a lock.
(marking as draft atm until testing whether my changes did not completely kill the server c:)

Built and tested #115, the server seems to be functioning correctly. Marking as ready for review.


Need to define duplicate contact in UG

We have changed the requirement. Two contact are considered to be duplicate if they have same name, or same email or same phone number.

Wait, is this not already covered in the UG? Where specifically do we need to change it


Fix specification for mailing-list in configuring-notifications.md

Why:
The description of mailing-list is erroneous. Git includes a List-Id mail header.
Closes:

What's being changed (if available, include any code snippets, screenshots, or gifs):
Updated the table and included an example.

Check off the following:

[x] I have reviewed my changes in staging, available via the View deployment link in this PR's timeline.

For content changes, you will also see an automatically generated comment with links directly to pages you've modified. The comment won't appear if your PR only edits files in the data directory.

[x] For content changes, I have completed the self-review checklist.

@mortax Thanks so much for opening a PR! I'll get this triaged for review ✨


Fix: too many sessions open

Each time you scrape data using the email & password option for auth, you create a new session which is never closed.
Navigate to https://www.linkedin.com/psettings/account to see your active sessions. Max active sessions are 50.

This enhancement logs out from a session when done before closing the page.

Closes: 76

Thank you for the collaboration @muchai-mercy and sorry for the late response, I saw that but I had to solve some bugs before merging new code, thank you again :smile:


Change current_user.is_authenticated() from method to property lookup

Flask-Login 0.3.0 changed is_authenticated() from a method to a property, thus breaking all the calls being made in Flask-User. This is a simple find and replace on the entire project directory, where I included comments/docstrings/outputted HTML/etc so that it would be complete from end to end. Let me know if you have any questions.

This is a tough one, it would require a MAJOR version bump because end-developers are encouraged to use is_authenticated in their applications.
It might make more sense for us to extend current_user to give us more control over the implementation of is_authenticated -- even allowing for backwards compat -- rather than blindly sending that object to the end-developer.

Hmmm, I can see your point there. Sometimes there's value in following the implementation of a dependency/upstream package, but minimizing breakage is certainly a good thing. This is my first pull req/open-source contribution so I'm relying on your/@lingthio's guidance here. :)

Flask-Login 3.0 CHANGES.txt mentions: "BREAKING: The is_authenticated, is_active, and is_anonymous members of the user class are now properties, not methods. Applications should update  their user classes accordingly.
We'll need to make sure that Flask-User either checks the Flask-Login login version, or checks whether these attributes are callable or not.
I will not be able to work on this until mid October.

It's even more complex than I have feared. Flask-Login properties/methods need to be handled in:

Flask-User python code
Flask-User html templates
Example and test python code
User customized html templates.
I have opened issue #92 to track this.

This has been fixed in release v0.6.8.


Added data preprocessing steps to Nifty_50(NSEI).ipynb file

I made following changes to the code:

Convert the index to DateTime format and set it as the date index for better time series analysis.
Handle outliers in the 'Close' column using Z-score method to improve the accuracy of statistical analysis.
Address missing values in the 'Close' column by interpolating linearly to maintain continuity in the data.
Apply Min-Max scaling to the 'Close' column to standardize the feature range, facilitating better convergence for machine learning models.

This pull request resolves #110

Create a new PR after conflict resolution.


fixing up EVP_PKEY_get_id for providers

Fixes #20497 .
If merged, this PR should also be backported to 3.0 as this aligns the long-standing documentation for (the return value of) EVP_PKEY(_get)_id with its implementation (in the presence of provider-based EVP_PKEY algorithms).

Hmmm....the CI failures look relevant

Yup. Problem found: In #19312 I did work around the (now considered by us incorrect) retval of EVP_PKEY_get_id. Fixed in https://github.com/openssl/openssl/pull/20501/commits/47675ee42be2842bc5ecdff1c2725dbd4ec46088. Nice that "my own" tls-provider test found it :)

@levitte is this correct? I see EVP_PKEY_KEYMGMT is a special case defined as -1

Yes, this is correct.  NID_undef is zero, and already signifies that the EVP_PKEY is unassigned (has no value), and that's hardly the case for an EVP_PKEY that's populated from a provider.  Therefore, another value was necessary, outside of the "normal" range of NIDs.

Therefore, another value was necessary, outside of the "normal" range of NIDs.

All right then -- that brings us to the core of the issue (also see https://github.com/openssl/openssl/issues/20497#issuecomment-1465968208): Should
a) EVP_PKEY_KEYMGMT be documented (and used internally and externally as) a permitted return value for EVP_PKEY_get_id or
b) should this not be done (retaining full backwards compatibility for code using the retval documentation for EVP_PKEY_id (Only 0/NID_undef or NIDs > 0)?
Option a) would possibly/probably require code changes in OpenSSL "consuming" apps -- which might be undesirable. Option b) would hide this -- possibly undesirable as well, e.g., if an app would like to know the algorithm name, for which EVP_PKEY_get0_type_name is a much better alternative in the presence of providers/OpenSSL3.
A third option might be "splitting" the APIs: EVP_PKEY_get_id would add EVP_PKEY_KEYMGMT as a permitted retval, while EVP_PKEY_id would not. That way, no problems would happen in code not aware of the new retval, e.g., if using it as input to OBJ_nid2sn. The current simple #define equating the two methods would need to be changed, of course.
Personally, I'd find the third option most appealing. Opinions, @levitte @mattcaswell @paulidale ?

Sorry, @baentsch, you're last comment wasn't visible to me when I wrote my review

Sorry, @baentsch, you're last comment wasn't visible to me when I wrote my review

ACK. Would you want to add a comment on option c) above? Otherwise I'll proceed with option a) as seems to be the jist of your latest comment, @levitte . Just FYI, this will necessitate changes to "downstream" code like this in OpenVPN.

Therefore, another value was necessary, outside of the "normal" range of NIDs.

All right then -- that brings us to the core of the issue (also see #20497 (comment)): Should a) EVP_PKEY_KEYMGMT be documented (and used internally and externally as) a permitted return value for EVP_PKEY_get_id or b) should this not be done (retaining full backwards compatibility for code using the retval documentation for EVP_PKEY_id (Only 0/NID_undef or NIDs > 0)?
Option a) would possibly/probably require code changes in OpenSSL "consuming" apps -- which might be undesirable. Option b) would hide this -- possibly undesirable as well, e.g., if an app would like to know the algorithm name, for which EVP_PKEY_get0_type_name is a much better alternative in the presence of providers/OpenSSL3.
A third option might be "splitting" the APIs: EVP_PKEY_get_id would add EVP_PKEY_KEYMGMT as a permitted retval, while EVP_PKEY_id would not. That way, no problems would happen in code not aware of the new retval, e.g., if using it as input to OBJ_nid2sn. The current simple #define equating the two methods would need to be changed, of course.
Personally, I'd find the third option most appealing. Opinions, @levitte @mattcaswell @paulidale ?

I'd would rather not use option b, because that return value is confusing.  Would NID_undef mean that the EVP_PKEY is unassigned, or is assigned a provider based key?  How would anyone know?  Should I assign a value or not?
I would rather fix the documentation for clarity.  Option a was the intent in that regard.
As for the third option, this means changing something that's already clearly documented:
https://github.com/openssl/openssl/blob/931369429564b5a9bb09711de8e885fef546a0ac/doc/man3/EVP_PKEY_set1_RSA.pod?plain=1#L203-L207
So I'm not at all sure that your idea is as easy as you seem to imagine.  Note: I'm not completely against the idea, but the ramifications are unclear to me.
Also, note that EVP_PKEY_type() and EVP_PKEY_get_base_id() (which are really one and the same) does things a bit more like you want.
Finally, there's another point in the manual you've been looking at:
https://github.com/openssl/openssl/blob/931369429564b5a9bb09711de8e885fef546a0ac/doc/man3/EVP_PKEY_set1_RSA.pod?plain=1#L136-L143
It seems this is glossed over...

It seems this is glossed over...

Don't get me wrong: I'm fine with what is documented there, actually any alternative; what concerns me is the original question that started this whole thing:
What shall we do with this code pattern in downstream code: OBJ_nid2sn(EVP_PKEY_id(pkey))?
It was completely OK in OpenSSL111 but now is wrong (and causes OpenVPN to quit execution when using (trying to display the name of) provider-based algorithms).
I'm absolutely fine doing a PR to OpenVPN to fix this (and update this PR to implement option a/stick to the current implementation of EVP_PKEY_get_id). It probably is the safest route to take given other OpenSSL consumers have adapted to the new behaviour of EVP_PKEY_get_id.

Could we use EVP_KEYMGMT_get0_name() inside EVP_PKEY_get_id() ?

OTC: needs to discuss the best method of solving this issue.

or rather push the issue to someone wondering what that generic string means.

:-) More seriously, if we pursue this, I'd suggest having that generic string point to the (properly amended) migration document. I'll do an OpenVPN PR regardless of how the discussion here ends.

BTW, I need to amend what I've said earlier.  We do make an effort to set the EVP_PKEY id to something sensible if there's a matching legacy implementation for the provider implementation that's being handled.  It happens in EVP_PKEY_set_type_by_keymgmt():
https://github.com/openssl/openssl/blob/931369429564b5a9bb09711de8e885fef546a0ac/crypto/evp/p_lib.c#L1602-L1652
So I have been a bit too strict about the meaning of EVP_PKEY_KEYMGMT returned by EVP_PKEY_id()...  it will only be returned when libcrypto doesn't have a preconceived idea of the key type (in form of an internal legacy implementation, or in form of an ENGINE implementation).  What this means isn't only that there needs to exist an OBJ database entry for it, but there must also exist an EVP_PKEY_ASN1_METHOD instance that libcrypto knows about.
I have no idea for the moment how to document that in a good enough way for user consumption without going very much into internal details...

I have no idea for the moment how to document that in a good enough way for user consumption without going very much into internal details...

I'd just say something like - For provided EVP_PKEYs whose algorithms do not have an internal or engine-based implementation -1 is returned as the id.

I'd just say something like - For provided EVP_PKEYs whose algorithms do not have an internal or engine-based implementation -1 is returned as the id.

Are engines still supported in master (or worthwhile mentioning any more)? So might this be even shortened to

For EVP_PKEYs implemented by an external provider, -1 (EVP_PKEY_KEYMGMT) is returned as the id.

? This might be improved further by clearly documenting prominently (and pointing to it in this case) the distinction between "external" and "internal" (providers and algorithms).

Are engines still supported in master (or worthwhile mentioning any more)? So might this be even shortened to

They are still supported and will be until the 4.0 at the earliest.

I have no idea for the moment how to document that in a good enough way for user consumption without going very much into internal details...

I'd just say something like - For provided EVP_PKEYs whose algorithms do not have an internal or engine-based implementation -1 is returned as the id.

Not sure I'm have that being "internal", as I fully expect that everything surrounding EVP_PKEY_ASN1_METHOD will be removed, along with ENGINEs...  "internal" sounds more permanent, and we've used the term "legacy" elsewhere.

I do not see a reason why we couldn't return nid that translates to real OID for these internally implemented algorithms even after we remove engines. Or, if we do not want to, then we should deprecate EVP_PKEY_get_id ASAP. Because keeping the function but have it always return just 0 or -1 after the legacy code removal does not make any sense.

EVP_PKEY_get_id() could call OBJ_create() and return it's NID in the case of unknown.
No doubt this path is fraught with problems...

That requires an OID, where does that come from? (We had some arguments about the OIDS  that are embedded in the OSSL_DISPATCH name aliases a while ago)

It requires and OID, a short name or a long name.  The algorithm was fetched by name so we can fill one of the names out.
I'd suggested using provider:name to avoid the (unlikely) situation where two different providers both include algorithms with the same name yet are different.

That solves the issue in this particular case.. It doesnt solve getting the OID.

If a provider does include something that looks like an OID as one of the algorithm's names, we could try to detect this and pass the OID into the creation function.  Guessing something might be an OID isn't too hard.  At least until somebody invents the 1.234 KDF :grinning:

Please let me know whether you'd expect me to do sth right now; otherwise I'd expect to hear a proposal which way to go (a-c above or sth else entirely). @levitte: The OpenVPN update to make this a "non-issue" there is available: https://github.com/OpenVPN/openvpn/pull/278

I think we're still in the decide how to do best do this phase.

t8m said:

I do not see a reason why we couldn't return nid that translates to real OID for these internally implemented algorithms even after we remove engines.

So you'd keep the diverse EVP_PKEY_ASN1_ALGORITHM instances around in libcrypto...  forever?  (I assume stripped down to just be a NID reference, but otherwise pretty useless).  Mind you, I'm not proposing that these get removed as soon as ENGINEs, exactly because they still have this use.

Or, if we do not want to, then we should deprecate EVP_PKEY_get_id ASAP. Because keeping the function but have it always return just 0 or -1 after the legacy code removal does not make any sense.

I would agree with deprecating such functions in the next iteration.  So, not for removal in 4.0 or whenever we plan on getting rid of ENGINEs, but perhaps deprecate them when that removal happens.  (or well, I actually don't mind going more radical and deprecate them nownownow, but I doubt everyone agrees)
Historical note: By the time 3.0 was almost ready for beta, we chose a level of caution with deprecations, though.  Plus, there are other functionality that dearly needs fixing / changing / adapting to a provider world first.

I assume that magically parsing out the OID from the algorithm name string and auto-creating an OBJ for it (an considering the current mechanism, a stripped down EVP_PKEY_ASN1_METHOD instance?) is going to be regarded as a new feature, i.e. goes into master only.  This doesn't solve anything for 3.1 or 3.0.

I would deprecate them only if we decide to deprecate all functions related to NIDs.
Given we added the obj callbacks to the provider API I assume this is not going to happen soon.

I would deprecate them only if we decide to deprecate all functions related to NIDs.
Given we added the obj callbacks to the provider API I assume this is not going to happen soon.

That was supposed to be an interim measure.  See https://github.com/openssl/openssl/issues/15624#issuecomment-855653176 and discussions around that.  Unfortunately, it seems we failed to mark it as such (something I asked for: https://github.com/openssl/openssl/issues/15624#issuecomment-855682038)

OTC: This should not be merged. We instead want a documentation improvement of the EVP_PKEY_get_id return value and mention in the migration guide that EVP_PKEY_get0_type_name() is the replacement. The same documentation fix should be done for equivalent functions for ciphers and digests.

Our reasoning for the decision is that EVP_PKEY_KEYMGMT is an already existing return value for algorithms that exist in provider form only, and some applications may rely on that value being returned for those cases.  Making changes that have EVP_PKEY_get_id() return a "valid" NID in all cases could become a breaking change just as much.
In the weighing of alternatives, which all are potentially painful, and weighing in that that we do want to deprecate public NID usage going forward, we made a choice.

ACK. The problem the code change would have fixed is anyway already resolved downstream: I'll revert the code change and amend the documentation as per the above.

Final nits and I'll approve.

... and I'll re-approve

@t8m Done as per the above.

24 hours has passed since 'approval: done' was set, but this PR has failing CI tests.  Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.

alternatively please review and set the label manually.

Could someone please do so? The failing CI tests (Windows only) very likely have no relation to the PR contents.

I've smashed all commit into one, and modified the commit message to this:
Update the EVP_PKEY_get_id documentation

The documentation didn't mention the development where EVP_PKEY_get_id()
returns a negative value for provider-only implementations, and the
migration guide didn't mention how to cope with that.

Fixes #20497

Merged
master:
a2a543e0e3ec277d136772b4b0e0bb3d1181d337 Update the EVP_PKEY_get_id documentation
3.1:
f3e0dfa742030bf3db356fd5fc22694fc485dbe7 Update the EVP_PKEY_get_id documentation
3.0:
3216dc1242ecfc952e5647111eeae77a9d283fba Update the EVP_PKEY_get_id documentation


Preferred language configuration parameter

This change adds a configuration value (pathling.terminology.client.acceptLanguage) that controls the language preference communicated to the server using the Accept-Language header when making terminology requests.
See Multi-language support in FHIR.

pushed to branch 'issues/1191'
Change
the accept_language option was added to the python context.py, and also into the HTTPclientconfig (which I felt was more appropriate)
code was tested in python and java, and accept_language header HTTP request were inspected using 'HTTPtools'.
Justification
once the Apache httpClient is created it is then passed into hapi-fhir's TerminologyClient, where it is invoked therein entirely according to its own methods but is potentially dangerous to access (and therefore presumably change), as the only accesor is:
IRestfullClient.java in HapiFHir respository has:
//Do not call this method in client code. It is a part of the internal HAPI API and is subject to change!
IHttpClient getHttpClient();
In this way, it makes sense only to have accept_language as startup config option, but not dynamically changeable.
other changes

maven-shade plugin was causing warnings, removed duplicate entries in pom.xml
having older versions of node causing problems with newer versions of docusaurus, updated CONTRIBUTING to say node 19.x
updated tutorial programs for python/java to be compatible with newer versions of pathling

pathling.create() no longer valid, needs spark context specified.
csv loading needs option (headers=true) to work (otherwise headers are '_c0','_c1',etc)
various imports have changed
removed expanded quotes (''') in java examples - as these were not compatible with documented required java version 11, and as newer versions of java (such as v19) have compile issues.

Potential future changes

I can update the scala website code (... I dont currently speak Scala)
potentially add accept_language tests (I can try to figure out how to use wiremock, i believe)

JAVA testing code
import au.csiro.pathling.sql.Terminology;
import static au.csiro.pathling.library.TerminologyHelpers.*;
import au.csiro.pathling.library.PathlingContext;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.apache.spark.sql.SparkSession;
import org.hl7.fhir.r4.model.Coding;
import au.csiro.pathling.config.TerminologyConfiguration;
import au.csiro.pathling.config.HttpClientConfiguration;
import au.csiro.pathling.config.TerminologyAuthConfiguration;

class MyApp {
    public static void main(String[] args) {
    	SparkSession spark = SparkSession
    	  .builder()
    	  .config("spark.master", "local")
    	  .getOrCreate();

    	TerminologyConfiguration configuration = TerminologyConfiguration.builder()
			.client(HttpClientConfiguration.builder()
				.acceptLanguage("de")
				.build()
    		).build();

        PathlingContext pc = PathlingContext.create(spark, configuration);
        Dataset<Row> csv = pc.getSpark().read().option("header", "true").csv("conditions.csv");

        // Get the synonyms for each code in the dataset.
        Dataset<Row> synonyms = csv.withColumn(
                "SYNONYMS",
                Terminology.designation(toSnomedCoding(csv.col("CODE")),
                        new Coding("http://snomed.info/sct",
                                "900000000000013009", null))
        );
        // Split each synonym into a separate row.
        Dataset<Row> exploded_synonyms = synonyms.selectExpr(
                "CODE", "DESCRIPTION", "explode_outer(SYNONYMS) AS SYNONYM"
        );
        exploded_synonyms.show();
    }
}

PYTHON testing code
from pathling import PathlingContext, to_snomed_coding, Coding, designation

pc = PathlingContext.create(accept_language="devil")
csv = pc.spark.read.option("header","true").csv("conditions.csv")

# Get the synonyms for each code in the dataset.
synonyms = csv.withColumn(
    "SYNONYMS",
    designation(to_snomed_coding(csv.CODE), Coding.of_snomed("900000000000013009")),
)
# Split each synonyms into a separate row.
exploded_synonyms = synonyms.selectExpr(
    "CODE", "DESCRIPTION", "explode_outer(SYNONYMS) AS SYNONYM"
)
exploded_synonyms.show()

Thanks @Markopolo141, I'll take a look at this tomorrow!

I accidentally moved this issue to backlog. :-(

In this way, it makes sense only to have accept_language as startup config option, but not dynamically changeable.

I think this assumption is fine.

This work looks great so far! The configuration parameter for controlling Accept-Language is working well.
I would like to see if we can take this a bit further now. I've added some extra requirements to this issue, @Markopolo141 take a look and let me know what you think. It would be great if we could now enhance the functions themselves to allow for the language to be overridden within an invocation.


Add document for MSI with Key Vault and update README

The quick start should be simple, so we may want to keep using the env vars for service principals in the README. However, we should bluntly call out that it's not recommended and point people to how to use MSI with Key Vault. We may be able to point them here for general concepts: https://docs.microsoft.com/azure/active-directory/managed-identities-azure-resources/overview#how-does-the-managed-identities-for-azure-resources-work

@schaabs we had talked offline about you (or someone) writing general MSI guidance perhaps for the Identity package I could link to. Is that scheduled for any particular milestone?

It's scheduled for the May milestone as well. For authentication the the Key Vault README should mainly reference using the DefaultAzureCredential. As far as documenting managed identity any Key Vault docs should focus on setting up permissions, since this is specific to Key Vault.

@adrianhall @jongio might this also make a good blog post idea - using Managed Identity and DefaultAzureCredential whenever possible for ease and security? I'd still update the Key Vault docs across languages, but might be good to emphasize in our blog as well.

Given this has been punted along for a while, moving to backlog as a lower priority.

@schaabs we had talked offline about you (or someone) writing general MSI guidance perhaps for the Identity package I could link to. Is that scheduled for any particular milestone?

Is this link available so we could refer it into the KV readme?

@heaths I see us using DefaultAzureCredential in the KV readme's which I think is consistent across all SDKs. Is this an older bug where we perhaps used MSI?

DAC is used to authenticate clients or services, yes. I'm not suggesting we change that. The documentation is how to set up managed identity across services to Key VAult. It's what lets DAC work efficiently in prod (using MSI credentials) or dev.

@heaths do you still see value in adding documentation here? I have not seen any customer feedback here but marking this as MQ so we get a chance to address this. Feel free to close the issue if you feel otherwise.

I did update the READMEs a while back to add:

Additionally, we recommend using a managed identity for authentication in production environments.

I think this is probably good enough for now. Plenty of documentation on how to enable that.


Accessibility Bug - Using keyboard to toggle a checkbox, breaks the navigation outside the tree component

Description
In the tree component with the checkboxes enabled, using the keyboard to toggle one or more checkboxes and then navigating away from the tree to another HTML element on the same page (i.e. to a button), the element is no longer responding to ENTER key (in this example, hitting ENTER when the button is selected, does nothing, the click event is disabled).
This breaks the accessibility features.
Steps to reproduce:
Please use the code below to reproduce :
import { ITreeOptions, KEYS } from 'angular-tree-component';
import { Component } from '@angular/core';

@Component({
  selector: 'app-checkboxes',
  template: `
    <tree-root
      id="tree"
      [nodes]="nodes"
      [options]="options">
    </tree-root>
    <button (click)="onClick()">Click Me!</button>
  `,
  styles: [
  ]
})
export class CheckboxesComponent {
  nodes = [
    {
      name: 'root1',
    },
    {
      name: 'root2',
      children: [
        { name: 'child1' },
        { name: 'child2', children: [
          { name: 'grandchild1' },
          { name: 'grandchild2' }
        ] }
      ]
    },
    {
      name: 'asyncroot',
      hasChildren: true
    }
  ];

  options: ITreeOptions = {
    useCheckbox: true,
    getChildren: this.getChildren.bind(this)
  };

  getChildren(node: any) {
    const newNodes = [
      {
        name: 'child1'
      }, {
        name: 'child2'
      }
    ];

    return new Promise((resolve, reject) => {
      setTimeout(() => resolve(newNodes), 1000);
    });
  }

  onClick() {
    alert('Hello World!');
  }
}

Use the keyboard only to select/unselect a checkbox and then, again using the keyboard, navigate to the Click Me! button and hit ENTER. Nothing happens.
However using the mouse, the button is clickable and the alert is shown.
Expected behavior:
For accessibility purposes, the tree component should subscribe to keypress events only as long as it has focus. In this case, once we navigate away from the tree component, ENTER should behave as expected for all the other HMTL elements on the page.
Versions of Angular Tree Component, Angular, Node, affected browser(s) and operating system(s):
Angular Tree Component: 11.0.4
Angular: 11.2.4
Node: v14.15.4
Browsers: Chrome, Firefox (Latest)
OS; Windows, MacOS
Work around:
Override the Action Mappings with :
 options: ITreeOptions = {
    useCheckbox: true,
    getChildren: this.getChildren.bind(this),
    actionMapping: {
      keys: {
        [KEYS.ENTER]: undefined // disable the ENTER key mapping
      }
    }
  };

I'm facing a similar problem where items in the tree are still responding to keyboard events when I'm actually navigating a totally different component, e.g. a Material Accordion. Need to unsubscribe from the keyboard events when you're not focused on the tree and vice versa!


IntelliSense can't trigger keywords like 'return','if','else' and so on

VS: Dev14 Community
OS: Windows 8.1 Enterprise
PowerShell: v5
Repro steps:

Install latest version PoshTools from http://aka.ms/Get-PoshToolsNightly;
Create a PowerShell project in VS.
Try to type 'retu' in the powershell script editor, verify intellisense whether trigger 'return'

Expect: intellisense whether trigger 'return';
Actual: intellisense trigger a drop down list without contain 'return'

Thanks for reporting this!  However, due to PowerShell's dynamic nature, 'retu' could very well be valid PowerShell within this context.  However, something we should consider: Should we seed the valid list of PowerShell keywords into the intellisense list?


Add new company: Blackberry

Blackberry
Highly secured real time operating systems
Produced smartphones and Bluetooth devices
They started loosing a lot of market share to the other phone providers.
Wikipedia/company website

I'm wondering whether we should include Blackberry as an example of a successful pivot. They definitely need another pivot very soon 👀


md-label with  should have the active class set up

I find out that if I use that kind of input : <md-input md-type="time" md-label="startTime" md-value.bind="Start Time"></md-input>
The Start Time label is on the same line as the --:-- empty value or even on a entered value like 12:15. I see that to put a active class on the label could be more appropriate with this kind of input because it always display something in the input.
I have take a look at the code of the input/input.js and I have added this 3 lines in the attached(), which make the trick :
if (this.mdType === 'time') {
    $(this.input.labels).addClass('active');
}

I don't know if you think it a good idea?

This is on chrome... but still have the md-input with md-label display issue on safari :(

Thanks for the report, perfect timing. I will have to do some modifications anyway. 😄
As for #309, maybe I need to reactivate these lines: https://github.com/aurelia-ui-toolkits/aurelia-materialize-bridge/blob/master/src/input/input.css#L1-L6
I'm not sure though.

Reproduced it here:
https://gist.run/?id=7192c3cfc552a44f1ab07592d6a7f903
I wonder if Materialize itself has support for time inputs and if so, where we failed to transfer this. 😃

The real problem with this issue is that Materialize doesn't update time inputs. 😕
https://github.com/Dogfalo/materialize/blob/master/js/forms.js#L6

Added static "active" to label when it's a time input.


Format number for the "characters remaining" on the Project Contact modal

PR: https://github.com/NationalSecurityAgency/skills-service/pull/1669

:+1:


the viewport width too small

VS Code Version:v1.53.2
OS Version:windows10-20H2

Steps to Reproduce:

set {"editor.wordWrap": "on"}

Does this issue occur when all extensions are disabled?: Yes

@twbworld You can try editor.wrappingStrategy: advanced when using a non-monospace font.


⚠ Processors has degraded performance

In 4330e82, Processors ($STATUS_URL) experienced degraded performance:

HTTP code: 200
Response time: 293 ms

Resolved: Processors performance has improved in 7264fe5.


Claim dapp rewards - Call vector exceeds limit error

I'm using latest version 2.25.2, ledger nano S and polkadot.js chrome extension. After clicking claim button and Sign on ledger there is error: Call vector exceeds limit error.
On Astar website I can see that it is possible to claim only 2 eras with nano S device.
Also found same error on Astar forum: https://forum.astar.network/t/dapp-staking-with-ledger/4247/3
I tried both Astar and Astar XL. In README.md there is info that claim Dapp should work and there is no info about any limitations.

That limitation in the number of items in a vector is a hardware limitation, we cannot override it, otherwise we'd end out of stack. It should be something that Astar Dapp should handle, and only send 2 call at a time.

this is the fix for it guys, I tried it and it works:
https://github.com/AstarNetwork/astar-apps/issues/804