v6.5.0 SubmissionError in onSubmit Function is Not Passing Along field errors / _error, giving "Uncaught (in promise)" Error in Console

So, along with Redux-Form I am using axios and thunk as middleware, and when I am in the onSubmit function (loginUser), and do AJAX calls with Axios. Unfortunately, when I want to signal that my user's submitted credentials are invalid and throw a SubmissionError to signal that the onSubmit function failed, and therefore get the errors displayed on the form I am getting "Uncaught (in promise)".
I have read from other threads that I might have to return a promise at some point, but I'm not entirely sure how to implement that (if that is even the problem).
Currently using version 6.5.0. Any help would be appreciated.
import axios from 'axios';
import { SubmissionError } from 'redux-form';

export function loginUser({ email, password }) {
  return function(dispatch) {
      axios.post(`${API_URL}/authenticate`, { email, password })
      .then(response => {
        console.log('status is: ', status, ' response is: ', response);
        if(response.data.token){
          cookie.save('token', response.data.token, { path: '/' });
          dispatch({ type: AUTH_USER });
          browserHistory.push('/');
        } else {
          if(response.data.success === false) {
            var errObj = { email: "Invalid email and password combo", _error: "That email and password combination did not work. Please try again."};
            throw (errObj)
          }
        }
      })
      .catch((error) => {
        throw(new SubmissionError(error));
      })
    }
  }

Error in console:
Uncaught (in promise) >
SubmissionError
errors
:
Object
message
:
"Submit Validation Failed"
name
:
"SubmissionError"
stack
:
"SubmissionError: Submit Validation Failed↵    at eval (eval at <anonymous> (http://localhost:8080/bundle.js:14:22671), <anonymous>:94:1297)"
__proto__
:
ExtendableError

And interestingly enough if I change the last line to "reject(new SubmissionError(error))", then the form's state "submitFailed" gets set to true, but it doesn't tell me anything about the actual errors (ie they are not defined anywhere in the state, like they should be so they can be sent to the component as feedback to the user).

the same problem

@d1slike , kinda hard to follow your post but I tried doing the following:
export function loginUser({ email, password }) {
  new Promise((resolve, reject) => {
    axios.post(`${API_URL}/authenticate`, { email, password })
      axios.post(`${API_URL}/authenticate`, { email, password })
      .then(response => {
        console.log('status is: ', status, ' response is: ', response);
        if(response.data.token){
          console.log('in response.token clause of loginUser')
          cookie.save('token', response.data.token, { path: '/' });
          //dispatch({ type: AUTH_USER });
          browserHistory.push('/');
          resolve();
        } else {
          if(response.data.success === false) {
            console.log('throwing submission error for loginUser');
            var errObj = { email: "Invalid email and password combo", _error: "That email and password combination did not work. Please try again."};
            throw (errObj)
          }
        }
      })
    },
    (error) => {
      if(error instanceof SubmissionError) throw error;
        throw new SubmissionError(error);
    })
  }

I ended up with the same error ("uncaught promise").  I am not familiar with your api.instanse() object and method so I'm not positive how closely it would match Axios.

FYI I apparently fixed with the following code (specifically note the reject() parts):
export function registerUser({ email, password }) {
  return new Promise((resolve, reject) => {
    axios.post('http://localhost:8088/api/users', { email: email, password: password })
    .then(response => {
      console.log('response is: ' , response, 'response.data is: ', response.data, 'response.code is: ', response.code);
      if(response.data.success){
        console.log('registerUser response.data.success is true')
        cookie.save('token', response.data.token, { path: '/' });
        store.dispatch({ type: AUTH_USER });
        browserHistory.push('/');
        resolve();
      } else {
        if(response.data.code === 11000){ //duplicate email
          console.log('data code = 11000')
          var errObj = new SubmissionError({_error: 'User registration failed, email already exists.' }) //need to add store dispatch for failed user registration (for form feedback)
          reject(errObj);
        } else if (response.code === 2) {
          console.log('response.code = 2')
          var errObj = new SubmissionError({ email: 'Invalid email pattern.' })
          reject(errObj);
        }
      }
    }).catch((error) => {
      console.log('error is: ', error)
      //errorHandler(store.dispatch, error, AUTH_ERROR)
      if(error instanceof SubmissionError) reject(error);

    });
  })
}

<Form onSubmit={handleSubmit(this.handleSubmit)}>

make sure you this.handleSubmit return promise .


route not working if the params dont contain a slash

HI,
Expected behavior and actual behavior.
the route is not working if the params dont contain a slash at the end of the url
Steps to reproduce the problem.
http://localhost:3000/dashboard;week=2020-03-15T23%3A00%3A00.000Z
and this url works as expected:
http://localhost:3000/dashboard;week=2020-03-15T23%3A00%3A00.000Z/
Specifications like the version of the project or browser version
"@plusnew/router": "1.0.0-beta.6",
Please fix this ;)

@Reloaded2 That issue is not reproducable in the router. In both ways the router is working correctly and is returning the dashboard-component.


Proposal to split the node staleness logic out of HttpHandler

This is because HttpHandler is V1 specific and we'd otherwise be duplicating this code.

This PR will be reviewed at:
http://codereview.appspot.com/275890043


edgedb installer segmentation fault

OS Version: linux-nixos 22.11.2510.103fe0800b9 (Raccoon)

Steps to Reproduce:

run the installer command curl https://sh.edgedb.com --proto '=https' -sSf1 | sh

[joe@nixos:~]$ curl https://sh.edgedb.com --proto '=https' -sSf1 | sh
info: downloading installer

Welcome to EdgeDB!

This will install the official EdgeDB command-line tools.

The edgedb binary will be placed in the user bin directory located at:
/home/joe/.local/bin

This path is already in your PATH environment variable, so no profile will be modified.
main: line 226:  9126 Segmentation fault      (core dumped) "$@"

Interesting workaround:
[joe@nixos:~]$ curl https://sh.edgedb.com --proto '=https' -sSf1 > edgedb-init.sh

[joe@nixos:~]$ source edgedb-init.sh --nightly
info: downloading installer

Welcome to EdgeDB!

This will install the official EdgeDB command-line tools.

The edgedb binary will be placed in the user bin directory located at:
/home/joe/.local/bin

This path is already in your PATH environment variable, so no profile will be modified.
┌──────────────────────┬──────────────────────┐
│ Installation Path    │ /home/joe/.local/bin │
│ Modify PATH Variable │ no                   │
└──────────────────────┴──────────────────────┘
1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
1
The EdgeDB command-line tool is now installed!
To initialize a new project, run:
edgedb project init

This also happens on my Pop!_OS 22.04 system when running the installer script.

Fixed on x86_64. aarch64 will be too once release CI is complete.


ERROR [karma]: TypeError: Cannot read property 'push' of undefined

Expected behaviour
Run the karma test server without crashing
Actual behaviour
karma server crashes after running boiler plate tests:
4 08 2018 16:01:06.067:ERROR [karma]: TypeError: Cannot read property 'push' of undefined
    at eventReporter.BaseReporter.onBrowserStart (/home/vmuser/dev/SpiritGui/node_modules/karma/lib/reporters/base.js:34:20)
    at Server.<anonymous> (/home/vmuser/dev/SpiritGui/node_modules/karma/lib/events.js:40:26)
    at emitTwo (events.js:131:20)
    at Server.emit (events.js:214:7)
    at Browser.onStart (/home/vmuser/dev/SpiritGui/node_modules/karma/lib/browser.js:123:18)
    at Socket.socket.on (/home/vmuser/dev/SpiritGui/node_modules/karma/lib/browser.js:269:39)
    at emitOne (events.js:116:13)
    at Socket.emit (events.js:211:7)
    at /home/vmuser/dev/SpiritGui/node_modules/socket.io/lib/socket.js:528:12
    at _combinedTickCallback (internal/process/next_tick.js:131:7)
    at process._tickCallback (internal/process/next_tick.js:180:9)

Environment Details
"dependencies": {
    "@angular/animations": "^6.1.0",
    "@angular/common": "^6.1.0",
    "@angular/compiler": "^6.1.0",
    "@angular/core": "^6.1.0",
    "@angular/forms": "^6.1.0",
    "@angular/http": "^6.1.0",
    "@angular/platform-browser": "^6.1.0",
    "@angular/platform-browser-dynamic": "^6.1.0",
    "@angular/router": "^6.1.0",
    "@ngrx/core": "^1.2.0",
    "@ngrx/effects": "^6.1.0",
    "@ngrx/schematics": "^6.1.0",
    "@ngrx/store": "^6.1.0",
    "core-js": "^2.5.4",
    "rxjs": "^6.2.2",
    "zone.js": "~0.8.26"
  },
  "devDependencies": {
    "@angular-devkit/build-angular": "~0.7.0",
    "@angular/cli": "~6.1.3",
    "@angular/compiler-cli": "^6.1.0",
    "@angular/language-service": "^6.1.0",
    "@ngrx/store-devtools": "^6.1.0",
    "@types/jasmine": "~2.8.6",
    "@types/jasminewd2": "~2.0.3",
    "@types/node": "~10.9.1",
    "codelyzer": "~4.4.4",
    "jasmine-core": "~3.2.1",
    "jasmine-spec-reporter": "~4.2.1",
    "karma": "^3.0.0",
    "karma-chrome-launcher": "~2.2.0",
    "karma-coverage-istanbul-reporter": "~2.0.0",
    "karma-jasmine": "~1.1.1",
    "karma-jasmine-html-reporter": "^1.3.1",
    "protractor": "^5.4.0",
    "ts-node": "~7.0.1",
    "tslint": "~5.11.0",
    "typescript": "~3.0.1"
  }

// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html

module.exports = function (config) {
  config.set({
    basePath: '',
    frameworks: ['jasmine', '@angular-devkit/build-angular'],
    plugins: [
      require('karma-jasmine'),
      require('karma-chrome-launcher'),
      require('karma-jasmine-html-reporter'),
      require('karma-coverage-istanbul-reporter'),
      require('@angular-devkit/build-angular/plugins/karma')
    ],
    client: {
      captureConsole: true,
      clearContext: false // leave Jasmine Spec Runner output visible in browser
    },
    coverageIstanbulReporter: {
      dir: require('path').join(__dirname, '../coverage'),
      reports: ['html', 'lcovonly'],
      fixWebpackSourcePaths: true
    },
    reporters: ['progress', 'kjhtml'],
    port: 9876,
    colors: true,
    logLevel: config.LOG_INFO,
    autoWatch: true,
    browsers: ['Chrome'],
    singleRun: false
  });
};

Steps to reproduce the behaviour

npm install deps
ng test
open browser

Please set logLevel: config.LOG_DEBUG, and post anything suspicious (check the log for redaction).

Note the final configuration in the log, sometimes its not what we expect.

@johnjbarton hm, I'm only getting "serving cached" in the terminal, where can I find redacted logs?

Sorry I don't know the details of your command env, maybe that ng thing is involved.

I'm using the Angular CLI to run the tests, when I use LOG_DEBUG it runs fine though

This does not seem like something we can fix.

Related stacktrace?
16 09 2020 11:35:38.234:WARN [karma]: Error during refresh file list. TypeError: Cannot read property 'push' of undefined
    at _reporters.forEach (/x/node_modules/karma/lib/reporters/multi.js:11:61)
    at Array.forEach (<anonymous>)
    at MultiReporter.addAdapter (/x/node_modules/karma/lib/reporters/multi.js:11:21)
    at Server.<anonymous> (/x/node_modules/karma/lib/middleware/runner.js:97:18)
    at Object.onceWrapper (events.js:286:20)
    at Server.emit (events.js:203:15)
    at Server.EventEmitter.emit (domain.js:448:20)
    at Executor.schedule (/x/node_modules/karma/lib/executor.js:31:20)
    at refreshFileList.then (/x/node_modules/karma/lib/middleware/runner.js:42:18)


1.14.4 fees disable rounding

One minor thing re: the first commit message, I think the change is the other way around than what the message says, eg: "introduce wallet-only rounding", or "remove rounding from relay"

Not done with this, DO NOT RE-REVIEW yet please :)

Code looks good now. Could you please rebase/squash so I can do final test/review?

Done

@patricklodder Could you approve this?

Could you approve this?

When I'm done testing and I am happy, yes I will ❤

Rebased to resolve merge conflict


add logging to quagga

@fichtner this is the template and GUI related work for logging in the quagga plugin. the syslog config is currently not included in the service file.
This is for #205

@fichtner a log viewer is now included.

Beautiful

One thought: it may be beneficial to use a joined ISO date+time field, sorting makes more sense then.

@fichtner It's a log file, sorting it a different way than in chronological order makes no sense in my opinion. The only thing that would make sense would be reversing the file (new entries on top).

what I mean: if you sort by date alone, the time is off. if you sort by time, the date is off, because they are separate columns.


Use reinstall instead of just overwriting apps

I got this warning while upgrading using brew cu -a:
Warning: It seems there is already an App at '/Applications/IntelliJ IDEA.app'; overwriting.
I assume that homebrew-cask-upgrade issues brew cask install --force instead of brew cask reinstall. Would it hurt to use reinstall instead? I'd strongly assume this would get rid of the warning.

reinstall produces an error and stops:
$ brew cask reinstall evernote
==> Downloading https://cdn1.evernote.com/mac-smd/public/Evernote_RELEASE_6.11_454874.dmg
Already downloaded: /Users/tony/Library/Caches/Homebrew/Cask/evernote--6.11_454874.dmg
==> Verifying checksum for Cask evernote
Error: It seems there is already an App at '/Applications/Evernote.app'.

reinstall --force works well, but it still shows an warning:
$ brew cask reinstall evernote --force
==> Downloading https://cdn1.evernote.com/mac-smd/public/Evernote_RELEASE_6.11_454874.dmg
Already downloaded: /Users/tony/Library/Caches/Homebrew/Cask/evernote--6.11_454874.dmg
==> Verifying checksum for Cask evernote
Warning: It seems there is already an App at '/Applications/Evernote.app'; overwriting.
==> Removing App '/Applications/Evernote.app'.
==> Moving App 'Evernote.app' to '/Applications/Evernote.app'.
🍺  evernote was successfully installed!

So, using reinstall isn't helpful to get rid of the warning.

That is odd. reinstall works for me. That's how I updated my casks before I found this neat tool:
brew cask outdated | xargs brew reinstall

Am 19.04.2017 um 22:33 schrieb buo<EMAIL_ADDRESS>reinstall produces an error and stops:
$ brew cask reinstall evernote
==> Downloading https://cdn1.evernote.com/mac-smd/public/Evernote_RELEASE_6.11_454874.dmg
Already downloaded: /Users/tony/Library/Caches/Homebrew/Cask/evernote--6.11_454874.dmg
==> Verifying checksum for Cask evernote
Error: It seems there is already an App at '/Applications/Evernote.app'.
reinstall --force works well, but it still shows an warning:
$ brew cask reinstall evernote --force
==> Downloading https://cdn1.evernote.com/mac-smd/public/Evernote_RELEASE_6.11_454874.dmg
Already downloaded: /Users/tony/Library/Caches/Homebrew/Cask/evernote--6.11_454874.dmg
==> Verifying checksum for Cask evernote
Warning: It seems there is already an App at '/Applications/Evernote.app'; overwriting.
==> Removing App '/Applications/Evernote.app'.
==> Moving App 'Evernote.app' to '/Applications/Evernote.app'.
🍺  evernote was successfully installed!
So, using reinstall isn't helpful to get rid of the warning.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Oh, it works well on my other mac. I will investigate further.

This issue seems to be occurring very frequently for me.
Command I am issuing to upgrade:
brew cu --verbose --cleanup --interactive --all --force;
Sample of errors I see during the upgrade (happens for multiple apps being upgraded):
==> Installing Cask steam
hdiutil attach -plist -nobrowse -readonly -noidme -mountrandom /var/folders/xxxx.dmg
mkbom -s -i /var/folders/xxxx.list -- /var/folders/xxxx.bom
ditto --bom /var/folders/xxxx.bom -- /private/var/folders/xxxx
diskutil eject /private/var/folders/xxxx
cp -pR /var/folders/xxxx/Steam.app/. /usr/local/Caskroom/steam/latest/Steam.app
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/MacOS/public with non-directory /var/folders/xxxx/Steam.app/./Contents/MacOS/public
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Resources with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Resources
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Versions/Current with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Versions/Current
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Headers with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Headers
==> Purging files for version latest of Cask steam
Error: Failure while executing; `cp -pR /var/folders/xxxx/Steam.app/. /usr/local/Caskroom/steam/latest/Steam.app` exited with 1. Here's the output:
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/MacOS/public with non-directory /var/folders/xxxx/Steam.app/./Contents/MacOS/public
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Resources with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Resources
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Versions/Current with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Versions/Current
cp: cannot overwrite directory /usr/local/Caskroom/steam/latest/Steam.app/./Contents/Frameworks/Breakpad.framework/Headers with non-directory /var/folders/xxxx/Steam.app/./Contents/Frameworks/Breakpad.framework/Headers

Workaround solution:
I've been resorting to interactively saying 'no' to the detected upgrades and then manually issuing brew reinstall for them.
brew cask reinstall steam

I can confirm this issue with latest version of casks.

Here's a solution that works with the base brew-cask command:
brew cask upgrade --greedy

Hello there, since https://github.com/buo/homebrew-cask-upgrade/pull/172 we're using reinstall 🎉

Hello there, since #172 we're using reinstall 🎉

I have the same question. See the picture below.

Hello there, since #172 we're using reinstall 🎉

I have the same question. See the picture below.

I have the same question. See the picture below.

Hey @canondin, if it doesn't work with brew cask reinstall (or brew reinstall --cask), there is not much we can do here. My suggestion would be to reinstall the app manually by using uninstall and then install, possible removing the installed app from the /Application folder if it is still present there in between the steps.

I have the same question. See the picture below.

Hey @canondin, if it doesn't work with brew cask reinstall (or brew reinstall --cask), there is not much we can do here. My suggestion would be to reinstall the app manually by using uninstall and then install, possible removing the installed app from the /Application folder if it is still present there in between the steps.

I have the same question. See the picture below.

Hey @canondin, if it doesn't work with brew cask reinstall (or brew reinstall --cask), there is not much we can do here. My suggestion would be to reinstall the app manually by using uninstall and then install, possible removing the installed app from the /Application folder if it is still present there in between the steps.

Thank you,it works.

I have the same question. See the picture below.

Hey @canondin, if it doesn't work with brew cask reinstall (or brew reinstall --cask), there is not much we can do here. My suggestion would be to reinstall the app manually by using uninstall and then install, possible removing the installed app from the /Application folder if it is still present there in between the steps.

Thank you,it works.

Just faced the same issue. reinstall --force helped me. Thanks!


[Feature] Create boilerplate for library

This is a feature request.
It will be great if we can create a basic boilerplate for creating libraries for pipes, components etc. This is the time when people may be willing to create components for angular 2 but due to the lack of this, it's tough. angular-cli already has a build system in place so it will be easier to integrate it here.
For example, If making a pipe, I won't need the whole src folder. A single file and a page where I can see the preview will do. This will make it easier for a lot of people.

We have this feature on the backlog, but it's probably only going to happen post v1 release.

Hi,
I've found a Yeoman biolerplate that might be used until this one is resolved:
https://github.com/jvandemo/generator-angular2-library
(Haven't tested it yet, but will, soon..)
Hope it will help, and take down the pressure from ng2-cli team ;)

Can't wait to use this in angular-cli :)
@DxCx did you test this generator finally ? Because doesn't seems up to date with last angular version :/

@jaumard I tested it long time ago,
yes i agree it's totally not up to date :\

Is there any resources about this for angular 2.0 ? I found for beta, alpha but nothing for the stable release...

i think now that the final is out, they might want to implement this soon..
@Brocco is there any near plans about this feature?

Would love to see this feature rather sooner than later. I understand that the wonderful heroes 👍 behind the cli have to manage their scope, but I am crossing my finger that it does not take too long.
It is becoming somewhat of a bottleneck w.r.t. reusability of developed code. An ETA, even it broad strokes, would be most appreciated.

@DxCx This is on the roadmap, but not in the immediate future.

It is sad to see that such an important feature is not being taken up as a priority. Angular2 is all about components but cli doesn't allow for making lib out of components, so that these can be reused across projects. Strange.

@vinaysoni I understand that this may be higher on your priority list, but there are more pressing issues for the team to focus on, such as build and test performance. Rest assured that this is something that will be supported by the CLI.

Hi @Brocco
Thanks for your reassurance on this. However, let me explain my perception of the situation and why I thought that this feature (support for library development) is a vital part that should not have been missing in angular-cli .
Let me begin by saying that my comment was not motivated because of my immediate personal need for building libraries.
I tend to think of cli as a tool similar to Maven Archetypes. A tool which can provide me scaffold of different kinds/pieces of applications - so that one can get started quickly - without having to do plumbing and with the best blueprints/practices. angular-cli, along the same lines, generates project, modules, components, pipes, enums etc.
In the Java world, we have had Maven Archetypes, to generate different kind of projects (java command line app, a Jar file, a J2EE app, a web app, a Spring Camel App - and the list is virtually endless). But the most important part of Maven Archetypes - which is the closest parallel to angular-cli  is generation of libraries.
We live in the world of libraries. Maven generated Java jar, war, ear, zip files to NPM packages. In an enterprise environment, everything is broken down into libraries. Now, when I think about - did anyone spend time in performance testing the Archetype for J2EE app or it's Unit tests, the answer is No. I feel that it is a minute piece in a much larger effort. If your blueprints are correct, and you are generating the code according to the blueprints, why do you need to do performance tests? angular-cli is not a full blown code generation tool. It generates only a starting point in code - with the right plumbing/blueprints/best practices.
On the other hand, what angular-cli should have had from the day one, was the ability to generate a Library. Even before "ng new project" came into place, there should have been "ng new lib datepicker"
This is because, there won't be a single Angular 2 project, worth the salt, within the enterprise, in real world, that would be composed of one single monolithic application. Only amatures, or Angular2 students, or a small time web developer would build such a monolithic application (without breaking it down into components). They may do it as a proof of concept, and therefore could be the use case for "ng new project" and the rest of what angular-cli has to offer today.
For corroboration, you may look at Angular2 itself. It acknowledges the assertion I am making by  providing modules and components. The idea, the spirit and the very purpose of Modules was that when a module is created, it should be packaged in its own library. This is what we have done for years in the java eco system on the Swing based UIs for many years. But where is the support to do this in angular-cli?
Also, Modules were introduced late. Angular-cli should have been nimble to include "Support for Libraries" as soon as Modules surfaced. The current variance between angular-2 and angular-cli doesn't reflect nicely on angular-cli. Without support for libraries, I can't see enterprise applications adopting angular-cli.
"Support for Libraries" would be the most important Use Case for angular-cli within an enterprise software development environment. This may be a bit hard for traditional Java Script developer to grasp. But with a first class Object Oriented programming language (Typescript) it won't be JS developers but C# and Java developers who would be building the next generation of reusable components and apps using Angular2. GUI applications, with Typescript and Ng2 will be larger than the JS apps of the past and will have much greater element of reuse.
In contrast, generating a route, or a component, or Enum are nice to have features but are relatively simpler and pale in front of the need for "Support for Libraries".
Thanks
Vinay Soni

Hi,
i'm really appreciating the work on angular cli. i agree to what @vinaysoni wrote.
I want to get involved and make this feature come to life. Does somebody want to join and/or do a brainstorming session?

Here is temprorary workaround
I've managed to publish my project to npm.
Here's what I did.
In angular-cli project my module went to single folder (component-warpper).
In that folder I've added index.ts with list of modules and components to export.
I also added package.json file.
Then in command line go to this folder and npm publish.
Now I can import it as node_modules in other projects.

I wholeheartedly agree. We've been using Angular-CLI to manage a component library since alpha 0.0.34 but the webpack upgrade killed it.
The crawl phase of this kind of support really just needs:
[ ] to allow declarations to be emitted (maybe its possible now but with the first webpack release it threw all sorts of weird errors if you turned this on in tsconfig)
[ ] the ability to generate barrels that make the API surface obvious.
[ ] compile the barrels for distribution rather than build a single bundle.
We are still using Angular-CLI to build the demo app within our component library but have resorted to an NPM script like the following to build the library:
del-cli ./dist && tsc --outDir ./dist -p src/app && node-sass --include-path scss src/app -o ./dist && cp ./public/package.json ./dist && cp -R ./src/assets ./dist && cd src/app && find . -name '*.html' -exec cp --parents \\{\\} ../../dist \\; && cd ../.. && npm run inline-resources

which is clunky at best.
Material2 switching back to gulp should be a good indication that this support is needed.

I hope this feature will be implemented very soon because my temprorary solution has issue with code completion in IDE (PhpStorm in my case).

Thanks for all the work so far, I'm a huge fan of angular-cli!
This issue is idle for about 2 months now. Any plan on when this will be implemented?
For the time being I will also try to come up with something on my own.

I have a live example, how to use angular cli for creating angular component library (with own dependencies, in that case @angular/material).
It also has a demo application inside of component library, that you could use as a documentation or sandbox.
You could have a look into:  app, lib,  demo.
It has a limitation: you can use it only from typescript projects (like angular-cli project), because of bundling as application, but everything other works perfectly.

There are some things that will need tackled within the CLI project in order to support libraries (not just applications). The first issue will be to support multiple applications within a project, this will allow for multiple build paths not just a single application. Then in order to support libraries a separate , non-application, build process will need to be implemented as there are additional build concerns when building a library than when building an application.
This is a high priority item for the community and for the team and is most certainly on the roadmap, just not sure of the timeframe at this point. Thanks for your input and patience.

Thanks for the heads up Brocco. After building some simple mechanisms for my publishing process on my own I wondered if the angular-cli project would have really helped, because when publishing a library in certain cases you want to be very deterministic on what happens during the preparation and in the end be part of the package. I got a grasp on how much work this would be for the team to implement this in general in a smooth way.
Regarding libraries I assume this is one of the points where every CLI user has to think about the building process on their own if straightforward solutions like @nsmolenskii 's approach (thanks!) can't be used.

@nsmolenskii, hey, I've taken a look at your lib example. It seems to me that it's a simple angular module, without any build process on it's own. Is it correct, or am I missing something? We're looking into building a library using angular-cli without including angular sources into the build

@maximusk yes, you are right. It is based on the distributing sources files(.ts, .html, .scss, etc) instead of compiled into .js + .d.ts. In case if you using any build system, that supports typescript loader (angular-cli as perfect example), this library will be loaded as normal module and will be bundled as part of your application based on your build configuration.
I assume, that as soon as angular-cli will support library mode, to migrate from current approach to a native one, it will require to:

configure library mode (most probably some properties in angular-cli.json)
change "main": "lib/index.ts"   and "typings": "lib/index.ts" in package.json to new compiled output files.

@nsmolenskii, got it, thanks for your reply

In order to write really scalable cross-platform apps, the need to have an appropriate architecture from the outset and encapsulate core / shared pipes, components and services in reusable external modules is paramount.
Whilst, from the conversation above, its apparent you can use cli as a base to get an external library started, the whole selling point of cli is convenience whilst ensuring best practice and imho, this needs to be promoted to priority 1 as a matter of priority 1 :-)
I've personally been waiting for this feature for months - can you give us a definite timeline?

I just want to reiterate that this is vitally needed. There is no good way to package an AOT ready library for angular 2 right now. Everything out there is a collosal mess.
Don't let this turn into another router fiasco.

+1 , x 1,000 if i could :-)

if someone from angular-cli can have a chat with me explaining what needs to be done i don't mind taking this and opening a PR. :)

It is important to remember that this is an OSS project and if a feature we want isn't being worked on as fast as we desire, we can always donate our own time to help create PRs.
:)

exactly @johnpapa ;)
i was creating libraries manually (mostly for myself and testing stuff), but Im not sure i was doing the right approach.
that's why if i'm gonna open a PR i want to make sure it's being done properly.

Hello @johnpapa, We like to make libraries too, do you have any pattern to show us.

It's not going to be there for 1.0, but it's definitely going to be there for 2.0. So the only question is if it's gonna be there for 1.x - I cannot answer this yet.
It's one of those big features that requires a fair bit of design upfront so it's not something we're looking for people to help out in right now. But it is something we're paying a lot of attention to.
It is true that there isn't a lot of guidance on how to build a library right now. I'm working on a cookbook for angular.io about this topic and hope to have it out soon.
I'm basing the upcoming cookbook heavily on @thelgevold's excellent work on https://github.com/angular/angular.io/pull/2758, which was never merged. It is a good starting point currently, if you want to have a look.

Thank you so much @filipesilva

Does it make sense to try using this typerscript boilerplate : https://github.com/alexjoverm/typescript-library-starter ?

That is nice, but the main problem from my experience is the AOT + Webpack bit.

Hey @filipesilva I am just starting to look at creating a component library for some upcoming Angular apps and was wondering how the cookbook might be coming along? If I told you that I could hold off on starting a component library for a week or two, would you be gracious enough to give me a recommendation whether to try tackling this now or later? I'm also somewhat new to the Angular (2+) world, if that knowledge is of much worth.
I also saw that you've been active recently in this: https://github.com/filipesilva/angular-quickstart-lib Is this usable atm? Or would you recommend first looking at thelgevolds work before that?  angular/angular.io#2758  Let me know if I can help guinea pig anything related to library development.

100% agree with @vinaysoni expressing the need of being able to create reusable/distributable libs with ng cli.  @danwulff @filipesilva I'm also looking to start a project soon within a couple of weeks that will require the ability to create such shareable/distributable libs.  Any recommendation between now and then will be appreciated.

From my experience, you need to set up a bunch of tools on your own.

Getting your Angular 2 library ready for AoT
Distributing an Angular Library - The Brief Guide

tl;dr:

ngc to ES5 target, generating *.js + *.d.ts + *.metadata.json, exclude *.ngfactory.ts from distributable package, optionally: include *.js.map in distributable package
inline templates and styles, compile pre-css languages to css
create am UMD bundle referenced in "main" property of package.json
create an ESM version (in ES2015 module format) referenced in "module" property of package.json
(possibly more...)

We have made a library of components with gulp and webpack. The important part as mentioned @dherges is to generate the *.d.ts and *.metadata.json.
If it helps someone, this is our library: https://github.com/stratio/egeo , the important part are the files:

gulpfile.js
tsconfig.gulp.json
config/webpack-components.js
tsconfig.lib.json

So far this is working for us. We are waiting for a "official/angular-cli" way to do a library.

I suggest to check repo of material2 and spend some time how it's done
They're using gulp and systemjs for dev sanbox app, but you can use final library whenever you want. It also provides UMD bundle.
So, just a tip: spend some time and if you will reformat/reorganize everything depended your needs, you will come up with the most flexible solution

@Brocco you mentioned above there will be to support for multiple applications within a project.  Is this available yet?

Thanks folks for the recommendations, I appreciate it a lot. I'm putting this off for a few weeks but I'll let you know how it goes when I get around to it.

Till this feature is implemented here you guys can use https://github.com/jvandemo/generator-angular2-library. It seems it is in active development.
All thanks to @jvandemo

@ritz078 — Thank you, much appreciated. It will be great for the ecosystem if Angular CLI offers the ability to generate a library at some point. 👍

@playground yes, multiple apps are currently supported by the CLI. There is a story that will be added to the wiki: #5737

+1

That library starter from me might also work:
https://github.com/cankayacan/ngx-library-starter

You can create a npm library from existing @angular/cli project itself.
Create a new project with ng new -projectname
edit "package.json"
Add "typings": "./index.d.ts"  (change to any name you want)
in "index.d.ts" file export all the classes/interfaces you need to expose, you can even included a new ts file here which has a export (like a nested export)
in my case i used
export * from "./src/app/model";
export * from "./src/app/service";

model and service folders will have index.d.ts which exports the underlying classes/interfaces.
now login to npm from root folder
npm login
and publish the module
npm publish
How to use the published module in angular project
Just add a dependency and devDependencies in your project
"module-project": "^1.0.13"

@achieverprince, you are right, but it has some limitations, for example:

you can not use it directly from es projects without extra typescript loader, because it based on typescript code distribution
you will have a lot files (as index.htm, main.ts, etc), those redundant for library, but could be used as sandbox.
Even that we using such approach inside of our team for half year already. It just works and compatible with aot-compilation out of the box (within another angular-cli project)

I just put link to example repository here.

@nsmolenskii , you are right.
I am stuck in final stage with this error
compiler.es5.js:1540 Uncaught Error: Encountered undefined provider! Usually this means you have a circular dependencies (might be caused by using 'barrel' index.ts files.
May be i will try your approach which is neater.
But i also have few classes that has to be exposed and can be imported in main project.

Usually, such errors are happens when you doing some imports like:
import {something}from './';
import {something}from '../';

try to get rid of such imports and use at least one path segment explicit.

@nsmolenskii
It was not related to that.
Changes i made make it work
i was using "module" property in package.json and referencing it to exported js file (This will not work as the exported js files will not have all the modules)
i removed "module" and not exporting any js file now
using "main" property as your library project which points to same typing ts file
"main": "src/index.ts"
1 more change i has to make is rename all index.d.ts > index.ts , which solved the issue.
And i was using dependency as npm module itself (i need to publish to npm every time to get a new version), and my project is private code so now changed to local svn repository.
But i am not able to directly download the code from svn
//DOESN'T WORK
"dependencies": {
"yl-angular": "http://****/svn/maven2/repo/trunk/yl-angular/yl-angular/"
}

//WORK - Local
"dependencies": {
"yl-angular": "D://JAVA_DEVELOPMENT//G2_NEW//yl-angular//yl-angular"
}

Do you have any idea to use svn repo for depencency?

@achieverprince @nsmolenskii I strongly discourage that way of publishing a library, it's not at all compliant with the Angular Package Format.
Meanwhile you can read a tentative guide to third party libraries in https://github.com/angular/angular/pull/16486, and a seed for it in https://github.com/filipesilva/angular-quickstart-lib.

@filipesilva, thanks for a really reasonable comment.
I'm not pretend, that my suggestion is a proper way to manage components libraries, it is just workaround until official support by angular-cli finished.
I have to admit, that such suggestions would never have appeared, if this issue had been solved.
Now you feel the irony of the situation, don't you?

@filipesilva
Thanks for the update.
I will check https://github.com/filipesilva/angular-quickstart-lib
I know you guys will have lots of other issues to focus on.
Hoping to see an update from cli team soon :)
@nsmolenskii Finally every thing works here , used this npm plugin for svn support in repository.
At least i was happy that we are able to bring a temp solution to the desk to keep the project running.

Hi, for my purposes, I scrambled together a packaging script that does all the necessary transformations and produces a library in the Angular Package Format:
https://github.com/dherges/ng-packagr
There are still issues, minification is not yet implemented, source maps need to be re-mapped, and the source maps from downleveling with tsc are lost ... so I will neither support this nor publish this to npm. Things are inspired by the build tasks from the material2 team
If you like, let's try to incorporate this into Angular CLI. Is there anyone working on the compile library feature? If yes, who can I get in touch with?
Cheers! :beers:

@dherges I appreciate your offer but we're not yet open to contributions for this new feature :/

@filipesilva Ok, no deal.
Given that, I am looking for people from the community who are interested in implementing a packaging tool for Angular libraries. You can contact me here on my Twitter account

In contradiction to what I just said a very very loooong time ago, I decided to publish ng-packagr.
Once again, I stress that I am not really able to support this tool for everyone. I believe that a community effort will lead to way better results than one individual can ever achieve. Feel free to use ng-packagr when it suits your needs! If you find any issues or want to add missing features, don't hesitate to contact me ... open issues or pull requests! It's always welcome!

It looks like our company is going to hold back on publishing our Angular modules to the Open Source community until this is figured out. We need to spend more time writing application code, less time maintaining our own custom build chain. We're happy to contribute some hours to helping standardize on this.

Thanks to everyone who threw starter packs together. We've struggled with this problem too and spent countless hours on our NG2 builds. In the end some combination of ngc, webpack and custom gulp tasks worked for us.
To angular team: Angular is loosing ground to React and Vue and others for developer mindshare.  This should be your number 1 concern to kick start Angular community.

@oliverjanik
I absolutely agree with you.
What is the point of having a framework which doesn't support code sharing(library).
Hope they will realize it before it is too late.
Angular 2/4 should not be a toy framework for learners/free lancers.

@achieverprince that is kind of insulting to framework authors - framework can be anything. And remember you get it for free (which is kinda amazing) - if you don't like something - patches are always welcome

I used https://github.com/robisim74/angular-library-starter with 3 npm packages (http://npmjs.com/~orizens) thus far and it's working quite well with AOT

Check out https://github.com/gonzofish/angular-library-set

@benetis-bentley
Not at all, i am not disrespecting any framework or anyone.
We all are here because of the wonderful framework Angular and i love to use it.
I was just worried, Angular should not lose its popularity because of this.
My words would have been little harsh, i apologize if i have hurt any one.
I do have to say, it is getting harder than angularjs because of the fragmentation... (angular 2, angular 4), even upgrading the framework from angular 4.0.3 > 4.1.2 broke the build (I think it has nothing to do with the framework, it is problem with the CLI)
It is going out of scope for this issue, so i ll leave it here.
I am just a encouraged developer looking to promote Angular.

@achieverprince
Unfortunately I agree with you. The Angular team has not been able to create a simple framework for the community. Instead he has put more inconveniences along the way than improvements.
In my team we have made a library for Angular 2/4 and we have had many problems to support the different versions and, above all, the AOT compilation.
If a framework wants to be successful it needs the community, and it is evident that Angular 2/4 has not been built with the community in mind.
It would be well if the Angular team would participate in the reflection created in this issue and tell us their impressions.

Perhaps the idea of what an Angular Library needs to change to better go with the flow that Angular CLI supports. My thought is that instead of attempting to create an alternative set of build tools for Angular Libraries (ex. https://github.com/gonzofish/angular-library-set), libraries could be included directly into an Angular CLI based project in the /src/app/contrib/<angular library module name> directory so that the standard Angular CLI build chain picks it up. This might get messy with dependency management but Open Source projects like Drupal were able to foster a thriving ecosystem of community contributed modules that did not have the luxury of being able to use their own specific version of some dependency.

@rjsteinert I agree that creating third-party tools don't solve the problem--I created Angular Librarian when I realized using the CLI wasn't going to be possible/too cumbersome to create a library.
I'd love to incorporate what librarian and other generators have done into the CLI to perpetuate a set of standards & practices when it comes to developing Angular code.

It's great to see so many people eager to help with this feature, however @filipesilva commented above:

I appreciate your offer but we're not yet open to contributions for this new feature :/

I think this means that Angular team is working hard on this feature. I only hope to see an update with the progress/roadmap to calm the community down a bit.

@DmitryEfimenko I think that would be great for the community to get an update with the progress as many of us in the community have been eagerly waiting for this feature to be out.

@DmitryEfimenko
I doubt that, cos the priority is still "required".
I think the Angular team has other major issues to deal with in their bucket.
I absolutely respect the team on prioritizing the issues (they know the actual situation)
I think we shouldn't pressure them as well, but what other choice do we got.

Thanks everyone for your comments.
We really appreciate the discussion regarding libraries, but unfortunately this will not be implemented as part of CLI 1.x. There are multiple challenges that are insurmountable with library support and the current state of the CLI. Here are a few examples (in no particular order, and non-exhaustive):

Webpack does not support the kind of modules we're looking for when publishing Angular libraries (e.g. metadata.json and d.ts files).
Webpack does not support (but it's on the roadmap) outputting ES6 code like we suggest for flat modules.
We do not have a story yet for a real multi-application projects, which is required for developing libraries (you want a demo app, a development app and an e2e app for developing libraries).
We do not have support for custom templates, and creating templates right now is particularly expensive for us.
We do not have support for having multiple entry points.
There's no proper serve/test/e2e, or even build stories for libraries in particular. What I mean by this is that no design has been done yet on how e.g. ng serve in a library would even work. This is a surprisingly hard problem for us because the CLI should stay as simple-to-use as possible. Same goes for ng test; our current karma config relies heavily on Webpack (see points above).

There are of course other problems that arise when building a CLI tool that supports both libraries and applications while being simple and straightforward to understand.
As for the way forward, we are currently building our Angular Development Kit and in the early design stages. We are rethinking the build story entirely and taking into account libraries from the start. Unfortunately the timeline for the DevKit is rather fuzzy, but once we have something more concrete we will share it with the community.
I'm going to lock this conversation for now, to make sure people coming into this thread see this message. I am not entirely sure this issue will live on as we move to the DevKit, but wherever news happen on library support in the CLI I will point to from this thread so people can follow.
Thanks everyone.

Addendum: We are in the process of adding custom template support to the CLI, and with it another tool that can be used to generate just templates but outside the CLI. We will consider having a scaffold for basic library projects, but it will not be part of the Angular CLI.

I created https://github.com/angular/angular-cli/issues/6510 to keep this thread locked, but the conversation going. Please continue the discussion over to the new issue, so that people coming here see the official answer.


Update Dart icon in JetBrains plugin

Dart has a refreshed icon, we should get the Dart JetBrains plugin updated.

@devoncarew can you help facilitate this?

Out for review -


Writing objects always reused

After I create and run "git push deis master", it's always display "Total 102 (delta 43), reused 102 (delta 43)", and last display "error: failed to push some refs to 'ssh://git@deis.local3.deisapp.com:2222/tender-overalls.git'".
This occur only I clone this example, other examples of deis did not existed.

There isn't a general problem with this example app:
$ deis create
Creating application...  o..
done, created owlish-armchair
Git remote deis added
$ git push deis master
Warning: Permanently added the RSA host key for IP address '[<IP_ADDRESS>]:2222' to the list of known hosts.
Counting objects: 110, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (61/61), done.
Writing objects: 100% (110/110), 23.16 KiB | 0 bytes/s, done.
Total 110 (delta 48), reused 99 (delta 43)
-----> Ruby app detected
-----> Compiling Ruby/Rack
-----> Using Ruby version: ruby-1.9.3
-----> Installing dependencies using 1.7.12
       Running: bundle install --without development:test --path vendor/bundle --binstubs vendor/bundle/bin -j4 --deployment
       Fetching gem metadata from http://rubygems.org/..........
       Using bundler 1.7.12
       Installing tilt 1.3.6
       Installing rack 1.5.2
       Installing rack-protection 1.5.0
       Installing sinatra 1.4.2
       Your bundle is complete!
       Gems in the groups development and test were not installed.
       It was installed into ./vendor/bundle
       Bundle completed (5.78s)
       Cleaning up the bundler cache.

-----> Discovering process types
       Procfile declares types -> web
       Default process types for Ruby -> rake, console, web
-----> Compiled slug size is 15M

-----> Building Docker image
remote: Sending build context to Docker daemon 15.09 MB
remote: build context to Docker daemon
Step 0 : FROM deis/slugrunner
 ---> 6e204a1f7ea6
Step 1 : RUN mkdir -p /app
 ---> Using cache
 ---> 841f4db8f199
Step 2 : WORKDIR /app
 ---> Using cache
 ---> 5ff0af9ba82f
Step 3 : ENTRYPOINT /runner/init
 ---> Using cache
 ---> e11c63bcb14f
Step 4 : ADD slug.tgz /app
 ---> 434c9625c5b9
Removing intermediate container b6866d32aafd
Step 5 : ENV GIT_SHA 6b1a9488ac7f37fab78e69b20118d48d6294b8f3
 ---> Running in 30a39aba042e
 ---> d5cbda990cac
Removing intermediate container 30a39aba042e
Successfully built d5cbda990cac
-----> Pushing image to private registry

-----> Launching...
       done, owlish-armchair:v2 deployed to Deis

       http://owlish-armchair.local3.deisapp.com

       To learn more, use `deis help` or visit http://deis.io

To ssh://git@deis.local3.deisapp.com:2222/owlish-armchair.git
 * [new branch]      master -> master
$ curl http://owlish-armchair.local3.deisapp.com
Powered by Deis!
Running on container ID 22aac46e3c6c

I'm going to close this issue since it's six months old and there isn't much to go on, but @Trialngle23 please re-open it or create a new issue if you are still having problems deploying example-ruby-sinatra.


Proposal for #365: Prevent update changes

Resolves #365
Summary
This is a proposal for the preventUpdateChanges hook discussed in #365.
The hook cannot be merged with the existent preventChanges hook, as the function signature is different (we need a getFunc parameter for the update method, which is not needed for patch).
If no getFunc is passed explicitely, the default function will be used which simply passes the hook context's id and params.query fields to the service call and can handle multi record changes.
I also didn't implement preventChanges's  shouldThrow parameter as this would cause trouble with multi record changes. This is the case, because if shouldThrow was set to false and only some of the requested records would be allowed to change, the hook would need to ensure that really only these records would be updated.
NOTE: I added lodash.isequal as a dependency for the equality check as it already can handle object and array comparison.
Other Information
This PR includes tests for the hook with the following coverage result:

File
% Stmts
% Branch
% Funcs
% Lines
Uncovered Line #s

prevent-update-changes.js
100
100
100
100

Thanks for the PR. I reviewed the code.
This hook is restricted to the update method. That method requires that an id be provided, and it will only update one row. Feathers otherwise throws BadRequest: Not replacing multiple records. Did you mean patch?.
Your code is based on the notion that update` can update multiple records, which is incorrect.
Once again, I question providing such a hook rather than requiring people to use the patch method. An alternative approach may be a hook which converts an update to a patch call.

@eddyystop thanks I didn't know that, I changed the code accordingly. :)
I also added the ifThrow parameter from the preventChanges hook, since there is no issue with it anymore.

Once again, I question providing such a hook rather than requiring people to use the patch method. An alternative approach may be a hook which converts an update to a patch call while removing any props for fields which may not be changed.

I see it the same way, I would also prefer to convert the requests into patches, but with that approach's given limitations I don't think that it is suitable for the majority, as it could induce misleading behavior and would eliminate some basic features of the update method.
But I'm open to being convinced otherwise. (hope this is correct englisch) :)

Your English is excellent.
What limitations do you see if the hook converted the update call to a patch? The hook chain is created during app configuration, so the update hooks would be run even for patch.
That leaves common and custom hooks which act differently for patch than for update. A strong notice in the docs should be enough to warn people of that.

Sorry, I don't know how to express this in a better way so I'll try to describe it with an example:

Example

Let's say we had an entry like this:
{
  "id": "1-2-3",
  "firstName": "John",
  "lastName": "Doe",
  "gender": "male",
  "settings": [ "..." ]
}

When we apply an update like the following...
{
  "firstName": "Bill",
  "lastName": "Gates"
}

... than we expect the result to look like something like this:
{
  "id": "1-2-3",
  "firstName": "Bill",
  "lastName": "Gates"
}

id stays as it is because it is a special field, but all other fields which miss in the update get omitted from the result.
But if we did a patch instead of an update with exactly the same request data we would get this:
{
  "id": "1-2-3",
  "firstName": "Bill",
  "lastName": "Gates",
  "gender": "male",
  "settings": [ "..." ]
}

Unlike the update method every field which was not described in the patch stays as it is and doesn't get omitted.

We have no way to unset fields or to set them to undefined if we only have patch but not update.
So the first problem would be that if we changed the update method to internally do a patch instead we wouldn't be able to unset fields anymore if we wanted to.
The second problem is shown in the example above.
When we do an update and don't mention a field in our request we expect this field to be definitely undefined in our result, even if it was set to a value before the update.
But patch works differently. It only modifies exactly those fields which were specified in the request and let's all other fields untouched. So if we changed the request into a patch internally we would change the behavior how these unspecified fields are treated.
And even if patch had a mechanism to unset fields we would nevertheless need to make a service call to fix this issue because we would need to find out which fields were omitted in the request and thus would explicitely need to be unset.

"We have no way to unset fields or to set them to undefined if we only have patch but not update."
You can service.patch(id, { name: undefined }). I'm not sure if all the adapters consistently set the value to undefined or if they delete it.
I understand your points. I admit I was thinking more about adapters with schemas than MongoDB.

Oh well I didn't know that.
I am mainly using ReST and I don't think that JSON is capable of doing something like this as it doesn't have an undefined, but I think on the serverside it should work fine.
So this still keeps the problem with schemaless adapters.


Server Sided data loading with 1.0.0

Previously with 0.13.x I could pass my custom props into the RouteHandler and they would get passed down to the rendered component . The docs for react-router 1.0.0 recommend to use match with RoutingContext, however I cannot figure out a way to access custom props from the components.
Here are simplified snippets of my code:
/* Server Route handler */
let customProps = {/* some custom props*/};
match({routes, location}, (err, redirectLocation, renderProps) => {
  // removed error checking for simplicity
  renderProps.customProps = customProps;
  let factory = React.createFactory(RoutingContext)(renderProps);
  ReactDOMServer.renderToString(factory);
});

/* Routes.jsx */
export default (
    <Route path='/' component={App}>
      <IndexRoute component={Home}/>
      <Route path='admin' component={Admin}/>
    </Route>
)

/* App.jsx */
export class App extends React.Component {
  // this.props does not contain customProps
  render() {
    return(
      <html>
        {this.props.children} // How can I render this with customProps?
      </html>
    )
  }
}

The documentation mentions using a load function within the route or using wrapComponentWithData() on renderProps.components, but doesn't mention how this can be accomplished. Is there something I am missing?

Does createElement prop help?

@gaearon YES! that helped me get past the SSR issue, but now there are invariant violation errors once I'm back on the frontend.

It looks like the client is rendering without data-reactid on some components. Still no idea why this would happen.

@gaearon how would the createElement prop be used in this case?

@dmitrigrabov you would pass a prop to the RoutingContext component called createElement which would return an element with your custom props loaded:
const customProps = {/*Custom Data*/};
match({routes, location}, (err, redirectLocation, renderProps) => {
// Skipping error checking
 const routerProps = {
   ...renderProps,
    createElement: (Component, props) => {
    return React.createElement(Component, {...props, ...customProps});
 }

  let factory = React.createFactory(RoutingContext)(routerProps);
  res.send(ReactDOMServer.renderToString(factory));
};

@schauhan19 thanks very much for the help :)


perf: debounce sync progress updates

Description:
Debounce sync progress updates
Motivation and Context:
Reduce excessive renders in the sync process
How Has This Been Tested?
Manually
Types of changes:
Performance enhancement
Checklist:

[x] My code follows the code style of this project.
[x] I have reviewed and updated the documentation accordingly.
[x] I have read the CONTRIBUTING document.
[ ] I have added tests to cover my changes where needed.
[x] All new and existing tests passed.
[x] My commits have been squashed into a concise set of changes.

Coverage increased (+0.1%) to 20.23% when pulling 708231c898295b85b98362f64247ffc9e7d48893 on mrfelton:perf/sync-progress into 77b793c403bd15a403475e462d1693883fd17452 on LN-Zap:next.


Issue #SB-20781 fix: Unit testing coverage to be 80%

Issue #SB-20781 fix: Unit testing coverage to be 80%
code coverage = 86.55%

Raised new PR: https://github.com/project-sunbird/sunbird-player-sdk/pull/8 hence closing this PR


Change GDScript tests to use InstancePlaceholder as the example abstract class

This PR is split off from #67510 for easy reviewing.
It changes the GDScript tests to use InstancePlaceholder as the example abstract class instead of CanvasItem, since I want to allow extending CanvasItem. Why InstancePlaceholder: somewhat arbitrary, out of the current abstract classes this seems like a class that nobody would ever want to extend.
Also, this PR includes some formatting fixes in canvas_item.h.

Thanks! For the record, the canvas item changes should've been avoided here, since they aren't relevant to the improvements. But it wasn't worth the trouble to request an amendment :)


Home Screen - menu does not close on clicking home

In the new UI - There is a general confusion on why the history screen is the home page .. because of this confusion, the users tend to click on the "Home" button from the menu on the top left corner of screen..
When they click on the Home  the menu does not close ..
this causes confusion and makes the user feel that the app is stuck.
Steps to reconstruct:

Open the leaflet wallet
Scan a product
Go back to home page  -- now it has history items with list of products
Now open the menu and click on the "Home"
Now its observed that the menu does not close and gives an impression that the app is stuck

Could you configure the settings tab to close the menu when the same page is clicked?
Please let me know if the description is not clear.
Thank you

This issue was fixed.
Commit: https://github.com/PharmaLedger-IMI/leaflet-ssapp/commit/aa8dfeed12164550c7b5f35ca6155d43c6d59b51


VS code crashes when the ozone platform is set to wayland

Type: Bug

run the vs code binary as such: code --enable-features=UseOzonePlatform --ozone-platform=wayland

Drag your cursor to the "file" option on the toolbar.

 I have a crash the moment I click file in the menu

same problem here but it doesn't even start up

for some unknown mystery reason, going to the GTK Settings app and pressing apply on the mouse cursor menu fixed it.
no idea how, no idea why, but it works now. huge thanks to this guy on reddit

but I use KDE and don't have that

There seems to be a workaround for this file-toolbar-crash-issue:
https://github.com/microsoft/vscode/issues/232873#issuecomment-2454887753

for some unknown mystery reason, going to the GTK Settings app and pressing apply on the mouse cursor menu fixed it.
no idea how, no idea why, but it works now. huge thanks to this guy on reddit

You da man!
btw, You can fix the same way using nwg-look too.

/duplicate https://github.com/microsoft/vscode/issues/232723


rolebindings.authorization.openshift.io is forbidden: User "admin" cannot list rolebindings.authorization.openshift.io in the namespace "default"

Steps to reproduce the error
git clone https://github.com/snowdrop/openshift-infra.git
cd openshift-infra/ansible
git clone -b release-3.9 https://github.com/openshift/openshift-ansible.git
ansible-playbook -i inventory/cloud_host openshift-ansible/playbooks/prerequisites.yml
ansible-playbook -i inventory/cloud_host openshift-ansible/playbooks/deploy_cluster.yml
ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e openshift_admin_pwd=admin --tags enable_cluster_admin
ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e openshift_admin_pwd=admin --tags identity_provider
ansible-playbook -i inventory/cloud_host playbook/post_installation.yml --tags add_extra_users -e number_of_extra_users=2 -e first_extra_user_offset=1 -e openshift_admin_pwd=admin

Error
TASK [add_extra_users : Grant user admin priviledges] *****************************************************************************************************************************************************************************************
failed: [<IP_ADDRESS>] (item=1) => {"changed": true, "cmd": ["oc", "adm", "policy", "add-role-to-user", "admin", "user1"], "delta": "0:00:00.215537", "end": "2018-05-09 16:20:15.113077", "item": "1", "msg": "non-zero return code", "rc": 1, "start": "2018-05-09 16:20:14.897540", "stderr": "Error from server (Forbidden): rolebindings.authorization.openshift.io is forbidden: User \"admin\" cannot list rolebindings.authorization.openshift.io in the namespace \"default\": User \"admin\" cannot list rolebindings.authorization.openshift.io in project \"default\"", "stderr_lines": ["Error from server (Forbidden): rolebindings.authorization.openshift.io is forbidden: User \"admin\" cannot list rolebindings.authorization.openshift.io in the namespace \"default\": User \"admin\" cannot list rolebindings.authorization.openshift.io in project \"default\""], "stdout": "", "stdout_lines": []}
failed: [<IP_ADDRESS>] (item=2) => {"changed": true, "cmd": ["oc", "adm", "policy", "add-role-to-user", "admin", "user2"], "delta": "0:00:00.239512", "end": "2018-05-09 16:20:15.705065", "item": "2", "msg": "non-zero return code", "rc": 1, "start": "2018-05-09 16:20:15.465553", "stderr": "Error from server (Forbidden): rolebindings.authorization.openshift.io is forbidden: User \"admin\" cannot list rolebindings.authorization.openshift.io in the namespace \"default\": User \"admin\" cannot list rolebindings.authorization.openshift.io in project \"default\"", "stderr_lines": ["Error from server (Forbidden): rolebindings.authorization.openshift.io is forbidden: User \"admin\" cannot list rolebindings.authorization.openshift.io in the namespace \"default\": User \"admin\" cannot list rolebindings.authorization.openshift.io in project \"default\""], "stdout": "", "stdout_lines": []}

You have wrongly executed one of the steps.
Instead of
ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e openshift_admin_pwd=admin --tags enable_cluster_admin
it should be
ansible-playbook -i inventory/cloud_host playbook/post_installation.yml -e openshift_admin_pwd=admin --tags enable_cluster_role


Unable to boot Windows after resetting Nvram

Hello and congratulations on the toll
I've been using it for years and it's always worked great
even dual boot with Opencore  " macOS  "
PciRoot(0x0)/Pci(0x17,0x0)/Sata(0x2,0xFFFF,0x0)/HD(1,GPT,798C34C2-A8BB-4A4D-8E63-436A5EC6E2AC,0x800,0x64000)/\EFI\HackBGRT\loader.efi ( my custom entry in Opencore )
The problem arises since unfortunately sometimes I have to do a reset/clearnvram
After that i am unable to boot Windows in any way either from Windows disk or from the Opencore bootloader with blue screens and 0x00... errors following
I was wondering if there is a way to restore it without having to reinstall or fix it with the recovery stick drive... perhaps by putting the entry ( loader.efi ) back into the BCD?
Thanks for the attention

HackBGRT does not write any NVRAM data, except for the boot entry. As far as I understand, the boot log should be only in normal RAM, but you could disable logging in config.txt just in case.
It's not a surprise that you can't boot Windows after resetting NVRAM. You should figure out why you even need to reset NVRAM (very suspicious!) and if you could somehow either avoid that or at least backup and restore some of the data required by Windows. Like, take a backup of your NVRAM with some tool and compare it after resetting to figure out the problem.
Getting a blue screen after resetting NVRAM is a Windows problem and has nothing to do with HackBGRT.

Thank you for answering me and if I may I will reply
Unfortunately it's not a real Mac and I also use OCLP patcher to make some devices work, so I'm forced to reset/clean the nvram to make the patch work
I manually inserted the entry ( loader.efi ) into the BCD

Everything seems to be fine whether booting directly from Windows or via Opencore even after cleaning/resetting nvram
However, booting from Windows directly temporarily shows warnings

... but still boots
I don't know if they can be corrected, but I'm already satisfiedI ...attach log
setup.log.zip
Thanks again

I didn't quite understand the commit you linked to me "start_image error" ... I have to reread it calmly
"BlessOverride" or Custom Entries is more or less the same thing, I prefer the latter for the reason of scanpolicy an example HERE
What I did now I entered this into the Win terminal :
" bcdedit /set {bootmgr} path \EFI\HackBGRT\loader.efi "
It's working well as written above, no problems even after resetting the nvram... the entry still persists
As you can See with Opencore it starts your loader without problems
I only get  warnings when boot directly from Win's disk/EFI
It's not important, it's good that it starts and doesn't lose boot... I'll update you if I manage to eliminate that warning
Greetings

Solved hahaha :-)
I just needed to rename the Entry from HackBGRT --> Windows Boot Manager
and the warning disappeared

Greetings


feat: Mount qdrant volume for single node docker setup

Make it easier to access Qdrant storage volume. We are already doing this for billion scale docker compose setup.

Why do we need to access it?
How do we create a collection name, is it the same for all setups or can it be different for various setups?

Why do we need to access it?

Helpful while running experiments. I often have to look into the files. Also, more importantly, this keeps the volume persistent. I should have mentioned that instead.

How do we create a collection name, is it the same for all setups or can it be different for various setups?

So far we always create/use a benchmark collection. It's always recreated for upload. So shouldn't cause issues between re-runs.

Now that I thought more about it, I think it's unnecessary. One can always exec or cp into the container.
Let me close this.


Epson printer text left and right

Can any one provide example of how to print texts align left and right in the same line? Can't seem to find it anywhere. Help is appreciated!!

@ManveeYew hello ESC/POS doesn't support such functionality out of the box. However, it's possible to do it manually, I plan to prepare a function in the near future.
The main idea is to use this method and adjust the layout manually.

Thanks @tr3v3r , without this it doesnt really meaningful to print POS receipt.  Can't wait for this function!

Hi, What should we do to have 2 texts in one line?

@PedramGhdi hi I’m currently working on it. I’ll keep you posted on updates

hi @PedramGhdi, currently i used a work around to get this to work.
`/**

utility: pads two strings to columns per line
*/
const getSplitMessage = (
value: string,
value2: string,
columnPerLine?: number,
) => {
columnPerLine = 48;
let finalString = '';
if (value.length + value2.length > columnPerLine) {
finalString = value + ' ' + value2;
} else {
let padding = columnPerLine - (value.length + value2.length);
finalString = finalString + value;
for (let i = 0; i < padding; i++) {
finalString = finalString + ' ';
}
finalString = finalString + value2;
}
return finalString;
};`

format.size(1, 1).text(getSplitMessage('Product', 'Total'))

@PedramGhdi hi I’m currently working on it. I’ll keep you posted on updates

It'll be great! thanks

Just released 2.3.0 version.
Please try this method https://github.com/tr3v3r/react-native-esc-pos-printer/blob/main/docs/PRINTING.md#textline


Ability to auto-fill required dataset_id metadata field

Given any non-DataLad identifier, we can generate a UUID identifier that would be suitable for DataLad using an approach that datalad-ebrain is using
https://github.com/datalad/datalad-ebrains/blob/75acaae21e7daf4ea100ec7e8e8fa01774729e63/datalad_ebrains/fairgraph_query.py#L83-L88
This would make it possible to accept any identifier as input, and render it out reproducibly as a UUID on output (if it is not already a UUID).

This functionality has been implemented and used in datalad-catalog-adjacent tools, e.g. the SFB1451/ABCD-J catalog tooling.


🐛 [Bug] Encountered bug when using Torch-TensorRT (We don't have an op for aten::floor_divide but it isn't a special case)

Bug Description
Hi, I'm trying to compile a model with torch_tensorrt. I was able to successfully create the scripted model but when compiling it I'm getting the following error:
INFO: [Torch-TensorRT] - ir was set to default, using TorchScript as ir
DEBUG: [Torch-TensorRT] - Settings requested for Lowering:
    torch_executed_modules: [
    ]
Traceback (most recent call last):
  File "test.py", line 103, in <module>
    trt_model = torch_tensorrt.compile(scripted_model,
  File "/media/andrea/Disk_21/Desktop/ARES/leav-action-recognition-pipeline/test_env/lib/python3.8/site-packages/torch_tensorrt/_compile.py", line 115, in compile
    return torch_tensorrt.ts.compile(ts_mod, inputs=inputs, enabled_precisions=enabled_precisions, **kwargs)
  File "/media/andrea/Disk_21/Desktop/ARES/leav-action-recognition-pipeline/test_env/lib/python3.8/site-packages/torch_tensorrt/ts/_compiler.py", line 113, in compile
    compiled_cpp_mod = _C.compile_graph(module._c, _parse_compile_spec(spec))
RuntimeError: 0INTERNAL ASSERT FAILED at "../torch/csrc/jit/ir/alias_analysis.cpp":607, please report a bug to PyTorch. We don't have an op for aten::floor_divide but it isn't a special case.  Argument types: int, int,

Candidates:
	aten::floor_divide(Tensor self, Tensor other) -> (Tensor)
	aten::floor_divide.Scalar(Tensor self, Scalar other) -> (Tensor)
	aten::floor_divide.out(Tensor self, Tensor other, *, Tensor(a!) out) -> (Tensor(a!))

I don't know which part of the model is exactly causing this error yet, I'll post a simple version once I figure it out but I think torch_tensortrt 1.1.0 release is supposed to support floor_divide.
This is what I'm doing to compile the model:
model.eval().cuda()
scripted_model = torch.jit.script(model)

with torch_tensorrt.logging.debug():
    trt_model = torch_tensorrt.compile(scripted_model,
                    inputs = [torch_tensorrt.Input((1, 3, 16, 344, 344))],
                    enabled_precisions= {torch.half},
                    workspace_size= 1 << 20,
                    truncate_long_and_double=True,
                    require_full_compilation=False, #True
                )

Expected behavior
I was expecting floor_divide to be supported in the 1.1.0 release based on the information given here: https://github.com/pytorch/TensorRT/releases
Environment

Torch-TensorRT Version: 1.1.0
PyTorch Version: 1.11.0+cu113
CPU Architecture: x86_64
OS: Ubuntu 20.04
How you installed PyTorch: pip
Python version: 3.8
CUDA version: 11.3
GPU models and configuration: NVIDIA GeForce RTX 3070

From what I can tell the issue is that there is some operation in your model of the form:
aten::floor_divide(int self, int other) -> ...

Which does not seem to be a valid TorchScript operator which why PyTorch not necessarily us is reporting this issue.
I took a look at PyTorch and saw there is a aten::floordiv.int operator which would make sense for the input types you have. The question is why this model has floor_divide and not floordiv if that is indeed what the operation is supposed to be? Perhaps we are inserting this erroneously in some lowering pass (This is just a theory based on limited info).
Some quick debugging steps you can take would be to grep for instances of aten::floor_divide in the debug logs, specifically the lowered graph. TorchScript includes source locations so that may help you narrow down where in your code is emitting aten::floor_divide

This is the only lowering pass which uses floor_divide but seems to use the tensor variant so that probably is not the root cause: https://cs.github.com/pytorch/TensorRT/blob/679ea2179aaaf28fd16203d610315ddf9ea8dfe8/core/lowering/passes/reduce_remainder.cpp?q=repo%3Apytorch%2Ftensorrt+aten%3A%3Afloor_divide+language%3AC%2B%2B

@narendasan Thank you for your response.
So far it seems like what causing the issue is the Modulus operator (%).
The following network gives the same error:
class SomeNet(nn.Module):
    def __init__(self) -> None:
        super().__init__()

  def forward(self, x: Tensor) -> Tensor:
          input_shape = x.shape
          if input_shape[2] % 2 == 0:
              return x
          else:
             return torch.tensor(0)

This is the torchscript graph I am getting back (PyTorch 1.12.1)
torchtrt39 ❯ python /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py
graph(%self : __torch__.SomeNet,
      %x.1 : Tensor):
  %16 : bool = prim::Constant[value=0]()
  %14 : NoneType = prim::Constant()
  %5 : int = prim::Constant[value=2]() # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:23
  %10 : int = prim::Constant[value=0]() # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:33
  %input_shape.1 : int[] = aten::size(%x.1) # <string>:13:9
  %8 : int = aten::__getitem__(%input_shape.1, %5) # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:11
  %9 : int = aten::remainder(%8, %5) # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:11
  %11 : bool = aten::eq(%9, %10) # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:11
  %26 : Tensor = prim::If(%11) # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:12:8
    block0():
      -> (%x.1)
    block1():
      %17 : Tensor = aten::tensor(%10, %14, %14, %16) # /Users/naren/Developer/py/pytorch_org/tensorrt/experiments/1305.py:15:18
      -> (%17)
  return (%26)

Don't seem to see the floor_divide. Maybe this changed in 1.12?

Seems like the same graph from PyTorch 1.11

@narendasan  seems a lowering pass could be a good WAR here.


TTS0001: Add speaker profile or metadata to the training data. (MM24)

Description
We need to integrate metadata from the TTS data collection into the training data. This will enhance the creation of a more balanced test set for model evaluation by ensuring the test data is evenly distributed, leading to more accurate model assessments.
We need data from STT:
1. NS
2. AB
3. TT (optional )
Completion Criteria
Metadata from the TTS data collection is successfully incorporated into the training data.
Implementation
Subtask

[x] get the current csv file of training data from each department.
[x] parse the google sheet catalog to get df of audios and it's metadata.
[x] select list of metadata of audio to be merged.
[ ] wrtie a script to make the meta values uniform.
[ ] merge the metadata of audio file in catalog with the corresponding audio segment that is derived from the audio.
[ ] create a stats of count and duration of audio segments avialable for each values metadata, such as Gender.
[ ] create a documentation of explanation of meta data values.

first merge the speaker meta data with catalog sheet.

we will get tts training data with speaker metadata


Adding new rule no-side-effects

Closes #34

tested on eslint-config with the errors

tested on mngs


Running Individual Specs

Hey guys, how can I run individual specs with Cedar and not the whole test suite?

Hi @alexvbush,
You can do this by changing it()s to fit()
It also works for context() and describe()
As long as there is one fit/fcontext/fdescribe Cedar will only run those particular examples.

@idoru ha, interesting. So there's no way to specify what line in a spec file I want to run? I'm thinking of how rspec does it

Line numbers change while you're working on a file. I think this was chosen because it's more reliable.

On Jun 30, 2016, at 11:57, Alex V Bush<EMAIL_ADDRESS>wrote:
@idoru ha, interesting. So there's no way to specify what line in a spec file I want to run? I'm thinking of how rspec does it
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

Agreed, fit and fdescribe and fcontext were chosen because they can be done easily while looking at code. It is also possible to write tools that easily add / remove focus (even integrating with the Xcode editor so you can do this with a keyboard shortcut).
Do you have a strong preference for the rspec file name and line number pattern? I'm curious what you like about that system, since it's very different from Cedar (and other BDD frameworks like Gingko or Quick).
Sent From A Very Small Keyboard

On Jun 30, 2016, at 12:19, Joshua Marker<EMAIL_ADDRESS>wrote:
Line numbers change while you're working on a file. I think this was chosen because it's more reliable.

On Jun 30, 2016, at 11:57, Alex V Bush<EMAIL_ADDRESS>wrote:
@idoru ha, interesting. So there's no way to specify what line in a spec file I want to run? I'm thinking of how rspec does it
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

I’ve been using rspec lately, pairing, and have seen at least three times this week where people weren’t testing what they thought because line numbers had changed.
I do like RSpec’s focus: ‘category_name’ and subsequent rspec —focus category_name, though. Can be handy.
Line numbers are implementation details.

How might the --focus categoryName pattern be ported to Cedar? That's a really interesting idea...
If each spec had a way of specifying it's "category" and we respected a CEDAR_FOCUS_CATEGORY env var... would that be helpful and useful?
Sent From A Very Small Keyboard

On Jun 30, 2016, at 15:39, Joshua Marker<EMAIL_ADDRESS>wrote:
I’ve been using rspec lately, pairing, and have seen at least three times this week where people weren’t testing what they thought because line numbers had changed.
I do like RSpec’s focus: ‘category_name’ and subsequent rspec —focus category_name, though. Can be handy.
Line numbers are implementation details.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

Like numbers were super useful running a spec you're looking at from vim.
The line number you're cursor is on was used to run specific test with rspec
On Thu, Jun 30, 2016 at 3:47 PM Tim Jarratt<EMAIL_ADDRESS>wrote:

How might the --focus categoryName pattern be ported to Cedar? That's a
really interesting idea...
If each spec had a way of specifying it's "category" and we respected a
CEDAR_FOCUS_CATEGORY env var... would that be helpful and useful?
Sent From A Very Small Keyboard

On Jun 30, 2016, at 15:39, Joshua Marker<EMAIL_ADDRESS>wrote:
I’ve been using rspec lately, pairing, and have seen at least three
times this week where people weren’t testing what they thought because line
numbers had changed.
I do like RSpec’s focus: ‘category_name’ and subsequent rspec —focus category_name, though. Can be handy.
Line numbers are implementation details.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub, or mute the thread.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/pivotal/cedar/issues/394#issuecomment-229810243, or mute
the thread
https://github.com/notifications/unsubscribe/AAS_JSUImgHfNlUxzXQ4dBofE37nnYygks5qREd6gaJpZM4JCW-3
.

I wonder if you’ve seen cppforlife’s plugin that does exactly that, Tim? Runs the spec the cursor is in?

@tooluser yeah :)
I have been maintaining cppforlife's Xcode plugins, since he's moved on past iOS development. Now that Apple has deprecated the old, unofficial Xcode 7 plugin interface, I'm in the process of trying to port them to the Xcode 8 API (née XcodeKit).


Transaction ID mismatch between SDK and flow model

Problem
Someone on discord reported an issue where the flow-cli shows a different transaction ID from the one requested. e.g.
$ flow transactions get 38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a --network=mainnet

Block ID        7db0f9d4867e1c895f83a5e03e932cebfd6e3daeed53b8108d9c75e097c58784
Block Height    56134268
Status          ✅ SEALED
ID              06e254293add97d9a9519eac42a30c8450ff7f51556392901462f5476ca06a18
Payer           8da51d7dff4b3151
Authorizers     [8da51d7dff4b3151]

Proposal Key:
    Address     8da51d7dff4b3151
    Index       0
    Sequence    9633

No Payload Signatures

Envelope Signature 0: 8da51d7dff4b3151
Signatures (minimized, use --include signatures)

Events:
    Index       0
    Type        A.1654653399040a61.FlowToken.TokensWithdrawn
    Tx ID       38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a
    Values
                - amount (UFix64): 73.09790833
                - from (Address?): 0x8da51d7dff4b3151
...

Note that the requested TX was 38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a, and the ID included in the response was 06e254293add97d9a9519eac42a30c8450ff7f51556392901462f5476ca06a18. Also note that the ID in the events correctly match the request.
Looking at the flow-cli code, the ID field is populated using the tx.ID() method on the transaction returned using the SDK.
The ID() generates a hash of the datastructure, so this most likely means that the serialized representation of the transaction produced by the sdk is different from the flow model used to produce the original.
Steps to Reproduce
I created this repo script: https://gist.github.com/peterargue/da744c9e7c4bddbfee4d89240a3f4244
It requests the same transaction from an AN using the sdk and grpc directly. Calling ID() on the sdk version produces 06e254293add97d9a9519eac42a30c8450ff7f51556392901462f5476ca06a18, but using the flow model, it returns 38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a.

yeah this is very old issue ( related to cadence json in args )there was a fix in flow-go-sdk to match fcl-js behaviour. ( while encoding arguments, extra new line or not issue )

I think this is a little different. The SDK uses grpc under the covers (I think), so in my reproduction, the SDK and my script received identical responses from the API. The only difference was the logic that converts from protobuf to a go struct.

@peterargue  yeah grpc swallows trailing \n maybe that's the reason

Yea, that's it. I tried my script with that code disabled and get the same tx ID. here's the args as hex
$ go run cmd/tx_result/main.go
SDK TxID:        06e254293add97d9a9519eac42a30c8450ff7f51556392901462f5476ca06a18
SDK Result TxID: 38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a
gRPC TxID:       38559cfac11eba732f3de2420eac511393e223bc92b0c52f75b6604098e4181a
SDK Args:
  0: 7b2276616c7565223a22307832323234643462383331663534613765222c2274797065223a2241646472657373227d
  1: 7b2276616c7565223a2237332e3039373930383333222c2274797065223a22554669783634227d
gRPC Args:
  0: 7b2276616c7565223a22307832323234643462383331663534613765222c2274797065223a2241646472657373227d0a
  1: 7b2276616c7565223a2237332e3039373930383333222c2274797065223a22554669783634227d0a

I think the problem is just that the SDK is using this hack for both new and already submitted tx. This makes sense for tx it submits, but for any received via the API, the hack should be skipped.
I'm guessing the the user that submitted the problem tx was just using an older version of the sdk that didn't include this change.

@peterargue for existing old Tx you are right, the problem is there's no good way of knowing in that SDK implementation where the payload came from unless breaking a lot of stuff. I believe the new CCF format will address this better and hopefully greatly reduce any kind of similar issues. If you see any action we can take let me know.

Related to: https://github.com/onflow/flow-go-sdk/issues/377


PR for the bugfix : process killed while executing ClassificationPredictionPipeline

process killed while running eogrow.pipelines.prediction.ClassificationPredictionPipeline
To Reproduce
The issue is reproducible when the property "label_encoder_filename" is specified in the cofiguration.
In such case, the LabelEncoder (LE) which was used in training step is used to decode the labels.
This happens in the eogrow.pipelines.prediction.ClassificationPredictionTask line 163 where we try to transform the form of the feature which accepts predictions to be a column feature. But because we are using a LE for decoding, it converts the column predictions array to row array. This causes the function transform_to_feature_form to just fail without any issue.
Steps to reproduce the behavior:
Run the eogrow.pipelines.training.ClassificationTrainingPipeline with a preprocessing.label_encoder_filename specified
Once the model is trained, run eogrow.pipelines.prediction.ClassificationPredictionPipeline and use the same label_encoder_filename which was used in training to decode
Expected behavior
A clear and concise description of what you expected to happen.
Environment
Python 3.9
Stack trace or screenshots
The issue doesn't give any stack trace, the process is killed with just a small warning as follows :
............
2023-01-19 15:34:11,381 graphviz._tools DEBUG    deprecate positional args: graphviz.graphs.BaseGraph.init(['comment', 'filename', 'directory', 'format', 'engine', 'encoding', 'graph_attr', 'node_attr', 'edge_attr', 'body', 'strict'])
2023-01-19 15:34:11,382 graphviz._tools DEBUG    deprecate positional args: graphviz.sources.Source.from_file(['directory', 'format', 'engine', 'encoding', 'renderer', 'formatter'])
2023-01-19 15:34:11,383 graphviz._tools DEBUG    deprecate positional args: graphviz.sources.Source.init(['filename', 'directory', 'format', 'engine', 'encoding'])
2023-01-19 15:34:11,383 graphviz._tools DEBUG    deprecate positional args: graphviz.sources.Source.save(['directory'])
2023-01-19 15:35:16,970 py.warnings  WARNING  /Users/dhiman/envs/uc_land-cover/lib/python3.9/site-packages/sklearn/preprocessing/_label.py:155: DataConversionWarning: A column-vector y was passed when a 1d array was expected. Please change the shape of y to (n_samples, ), for example using ravel().
y = column_or_1d(y, warn=True)
Desktop (please complete the following information):
OS: Docker container
Version
sentinelhub>=3.6.3
eo-learn==1.3.1
eo-grow==1.3.3
scikit-learn==1.2.0
Solution
I was able to fix the issue by moving the line where you add new axis (i.e. line 163 in file eogrow.pipelines.prediction => predictions = predictions[..., np.newaxis]) after the labels are decoded. I tried to push my branch with the fix to create a PR but I don't have the rights to the repo.

I moved the merge branch from main to develop and ran tests.

Is there am ETA on when a new version of eo-grow would be released which includes this change?

Is there am ETA on when a new version of eo-grow would be released which includes this change?

you're in luck, this week :)
However, the release will be fairly codebreaking. The area manager has been changed and this caused some larger refactoring in the rest of the code. I can send you a small guide for updating via e-mail.


webpack and node-notifier

Hi
I have been using node-notifier in an electron app and it works fine until I use webpack to concatenate everything into a single file.
there are 2 issues:

semver version

Could you upgrade the version of semver in package.json to "semver": "^5.1.0".
Using the earlier version of semver causes a problem when you use webpack:
https://github.com/webpack/webpack/issues/1942
I can stop this problem if I locally upgrade the node-notifier semver version.

notifications stop when using webpack version because it calculates the location of teminal-notifier-app incorrectly.

I guess this is similar to the electron asar problem that you mention in the main README.
This line of code:
notifier = path.join(__dirname, '../vendor/terminal-notifier.app/Contents/MacOS/terminal-notifier'),
gets the wrong path. __dirname points to the directory of the webpack bundled js file and so it does not find node_modules/node-notifier/vendor directory correctly. I guess the simplest solution is just to copy the vendor directory into location ../vendor relative to the webpack bundle.

We'll look into this for you.

From #73

@mikaelbr: I think all the major updates are good. However, I don't see why the minor ranges should be bumped. This causes less packages to be deduped by npm as it's more restrictive. As a rule of thumb, I try to have the version ranges as forgiving as possible, allowing for more deduping.

@mikaelbr: Yeah, node-notifier will probably run just fine, but the problem is if we have too small window of dependency versions, we will possibly cause our consumers to have some duplicate packages. Also, there is rarely any need to bump major release, unless a major release introduces a feature we want to use / are dependent on.

We can easily bump to new semver version as it has some new features that can be nice to have (better support for browser usage is a feature too).
I'm more skeptical about the second issue using __dirname. This feels like a problem of WebPack, not node-notifier. Surely other packages also use __dirname with it's expected behaviour. Have you tried activating something like:
node: {
  __dirname: true
}

in the Webpack config?

On the second issue, yes thanks for pointing out the __dirname configuration solution.
As regards the first issue, as far as I can tell webpack2 thinks semver 4.1.0 is an AMD module and it prefixes and suffixes it with __WEBPACK code which causes a runtime error.  webpack does not do this with semver 5.1.0. If I comment out the _WEBPACK code where semver 4.1.0 has been bundled, it also works. Not quite sure whether kurlsubrooke sees this as a bug in webpack or not - it is obviously not a bug in node-notifier itself. There must be lots of other packages which use semver.
If they decide it is not an issue, bumping the semver version in node-notifier would be great.

I've updated the semver dependency now. You can test it out by doing npm i mikaelbr/node-notifier.

thanks that will be fine.
when will you add it as a versioned release which I can reference in my
package.json?
On 28 January 2016 at 10:53, Mikael Brevik<EMAIL_ADDRESS>wrote:

I've updated the semver dependency now. You can test it out by doing npm
i mikaelbr/node-notifier.
—
Reply to this email directly or view it on GitHub
https://github.com/mikaelbr/node-notifier/issues/94#issuecomment-176122768
.

I tried that version from @mikaelbr but still I get the error Uncaught TypeError: Invalid Version: function (request) ...
@jmc420 do I need to consider something else when installing that version or how did you manage to get that up and running?
Thank you both!

@jaulz Could we please have the full stack trace?

Not sure how I can format the strack trace better but basically here it is.  Save the file and then run npm install in that location.
Go back to your top level directory and run your webpack command. The Invalid version problem should go away. Also check that semver within your webpack bundle does not include the lines:
if (true)
!(WEBPACK_AMD_DEFINE_FACTORY = (exports), WEBPACK_AMD_DEFINE_RESULT = (typeof WEBPACK_AMD_DEFINE_FACTORY === 'function' ? (WEBPACK_AMD_DEFINE_FACTORY.call(exports, webpack_require, exports, module)) : WEBPACK_AMD_DEFINE_FACTORY), WEBPACK_AMD_DEFINE_RESULT !== undefined && (module.exports = WEBPACK_AMD_DEFINE_RESULT));
see https://github.com/webpack/webpack/issues/1942

could you release the update to semver version in package.json into a new node-notifier release (4.4.1?) so that it works with webpack?

➜  node-notifier git:(master) npm publish
+<EMAIL_ADDRESS>
:cake:

I consider this closed now. If theres any problems, it can be re-opened or just add a new issue.

Yep, many thanks :)


opinion about user input

@kusalhasintha can you kindly what this PR is about?
Did you try to open an issue?
Those changes in README.md seem unnecessary.

Hello,
I wanted to tell you that the inputing a coordinate is confusing. So give a
better guide there
On Sun, 27 Sep 2020, 12:44 Jayanth PSY<EMAIL_ADDRESS>wrote:

@kusalhasintha https://github.com/kusalhasintha can you kindly what
this PR is about?
Did you try to open an issue?
Those changes in README.md seem unnecessary.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/j-tesla/tic-tac-toe/pull/5#issuecomment-699596547,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AHMQGCZBWHYA6YZEQGBNDEDSH3Q3TANCNFSM4R3MHYOA
.

@kusalhasintha Sure, I'll work on that. But, creating an issue is the way to inform that. I created an issue on that for now.
Peace :v: