Cause() vs RootCause()

I just came across this package and wondering why package's Cause() function returns the root cause and not just the cause of the passed error value?
I can imagine a situation where I want to inspect the cause of the error and check for some additional information in it, etc. So, to get that information I'll have to do a check for Cause() presence myself, call it, do a type check for additional information methods and only then call them. An additional method that returns the cause might be useful here.
ps. I wonder why this is not part of the standard library. Seems to be a very useful pattern.

Would the below not work to achieve inspecting the underlying error? This library shouldn't change that.
if err != nil {
    // From the README
    switch err := errors.Cause(err).(type) {
    case *MyError:
        // handle specifically
    default:
        // unknown error
}

Replace *MyError with net.Error or similar to test for the types you care about. Or are you saying that you want to check the most recent error? Can you provide an example of what you're trying to achieve?

Yes, I could imagine a usecase where I want to be able to check the most recent error, not the root cause.
Lets say A takes function B and calls it. If B returns an error, A wraps it and returns. If I call A and want to get error returned from B and inspect it, there is no easy way. Error from B may itself be a wrapper around some other error - we might not know anything about implementation of B, just the signature, but we might know its "contract", know that it returns enhanced errors with additional information (and may also have Cause()).

I just came across this package and wondering why package's Cause() function returns the root cause and not just the cause of the passed error value?

Because these are wrappers around the original error, the cause. It may have been a poor choice of names, but I cannot change it now.

I can imagine a situation where I want to inspect the cause of the error and check for some additional information in it, etc. So, to get that information I'll have to do a check for Cause() presence myself, call it, do a type check for additional information methods and only then call them. An additional method that returns the cause might be useful here.

Yup, but I'm not sure what you're expecting to discover as all the error values returned from this package are anonymous.

Yup, but I'm not sure what you're expecting to discover as all the error values returned from this package are anonymous.

Yes, if using this package's Wrap(). What if I want to add additional information in A to the error returned from B, not just wrap it? E.g. in Java I would create an Exception subclass with additional fields and initialize them in constructor via constructor arguments AND also pass the cause to the super() constructor. Then receiver of the exception has access to the cause and to the additional information. I think this "pattern" might be useful in Go aswell. WDYT?
i.e. this package adds cause support but there is no support for additional information attached to the wrapper except a string message. I'm not proposing something concrete, just thinking out loud.

What if I want to add additional information in A to the error returned from B, not just wrap it? E.g. in Java I would create an Exception subclass with additional fields and initialize them in constructor via constructor arguments AND also pass the cause to the super() constructor. Then receiver of the exception has access to the cause and to the additional information. I think this "pattern" might be useful in Go aswell. WDYT?

You don't have to use errors.Wrap, any type that defines a Cause method will work.
type MyError struct {
     cause err
     message string
     time time.Time
     dayOfMonth int
}

func (e *MyError) Cause() error { return e.cause }

Yes, that is what I'm saying. But then errors.Cause(errorFromA) method will return me the root cause (cause of error from B) and not this enriched error, which B returned.
And also using MyError will not capture  the location like Wrap() does.

I've been wondering about this question as well. There is an asymmetry between Wrap and Cause. Wrap builds up anonymous layers of error context, but errors.Cause could strip away layers not created by Wrap—layers that are external to this package—if those error types implement causer. Because Wrap uses anonymous types there is currently no practical way to avoid this asymmetry.
This asymmetry could be resolved by adding this function.
// Unwrap removes annotations added by Wrap from err until it
// finds an error value not created by Wrap which it then returns.
func Unwrap(err error) error

@ChrisHines I agree it asymmetric. Can you give me an example on what you would do with the value from Unwrap?

@ash2k thank you for clarifying. At the moment there are two, incomplete, ways you can do this with the errors package.
The first is to write your own error implementation, and if you want it to report location information, add a Location() (string, int) method. Collecting that location data is left as an exercise to the user as well.
The second is to use something like errors.Wrapf(err, "some %, that includes %v and time %v", "extra", "data", time.Now()). Which is not inspectable, in the way that an error type would be.
To give two pieces of information, possibly justifications, i'm not sure.

My philosophy is that errors should not be inspected by type or by value. See my recent presentation at GoCon Japan for the details, so I'm not really looking to add mechanisms to enable these patterns into the errors package, save what errors.Cause already provides.

Based on my interactions with the Go team, if something like this package was to be proposed for inclusion in the standard library, the smaller it is the better a chance it has of being includes. To make this concrete, apart from the discussion in #15, I expec this package to move towards 1.0 rapidly, and at that point see very little enhancement.

As far as I understand from slides you are suggesting to inspect error values for the behaviour, not for some type/value but what I'm trying to say is that currently this package does not provide means to get the cause of the error (to let me inspect it for behaviour).
Function B may define behaviour of returned errors just like net.Error or like this where the interface is hidden:
package x

type isMagic interface {
	IsMagic() bool
}

type myError struct {
	cause error
	message string
	time time.Time
	dayOfMonth int
	isMagic bool
}

func (e *myError) IsMagic() bool { return e.isMagic }
func (e *myError) Cause() error { return e.cause }
func (e *myError) Error() string { return fmt.Sprintf("%v(%d): %s", e.time, e.dayOfMonth, e.message) }

func IsMagic(e error) bool {
	m, ok := e.(isMagic)
	return ok && m.IsMagic()
}

// B returns errors that have IsMagic() method. Check using IsMagic() function.
func B() (int, error) {
    return 0, &myError{errors.New("Cause"), "msg", time.Now(), 0, true}
}

Then A will wrap errors from B and lets say my code wants to check for the IsMagic():
func A(b func() (int, error)) int, error {
    n, err := b()
    if err != nil {
        return 0, errors.Wrap(err, "Boom")
    }
    // Some other operation here, returning non-magic error
    err = ....
    if err != nil {
        return 0, errors.Wrap(err, "Big boom")
    }
    ...
    return n+10, nil
}

a, err := A(x.B)
if err != nil {
    e := errors.CauseOfError(err) // Cannot do this
    if x.IsMagic(e) {
         // Magic!
    }
}

I.e. I don't see how what I'm asking about contradicts your philosophy :)

but what I'm trying to say is that currently this package does not provide means to get the cause of the error (to let me inspect it for behaviour).

I believe it does, but we disagree on the definition of the cause of an error. This package defines the cause as the first error value that does not implement a Cause method. I believe that what you are saying is you want to create an error type which is not the cause, as defined above (ie, it has a Cause method), but is also not the root cause of the error. Did I understand this correctly ?

package main

import (
	"fmt"
	"time"
	"errors"
	pkgErr "github.com/pkg/errors"
)

type isMagic interface {
	IsMagic() bool
}

type myError struct {
	cause error
	message string
	time time.Time
	dayOfMonth int
	isMagic bool
}

func (e *myError) IsMagic() bool { return e.isMagic }
func (e *myError) Cause() error { return e.cause }
func (e *myError) Error() string { return fmt.Sprintf("%v(%d): %s", e.time, e.dayOfMonth, e.message) }

func IsMagic(e error) bool {
	m, ok := e.(isMagic)
	return ok && m.IsMagic()
}

// B returns errors that have IsMagic() method. Check using IsMagic() function.
func B() (int, error) {
	return 0, &myError{errors.New("Cause"), "myErrorOfMagic", time.Now(), 0, true}
}

func A(b func() (int, error)) (int, error) {
	n, err := b()
	if err != nil {
		return 0, pkgErr.Wrap(err, "Boom")
	}
	// Some other operation here, returning non-magic error
	err = errors.New("Something is wrong")
	if err != nil {
		return 0, pkgErr.Wrap(err, "Big boom")
	}
	return n+10, nil
}

func main() {
	a, err := A(B)
	if err != nil {
		e := DirectCause(err)
		//e := pkgErr.Cause(err)
		if IsMagic(e) {
			fmt.Printf("%v is a magic error", e)
		} else {
			fmt.Printf("%v is not a magic error", e)
		}
		return
	}
	fmt.Println(a)
}

type causer interface {
	Cause() error
}

func DirectCause(err error) error {
	cause, ok := err.(causer)
	if ok {
		return cause.Cause()
	}
	return err
}

Yes, our definitions of "cause" are different. Sorry for confusion.

I think it might be useful to have DirectCause() in the library (see usage example above);
It would be nice to be able to reuse all functionality of this package to create custom errors with cause, location and additional error-specific information (not just a string, but potentially more information of different types; why only string?). To achieve this package could export an error type that implements Location()/Cause() so that I, as the user of the package, can augment this type into my custom error type with additional information. With current implementation to achieve this I'll have to copy all of this package into my codebase to create a custom error. WDYT?

Thank you for your reply. wrt to question one, see #21 for a counter suggestion.
wrt 2. This package does implement Location() and Cause() for all errors returned from both Wrap and Wrapf and Location() from New. Can you please try to explain what is missing, I'm sorry but I must not be understanding the piece that you want to do which you cannot currently do.

#21 is what I originally wanted when I created the issue. Thanks!

what can I, as the user of the package, do to reuse the Cause(), Error() and Location() methods from the errors package's error types in my own error types? If location and cause types were exported, I could have embedded them into my error type and "inherited" their methods.

I'm a Go newbie so I might be overlooking something. Sorry if that is the case.

@ash2k I'm sorry but I will not be making either of those types public. errors.cause is trivial, there is no reason someone should have to depend on the errors package to add two fields to their type.
location is complicated, but only because this package chooses to store the program counter rather than the file and line information reported by runtime.Callers. You can find this in a publicly supported package here. https://github.com/go-stack/stack

@davecheney It makes sense if we look at this package as at just a random package. But if the end goal is to build something standard, make it part of standard library then it may make sense to think about the usecase I'm describing. If the code is already in the package anyway and the package is part of std. lib AND I'm using it anyway (.Wrap()/etc) then why would I depend on something else? To me it feels like the current implementation solves part of the problem but does not solve the other part even though the code to enable the usecase is already there. Just my thoughts :)

I don't really know what to say. The design of this package is based on
behaviour not implementation. The behaviour is Cause, which lets people
stack errors, and for convenience I provide a function to undo this
stacking. Everything this package does, and my philosophy around error
handling is based on behaviour, not asserting a specific type or value of
an error. I understand that sometimes this is overly idealistic, but it is
still the philosophy of this package and drives its design.
If I understand your objections, you want more functionality embedded in
this package and for everyone to import it. This is a level of source level
coupling that I do not wish to see.
Please accept my apologies on advance if I have misunderstood your
positions.
On Wed, 11 May 2016, 14:05 Mikhail Mazurskiy<EMAIL_ADDRESS>wrote:

@davecheney https://github.com/davecheney It makes sense if we look at
this package as at just a random package. But if the end goal is to build
something standard, make it part of standard library then it may make sense
to think about the usecase I'm describing. If the code is already in the
package anyway and the package is part of std. lib AND I'm using it anyway (
.Wrap()/etc) then why would I depend on something else? To me it feels
like the current implementation solves part of the problem but does not
solve the other part even though the code to enable the usecase is already
there. Just my thoughts :)
—
You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
https://github.com/pkg/errors/issues/18#issuecomment-218356516

@ash2k, check out how hashicorp/errwrap does it. The gist is that error wrapping forms a linked list (just like in this package; cause is the pointer to the next "node" so to speak), and the list is traversable via a public interface (like "Causer") with the terminal node being the first error to not implement the interface or to return no wrapped error.
This allows adding structured/typed information to errors without erasing the underlying error, and to be able to do it recursively. In addition, the package provides many helpers for walking the error list, so you're able to get to an underlying error if necessary.
The package ansel1/merry takes this same pattern to an extreme; each "node" looks like this:
type node struct {
    key, value interface{}
    err error

So the "list" basically becomes a map.
This strategy has its pros and its cons, but I'm not sure which I prefer yet.

Related proposed solution: https://github.com/pkg/errors/issues/144

This is closed for good reason. You can type assert for an interface { Cause() error } to step through causation yourself.


Exception when filtering a string with non alpha numeric characters

    let realm = try! Realm()

    try! realm.write {
        var cat = realm.objects(Category).filter("name = '\(categoryName)'").first
        if cat == nil{
            print("Creating Category with name: \(categoryName)")
            cat = Category()
            cat?.name = categoryName
            realm.add(cat!, update: false)
        }

It causes crash:
'Unable to parse the format string "name = '!$&'()*+,;='"'

When building predicates like this, you should pass objects to query against rather than using Swift's string interpolation:
var cat = realm.objects(Category).filter("name = %@", categoryName).first

Thanks that worked.


Crashing when trying to add image

InflateException when trying to add image by opening the file chooser dialog

This problem is still there. Any effort to fix it?


blob_service.list_blobs returns blobs with no metadata

Which service(blob, file, queue) does this issue concern?
Blob
Which version of the SDK was used? Please provide the output of pip freeze.
1.3.1
$ pip freeze | grep "azure"
azure-common==1.1.16
azure-nspkg==3.0.2
azure-storage-blob==1.3.1
azure-storage-common==1.3.0
azure-storage-nspkg==3.0.0

What problem was encountered?
azure.storage.blob.BlockBlobService.list_blobs(..) returns a list of Blob objects that have metadata member as None - even though some of the blobs have metadata in the blob storage container.
Have you found a mitigation/solution?
Call get_metadata on each blob, but this is time consuming and presumably consists of multiple requests.
Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

Hi @aatkinson, please refer to the sample on how to list blobs with metadata.


Breaks U2F

Mainly for posterity (I'm aware the project needs a maintainer). I've found that Saka Key apparently breaks U2F, at least with Github, and I'm not quite sure why. The prompt comes up on the Firefox end, but the Yubikey is intercepted by Saka Key before it can get to Github.

Never mind, it's not Saka Key, it's something else.


The "window.EventSource" is being proxied by PageSpy's NetworkPlugin. EventSource无法正常使用

Describe the bug
开启PageSpy后的eventSource实例

未开启PageSpy时的eventSource实例

Steps to reproduce
No response
System Info
System:
macOS/10.15.7
Platform:
Chrome/<IP_ADDRESS>
User Agent:
Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/<IP_ADDRESS> Safari/537.36

Logs
No response
Validations

[X] Read the FAQ.
[X] Read the Contributing Guidelines.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] The provided reproduction is a minimal reproducible example of the bug.

升级到新版本即可


About the metrics used in the original paper, e.g., CSI, PSD, CPRS?

Dear @jacobbieker:
Thanks for your excellent work for DGMR. I have some questions about the metrics used in the original paper. Do you have any plans to add these metrics to the script?
Thanks and best regards.

Hi, glad you like this work! I hadn't thought about adding the metrics, but probably will at some point either here, or in HuggingFace Evaluate to have it be more general. But also, happy to accept any PRs or anything adding those too!

Thanks for your reply. I will try to do it.
Thanks and best regards.

Thanks! Looking forward to seeing your work, and if I can help in anyway, just shout!

@all-contributors please add @GreenLimeSia  for question


APEXMALHAR-2472 Kudu Input Operator implementation

@tweise  / @bhupeshchawda / @amberarrow : Could you please review.
I have implemented the Kudu input operator as per the design described in the JIRA ticket given here : https://issues.apache.org/jira/browse/APEXMALHAR-2472

@ananthc thanks for the contribution! Can you please move this to a separate Maven module? With the antlr build step it does no longer fit into contrib, and a new module will also allow for proper dependency management. Would it be possible to write some unit tests that can run as part of the CI (by mocking the Kudu dependencies, without requiring an actual Kudu cluster).

@tweise  . Sure. I will move to a separate maven module. I will add conditional test rules for junit to ignore all of the current tests which assume a kudu cluster is present and add more tests with some mocking.

@tweise  - I have made the following changes

Kudu pacakge as a separate module
A conditional trigger of unit tests based on a Junit Rule
The Kudu cluster based tests are automatically enabled when there is a command line switch "-Dkudumasterhosts="

Could you please review or assign this to some one who can complete the review ?

@tweise  - Thanks for the trick. I changed the approach to generate the code under the generated-sources folder. The IDE was giving an error ( as I believe some IDEs need specialised plugins and/or additional setup by Devs ). This was solved by using the build-helper plugin in the pom which also took care of automatically by all of the IDEs.
@vrozov  - The grammar file now has the Apache license as well.

@ananthc there are several classes that are not marked @Evolving. I would suggest to mark everything evolving since this is brand new code that will be difficult to change once released unless it is marked evolving. The easiest way to accomplish this is to put a package-info file for each package and annotate that. That would also be an opportunity to provide a package level javadoc.

@ananthc I created tickets for test issues that have nothing to do with this PR. Two subsequent failures due to https://issues.apache.org/jira/browse/APEXMALHAR-2544
Flume tests pass.


Support testing for a component to render nothing

it('renders nothing', () => {
  const RenderNull = React.createClass({
    render: () => null
  })

  expect(<RenderNull/>, 'to have rendered', null)
})

The error message you get:
expected <RenderNull /> to have rendered null
	  No matching assertion, did you mean:
	  <ReactElement> to have [exactly] rendered <ReactElement>
	  <ReactElement> to have rendered [with all children] [with all wrappers] <ReactElement>
	  <ReactShallowRenderer> to have [exactly] rendered <ReactElement>
	  <ReactShallowRenderer> to have rendered [with all children] [with all wrappers] <ReactElement>
	  <RenderedReactElement> to have [exactly] rendered <ReactElement>
	  <RenderedReactElement> to have rendered [with all children] [with all wrappers] <ReactElement>

It would be nice to support the following:
expect(<RenderNull />, 'to have rendered', null)

and
expect(<RenderNull />, 'to have rendered nothing')

This should be pretty easy to add.  This would be a great first PR :)

@bruderstein how do you identify that a renderer rendered null?

You can check that its getRenderOutput()returns null. However, that function is unavailable when using the raw JSX as the subject, and when using a shallow renderer (as given by TestUtils.createRenderer()) it is not recognized as a ReactElement type.


feat(toasts): add link to transfer log

Add on each transfer-toast a link to the Account menu with the transfer-log expanded.

[x] Changes have been done against master branch, and PR does not conflict
[x] New unit / functional tests have been added (whenever applicable)
[x] Test are passing in local environment
[ ] Docs have been updated

This change is

Add on each transfer-toast a link to the Account menu with the transfer-log expanded.

[ ] Changes have been done against master branch, and PR does not conflict
[ ] New unit / functional tests have been added (whenever applicable)
[ ] Test are passing in local environment
[ ] Docs have been updated

:tada: This PR is included in version 1.0.0-dev.1 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:

:tada: This PR is included in version 1.0.0 :tada:
The release is available on GitHub release
Your semantic-release bot :package::rocket:


SendGrid webhooks not resolving

Hi, I am currently migrating an application from using Mailgun to SendGrid. To be clear everything was working as desired using Mailgun, but as soon as I switched, nothing has worked since. The emails are clearly going somewhere because they are not being rejected. However the webhooks are not firing.
Any help would be appreciated.
I have followed everything in the documentation to a "T":
My ENV variables
MAILBOX_DRIVER=sendgrid
MAILBOX_HTTP_PASSWORD=password
MAILBOX_DOMAIN="parse.mail.cultivateprm.com"

Inbound Parse configuration

DNS settings within GoDaddy

This issue was related to both my routes and configuration variables being cached. This has been resolved.

This issue was related to both my routes and configuration variables being cached. This has been resolved.

@dniccum I encounter with bad request while using as like your format. Can you help me for this.


Docs: Remove extra dash

This causes the doc generator to think that the param name is a dash

Keep em coming!


file input widget does not fire fakefocus and fakeblur events

will be fixed as part of goTo functionality

fixed with f98b1d956a0c174656c506ad2f418ee4fc985149


Add flush method to empty the logs array in logger

When testing there is no way to reset the logs in a test
We have to reuse one instance across packages lick this ui().logger. UI is a singleton and always carries all logs also from previous tests.

Can you please open a PR for the same?

Hi! Ca try to squeeze that in in the next week.

Done!
https://github.com/poppinss/cliui/pull/16


[meta] Document all the things

Is this a BUG REPORT or FEATURE REQUEST?:
feature
What happened:
We currently don't document enough.
What you expected to happen:

[ ] build list of things to document and create separate issues afterwards or link to current issues.

A few things are documented and this is a non actionable issue. Closing and creating separate ones.


BigQuery: Fixes Support for StandardSQLTypeName in Field.newBuilder(name, type).

Fixes #4319 Support for StandardSQLTypeName in Field.newBuilder(name, type).

@sduskis PTAL


Supervisord cannot restart app when error occured

Is there an existing issue for this?

[X] I have searched the existing issues

Output of ddev debug test
Expand `ddev debug test` diagnostic information
Running bash [-c /var/folders/k2/l6n0dl6j4dg_8x02bwvjfwrr0000gn/T/test_ddev.sh]
======= Existing project config =========
These config files were loaded for project my-project: [/Users/yohanescandrajaya/Documents/GitHub/ddev/my-project/.ddev/config.yaml /Users/yohanescandrajaya/Documents/GitHub/ddev/my-project/.ddev/config.development.yaml /Users/yohanescandrajaya/Documents/GitHub/ddev/my-project/.ddev/config.local.yaml /Users/yohanescandrajaya/Documents/GitHub/ddev/my-project/.ddev/config.selenium-standalone-chrome.yaml]
name: my-project
type: php
docroot: web
php_version: 8.2
webserver_type: apache-fpm
webimage: ddev/ddev-webserver:20230803_php_serialize_precision
xdebug_enabled: true
database: {mariadb 10.11}
performance_mode: none
hooks: map[post-start:[map[exec-host:composer config github-oauth.github.com 2>/dev/null | xargs -I {} ddev exec "composer config github-oauth.github.com {}"] map[exec:sh d/initLocal.sh] map[exec:sh d/migrate.sh] map[exec-host:composer config github-oauth.github.com 2>/dev/null | xargs -I {} ddev exec "composer config github-oauth.github.com {}"] map[exec:sh d/initLocal.sh] map[exec:sh d/migrate.sh]] pre-start:[map[exec-host:[ ! -f .ddev/docker-compose.selenium-chrome.yaml ] || rm .ddev/docker-compose.selenium-chrome.yaml] map[exec-host:[ ! -f .ddev/docker-compose.selenium-firefox.yaml ] || rm .ddev/docker-compose.selenium-firefox.yaml] map[exec-host:sh fetchDeploy.sh] map[exec-host:[ ! -f .ddev/docker-compose.selenium-chrome.yaml ] || rm .ddev/docker-compose.selenium-chrome.yaml] map[exec-host:[ ! -f .ddev/docker-compose.selenium-firefox.yaml ] || rm .ddev/docker-compose.selenium-firefox.yaml] map[exec-host:sh fetchDeploy.sh]]]
upload_dirs: [/var/www/html/storage]
host_db_port: 59099
mailhog_port: 8025
mailhog_https_port: 8026
project_tld: ddev.site
use_dns_when_possible: true
composer_version: 2
nodejs_version: 18
default_container_timeout: 120
web_extra_exposed_ports: [{web 8088 8088 8089}]
======= Creating dummy project named  tryddevproject-25810 in ../tryddevproject-25810 =========

Expected Behavior
When a command that runs by the Supervisor gets an error or crashes, it automatically restarts the app with autorestart configuration on the supervisor.
Actual Behavior
When a command that runs by the Supervisor gets an error or crash, it automatically turns off the web container. Making the supervisor auto restart feature useless.
Steps To Reproduce

create a daemon that runs by supervisord
ddev start
make the daemon crash by making an error/throw an exception
see in the docker dashboard that the web container is shut down

Anything else?
I think it's related to this issue here
https://github.com/ddev/ddev/issues/1137
and this commit
https://github.com/ddev/ddev/commit/58f80232c65a961c935f85417a92c2df310a5f34
I could make a turnaround by replacing the supervisor.conf without the [eventlistener:child_exit_monitor] section. but supervisor behavior should work as expected out of the box with ddev since I've spent some hours getting to this turnaround. This issue does not exist in the documentation as well.

Hi @mootensai  - What is causing the daemon to crash? What daemon is it? Please provide those details, thanks.
You abolutely can override the supervisor.conf in a .ddev/web-build/Dockerfile to avoid this.

I make a web socket server daemon, and I deliberately make a test to crash the system with the expectation that the server should automatically restart, but it doesn't. OK, I'll try to move my daemon runner with web_extra_daemons, hopefully, it could be monitored & autorestarted just like in the Supervisor

You can have your own configuration for your daemon as well, and not use web_extra_daemons. See https://ddev.readthedocs.io/en/latest/users/extend/customization-extendibility/#explicit-supervisord-configuration-for-additional-daemons

yes, I follow that link before, but when I get my daemon to crash, the web container is shut down and not auto restarting

I don't know. Take a look at the overall config in there and see what you come up with. Your expectation of how it should behave for your tests is not the same as "DDEV must behave this way".

I've spent hours trying to discover the problem, and it turns out that the commit.
https://github.com/ddev/ddev/commit/58f80232c65a961c935f85417a92c2df310a5f34
especially this line
https://github.com/ddev/ddev/commit/58f80232c65a961c935f85417a92c2df310a5f34#diff-d4006a7137dc8af5a006144133cdc2722c0ed5c03e2151b164fb2c0a72e9ec08R22
that turns off the web container. this py file make the autorestart feature on Supervisor doesn't work

Why don't you please replace the supervisord configuration with what you want. Use a .ddev/web-build/Dockerfile to make to comply with your expectations.

Yes, that's precisely what I explained before

I could make a turnaround by replacing the supervisor.conf without the [eventlistener:child_exit_monitor] section. But supervisor behavior should work as expected out of the box with ddev since I've spent some hours getting to this turnaround. This issue does not exist in the documentation as well.

But I expect the Supervisor's behavior in handling crashes would be unhindered by the DDEV default config that's not documented.

I imagine that the web container should not halt when mailhog fails eithere, but it should fail when php-fpm or nginx fails, so I'm sure that was the intent.
Since you've studied this carefully, a PR changing the behavior to only shutdown the container when nginx/apache or php-fpm fails would be welcome.

Ok, I'll find a way to do that.
On Wed, Sep 20, 2023, 19:49 Randy Fay @.***> wrote:

I imagine that the web container should not halt when mailhog fails
eithere, but it should fail when php-fpm or nginx fails, so I'm sure
that was the intent.
Since you've studied this carefully, a PR changing the behavior to only
shutdown the container when nginx/apache or php-fpm fails would be welcome.
—
Reply to this email directly, view it on GitHub
https://github.com/ddev/ddev/issues/5358#issuecomment-1727663040, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/ABMSZNLUDISERDEH5FM2XDLX3LQ7NANCNFSM6AAAAAA47IVL7M
.
You are receiving this because you were mentioned.Message ID:
@.***>

I will help you in the PR, thanks! It may be a few days before I can push the necessary image.

Seeing the same thing on a laravel project when running the queue:work command on supervisor.
The process exits nicely (code 0) after 20s (see --max-time=20 argument) and brings down the whole container.
Web logs
2024-01-25 11:15:21,512 INFO Included extra file "/etc/supervisor/php-fpm.conf" during parsing
2024-01-25 11:15:21,512 INFO Included extra file "/etc/supervisor/conf.d/laravel-worker.conf" during parsing
2024-01-25 11:15:21,512 INFO Included extra file "/etc/supervisor/conf.d/mailhog.conf" during parsing
2024-01-25 11:15:21,512 INFO Included extra file "/etc/supervisor/conf.d/supervisor.conf" during parsing
2024-01-25 11:15:21,514 INFO RPC interface 'supervisor' initialized
2024-01-25 11:15:21,514 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2024-01-25 11:15:21,514 INFO supervisord started with pid 32
2024-01-25 11:15:22,517 INFO spawned: 'child_exit_monitor' with pid 2009
2024-01-25 11:15:22,519 INFO spawned: 'php-fpm' with pid 2010
2024-01-25 11:15:22,520 INFO spawned: 'nginx' with pid 2011
2024-01-25 11:15:22,522 INFO spawned: 'laravel-worker_00' with pid 2012
2024-01-25 11:15:22,523 INFO spawned: 'mailpit' with pid 2013
[25-Jan-2024 11:15:22] NOTICE: fpm is running, pid 2010
[25-Jan-2024 11:15:22] NOTICE: ready to handle connections
[25-Jan-2024 11:15:22] NOTICE: systemd monitor interval set to 10000ms
2024-01-25 11:15:23,659 INFO success: child_exit_monitor entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 11:15:23,659 INFO success: php-fpm entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 11:15:23,659 INFO success: nginx entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 11:15:23,659 INFO success: laravel-worker_00 entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 11:15:23,659 INFO success: mailpit entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2024-01-25 11:15:44,785 INFO exited: laravel-worker_00 (exit status 0; expected)
2024-01-25 11:15:45,790 INFO spawned: 'laravel-worker_00' with pid 2094
2024-01-25 11:15:45,790 WARN received SIGQUIT indicating exit request
2024-01-25 11:15:45,791 INFO waiting for child_exit_monitor, php-fpm, nginx, laravel-worker_00, mailpit to die
2024-01-25 11:15:45,791 WARN child_exit_monitor: bad result line: 'This line kills supervisor: ver:3.0 server:supervisor serial:0 pool:child_exit_monitor poolserial:0 eventname:PROCESS_STATE_EXITED len:93'
2024-01-25 11:15:45,792 WARN child_exit_monitor: has entered the UNKNOWN state and will no longer receive events, this usually indicates the process violated the eventlistener protocol
2024-01-25 11:15:45,794 INFO stopped: mailpit (exit status 0)
2024-01-25 11:15:45,795 INFO stopped: laravel-worker_00 (terminated by SIGTERM)
2024-01-25 11:15:45,865 INFO stopped: nginx (exit status 0)
[25-Jan-2024 11:15:45] NOTICE: Terminating ...
[25-Jan-2024 11:15:45] NOTICE: exiting, bye-bye!
2024-01-25 11:15:45,879 INFO stopped: php-fpm (exit status 0)
2024-01-25 11:15:45,879 INFO stopped: child_exit_monitor (terminated by SIGTERM)
+ trap - SIGTERM
+ kill -- -1

Supervisor config :
[program:laravel-worker]
process_name=%(program_name)s_%(process_num)02d
command=/usr/bin/php /var/www/html/artisan queue:work --sleep=3 --tries=2 --max-time=20 --backoff=2 --queue=emails,default
autostart=true
autorestart=true
numprocs=1

The only workaround I found is to set a huge max time so the process doesn't exit for a day : --max-time=86400
I'm unable to pinpoint the issue but hopefully if this is the same than reported that might help

Your daemon is expected to keep running. A number of people in other issues have wrapped the daemon in a script so it restarts and doesn't exit. Somebody could pick up the abandoned PR as well.
Please see

https://github.com/ddev/ddev/issues/5682#issuecomment-1900271336

The abandoned PR is

https://github.com/ddev/ddev/pull/5423

This was a problem I was having with https://github.com/tyler36/ddev-laravel-queue.


Extending Instrumentation Functionality

The major change in this branch is to add in model-level data sampling that is coordinated with the GVT-based and real time based instrumentation modes.  There's also been some other minor changes.
I'm not quite ready to merge yet, but wanted to run it through the Travis tests.

If this merge represents a feature addition to ROSS, the following items must be completed before the branch will be merged:

[x] Document the feature on the blog (See the Contributing guide in the gh-pages branch).
Include a link to your blog post in the Pull Request.
[ ] One or more TravisCI tests should be created (and they should pass)
[ ] Through the TravisCI tests, coverage should increase
[x] Test with CODES to ensure everything continues to work

Codecov Report

Merging #116 into master will decrease coverage by 0.8%.
The diff coverage is 45.37%.

@@            Coverage Diff             @@
##           master     #116      +/-   ##
==========================================
- Coverage   73.73%   72.93%   -0.81%
==========================================
  Files          30       31       +1
  Lines        3926     4001      +75
  Branches      727      745      +18
==========================================
+ Hits         2895     2918      +23
- Misses       1005     1056      +51
- Partials       26       27       +1

Impacted Files
Coverage Δ

core/tw-eventq.h
88.66% <0%> (-1.2%)
:arrow_down:

core/tw-lp.c
75% <0%> (ø)
:arrow_up:

models/phold/phold.c
72.22% <100%> (ø)
:arrow_up:

core/instrumentation/st-data-collection.c
99.46% <100%> (+0.01%)
:arrow_up:

core/tw-setup.c
84.3% <100%> (ø)
:arrow_up:

core/instrumentation/st-stats-buffer.c
92.47% <12.5%> (-7.53%)
:arrow_down:

core/tw-pe.c
88.23% <33.33%> (-3.44%)
:arrow_down:

core/instrumentation/st-event-collection.c
83.33% <55.55%> (+11.11%)
:arrow_up:

core/gvt/mpi_allreduce.c
92.92% <60%> (-1.81%)
:arrow_down:

core/instrumentation/st-model-collection.c
8.88% <8.88%> (ø)

... and 2 more

Continue to review full report at Codecov.

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

Since this is part of the instrumentation, I just added details on using it to the Instrumentation blog post.


Markdown processor issue - Single-quotes in tag attributes.

The following test page where I used HTML in MD to get a nice table causes the markdown processor to drop the second table from the output! This was clearly seen with the dump feature where the 2nd table is in the input to markdown, and not in the HTML.
{
    title {Testing stuff}
    hideSidebarNote 1
}

Array
Core

Tcl
Core

I have found two ways of fixing this in the input:
(1) Remove the column contain the  reference.
(2) Change the single-quotes around the href-url to double-quotes.
It seems that the markdown processor chokes in some way on the single-quotes.
As AFAIK HTML allows either single- or double-quotes around attribute values and markdown allows arbitrary HTML this looks to me a bug in the markdown processor in question.
Which is the internal one, looks like.
I suspect that this issue has to be handed to the Caius project for actual fixing.
... Or not. Looks to be line 325 in your copy of markdown.tcl
Replacing it with
set re_htmltag {<(/?)(\w+)(?:\s+\w+=(?:\"[^\"]+\"|'[^']+'))*\s*>}

and the problem is fixed. The new regex is based on the variation I found in line 431 (proc parse_inline) of the same file.
Should still be forwarded to upstream Caius.
As a side note it seems that Caius does not handle the extended syntax github supports for tables. I.e. I  took the tclssg Readme.md, put it into my test site and processed it. The tables are not coming not out as tables but a wall of text. That could be a feature request for Caius.

As AFAIK HTML allows either single- or double-quotes around attribute values and markdown allows arbitrary HTML this looks to me a bug in the markdown processor in question.

I've checked and they are. Other Markdown processors I've tried handle this just fine as well.

it seems that Caius does not handle the extended syntax github supports for tables

Yep. Those are nonstandard if you take the original Markdown.pl to be the standard and apparently CommonMark hasn't yet specced them, either. It's your call whether to request this feature now but I'd consider it a reasonable request. Tables and GitHub's implementation of them are likely to match the future spec/test suite produced through the coordination by some of the biggest Markdown users.
While I do have a local copy of markdown.tcl to keep Tclssg self-contained the code is taken verbatim from upstream. The bug is also reproducible outside of Tclssg, so this is definitely an upstream issue. I could fix it locally using your patch but I'd rather keep in sync with the Caius Project, esp. since they have a test suite for Markdown to ensure changes don't break anything (not that I expect yours to). Could you file a bug report at https://github.com/tobijk/caius/issues?

Done.

Quoting bug
Table support

Thanks a lot for your interest and contributions to Caius' Markdown module. I implemented the table syntax. Let me know if you encounter any problems.

Thanks, @tobijk! I'm closing the issue.


Copyediting

I notice http://phpden.info/Bloom-filters-in-PHP seems to be down at the moment...

Thank you very much for this PR.

Yep, it is down, it wasn't a few weeks ago, I hope it will be back up someday, it was a very interesting and very well explained technical article.


Feedback for: /fundamentals/index.html

The link "View Source" in header doesn't work.

This is fixed, but not deployed. We should be live soon.
On Sun, 8 Feb 2015 04:47 seito2014<EMAIL_ADDRESS>wrote:

The link "View Source" in header doesn't work.
—
Reply to this email directly or view it on GitHub
https://github.com/google/WebFundamentals/issues/1129.

Tangled in Google's bureaucracy?

Heh, no. People went away and some priorities changed for the short term,
no all sorted.
On Wed, 11 Feb 2015 14:19 Ionel Roiban<EMAIL_ADDRESS>wrote:

Tangled in Google's bureaucracy?
—
Reply to this email directly or view it on GitHub
https://github.com/google/WebFundamentals/issues/1129#issuecomment-73887553
.

Starting to re-gain some trust in the project. Thanks.


Bump macosxsdk

Checklist

[ ] Used a personal fork of the feedstock to propose changes
[ ] Bumped the build number (if the version is unchanged)
[ ] Reset the build number to 0 (if the version changed)
[ ] Re-rendered with the latest conda-smithy (Use the phrase @conda-forge-admin, please rerender in a comment in this PR for automated rerendering)
[ ] Ensured the license file is being packaged.

@conda-forge-admin, please rerender

@raybellwaves - Is this good to merge from your POV?


File extension?

If I were to store the output of lz-string as a file, what should the extension be?

Well, LZString compresses UTF16 strings to more compact UTF16 strings, so it's not really intended to have its own file format. So none of what I'm about to write is official guidelines, I'm just trying to think along and give some helpful suggestions. Let me know if it works for you.
Given that we don't really need a file format of our own, your question becomes more one about storing plain-text, for which you have a number of options. The most obvious and cross-platform friendly would be a simple .txt file (UTF encoded of course). Alternatively, if you are compressing JSON data, .json arguably also works, since storing a plain string is actually valid JSON!
But that misses the point a bit: I guess you want to know which file extension is appropriate so that intent is stored in the filename, right? And something like mydata.txt or mydata.json does not convey that the data in that text is compressed. But there's a simple way to achieve that: mydata.lzstring.txt or mydata.lzstring.json. The latter can be interpreted as "a JSON file compressed with lzstring".
Then, if you want load the data later you can just test if the filename ends with .lzstring.txt to verify it's a LZString compressed string, or .lzstring.json to verify it's data that you should run through JSON.parse(LZString.decompress(<some DOMString to your file>)) (assuming you are using JavaScript in your browser) to get your data back.
Does this answer your questions, or were you trying to do something else?

Yep. Thanks for that information!


Detection of nodes in Ready state in label-nodes.sh fails too easily

label-nodes.sh calculates nodes in Ready state using this:
kubectl get nodes | grep -i ready
but this parsing method is too simple.
Few examples of strings which produce a false "ready"
in context of label-nodes.sh expectation:
node-1   NotReady       164d      v1.10.2
node-2   Ready,SchedulingDisabled          165d      v1.10.2
As first idea, I propose a small parsing change to
accept only clean "ready" with spaces on each side:
kubectl get nodes | grep -i ' ready '
Note that this may leave out nodes where some other non-blocking attribute
is appended, so we may need something more complex.
This whole nodes detection could be cleaner via some deterministic API instead of parsing state lines,
but is there any easily available command, without need to write even more parsing code? At least
I don't see better ways using kubectl options

let's close this, new issues to be created for future ideas.


Assignment 2

What changes are you trying to make? (e.g. Adding or removing code, refactoring existing code, adding reports)
I completed the Assignment 2.
What did you learn from the changes you have made?
I learn how to perform linear regression.
Was there another approach you were thinking about making? If so, what approach(es) were you thinking of?
I can also try other regression techniques such as kNN, which can tune K and give you more flexibility.
Were there any challenges? If so, what issue(s) did you face? How did you overcome it?
Yes, I first struggled to understand the application of RMSE but later I figured it out.
How were these changes tested?
Yes, I have completed all of them on VSCode.
A reference to a related issue in your repository (if applicable)
Checklist

[X ] I can confirm that my changes are working as intended

You have unfortunately made a pull request to the wrong repo. You shouldn't be making a pull request to UofT-DSI/applying_statistical_concepts, but rather your own forked applying_statistical_concepts repo. Please read the instructions on your onboarding Assignment Submission Guide more carefully.


Changed error_handler and replaced test_basics

First change: error_handler was causing the chain to succeed, even if some step failed. For example try to change
cmd: "st2 action list -j --pack=core | egrep -w 'core.local|core.remote'"
to
cmd: "st2 action list -j --pack=core | egrep -w 'nosuchthing'"
and run the chain. It will go ... > test_action_list (failed) > error_handler (success) ==> chain status is success, though should fail
Now the error_handler always calls 'exit 1', which causes chain to fail as expected
Second change: first step (test_basics) was not checking that something was returned; changed it to check some output. Ideally it should check the actual version.
Minor change is quotes consistency

LGTM, @DoriftoShoes @kirilstrax suggest we merge.
Next time please complain when it's on review for more than 5 days.

And now merge is failing.

Closing - @kirilstrax if this change is still relevant, please open a new PR on st2tests repo and I will get it merged.


src/hstr.c: always use "%s"-style format for printf()-style functions

ncuses-6.3 added printf-style function attributes and now makes
it easier to catch cases when user input is used in palce of format
string when built with CFLAGS=-Werror=format-security:
hstr.c:743:44: error: format not a string literal and no format arguments [-Werror=format-security]
  743 |     mvprintw(hstr->promptYNotification, 0, screenLine);
      |                                            ^~~~~~~~~~

Let's wrap all the missing places with "%s" format.

Was seemingly fixed separately as https://github.com/dvorka/hstr/commit/9152b59527b5fcc5d4de89945b3c40fe49a42ba2


Remove the debug package from msal-common's dependencies

Library

[ ]<EMAIL_ADDRESS>or<EMAIL_ADDRESS>[x]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>[ ]<EMAIL_ADDRESS>
Description
Please remove debug (and @types/debug) from the package.json of @azure/msal-common or move it to devDependencies. It does not appear to be used in the package and having it as a dependency means other teams must track the package for vulnerabilities etc. If it's in devDependencies then this isn't an issue.
Priority
Low. In general, extra dependencies aren't a major problem, but in this case it's extraneous, so we might as well remove it.

@HarryGifford the debug package is added specifically to support debugging messages in the wild, not just in dev
@jasonnutter  cc


Fix return type of handleCrashes

What does this PR do?
Fix return type of handleCrashes.
This fix the following warning:
six.cpp: In member function ‘bool Six::handleCrashes(bool) const’:
six.cpp:72:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

My bad, sorry about that. What do you think of this approach: https://github.com/DataDog/datadog-agent/pull/3614? 😊

#3614 is a better approach that this PR.


Review of GitHub Apps - Travis CI

App is no longer used so app can be removed from the Org. Confirmed with MoJ Forms team.

App removed


Fixed set Set-SPOPropertyBagValue

Hi @erwinvanhunen, I'm your friendly neighborhood Microsoft Pull Request Bot (You can call me MSBOT). Thanks for your contribution!
You've already signed the contribution license agreement. Thanks!
The agreement was validated by Microsoft and real humans are currently evaluating your PR.
TTYL, MSBOT;


Unable to train voice

Hi All
I have tried to ask this on Discord, a new user on that place, but it wouldn't let me, so thought I'd try here.
I have MeloTTS installed in a docker container, but I am running into some issues training a new voice. The preprocess_text.py appears to go through, but when I run:
bash train.sh data/config.json 1
I keep getting the error:
INFO:data:Loading the training dataset
2024-08-01 18:10:20.762 | INFO     | data_utils:_filter:58 - Init dataset...
0it [00:00, ?it/s]
2024-08-01 18:10:20.763 | ERROR    | data_utils:_filter:78 - No valid data loaded. Please check your training files.
ERROR:data:Training dataset is empty. Please check the data paths and files.
In my train.list, I have:
/app/dafo_files/DaveSampleVoiceshort.wav|Dave|EN|The script from the user.
In my data directory, I have:
root@cc432df4ef3d:/app/melo/data# ls -l
total 20
-rw-r--r-- 1 root root  155 Aug  1 17:54 DAFOTrain.list
-rw-r--r-- 1 root root  542 Aug  1 17:55 DAFOTrain.list.cleaned
-rw-r--r-- 1 root root 3998 Aug  1 17:55 config.json
drwxrwxr-x 2 root root 4096 Jul 25 09:57 example
-rw-r--r-- 1 root root    0 Aug  1 17:55 train.list
-rw-r--r-- 1 root root  542 Aug  1 17:55 val.list
Anyone have any suggestions what I'm doing wrong?
I have cloned the repository, the original just wasn't working for me, I can get much further with my repository. You can see what I have done at https://github.com/dafogary/MeloTTS

It seems to be the dataset directory problem. Could you dive into the code and see where the code is searching for the dataset?

Apologies for the delay, it's been hectic in recent weeks. Thought I need to have a good sit down and go throuigh this.
Inititially, it looked like I hadn't got the NVIDIA aligned with my docker container, which I now have. But I am still getting the error when I run:
root@local:/app/melo# python3 preprocess_text.py --metadata data/DAFOTrain.list
I get
0%|                                                                                | 0/1 [00:00<?, ?it/s]/usr/local/lib/python3.9/site-packages/transformers/modeling_utils.py:415: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
 return torch.load(checkpoint_file, map_location="cpu")
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.weight', 'cls.seq_relationship.bias']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).

Then when I run:
bash train.sh data/config.json 1
I get:
2024-08-26 16:16:27.606 | INFO     | data_utils:_filter:58 - Init dataset...
0it [00:00, ?it/s]
2024-08-26 16:16:27.607 | ERROR    | data_utils:_filter:78 - No valid data loaded. Please check your training files.
ERROR:data:Training dataset is empty. Please check the data paths and files.

In my data directory I have:
-rw-r--r-- 1 root root  149 Aug 26 16:11 DAFOTrain.list
-rw-r--r-- 1 root root  536 Aug 26 16:12 DAFOTrain.list.cleaned
-rw-r--r-- 1 root root 3998 Aug 26 16:12 config.json
drwxrwxr-x 2 root root 4096 Jul 31 09:57 example
-rw-r--r-- 1 root root    0 Aug 26 16:12 train.list
-rw-r--r-- 1 root root  536 Aug 26 16:12 val.list
drwxr-xr-x 2 root root 4096 Aug 26 16:02 wavs

Where are the datasets locations set?
Running:
grep -r "dataset" /home/user/Documents/GitHub/MeloTTS
I just get:
/home/user/Documents/GitHub/MeloTTS/melo/train.py:        logger.info("Loading the training dataset")
/home/user/Documents/GitHub/MeloTTS/melo/train.py:        train_dataset = TextAudioSpeakerLoader(hps.data.training_files, hps.data)
/home/user/Documents/GitHub/MeloTTS/melo/train.py:        if not train_dataset.lengths:
/home/user/Documents/GitHub/MeloTTS/melo/train.py:            logger.error("Training dataset is empty. Please check the data paths and files.")
/home/user/Documents/GitHub/MeloTTS/melo/train.py:            train_dataset,
/home/user/Documents/GitHub/MeloTTS/melo/train.py:            train_dataset,
/home/user/Documents/GitHub/MeloTTS/melo/train.py:            eval_dataset = TextAudioSpeakerLoader(hps.data.validation_files, hps.data)
/home/user/Documents/GitHub/MeloTTS/melo/train.py:                eval_dataset,
/home/user/Documents/GitHub/MeloTTS/melo/data_utils.py:        logger.info("Init dataset...")
/home/user/Documents/GitHub/MeloTTS/melo/data_utils.py:        dataset,
/home/user/Documents/GitHub/MeloTTS/melo/data_utils.py:        super().__init__(dataset, num_replicas=num_replicas, rank=rank, shuffle=shuffle)
/home/user/Documents/GitHub/MeloTTS/melo/data_utils.py:        self.lengths = dataset.lengths

When I run the command:
python3 preprocess_text.py --metadata data/DAFOTrain.list
The train list is in the data directory, with the audio in the data/wavs directory. But running:
bash train.sh data/config.json 1
It isn't happy.
When I run the preprocess_text.py file I do get:
/usr/local/lib/python3.9/site-packages/transformers/modeling_utils.py:415: FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
  return torch.load(checkpoint_file, map_location="cpu")
Some weights of the model checkpoint at bert-base-uncased were not used when initializing BertForMaskedLM: ['cls.seq_relationship.bias', 'cls.seq_relationship.weight']
- This IS expected if you are initializing BertForMaskedLM from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing BertForMaskedLM from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).

Could that be the issue?
Any help is appreciated

I had this issues. After changing many things including resampling from 48000 to 44100 it seemed to work in colab. I'm unsure if resampling specifically was the reason.


Add new menu items

Please add new menu items and images of the food (images should go in the "images" folder).

i wanna do this. plz assign this to me.


Database Diagram

Some form of Database Diagram, similar to SSMS, would make using this much easier and enjoyable.

[help wanted] Is anyone willing to build an extension for database diagram?

When you say extension, would this be something that would be a part of this Github repo? If so, probably need to address the #102 licensing issue first before you accept code contributions.

@BrentOzar no, extensions can develop outside this repo and use their own licensing. We plan to support extension installation in a future release.

@kevcunnane WOOHOO! That's so awesome to hear. Thanks, sir.

Is extension supported yet?

any update?

With database diagrams being removed from SSMS (SQL Server Management Studio) 18, someone should put a roaring fire under this.

I agree with @JediSQL.  The priority on this should be moved towards the top of the pile with database diagrams removed from SSMS 18.

Suggestion 1: Per the agile paradigm, build the reverse engineering mode first; add forward engineering later.

Suggestion 2: It would be cool to have a feature that could, at least, read existing diagrams out of the sysdiagrams table. I've spent countless hours creating diagrams to support the developers that work with my databases.

+1

+1

+1

@JediSQL I just installed SSMS v18.4 and diagrams are there.

@waynebloss did you install azuredatastudio?
SSMS is another diferentes program.

@mercuriete I was responding to JediSQL who said "With database diagrams being removed from SSMS (SQL Server Management Studio) 18..."
I was simply correcting the information.

The original Microsoft documentation for removal of database diagrams from SSMS (SQL Server Management Studio) 18 said that it was deprecated. I think that someone got carried away and mistook deprecated for discontinued and removed it from SSMS 18.  So, Microsoft is  probably still planning on removing diagrams from a future version of SSMS.

@JediSQL @waynebloss previously Database Diagrams was planned for removal from SSMS and was not included in 18.0.  It turns out customers actually like and use this feature 😄 so @Matteo-T added it back in a subsequent 18.# release.  I don't think there are currently any plans to remove diagrams from a future SSMS version as far as I'm aware.

That is correct, @kburtram. Sadly, though, the Database Diagram is not fully functional at the moment. I've been trying to get it fix for quite some time now...

Please add Database Diagram to Azure data studio, similar to the one in SSMS. Thank you

I´ve built an extention for this. It doesn´t have that many features yet, but try it out if you are interested.
Here is the repo: https://github.com/R0tenur/visualization/
You can install from vsix downloaded here: https://github.com/R0tenur/visualization/releases/tag/v0.2.0

Please add an Entity Relationship Diagram tool to Azure data studio.

Please add!

Would be very nice, even more if it allows IDEF1X

vsix

I´ve built an extention for this. It doesn´t have that many features yet, but try it out if you are interested.
Here is the repo: https://github.com/R0tenur/visualization/
You can install from vsix downloaded here: https://github.com/R0tenur/visualization/releases/

it worked great for me, thank you very much! I struggled a bit to install extension on azure data studio. What finally worked for me was to download the folder and then "file > install Extension from VSIX Package" and had to reload ADS and now it works seamlessly.

Any progress?

Any updates on this?

Any update?

Looking @"Matteo-T commented on Dec 14, 2019" I get the impression that SSMS is where MSFT is putting their DB diagrams effort for the time being.

Any updates on this?

Still waiting

This would be a great help. Diagrams are really helpful in explaining the schema to people who are new on a project

+1

+1... It's been 2024 and there's no support for creating ER Diagram in Azure Data Studio officially. Hope in 2024 there will be support for creating ER Diagram.

2 years after previopus comment... Any updates on this?

7 years after the issue was posted is there any update?

Microsoft Soon™.
Good at marketing, terrible at execution. I was wondering, why a trillion dollar company, can't hire a few developers to just do it in a few months?🤦🏻♂

@chartdb
https://github.com/chartdb/chartdb
https://app.chartdb.io/


Update Donation Edit to Use New Theme

Theme update
We're upgrading our bootstrap theme to use a bootstrap 4 template and need to upgrade the various pages in our site.
This issue is the update the app/views/donations/edit.html.erb view file to use the new bootstrap theme. When submitting your PR please include a screenshot of the completed page!
If you get stuck please refer to the following pages have been done and can be used as a reference in the new theme:

app/views/requests/index.html.erb
app/views/distributions/index.html.erb
app/views/donation_sites/new.html.erb

As this is a work an progress and we can't go live until all the pages have been converted please submit your PR against the new_theme branch.

I'm working on this! 💖


television: init at 0.5.0

Television is a blazingly fast general purpose fuzzy finder TUI written in Rust.

Things done

Built on platform(s)

[x] x86_64-linux
[ ] aarch64-linux
[ ] x86_64-darwin
[ ] aarch64-darwin

For non-Linux: Is sandboxing enabled in nix.conf? (See Nix manual)

[ ] sandbox = relaxed
[ ] sandbox = true

[ ] Tested, as applicable:

NixOS test(s) (look inside nixos/tests)
and/or package tests
or, for functions and "core" functionality, tests in lib/tests or pkgs/test
made sure NixOS tests are linked to the relevant packages

[x] Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
[x] Tested basic functionality of all binary files (usually in ./result/bin/)
25.05 Release Notes (or backporting 24.11 and 25.05 Release notes)

[ ] (Package updates) Added a release notes entry if the change is major or breaking
[ ] (Module updates) Added a release notes entry if the change is significant
[ ] (Module addition) Added a release notes entry if adding a new NixOS module

[x] Fits CONTRIBUTING.md.

Add a :+1: reaction to pull requests you find important.

Everything should be good. Thank you both for the review. Getchoo, I added you as a maintainer =)

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 357237

aarch64-darwin

:white_check_mark: 1 package built:

television

nixpkgs-review result
Generated using nixpkgs-review.
Command: nixpkgs-review pr 357237

x86_64-linux

:white_check_mark: 1 package built:

television

Closes https://github.com/NixOS/nixpkgs/issues/357460

I don't think we need to all reapprove this just because some imports have been resorted 😅 this should be marked as 3+ approved!

Result of nixpkgs-review pr 357237 run on x86_64-linux 1

1 package built:

television


No map objects on windows?

On Windows running python2.7, a buddy is getting this:
[x] Starting PokemonGo Bot....
[#] Scanning area for objects (1 / 2500)
[#] Walking from (42.4907071, -76.2979782) to (42.4907071, -76.2979782) for approx. 0.00 second
[#] Finished walking
[#] (42.4907071, -76.2979782, 0)
starting work...
response: {"GET_MAP_OBJECTS": {}}
map objects: {}
status: [#] Scanning area for objects (2 / 2500)
[#] Walking from (42.4907071, -76.2979782) to (42.4932071, -76.2979782) for approx. 1.17 minutes
starting work...
response: {"GET_MAP_OBJECTS": {}}
map objects: {}
status: starting work...
response: {"GET_MAP_OBJECTS": {}}
map objects: {}
status: starting work...

in stepper.py:
def _work_at_position(self, lat, lng, alt, pokemon_only=False):
        print 'starting work...'
        cellid = self._get_cellid(lat, lng)
        timestamp = [0, ] * len(cellid)
        self.api.get_map_objects(latitude=f2i(lat), longitude=f2i(
            lng), since_timestamp_ms=timestamp, cell_id=cellid)

        response_dict = self.api.call()
        # pprint.pprint(response_dict)
        # Passing Variables through a file
        if response_dict and 'responses' in response_dict:
            if 'GET_MAP_OBJECTS' in response_dict['responses']:
                if 'map_cells' in response_dict['responses']['GET_MAP_OBJECTS']:
                    with open('web/location-%s.json' % (self.config.username), 'w') as outfile:
                        json.dump({'lat': lat, 'lng': lng, 'cells': response_dict[
                                  'responses']['GET_MAP_OBJECTS']['map_cells']}, outfile)
                    with open('data/last-location-%s.json' % (self.config.username), 'w') as outfile:
                        outfile.truncate()
                        json.dump({'lat': lat, 'lng': lng}, outfile)
        try:
            print 'response:', json.dumps(response_dict['responses'])
            print 'map objects:', json.dumps(response_dict['responses']['GET_MAP_OBJECTS'])
            print 'status:', json.dumps(response_dict['responses']['GET_MAP_OBJECTS']['status'])
        except:
            pass

no respons, issue hasent been reported again


Interpolate master binaries for plist source

Depends on https://github.com/googlei18n/fontmake/pull/156

LGTM


add HANOI UNIVERSITY OF SCIENCE AND TECHNOLOGY

I am a student in Vietnam, I am studying at Hanoi University of Science and Technology.

@TXSSON I am sorry, the domain sis.hust.edu.vn is removed from our trusted domains list because it was abused in the past. If you are the student of this school, please enroll to GitHub Student Developer Program. Then apply for JetBrains educational subscription with your GitHub account (GitHub tab at https://www.jetbrains.com/shop/eform/students).

oke


config: split dynamic_springboard.patch into 2 parts

Since ANCK 5.10-013, the function __schedule() has already attribute ((optimize("no-omit-frame-pointer"))).
So there is no need to patch it. Split the patch into 2 parts, only patch the 2nd part on old kernel.

LGTM.


Added Cpack commands

Allows for .deb generation. This has been tested with libpointmatcher.

Can one of the admins verify this patch?


Nested Fields

Support nested fields in templates, eg {{ person.name }} should result in an interface like so:
interface SESFooTemplate {
  person: {
    name: string
  }
}

[x] extract nested keys from handlebars templates
[x] write nested keys to ts interfaces

https://github.com/andrinheusser/typesafe-amazon-ses-templates/commit/ed5340d42c0b3f5419da51d02ae3863345ba568c


Implemented terminal code for tic tac toe and methods

I have implemented the following methods
newGame
isLegalMove
getBoardState
Furthermore, I made a new method responsible for clearing the board
clearBoard
This code allows you to play through tic tac toe with 2 people.
Furthermore, it uses the methods here to make sure the game runs smoothly and correct moves are made

Closing as game implementation is now covered by:
https://github.com/Matthew-Nicholson/mcts-tic-tac-toe/pull/3
Per discord convo with @soniclinkerman .


WIP - Documentation

Work in progress (WIP), please do not merge.
Effort to add documentation to the entire project. Any feedback is welcomed.
Todo

[x] Remove root/src/<project> folder for the more conventional root/<project> format.
[ ] Finish documenting the rest of the codebase.
[ ] Complete Getting Started, Plug & Play, Settings, and Index documentation.
[ ] Update the README.md to reflect new documentation changes.
[ ] Add Contributing to documentation.
[x] Adds automatic docs publishing.
[x] Add documentation building commands to the Makefile.
[ ] Format code to be compliant with repos standard.
[ ] Add examples to the documentation.

Best to likely have an /examples folder with the complete code, as well as the documentation page on the logic of the example code.

Note
This PR adds auto documentation publishing to the gh-pages, which automatically publishes the docs at <user>.github.io/aioauth/. See example here. This must be turned on in the repo settings.
Misc
Fix for #16, #22.
Update for #23.

@synchronizing wow very impressive! many thanks for contributing!

@aliev Is there any reason for the use of Text over str throughout the project? Encounter it in models.py, and unsure if this is on purpose or not.

@synchronizing I had no apparent reason to replace str with Text. I think Text doesn't make sense for models, but maybe it makes sense to use it for Request / Response classes fields only? Note from the python docs:
Use Text to indicate that a value must contain a unicode string in a manner that is compatible with both Python 2 and Python 3:

in any case I see no problem in replacing Text with str. What do you think about that?

I agree with the replacement. Regarding the Request and Response classes, I agree with the use of unicode - a lot of databases do support unicode, and I can certainly see the use for websites/providers that leverage different characters for their usernames/passwords. Will replace those.

Unsure why last commit is throwing line errors from flake8-black. Will investigate further at a later date. @aliev if you have any ideas from the top of your head, that would be wonderful, if not, I'll explore.
Running black -l 88 ..

@synchronizing could you try black .?

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   aioauth/grant_type.py
	modified:   aioauth/response_type.py
	modified:   aioauth/server.py
	modified:   aioauth/utils.py
	modified:   tests/classes.py
	modified:   tests/conftest.py
	modified:   tests/test_db.py
	modified:   tests/test_endpoint.py
	modified:   tests/test_flow.py
	modified:   tests/test_request_validator.py
	modified:   tests/test_utils.py
	modified:   tests/utils.py

no changes added to commit (use "git add" and/or "git commit -a")

@synchronizing could you try black .?

No cigar on my end. Unsure why.
10:13:16 at /Users/felipe/Desktop/aioauth
  λ black .
All done! ✨ 🍰 ✨
31 files left unchanged.

10:13:18 at /Users/felipe/Desktop/aioauth
  λ git status
On branch documentation
Your branch is up to date with 'origin/documentation'.

nothing to commit, working tree clean

Really weird. Will explore further, but your response was super helpful - likely some weird settings is getting applied for my Black formatter. Thank you.

@synchronizing hmm that's interesting. I cloned your repo, created virtual environment based on python 3.8:
python -mvenv env
source env/bin/activate

and did make dev-install.
this what flake8 command shows:
(env) ➜  aioauth git:(documentation) flake8 aioauth
aioauth/server.py:43:29: BLK100 Black would make changes.
aioauth/response_type.py:122:42: BLK100 Black would make changes.
aioauth/utils.py:167:33: BLK100 Black would make changes.
aioauth/grant_type.py:39:21: BLK100 Black would make changes.
(env) ➜  aioauth git:(documentation) flake8 tests
tests/test_utils.py:76:60: BLK100 Black would make changes.
tests/conftest.py:105:36: BLK100 Black would make changes.
tests/test_db.py:35:29: BLK100 Black would make changes.
tests/test_flow.py:50:25: BLK100 Black would make changes.
tests/utils.py:37:49: BLK100 Black would make changes.
tests/test_endpoint.py:121:49: BLK100 Black would make changes.
tests/classes.py:31:14: BLK100 Black would make changes.
tests/test_request_validator.py:31:23: BLK100 Black would make changes.
(env) ➜  aioauth git:(documentation)

Super weird. Just created and activated new env, and still no go.
(env) 13:18:25 at /Users/felipe/Desktop/aioauth
  λ flake8 aioauth
(env) 13:18:37 at /Users/felipe/Desktop/aioauth
  λ black .
All done! ✨ 🍰 ✨
31 files left unchanged.

Literally unsure what it could be. If anything, I might bug you before merging this guy for a final commit to just run black . if I can't figure out what in the world is going on. Makes no sense in my head though.

@synchronizing sure no problem. I will try to investigate what could be wrong there

@synchronizing sure no problem. I will try to investigate as well on different environment

This is an (ridiculous) issue currently opened on the Black repo. See here. I'll be running a Docker container w/ Ubuntu to format the code from now on.

@synchronizing interesting, the build status is still waiting.

I think it is due to a bad merge from my end (master -> documentation). Going to try to figure this out today and continue work on the PR.

Fixed the merge conflict, and Black situation. For future references, for whatever reason my system was defaulting to the latest version of Black despite activating the virtual environment. Running the env Black fixed all issues.

Codecov Report

Merging #21 (0eea325) into master (188699e) will decrease coverage by 0.35%.
The diff coverage is 97.99%.

@@            Coverage Diff             @@
##           master      #21      +/-   ##
==========================================
- Coverage   99.27%   98.92%   -0.36%
==========================================
  Files          15       15
  Lines         549      556       +7
  Branches       56       56
==========================================
+ Hits          545      550       +5
- Misses          3        4       +1
- Partials        1        2       +1

Impacted Files
Coverage Δ

aioauth/base/request_validator.py
100.00% <ø> (ø)

aioauth/base/server.py
100.00% <ø> (ø)

aioauth/errors.py
100.00% <ø> (ø)

aioauth/types.py
100.00% <ø> (ø)

aioauth/utils.py
93.40% <93.40%> (ø)

aioauth/base/database.py
100.00% <100.00%> (ø)

aioauth/config.py
100.00% <100.00%> (ø)

aioauth/constances.py
100.00% <100.00%> (ø)

aioauth/grant_type.py
100.00% <100.00%> (ø)

aioauth/models.py
100.00% <100.00%> (ø)

... and 13 more

Continue to review full report at Codecov.

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

Closing this for the meantime. Planning on restarting this PR some point in the next few months.
If new PR is created regarding docs, any text written here can be utilized.


initial review for changes to text.py

Note also that the automated tests are currently failing because spacy isn't being installed on Travis-CI. You can fix this by updating the travis.yml config file to make sure that spacy is pip installed alongside the other dependencies.


v11

Please, update to v11

It should be available within the next 24-36 hours

Sorry about the delay. I got distracted making Kasper... But you should be able to install and use it on v11 now


Improve kubeadm image and bump to elemental-toolkit v2.0.0

This was going to be just a kubeadm refactor, however due to the need of populating /usr/local/bin, the elemental-toolkit had to be bumped.

Still a few issues with the PR.
One being that the reset flow is broken, as /oem is not mounted in recovery mode.

Second problem being the Preflight checks failing.
The root cause seem to be containerd not starting the kubelet containers:
m-3c38e831-c1ea-4600-8bc4-53103b608ac9:~ # crictl --runtime-endpoint unix:///run/containerd/containerd.sock ps -a
CONTAINER           IMAGE               CREATED             STATE               NAME                ATTEMPT             POD ID              POD

The funny thing is that containerd seem to be "stop pulling image" on those, why?
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.382451950Z" level=debug msg="create image" name="registry.k8s.io/etcd:3.5.12-0" target="sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.385969536Z" level=info msg="ImageCreate event name:\"registry.k8s.io/etcd:3.5.12-0\"  labels:{key:\"io.cri-containerd.image\"  value:\"managed\"}"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.388973469Z" level=info msg="stop pulling image registry.k8s.io/etcd:3.5.12-0: active requests=0, bytes read=57237006"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.393106083Z" level=debug msg="create image" name="registry.k8s.io/etcd:3.5.12-0" target="sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.394722252Z" level=debug msg="create image" name="registry.k8s.io/etcd@sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b" target="sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.398011791Z" level=info msg="ImageCreate event name:\"registry.k8s.io/etcd@sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b\"  labels:{key:\"io.cri-containerd.image\"  value:\"managed\"}"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.399668678Z" level=info msg="Pulled image \"registry.k8s.io/etcd:3.5.12-0\" with image id \"sha256:3861cfcd7c04ccac1f062788eca39487248527ef0c0cfd477a83d7691a75a899\", repo tag \"registry.k8s.io/etcd:3.5.12-0\", repo digest \"registry.k8s.io/etcd@sha256:44a8e24dcbba3470ee1fee21d5e88d128c936e9b55d4bc51fbef8086f8ed123b\", size \"57236178\" in 2.495159513s"
Mar 29 12:37:50 m-3c38e831-c1ea-4600-8bc4-53103b608ac9 containerd[1466]: time="2024-03-29T12:37:50.399707338Z" level=info msg="PullImage \"registry.k8s.io/etcd:3.5.12-0\" returns image reference \"sha256:3861cfcd7c04ccac1f062788eca39487248527ef0c0cfd477a83d7691a75a899\""

This used to work just yesterday. The only change I made is to forbid the kubelet to start before kubeadm runs, since it failed on preflight with [ERROR Port-10250]: Port 10250 is in use. Also a mystery by the way, but maybe related.

Actually containerd is pulling images just fine, but no container is running still:
# ctr --namespace k8s.io containers list
CONTAINER    IMAGE    RUNTIME

kubelet reports an error maybe related:
E0329 15:48:16.809136    2080 kubelet.go:2353] "Skipping pod synchronization" err="PLEG is not healthy: pleg has yet to be successful"

However I'm not able to have kubelet print debug logs.
Seems to be ignoring the /var/lib/kubelet/config.yaml settings and any extra arg (like --v=4).
So it is probably ignoring cgroupDriver: systemd as well.

Closing this in favor of https://github.com/rancher-sandbox/cluster-api-provider-elemental/pull/39


Feature Request: Native Serialization for ParameterExpression in QPY

What should we add?
QPY currently relies on Symengine's serialization format for ParameterExpression, which has become version-specific with the recent Symengine 0.13 release. This can lead to errors when loading expressions across different versions. To improve stability and compatibility, we need to implement a Qiskit-native serialization method for ParameterExpression in QPY version 13. This will prevent version mismatch issues and eliminate reliance on Symengine.
Additional Improvements

Enhanced Error Messages: Improve documentation and error handling for serialization issues.
Backward Compatibility: Develop a compatibility layer for loading older serialized payloads.
Performance Optimization: Benchmark and optimize the new serialization method.
User Feedback System: Create a mechanism for users to report issues or suggest improvements.

This is indeed already tracked in #13252.


Basic TravisCI support

This introduces a .travis.yml file that configures a Travis CI
build to run on Ubuntu Trusty (14.04), install the JDK, and build
the project. The next step would be adding automatic tests.
You can see over here what the result looks like (enabled for
my fork of the repo): https://travis-ci.org/goldshtn/async-profiler/builds
@apangin You would need (as the repo owner) to log in on
https://travis-ci.org, authorize Travis to access your GitHub
repositories, and check the checkbox next to the async-profiler
repository so that we get an automatic build. Then we could
add a build badge, configure pull requests to require the build
to pass, and so on. If you'd like I can configure this for you,
but you would need to give me admin access to the repo.
Resolves #20.

Cool! It works!
https://travis-ci.org/apangin/async-profiler


Use custom classes required at compile time (e.g. Activity, Application, etc.)

Overview
In Android development it is a standard practice to use inheritance to create custom activities, applications and other components. Currently NativeScript runtime for Android ({N}) has limited support for this scenario. This proposal aims to provide a solution for creating custom activities, applications and other components.

Note: for the sake of this proposal I use the common scenario to extend an activity class.

Current State
{N} provides built-in NativeScriptApplication and NativeScriptActivity classes. While these classes helped the adoption of {N} they also provide limitations. Currently it is not possible to inherit from a third party activity or other types which are used in AndroidManifest.xml file.
Technical Details
Here is how a Java class is extended in {N}
// app/myactivity.js
var MyActivity = android.app.Activity.extend({
   onCreate: function(bundle) {
      // implementation
   }
});

However MyActivity class is generated at runtime by {N} bridge. This mean you cannot use MyActivity in AndroidManifest.xml the way we currently use NativeScriptActivity for example.
<!-- AndroidManifest.xml -->
<activity
    android:name="com.tns.NativeScriptActivity"
    android:label="TestApp">
    <intent-filter>
        <action android:name="android.intent.action.MAIN" />
        <category android:name="android.intent.category.LAUNCHER" />
    </intent-filter>
</activity>

Proposal
The current extend implementation can accept two parameters as well. We can rewrite the previous example as follows
// app/myactivity.js
var MyActivity = android.app.Activity.extend("MyActivity", {
   onCreate: function(bundle) {
      // implementation
   }
});

We can leverage the latter syntax of extend function and pass the fully qualified type name of the new class as follows
// app/myactivity.js
var MyActivity = android.app.Activity.extend("com.example.MyActivity", {
   onCreate: function(bundle) {
      // implementation
   }
});

During build time we can parse the JavaScript and generate Java file com/example/MyActivity.java. This proposal will not make the existing code ambiguous because currently there is a validation rule that says the class name cannot contain . symbol. The generated MyActivity.java file will look as follows
// com/example/MyActivity.java
package com.example;

@com.tns.JavaScriptImplementation(javaScriptFile = "app/myactivity.js")
public class MyActivity extends android.app.Activity {
   public MyActivity() {
      com.tns.Platform.initInstance(this);
   }
   public void onCreate(android.os.Bundle param_0) {
      Object[] args = new Object[1];
      args[0] = param_0;
      com.tns.Platform.callJSMethod(this, "onCreate", void.class, args);
   }
}

This is how the currently runtime generated types look like. We can provide a tool that generates equivalent types at build time. The only difference is the use of com.tns.JavaScriptImplementation annotation. The need a way to find the JavaScript implementation for MyActivity when an instance is created. Using annotation is just one possible approach. I find it clear and, more importantly, I find it aligned with the following proposition how to extend Java class in TypeScript.
// myactivity.ts
@JavaProxy("com.tns.MyActivity")
class MyActivity extends android.app.Activity {
   onCreate(bundle: android.os.Bundle)  {
      // implementation
   }
}

Using ES6/TypeScript decorators is a simple way to indicate that we have to generate Java class at build time. The main benefit of using decorators is that the change is less obtrusive than other alternatives.
Impact
This proposal will require {N} modules to change the way an application is initialized and activities are created. I expect that this would be small-to-medium change. The immediate benefits are better encapsulation and control. Also, it may require {N} modules to come with prebuilt Activity and Application classes. Another approach would be adding these classes to the project template.
Summary
This proposal has some other benefits as well. Removing NativeScriptActivity and NativeScriptApplication from {N} will allows us to support lower Android API levels. Currently we have to compile against API level 17 and there is no technical justification for that. Also it will allow embedding {N} in other applications much easier. One primary scenario is NativeScript companion app.
Finally, you can find a prototype here

! + 1

IS the NativeScript companion app open source?

Hi @gordonpro
NativeScript companion app is not open-sourced as it is used with Telerik AppBuilder services which are part of Telerik paid offerings. Also, currently {N} runtime has some Telerik AppBuilder related logic in order to make the integration between the two products. This proposal will help us to remove all AppBuilder specific logic from {N} runtime. Essentially, it will make {N} much more easy to embed whether it is NativeScript companion app or something else.

+1 need to implement an interface asap for a plugin

Boosting the volume on this so we can get the Auth0 plugin working for Android. Pretty please.

This will resolve Easy to embed with present app codebase.
Is there a approximate release date of this plan .

@gordonpro It is hard to say because it is a cross-team effort. The work on the android runtime side is already done and the prototype works as expected. The only unclear thing is how we are going to distribute the Java stuff which our modules depend on. ping @teobugslayer @hshristov

Can you Please write step by step for creating custom activity in Nativescript Commandline Interface. Because I am trying to implement AppWidget using NativeScript.

I have tried this proposal but i am facing error "com.example.MyActivity" class is not found. kindly provide steps to create custom activity class.

@katturajam
I haven't been clear enough. Both com.tns.MyApp and com.tns.MyActivity (the above com.example.MyActivity is just an example) will be generated at build time. In my prototype I wrote these files manually (you can find them at https://github.com/NativeScript/android-runtime/tree/slavchev/new-project-template2/test-app/src/com/tns). Currently our plan is to provide a new tool that will be seamlessly integrated in tns build command the will generate all *.java files. In short, this tool will parse your JavaScript source code and every time it finds ES5 extend or ES6 extends syntax it will generate the required *.java file. It is important these *.java files to be generated so the build can compiled and dex them. Otherwise, you cannot cite them in the AndroidManifest.xml file.

Just a quick update: we won't manage to ship this feature with the upcoming 1.6 release. While the functionality is implemented we need more time for proper testing.

@slavchev has any of this code been pushed to the repos, or is it all internal right now?

@NathanaelA Most of the code is public (PRs and some branches, the changes for metadata generator are in the master branch already). The only thing that is private is the modified static binding generator. It is a matter of a week or two to integrate all parts in a single feature.

@slavchev awesome.  Thanks for the feedback.  I'd personally love to see everything in the repos  after 1.6 ships so that others can do testing also. Just wasn't sure how close it was...  ;-D

@slavchev
https://github.com/NativeScript/android-runtime/tree/slavchev/new-project-template2/test-app/src/com/tns
gradle packar -PwidgetsPath=./widgets.jar
I am facing error when i was build android-runtime
[x86] SharedLibrary  : libNativeScript.so
[x86] Install        : libNativeScript.so => libs/x86/libNativeScript.so
:copyCppRuntime
:cleanCppRuntime
:revertNdkConfigurationfatal: Not a git repository (or any of the parent directories): .git
FAILED
FAILURE: Build failed with an exception.

What went wrong:
Execution failed for task ':revertNdkConfiguration'.

Process 'command 'git'' finished with non-zero exit value 128

hi, @katturajam
here is something that can help you out: link
and you can read more about git repositories here: link

@slavchev how can I backport this to 1.5.2?

Hi @vbresults
You can find a very old branch here https://github.com/NativeScript/android-runtime/tree/slavchev/new-project-template2
At yesterday's planning meeting it was confirmed this should be implemented for 1.7 release so I expect to merge it in master branch today or tomorrow.

Great. Good News. Awesome.

@slavchev any updates on this?

https://github.com/NativeScript/android-runtime/pull/364 is already merged into master branch so it
will be released with 1.7 release.

:)

related to: https://github.com/NativeScript/android-runtime/issues/250

Are we able to add another build step to maybe copy over the .java files...?  So like have a custom folder (maybe under App_Resource/android) where we can put our custom files... modifying the NativeScriptApplication/Activity files in the platform folder is becoming tedious here... :/

@sitefinitysteve You could use nativescript-hook and create a simple build step that copies those files over.   I actually contemplated doing that while writing my blog on this feature, but didn't figure that many people would actually need it.

@NathanaelA I kinda want this to be just a thing "that just works" though... I don't want my plugin install step to be "Go install another plugin, and add this to it".  Like this PR opened up the ability for us to modify these files, but in the worst possible place.  Would make more sense to modify them externally and have it copied over.  So in that case the step would be simply, "Take the .java files from here https://github.com/sitefinitysteve/nativescript-auth0/tree/master/plugin/platforms/android and paste them into X folder).  This would then let the dev modify them further to maybe do things for multiple plugins.
...I dunno, anything but /platforms/android

@sitefinitysteve Oh don't get me wrong, I'm not happy about the location either.  I just was tying to get you a solution today, if you needed it.  ;-)

@NathanaelA GOTCHA! :D ...so onboard with the original idea?

@NathanaelA @sitefinitysteve
Guys, let me shed some light on what the original idea is. Also it would be awesome if you provide feedback.
Firstly, because of the time pressure for 1.7.0 we released only a half of what was initially intended. As I wrote in the proposal, we intended to ship a tool which parses *.js and *.ts files and generates *.java source files during build time. The good news is that the tool is ready and we tested it with the current modules. So far it generates correct *.java files which are compiled as expected. I guess we will open the tool repo these days and it won't take long to integrate it in the gradle build scripts.
Secondly, we wanted to keep the change as small as possible and right now the *.java files are manually coded. We wanted to see how this proposal will work in real-world scenarios, and indeed it turns out to be a bumpy road. Hopefully, tomorrow we will release 1.7.1 which will fix the most critical issues.
With that said, our assumption was that {N} developers prefer to write JavaScript/TypeScript and try to avoid platform specific code such as Java. Also, we assumed that {N} developers will hate to see *.java files in the project folder. So far it seems that we are wrong in our assumptions. To be honest, we had some brief internal discussions about providing special folders for platform specific source code but never came with a final decision. One of our ideas was to generate *.java files with a 1970-1-1 time stamp and once the developer edit a file we skip any further generation for this file until the developer specifies explicitly his/her intent. Another approach worth exploring is providing "partial" classes or something similar. So, to put it in another words we are open for any suggestions.

@slavchev NONO, I very much hate running\writing .java! :)
However for this auth0 plugin I need to do it, and even though it's my plugin I'm getting annoying with having to keep going back and "fixing" these files on a platform add\remove...

@slavchev I love the idea of a JS -> Java transpiler.  I would ask that it be allowed to build a Java class from multiple JS files though.   Take for instance the permission pull I added  --  If I create a simple  NativeScriptActivty.add.js  (or some file) that the compiler would then pull the piece of code out to include in the final NSA.java file
ie:
function OnRequestPermission(a,b) {
// do something
}

and then append this inside the class.  That way individual plugins could add the needed support they might need without making the developer having to manually modify this file for these plugins.
But this could be an update; having the develop open the NativeScriptActivity.js and copy/paste the changes would be much much better than what we have now.  :grinning:

@NathanaelA I very much like the idea for a .java file to be created from several .js files, but I am wandering if two plugins declare
function OnRequestPermission(a,b) {
// do something
}

How should we know which one to include and use in the project. I'm thinking if there is a way to create one .java file from several .js files it will be something like partial classes, and we can come up with a convention to follow in such cases.

@Plamen5kov I think you are going to have to treat it like we did the Manifest; the developer will have to manually fix it. IF TNS throws an error that points them to the two files, it should be simple matter to fix and/or delete one of the files.  I don't see any other way around that.  But in the majority of the cases I would expect that should not be an issue.


Indentation within if/function/macro/etc

When typing if conditions, for loops, functions, macros, and other commands with a corresponding "end" command, there is no automatic indentation. Today, I get this:
if(WIN32)
add_library(foo main.cpp)
endif()

I expect indentation within if and endif scope to be indented:
if(WIN32)
    add_library(foo main.cpp)
endif()

CMakeTools doesn't do CMake language support, just things regarding running CMake. I think this issue should be on the CMake extension.


Pull Develop into Main for MAPL 2.3 Release

Description

This is a pull of develop into main for a MAPL 2.3 release.
Related Issue

Motivation and Context

Brings a lot of new MAPL functionality to the main
How Has This Been Tested?

Runs of GEOSgcm with both Intel and GCC have been made.
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Trivial change (affects only documentation or cleanup)

Checklist:

[X] I have tested this change with a run of GEOSgcm (if non-trivial)
[X] I have added one of the required labels (0 diff, 0 diff trivial, 0 diff structural, non 0-diff)
[X] I have updated the CHANGELOG.md accordingly following the style of Keep a Changelog

I'm pulling the blocker label off of this now that the logger update from #561 is in. Once the CI is done, I think we are ready!

Technically the date for 2.3.0 is now off a bit, but that's ok.

I could change it if you like?

Seems like it would be just as easy to correct on the next PR into develop.  the "Release" page will automatically have the true date.


Improved named parameter parsing of single quotes

SPR-8280 Improving named parameter parsing where statement has escaped single quotes or comments are immediately before or after quoted literals

Thanks Thomas.  Please note the re-worked commit comment and updated date range in the license headers of the affected sources at 9fb6e2313ccf54fc3b2936f33e470f9eb1418a5c.