Add field tag to ignore migration

[x] Do only one thing
[x] Non breaking API changes
[x] Tested

What did this pull request do?

User Case Description

import (
	"github.com/shopspring/decimal"
       ...
)

type ChainExtrinsic struct {
Fee                decimal.Decimal `json:"fee" sql:"type:decimal(30,0);"`//v1
...
}
type ChainExtrinsic struct {
Fee                decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);"`//v2
...
}
db.AutoMigrate()

/*Actually there is no field definition change between v1 and v2.
for mysql migration from gorm v1 to v2 the unnessary alter column ddl as following will be generated
the worst thing is after migrating to v2, will still generate ddl each time when run automigrate
---ALTER TABLE `chain_extrinsics` MODIFY COLUMN `fee` decimal(30,0)
*/

we can avoid by add field tag as following:
type ChainExtrinsic struct {
Fee                decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);ignoreMigration"`
...
}

Hello @yrong
For you example, I would suggest you add a precision tag like:
type ChainExtrinsic struct {
  Fee                decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);precision:30"`
  ...
}

but the skip migration feature sounds interesting, maybe we could support it like following, would you mind to make the change?
type ChainExtrinsic struct {
  Fee                decimal.Decimal `json:"fee" gorm:"type:decimal(30,0);-:migration"`
  ...
}

@jinzhu
Thanks for the clarifaction about precision tag and will take a try.  For the skip migration I think maybe there is some confliction with the exist Field-Level Permission Definition which is essentially different and better not mixed together
Name string gorm:"-"  // ignore this field when write and read with struct

@jinzhu
Btw, I add one minor fix in 4a1096b  which I think maybe a bug because such model works in gorm v1
Address           string         gorm:"default: null;size:100" json:"address" //there is a leading space before null
maybe something related to #3363

@jinzhu
Thanks for the clarifaction about precision tag and will take a try. For the skip migration I think maybe there is some confliction with the exist Field-Level Permission Definition which is essentially different and better not mixed together
Name string gorm:"-" // ignore this field when write and read with struct

I think it would be good to group all field permission related things into similar tags, so users can get them in one place.
Maybe we could have different permission level like the ->, <- one, - means disable read/write by default, -:all means disable read/write & migration, -:migration means only disable the migration?

@jinzhu
some refactor per your request, pls check if anything missing

Thank you for your PR

I want to Add field tag to ignore migration,too
What should I do now


Only do work for instances from a single queue

Fixes the race condition uncovered during #1017 by only doing work for instances from a single work queue.  Instances are now added to the polling queue in a rate limited manner, and Instead of the polling queue triggering a re-reconcile of the instance, it instead adds the instance's key into the main instance work queue.  This means that only a single goroutine will do work on an instance at a time.
Fixes #780

@vaikas-google your review appreciated, since we've talked about this a bunch before.

In a follow-up, i will add integration tests for more permutations

We should think about how we want to rate-limit the polling queue.  There's a fast-slow rate limiter that makes n fast attempts before switching to slow attempts that seems suitable.

@nilebox test added to PR; we now have integration test coverage for:

async provision/deprovision
sync provision/deprovision
failed provision

Overall the architecture looks good to me. I have some further questions about the rate limiting, but nothing that should block this going in. I'll merge this and rebase #1067 .


P.temp undefined (type *keygen.LocalParty has no field or method temp)compiler

I am trying to write a local keygen function for ECDSA. This is based on the test code. I am encountering a (probably stupid) error. The issue seems to arise from the fact that somehow keygen.NewLocalParty returns a *keygen.LocalParty whose temp and data fields are not available. This is weird because I can see that they are defined. They work correctly on the test case, but not on my code.
Any help is appreciated.
go.mod
module github.com/org/mpc-tsslib-app

go 1.16

require github.com/bnb-chain/tss-lib v1.3.4-0.20220817120535-83efb6398209 // indirect

replace github.com/agl/ed25519 => github.com/binance-chain/edwards25519 v0.0.0-20200305024217-f36fc4b53d43

main.go
func keyGen(userId big.Int, threshold int) {
	server_id := big.NewInt(1)
	if userId.Cmp(server_id) == 0 {
		panic("Invalid user id. Must != " + server_id.String())
	}

	log.Printf("Received request to generate keypair for user: %s", userId.String())

	preParamsUser, _ := keygen.GeneratePreParams(1 * time.Minute)
	preParamsServer, _ := keygen.GeneratePreParams(1 * time.Minute)
	log.Printf("Generated pre-params")

	userPartyName := userId.String()
	userParty := tss.NewPartyID(userPartyName, userPartyName, &userId)

	serverPartyName := userPartyName + "_server"
	serverParty := tss.NewPartyID(serverPartyName, serverPartyName, server_id)

	_pIDs := []*tss.PartyID{userParty, serverParty}
	pIDs := tss.SortPartyIDs(_pIDs)
	ctx := tss.NewPeerContext(pIDs)

	partiesCount := len(pIDs)
	errCh := make(chan *tss.Error, partiesCount)
	outCh := make(chan tss.Message, partiesCount)
	endCh := make(chan keygen.LocalPartySaveData, partiesCount)

	parties := make([]*keygen.LocalParty, 0, partiesCount)

	curve := tss.S256()

	userParams := tss.NewParameters(curve, ctx, userParty, len(pIDs), threshold)
	userLocalParty := keygen.NewLocalParty(
		userParams,
		outCh,
		endCh,
		*preParamsUser).(*keygen.LocalParty)
	parties = append(parties, userLocalParty)

	serverParams := tss.NewParameters(curve, ctx, serverParty, len(pIDs), threshold)
	serverLocalParty := keygen.NewLocalParty(
		serverParams,
		outCh,
		endCh,
		*preParamsServer).(*keygen.LocalParty)
	parties = append(parties, serverLocalParty)

	log.Printf("Starting goroutines")
	go func(P *keygen.LocalParty) {
		if err := P.Start(); err != nil {
			errCh <- err
		}
	}(userLocalParty)

	go func(P *keygen.LocalParty) {
		if err := P.Start(); err != nil {
			errCh <- err
		}
	}(serverLocalParty)

	var ended int32

keygen:

	for {
		select {
		case err := <-errCh:
			log.Printf("Error: %s", err.Error())
			break keygen

		case msg := <-outCh:
			dest := msg.GetTo()
			if dest == nil { // broadcast!
				for _, P := range parties {
					if P.PartyID().Index == msg.GetFrom().Index {
						continue
					}
					go SharedPartyUpdater(P, msg, errCh)
				}
			} else { // point-to-point!
				if dest[0].Index == msg.GetFrom().Index {
					log.Printf("party %d tried to send a message to itself (%d)", dest[0].Index, msg.GetFrom().Index)
					panic("Party Sending Msg to Itself")
					return
				}
				go SharedPartyUpdater(parties[dest[0].Index], msg, errCh)
			}

		case save := <-endCh:
			_, err := save.OriginalIndex()
			if err != nil {
				panic("Unknown Error while saving party's data: " + err.Error())
				return
			}

			atomic.AddInt32(&ended, 1)
			if atomic.LoadInt32(&ended) == int32(partiesCount) {
				log.Printf("Done. Received save data from %d participants", ended)

				// combine shares for each Pj to get u
				u := new(big.Int)
				for j, Pj := range parties {
					pShares := make(vss.Shares, 0)
					for _, P := range parties {
						vssMsgs := P.temp.kgRound2Message1s
						share := vssMsgs[j].Content().(*KGRound2Message1).Share
						shareStruct := &vss.Share{
							Threshold: threshold,
							ID:        P.PartyID().KeyInt(),
							Share:     new(big.Int).SetBytes(share),
						}
						pShares = append(pShares, shareStruct)
					}

					uj, err := pShares[:threshold+1].ReConstruct(tss.S256())
					if err != nil {
						panic("Error while vss.reconstructing shares: " + err.Error())
						return
					}

					// uG test: u*G[j] == V[0]
					// assert.Equal(t, uj, Pj.temp.ui)
					uG := crypto.ScalarBaseMult(tss.EC(), uj)
					// assert.True(t, uG.Equals(Pj.temp.vs[0]), "ensure u*G[j] == V_0")

					// xj tests: BigXj == xj*G
					xj := Pj.data.Xi
					gXj := crypto.ScalarBaseMult(tss.EC(), xj)
					BigXj := Pj.data.BigXj[j]
					// assert.True(t, BigXj.Equals(gXj), "ensure BigX_j == g^x_j")

					// fails if threshold cannot be satisfied (bad share)
					{
						badShares := pShares[:threshold]
						badShares[len(badShares)-1].Share.Set(big.NewInt(0))
						uj, err := pShares[:threshold].ReConstruct(tss.S256())
						if err != nil {
							panic("Error while vss.reconstructing shares: " + err.Error())
							return
						}
						// assert.NotEqual(t, parties[j].temp.ui, uj)
						BigXjX, BigXjY := tss.EC().ScalarBaseMult(uj.Bytes())
						// assert.NotEqual(t, BigXjX, Pj.temp.vs[0].X())
						// assert.NotEqual(t, BigXjY, Pj.temp.vs[0].Y())
					}
					u = new(big.Int).Add(u, uj)
				}

				// build ecdsa key pair
				pkX, pkY := save.ECDSAPub.X(), save.ECDSAPub.Y()
				pk := ecdsa.PublicKey{
					Curve: tss.EC(),
					X:     pkX,
					Y:     pkY,
				}
				sk := ecdsa.PrivateKey{
					PublicKey: pk,
					D:         u,
				}
				// test pub key, should be on curve and match pkX, pkY
				// assert.True(t, sk.IsOnCurve(pkX, pkY), "public key must be on curve")

				// public key tests
				// assert.NotZero(t, u, "u should not be zero")
				ourPkX, ourPkY := tss.EC().ScalarBaseMult(u.Bytes())
				// assert.Equal(t, pkX, ourPkX, "pkX should match expected pk derived from u")
				// assert.Equal(t, pkY, ourPkY, "pkY should match expected pk derived from u")
				// t.Log("Public key tests done.")

				// make sure everyone has the same ECDSA public key
				// for _, Pj := range parties {
				// assert.Equal(t, pkX, Pj.data.ECDSAPub.X())
				// assert.Equal(t, pkY, Pj.data.ECDSAPub.Y())
				// }
				// t.Log("Public key distribution test done.")

				// test sign/verify
				data := make([]byte, 32)
				for i := range data {
					data[i] = byte(i)
				}
				r, s, _ := ecdsa.Sign(rand.Reader, &sk, data)
				// assert.NoError(t, err, "sign should not throw an error")
				ecdsa.Verify(&pk, data, r, s)
				// assert.True(t, ok, "signature should be ok")
				log.Printf("ECDSA signing test done.")

				// log.Printf("Start goroutines: %d, End goroutines: %d", startGR, runtime.NumGoroutine())

				break keygen
			}
		}
	}

}

func SharedPartyUpdater(party tss.Party, msg tss.Message, errCh chan<- *tss.Error) {
	// do not send a message from this party back to itself
	if party.PartyID() == msg.GetFrom() {
		return
	}
	bz, _, err := msg.WireBytes()
	if err != nil {
		errCh <- party.WrapError(err)
		return
	}
	pMsg, err := tss.ParseWireMessage(bz, msg.GetFrom(), msg.IsBroadcast())
	if err != nil {
		errCh <- party.WrapError(err)
		return
	}
	if _, err := party.Update(pMsg); err != nil {
		errCh <- err
	}
}

$ go build
./main.go:161:19: P.temp undefined (cannot refer to unexported field or method temp)
./main.go:183:14: Pj.data undefined (cannot refer to unexported field or method data)
./main.go:185:17: Pj.data undefined (cannot refer to unexported field or method data)

Lower-case symbols are not exported in Go modules as far as I remember (temp, data). So it may work as part of module unit-tests, but not when you imported github.com/bnb-chain/tss-lib into your app

I believe you are correct. I am new to Go. How should I proceed in this case then? What's the way to generate shares? The README mentions to simply do below for each party with proper communications setup. But the tests make it seem like there's a lot more to be done.
party := keygen.NewLocalParty(params, outCh, endCh, preParams) // Omit the last arg to compute the pre-params in round 1
go func() {
    err := party.Start()
    // handle err ...
}()

You only have to read (for each party) from endCh data of type keygen.LocalPartySaveData.
This data you can just serialize to the disk via json.Marshal.
Same if your app restart, you just loads saved "share" from disk by json.Unmarshal.
This "share" of type keygen.LocalPartySaveData you use later for signing routines (for example)
This is kind of "key" of one party.

Hi @yshurik Thanks for being patient. I tried what you recommended, and it seems to make me move forward. But not complete. Now I can see messages passing around between the parties, but I don't get anything on the endCh to save.
main.go
func SharedPartyUpdater(party tss.Party, msg tss.Message, errCh chan<- *tss.Error) {
	// do not send a message from this party back to itself
	log.Printf("Got a message from %s for %s",
		msg.GetFrom().GetMoniker(),
		party.PartyID().GetMoniker())
	if party.PartyID() == msg.GetFrom() {
		log.Print("Ignored...")
		return
	}

	// Returns the encoded message bytes to send over the wire along with routing information
	bz, _, err := msg.WireBytes()
	if err != nil {
		errCh <- party.WrapError(err)
		return
	}

	pMsg, err := tss.ParseWireMessage(bz, msg.GetFrom(), msg.IsBroadcast())
	if err != nil {
		errCh <- party.WrapError(err)
		return
	}

	// Will only work in local setup
	if _, err := party.Update(pMsg); err != nil {
		errCh <- err
	}
}

func keyGen(userId big.Int, threshold int) {
	server_id := big.NewInt(1)
	if userId.Cmp(server_id) == 0 {
		panic("Invalid user id. Must != " + server_id.String())
	}

	log.Printf("Received request to generate keypair for user: %s", userId.String())

	preParamsUser, _ := keygen.GeneratePreParams(1 * time.Minute)
	log.Print(("Generated pre params for User"))
	preParamsServer, _ := keygen.GeneratePreParams(1 * time.Minute)
	log.Printf("Generated pre-params for Server")

	userPartyName := userId.String()
	userParty := tss.NewPartyID(userPartyName, userPartyName, &userId)

	serverPartyName := userPartyName + "_server"
	serverParty := tss.NewPartyID(serverPartyName, serverPartyName, server_id)

	_pIDs := []*tss.PartyID{userParty, serverParty}
	pIDs := tss.SortPartyIDs(_pIDs)
	ctx := tss.NewPeerContext(pIDs)

	partiesCount := len(pIDs)
	errCh := make(chan *tss.Error, partiesCount)
	outCh := make(chan tss.Message, partiesCount)
	endCh := make(chan keygen.LocalPartySaveData)

	parties := make([]*keygen.LocalParty, 0, partiesCount)

	curve := tss.S256()

	userParams := tss.NewParameters(curve, ctx, userParty, len(pIDs), threshold)
	userLocalParty := keygen.NewLocalParty(
		userParams,
		outCh,
		endCh,
		*preParamsUser).(*keygen.LocalParty)
	parties = append(parties, userLocalParty)

	serverParams := tss.NewParameters(curve, ctx, serverParty, len(pIDs), threshold)
	serverLocalParty := keygen.NewLocalParty(
		serverParams,
		outCh,
		endCh,
		*preParamsServer).(*keygen.LocalParty)
	parties = append(parties, serverLocalParty)

	log.Printf("Starting goroutines")
	go func(P *keygen.LocalParty) {
		if err := P.Start(); err != nil {
			errCh <- err
		}

		log.Print("local party finished")
	}(userLocalParty)

	go func(P *keygen.LocalParty) {
		if err := P.Start(); err != nil {
			errCh <- err
		}
		log.Print("server party finished")
	}(serverLocalParty)

	var ended int32

keygen:

	for {
		select {
		case err := <-errCh:
			log.Printf("Error: %s", err.Error())
			break keygen

		case msg := <-outCh:
			dest := msg.GetTo()
			if dest == nil { // broadcast!
				log.Print("Broadcasting...")
				for _, P := range parties {
					if P.PartyID().Index == msg.GetFrom().Index {
						continue
					}
					go SharedPartyUpdater(P, msg, errCh)
				}
			} else { // point-to-point!
				log.Print("Point-to-point...")
				if dest[0].Index == msg.GetFrom().Index {
					log.Printf("party %d tried to send a message to itself (%d)", dest[0].Index, msg.GetFrom().Index)
					panic("Party Sending Msg to Itself")
				}
				go SharedPartyUpdater(parties[dest[0].Index], msg, errCh)
			}

		case save := <-endCh:
			log.Printf("Got save data from party %d", save.ShareID)
			_, err := save.OriginalIndex()
			if err != nil {
				panic("Unknown Error while saving party's data: " + err.Error())
			}
			fmt.Print(save)

			log.Print("Got save data from party")
			atomic.AddInt32(&ended, 1)
			if atomic.LoadInt32(&ended) == int32(partiesCount) {
				log.Printf("Done. Received save data from %d participants", ended)
				log.Print(save.ShareID.String())
				json.Marshal(save)
				break keygen
			}
		}
	}

}

Upon executing I get the following
bitpack-tss-lib % ./mpc-app-tsslib
2022/08/27 13:22:17 Received request to generate keypair for user: 3
2022/08/27 13:22:30 Generated pre params for User
2022/08/27 13:22:44 Generated pre-params for Server
2022/08/27 13:22:44 Starting goroutines
2022/08/27 13:22:45 Broadcasting...
2022/08/27 13:22:45 local party finished
2022/08/27 13:22:45 Got a message from 3 for 3_bitpack
2022/08/27 13:22:45 Broadcasting...
2022/08/27 13:22:45 Got a message from 3_bitpack for 3
2022/08/27 13:22:45 server party finished
2022/08/27 13:22:46 Point-to-point...
2022/08/27 13:22:46 Broadcasting...
2022/08/27 13:22:46 Got a message from 3_bitpack for 3_bitpack
2022/08/27 13:22:46 Ignored...
2022/08/27 13:22:46 Got a message from 3_bitpack for 3
2022/08/27 13:22:46 Point-to-point...
2022/08/27 13:22:46 Broadcasting...
2022/08/27 13:22:46 Got a message from 3 for 3_bitpack
2022/08/27 13:22:46 Got a message from 3 for 3
2022/08/27 13:22:46 Ignored...

It is hard to say why stalled.
I would recommend to switch on the logging in tss lib.
It uses "github.com/ipfs/go-log", so add import like:
import (
    logging "github.com/ipfs/go-log"
)

// before start keygen:

logging.SetDebugLogging()

You will see what parties are talking to each other

@yshurik I added the following timeout condition apart from the logger, and it seems like one of the parties is waiting for a message from itself in round 2.
		case <-time.After(1 * time.Minute):
			for _, P := range parties {
				common.Logger.Debug(P.PartyID().String()+" waiting for %s", P.WaitingFor())
			}
			common.Logger.Debug("timeout")
			break keygen
		}

The log output is as follows: This is for a user with ID 3 and a server with ID 1
./mpc-api-tsslib
17:44:55.241  INFO    tss-lib: Received request to generate keypair for user: %s 3 main.go:72
17:44:55.242  INFO    tss-lib: generating the Paillier modulus, please wait... prepare.go:63
17:44:55.242  INFO    tss-lib: generating the safe primes for the signing proofs, please wait... prepare.go:78
17:45:00.242  INFO    tss-lib: paillier modulus generated. took 4.999475958s
 prepare.go:71
17:45:03.243  INFO    tss-lib: still generating primes... prepare.go:99
17:45:03.306  INFO    tss-lib: safe primes generated. took 8.064205959s
 prepare.go:85
17:45:03.431  INFO    tss-lib: Generated pre params for User main.go:75
17:45:03.431  INFO    tss-lib: generating the safe primes for the signing proofs, please wait... prepare.go:78
17:45:03.431  INFO    tss-lib: generating the Paillier modulus, please wait... prepare.go:63
17:45:11.431  INFO    tss-lib: still generating primes... prepare.go:99
17:45:14.912  INFO    tss-lib: paillier modulus generated. took 11.481392666s
 prepare.go:71
17:45:18.910  INFO    tss-lib: safe primes generated. took 15.478908959s
 prepare.go:85
17:45:19.031  INFO    tss-lib: Generated pre-params for Server main.go:77
17:45:19.031  INFO    tss-lib: party {0,3_server}: ecdsa-keygen round 1 starting party.go:135
17:45:19.031  INFO    tss-lib: party {1,3}: ecdsa-keygen round 1 starting party.go:135
17:45:20.546 DEBUG    tss-lib: party {0,3_server}: ecdsa-keygen round 1 finished party.go:137
17:45:20.546 DEBUG    tss-lib: Broadcasting... main.go:139
17:45:20.547 DEBUG    tss-lib: Got a message from %s for %s 3_server 3 main.go:38
17:45:20.612 DEBUG    tss-lib: party {1,3}: ecdsa-keygen round 1 finished party.go:137
17:45:20.612 DEBUG    tss-lib: Broadcasting... main.go:139
17:45:20.612 DEBUG    tss-lib: Got a message from %s for %s 3 3_server main.go:38
17:45:20.612 DEBUG    tss-lib: party {1,3} received message: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {0,3_server}, To: all party.go:154
17:45:20.612 DEBUG    tss-lib: party {1,3} round 1 update: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {0,3_server}, To: all party.go:156
17:45:20.612 DEBUG    tss-lib: party {1,3}: ecdsa-keygen round 1 update party.go:162
17:45:20.612 DEBUG    tss-lib: party {0,3_server} received message: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {1,3}, To: all party.go:154
17:45:20.613 DEBUG    tss-lib: party {0,3_server} round 1 update: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {1,3}, To: all party.go:156
17:45:20.613 DEBUG    tss-lib: party {0,3_server}: ecdsa-keygen round 1 update party.go:162
17:45:21.852 DEBUG    tss-lib: Point-to-point... main.go:147
17:45:21.852 DEBUG    tss-lib: Got a message from %s for %s 3_server 3_server main.go:38
17:45:21.852 DEBUG    tss-lib: Ignored... main.go:42
17:45:21.852 DEBUG    tss-lib: Broadcasting... main.go:139
17:45:21.852 DEBUG    tss-lib: Got a message from %s for %s 3_server 3 main.go:38
17:45:21.853  INFO    tss-lib: party {0,3_server}: ecdsa-keygen round 2 started party.go:172
17:45:21.853 DEBUG    tss-lib: party {0,3_server} received message: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {1,3}, To: all party.go:154
17:45:21.853 DEBUG    tss-lib: party {0,3_server} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {1,3}, To: all party.go:156
17:45:21.853 DEBUG    tss-lib: party {0,3_server}: ecdsa-keygen round 2 update party.go:162
17:45:21.853 DEBUG    tss-lib: Point-to-point... main.go:147
17:45:21.853 DEBUG    tss-lib: Broadcasting... main.go:139
17:45:21.853 DEBUG    tss-lib: Got a message from %s for %s 3 3_server main.go:38
17:45:21.853 DEBUG    tss-lib: Got a message from %s for %s 3 3 main.go:38
17:45:21.853 DEBUG    tss-lib: Ignored... main.go:42
17:45:21.853  INFO    tss-lib: party {1,3}: ecdsa-keygen round 2 started party.go:172
17:45:21.854 DEBUG    tss-lib: party {0,3_server} received message: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {1,3}, To: all party.go:154
17:45:21.854 DEBUG    tss-lib: party {0,3_server} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {1,3}, To: all party.go:156
17:45:21.854 DEBUG    tss-lib: party {1,3} received message: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {0,3_server}, To: all party.go:154
17:45:21.854 DEBUG    tss-lib: party {1,3} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound1Message, From: {0,3_server}, To: all party.go:156
17:45:21.854 DEBUG    tss-lib: party {1,3}: ecdsa-keygen round 2 update party.go:162
17:45:21.854 DEBUG    tss-lib: party {0,3_server}: ecdsa-keygen round 2 update party.go:162
17:45:21.854 DEBUG    tss-lib: party {1,3} received message: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {0,3_server}, To: all party.go:154
17:45:21.854 DEBUG    tss-lib: party {1,3} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {0,3_server}, To: all party.go:156
17:45:21.854 DEBUG    tss-lib: party {1,3}: ecdsa-keygen round 2 update party.go:162
17:46:21.852 DEBUG    tss-lib: {1,3} waiting for %s [{0,3_server} {1,3}] main.go:174
17:46:21.853 DEBUG    tss-lib: {0,3_server} waiting for %s [{1,3}] main.go:174
17:46:21.853 DEBUG    tss-lib: timeout main.go:176

I tried out this example with multiple userIDs and get the similar output
tail
19:49:09.001 DEBUG    tss-lib: party {1,3} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {3,5}, To: all party.go:156
19:49:09.001 DEBUG    tss-lib: party {1,3}: ecdsa-keygen round 2 update party.go:162
19:49:09.001 DEBUG    tss-lib: party {2,4} received message: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {3,5}, To: all party.go:154
19:49:09.001 DEBUG    tss-lib: party {2,4} round 2 update: Type: binance.tsslib.ecdsa.keygen.KGRound2Message2, From: {3,5}, To: all party.go:156
19:49:09.001 DEBUG    tss-lib: party {2,4}: ecdsa-keygen round 2 update party.go:162
19:50:09.001 DEBUG    tss-lib: {1,3} waiting for  [{0,server} {1,3} {2,4} {3,5}] main.go:193
19:50:09.003 DEBUG    tss-lib: {2,4} waiting for  [{1,3} {2,4} {3,5}] main.go:193
19:50:09.003 DEBUG    tss-lib: {3,5} waiting for  [{2,4} {3,5}] main.go:193
19:50:09.003 DEBUG    tss-lib: {0,server} waiting for  [{3,5}] main.go:193
19:50:09.003 DEBUG    tss-lib: timeout main.go:195

Message for itself - in your code you are skipping broadcasts to itself, is that a cause?

Not necessarily. I removed that part and it still was stuck. I copied that part from the test code itself. Did you manage to get this working? Any code sample that you can share?

Yes, I have it working fine.
I can not separate some working part from my codes to give an example.
But I can recommend these unittests: https://github.com/Kava-Labs/kava-bridge/blob/main/relayer/mp_tss/keygen_test.go / https://github.com/Kava-Labs/kava-bridge/tree/main/relayer/mp_tss which helped me


Make sidecar selection not require a service in ns

Currently, if you have a namespace with no Services, Sidecar selection
fails. This is because we precompute the sidecar scope for "all"
namespaces, but we get namespaces from the list of Services in
the cluster. As a result, if there is no service, we don't compute
anything for that namespace.
Technically, we require a Service:
https://istio.io/docs/ops/deployment/requirements/, but its pretty poor
behavior. On the other hand, this is inefficient and adds complexity for
a weird edge case.
@hzxuzhonghu @rshriram @ramaraochavali I am not convinced this is a good idea, so I figured I would send this out an get opinions

Make some sense when a proxy connects to pilot, but its service has not been synced. Even though this may rarely happen. Do you have any plan to make service not required for a sidecar?

It would be nice to not have Service required but it would require a ton of
work. Note that this is only broken if there are no Services in the entire
namespace though
On Sat, Mar 7, 2020, 1:14 AM Zhonghu Xu<EMAIL_ADDRESS>wrote:

Make some sense when a proxy connects to pilot, but its service has not
been synced. Even though this may rarely happen. Do you have any plan to
make service not required for a sidecar?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/istio/istio/pull/21945?email_source=notifications&email_token=AAEYGXPTGVOZ22KR22MV3O3RGIF5ZA5CNFSM4LDJUUQKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEODT3GQ#issuecomment-596065690,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAEYGXKX6OFXC5NNCMZ7CB3RGIF5ZANCNFSM4LDJUUQA
.

Some questions - mostly for my understanding of problem

This is because we precompute the sidecar scope for "all"
namespaces, but we get namespaces from the list of Services in
the cluster

Where do we just return List of namespaces that have services?

If a namespace does not have any services, I am curious what is the proxy acting as sidecar for?  I can think of Statefulset pod as one, but are there any? or is it the case of proxy connecting first before service?

What if rootNSConfig is nil - i.e. a sidecar does not exist in the root namespace? Does n't it fall to the same DefaultSidecarScopeForNamespace ?

@ramaraochavali https://github.com/istio/istio/blob/2fb83a09df322f7d34a8417e37b3b9ea1ffe517d/pilot/pkg/model/push_context.go#L1418 makes the namespace list dependant on Services.

Its not so rare to have "client only" pods, which don't have Services. Especially for CronJob type situations. If you have a namespace with only these, then you may run into this situation.

Good point, let me make sure that case is handled appropriately

Is it possible that this PR is missing updates of the default Sidecar?
I had that added to my PR here:
https://github.com/istio/istio/pull/22035/files#diff-ee39cd332931ab6f8c10713ce3446d09R1082


Three tests failed when running nvm in an node 4.1 (64 bit ) environment

Running tests at 2015-09-18T03:36:46
test/installation
io.js
✓ install already installed uses it
✓ install from binary
✗ install two versions and use the latest one
######################################################################## 100.0%
WARNING: checksums are currently disabled for io.js
Now using io.js v1.0.0 (npm v2.1.18)
######################################################################## 100.0%
WARNING: checksums are currently disabled for io.js
Now using io.js v1.0.1 (npm v2.1.18)
Now using io.js v1.0.0 (npm v2.1.18)
Now using io.js v1.8.4 (npm v2.9.0)
'node --version' was not v1.0.1, got: v1.8.4
✓ install version specified in .nvmrc from binary
✗ install while reinstalling packages
######################################################################## 100.0%
WARNING: checksums are currently disabled for io.js
Now using io.js v1.0.0 (npm v2.1.18)
<EMAIL_ADDRESS>/svt/shared/JOYENT64_41/lib/node_modules/object-is
######################################################################## 100.0%
WARNING: checksums are currently disabled for io.js
Now using io.js v1.0.1 (npm v2.1.18)
Reinstalling global packages from iojs-v1.0.0...
<EMAIL_ADDRESS>/svt/shared/JOYENT64_41/lib/node_modules/object-is
Linking global packages from iojs-v1.0.0...
Now using io.js v1.8.4 (npm v2.9.0)
nvm use iojs-1 didn't use v1.0.1
✗ nvm install v1 works
./nvm install v1 works: line 12: [: ../../../: binary operator expected
iojs-v1.8.4 is already installed.
Now using io.js v1.8.4 (npm v2.9.0)
./nvm install v1 works: line 18: [: ../../../versions/io.js/: binary operator expected
grep: Unmatched [ or [^
module.js:324
throw err;
^
Error: Cannot find module '/home/nodebot/.nvm/test/installation/io.js/'
at Function.Module._resolveFilename (module.js:322:15)
at Function.Module._load (module.js:264:25)
at Function.Module.runMain (module.js:487:10)
at startup (node.js:111:16)
at node.js:809:3
'nvm run  iojs-v1.8.4 --version | grep  iojs-v1.8.4' failed
node
✓ install already installed uses it
✓ install from binary
✓ install from source
✓ install from source implicitly
✓ install from source without V8 snapshot for ARM
✓ install two versions and use the latest one
✓ install version specified in .nvmrc from binary
✓ install version specified in .nvmrc from source
✓ install while reinstalling packages

Done, took 481 seconds.
12 tests passed.
3 tests failed.
environment is:
Red Hat Enterprise Linux Server release 6.6
node: v4.1.0
npm 2.14.3

What shell are oyu using?

I'm going to close this since tests are definitely passing.


Add back a temporary CTA button until ticket sales are available

What happened
Added back button as we had in the old site. note this can be removed once ticket sales available
Insight
No way for users to pre-register for ticket info
Proof Of Work

@matthewmayer let's keep it to the bottom as per the design

Not required anymore since the final design has been implemented in #58


Customizing Loader Animation

Is there a good way to customize the loader animation to use a custom animation?

Hi @abishekrsrikaanth,
Thank you for posting, but although it’s a valid usage question, we’ve limited GitHub Issues to bug reports and feature requests, keeping the board more manageable for maintainers; see the contributing guidelines for more information on what kind of posts should find themselves into the GitHub Issues board.
To get answers or feedback that might allow you to repost this issue, please use one of our other support resources:

Gitter chatroom
Official forums
StackOverflow


Look into support for secure TLS connections to memcached/redis servers

Resources:
https://github.com/memcached/memcached/blob/master/testapp.c
https://wiki.openssl.org/index.php/SSL/TLS_Client
https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_new.html
Related to https://github.com/twitter/twemproxy/issues/583
This would probably be done by

Adding a tls: true section to twemproxy pool configuration files
Adding a ./configure option to depend on openssl
Changing callers of nc_write/nc_writev to call a helper method for the nc_conn instead

Just as an example of how this could be useful / enable new use cases:
We're using Google's Memorystore for Redis. Unfortunately, its network connection patterns require the instances to be exposed to our whole (large) VPC. For security, we use TLS and Redis AUTH commands. However, handling that that puts some load on developers of services which use Redis.
These services run in Kubernetes with Istio, so we were looking into deploying Twemproxy into each cluster and having it handle the TLS termination and AUTH strings and letting services running in the clusters just connect without authentication or TLS, with the access policy being handled by Istio. However, the lack of TLS support is kind of blocking this use case for us.

for AWS ElastiCache for Redis, AUTH is only possible over TLS, so this is also something we would love to have so we can use ElastiCache with AUTH as there is no way to use it without TLS :(

Also for our usecase twemproxy terminating TLS connections from caching backends would be cools as our caching servers are available on internet and for then obvious security reason should only communicate inside TLS connections.


Sample Code For One Function Per ViewModel

Currently under the section Manual or no dependency injection, there is no code sample for when we want to provide one view model function per viewmodel for a composable screen.

Great job @KwabenBerko ! Only small things to improve 🙂

Thanks a lot @KwabenBerko ! 🙇


Design metadata retrieval for SQL modules

Description:
$subject

Reopening this as the proposal is still under review

Closing as proposal is accepted and implemented.


Procedure rely-guarantees between procedures

Procedure calls where the caller has a procedure-level rely/guarantee should do the library rely/guarantee check between their own rely/guarantee and the callee's R/G, rather than the thread rely/guarantee.
Additionally, if the entry procedure specifies rely/guarantee, it needs the lib R/G check against the thread rely/guarantee.

If we now care about procedure-level rely/guarantees for internal procedures, then I would need a more detailed explanation of how they are supposed to work, and what the differences are from the external procedure rely/guarantees.


It cannot use to decrypt a game file

I cannot decrypt stranger of power 2 resources , help with the file if you can or help me to decrypt it if you can. I no sure if i done something wrong or wha. Do help to check it thank.

Please note, that I already work on a method to automate this, see here:
https://github.com/Petschko/RPG-Maker-MV-Decrypter/issues/18

Oh ok it do work, thank you so much for the help. I really appreciate your effort there. A first time i thought the data file of rpg game that been compress cannot be decrypt... thank you very much for your hard work.
Anyway can i have your mail ? I promise i wont spam you. I no sure if i can find your mail here but do correct me if you already put your mail somewhere in here. Thank again for your help.

Hey, my Mail is<EMAIL_ADDRESS>usually its on my Github profile and on the Decrypt-Tool in the bottom (also within my imprint).
Please upload that game at mega or so and send me the link via mail then^^

I hope you check your mail as the link been send some day ago. Anyway, can you share fantasy heroine pack 1 and 2 if you got?

Yes I received it, sadly its not a link what you send me there, please send me a link with a download or such stuff
Before you send the link to me, please try out if it works and start with http:// or https:// I don't install any Extensions to download stuff^^
If your link has chrome-extension:// as start, it's not a valid link

Just copy paste it to any browser... It should work... Anyway that link is no by me... If no work then I will take time upload myself as my country internet speed is slow...

I think you can just upload some files of it, like the system.json, the rpg_core.js and a sample encrypted image.
I don't want to play the game, I just need these 3 Files (System.json, rpg_core.js and a encrypted file) and about your link, no it doesn't work
chrome-extension://bigefpfhnfcobdlfbedofhhaibnlghod/mega/secure.html(...)
doesn't even has a target server (Bold) nor the protocol "chrome-extension" exists. It just opens my search engine with the request to search for this, which makes sense since its not a URL


chore: add e2e tests for idempotency method

Please provide the issue number

Issue number: #512
Summary
We were missing a test for the E2E journey when decorating a method and not the handler
Changes
Add missing E2E tests
User experience

Please share what the user experience looks like before and after this change

Checklist
Please leave checklist items unchecked if they do not apply to your change.

[x] Meets tenets criteria
[x] I have performed a self-review of this change
[x] Changes have been tested
[x] Changes are documented
[x] PR title follows conventional commit semantics

Is this a breaking change?
RFC issue number:
Checklist:

[ ] Migration process documented
[ ] Implement warnings (if it can live side by side)

Acknowledgment
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
Disclaimer: We value your time and bandwidth. As such, any pull requests created on non-triaged issues might not be successful.

Codecov Report
All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (fe4ef8b) 72.21% compared to head (a87e492) 72.11%.
Report is 13 commits behind head on develop.

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #513      +/-   ##
===========================================
- Coverage    72.21%   72.11%   -0.11%
===========================================
  Files          101      101
  Lines         4064     4106      +42
  Branches       413      418       +5
===========================================
+ Hits          2935     2961      +26
- Misses        1017     1026       +9
- Partials       112      119       +7

Flag
Coverage Δ

unittests
72.11% <ø> (-0.11%)
:arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


Multivariate cmap

https://github.com/nschloe/cplot/wiki/Gallery

We should be careful about reading the cplot source is it is gpl3.


setting up basic UI for Auth API functionality check

[ ] Basic Sign Up Screen for Naive Login
[ ] oAuth Sign Up Screen for providers login
[ ] User profile Screen with Logout
[ ] User Login Screen either through native login, token-based or oauth.

Dropping this issue as Auth-API will only deals with providing auth credentials to the lower service layers.
As of now for any oAuth call: User is created in the DB.
For login and UI: Separate project will be created in any of the {Vue.js/React Native/Angular.js} in future.


Create a Wikipedia Clone

Is your feature request related to a problem? Please describe.
Yes, this is related to the problem this project deals with
Describe the solution you'd like.
I will use HTML, JS, CSS
Describe alternatives you've considered.

Add any other context or screenshots about the feature request here.

Assigned to you @Kumar-laxmi


Auth - SignUp - Callback does not fire

When i call the auth2.signIn() function i see the following result in my network tab:
GET https://accounts.google.com/o/oauth2/iframerpc?action=issueToken...
Status Code 200
{"error":"USER_LOGGED_OUT","detail":"No active session found."}
But the error Callback of my auth2.signIn(...) function is never called.
My Code should work because i get the popup_closed_by_user  error callback.
Anyone knows how to solve the USER_LOGGED_OUT error?
And i guess the error callback should be called.
My code looks something like this...
...

    gapi.load('auth2', () => {
      console.log('load:auth2');
      this.initAuth2();
      this.initListeners();
    });
...

private initAuth2() {
    console.log('initAuth2');
    this.auth2 = gapi.auth2.init({
      client_id: '###',
      scope: 'profile'
    });
  }

public signIn(): Promise<any> {
     const options = new gapi.auth2.SigninOptionsBuilder();
        options.setPrompt('select_account');
        this.auth2.signIn(options).then((user) => {
          console.log(user);
          resolve(user);
        }, (err) => {
          console.log(err);
          reject(err);
        // });
      })
...

in which browser you see this error? Does your code work on other browsers?
"USER_LOGGED_OUT" means there is no active sessions in google.com. In this case, you should display the Google Sign In button, to allow end user to open a popup and log into google firstly.

Hey.
After hours of debugging i was found the problem.
I recentrly installed ghostery browser plugin (blocks tracking and ad scripts)
Login Worked in all Browsers except for chrome (where ghostery was installed)
So somehow ghostery caused this "USER_LOGGED_OUT" error.
But anyway the error callback was never called for the error i mentioned above.
so i guess that should be fixed :)

Good to know your problem has been resolved.
We already have another bug to track the callback issue: https://github.com/google/google-api-javascript-client/issues/385

Hey @kongguibin @dominikstrasser I'm having this issue with ghostery, is there a fix for it?


Spam Video ID Submission

Duplicate Links

[X] Yes, I checked that the ID is not currently in the list
[X] I read the wiki explaining each different categories and examples before submitting

(Required) Spam Comment Direct Link
https://www.youtube.com/watch?v=eZYtnzODpW4&lc
(Optional) Screenshot of comments using the link

(Required) List of the spam video IDs / Links
IinfCdbOSUw&t
F2_qmGRVB24
BcncZTcfeus
18tyjlgE33A
xlb3B26NDBg
A4R8AFKsP2E
CdoDsLfsrY4
_2AsFZjJN2A
mTkRzwfm7O8
k8McH9rKPTE
rUJZC-CdRlc

These comments are quite old, I'd rather only add videos that are actively being spammed within the past couple weeks or so. Especially since the script can already detect comments that only contain a video link and nothing else.


Amp\Dns\TimeoutException

This may be the issue with my set up and not a bug, but I am not sure where I can ask for help.
I am following the basic example here: https://amphp.org/websocket-client/
Running on my Windows 10 Dev PC.
I am getting Uncaught Amp\MultiReasonException: Multiple errors encountered; use Amp\MultiReasonException::getReasons() to retrieve the array of exceptions thrown in \vendor\amphp\amp\lib\functions.php:540
Looking into the error, I found some issue with my DNS.
Amp\Dns\TimeoutException No response for 'ftx.com' (A) from any nameserver within 3000 ms after 2 attempts, tried udp://<IP_ADDRESS>:53, udp://<IP_ADDRESS>:53
Not sure what I can do to resolve this. I have no problems running a websocket client on Javascript.

@jclee100 You can open issues here or on StackOverflow, either is fine.
Is <IP_ADDRESS> the expected DNS server for your setup? You can check the system config following this article.

ipconfig /all
returns
DNS Servers . . . . . . . . . . . : <IP_ADDRESS>

So it's indeed querying the wrong server. Could you have a look at the registry and see where <IP_ADDRESS> and <IP_ADDRESS> are listed? You can find the keys Amp looks for here: https://github.com/amphp/dns/blob/920eb4786ba90c4241ca2dc09d855c6f7b5aed3a/lib/WindowsConfigLoader.php#L23


pep8 conversion on python algorithms #2

Description
pep8 conversion on python algorithms, second batch
Related Issue
NA
Motivation and Context
pep8 project
Requires Documentation Change
NA
How Has This Been Tested?
regression tests
Types of changes

[ ] Bug fix (non-breaking change which fixes an issue)
[X] Refactor (non-breaking change which improves implementation)
[ ] Performance (non-breaking change which improves performance. Please add associated performance test and results)
[ ] New feature (non-breaking change which adds functionality)
[ ] Breaking change (fix or feature that would cause existing functionality to change)
[ ] Non-functional change (xml comments/documentation/etc)

Checklist:

[X] My code follows the code style of this project.
[X] I have read the CONTRIBUTING document.
[X] I have added tests to cover my changes.
[X] All new and existing tests passed.
[X] My branch follows the naming convention bug-<issue#>-<description> or feature-<issue#>-<description>

Known issue:
type object is not subscriptable in Algorithm.Python/BasicTemplateFuturesFrameworkAlgorithm.py &  BasicTemplateFuturesFrameworkWithExtendedMarketAlgorithm.py


Missing important files

Still waiting on brutus's next release...

You might wanna take a look at:
https://github.com/0xdea/tactical-exploitation/blob/master/poriluk.py
https://github.com/0xdea/tactical-exploitation/blob/master/easywin.py
For your other more standard brute force needs, you should use one of these instead:
https://github.com/vanhauser-thc/thc-hydra
https://github.com/lanjelot/patator


Crash on C.lua_error call

Hi!
I really like this project so I spend more time on it and noticed that if I have:
type Vector2 struct {
	X, Y float64
}

func New() *Vector2 {
	return &Vector2{}
}

And then try to do:
local v1 = vector2.new()
v1.t = 1

I get:

fatal error: exitsyscall: syscall frame is no longer valid
goroutine 1 gp=0xc0000061c0 m=0 mp=0x644780 [syscall, locked to thread]:
runtime.cgocall(0x4e7c40, 0xc000119928)
..../.gobrew/current/go/src/runtime/cgocall.go:157 +0x4b fp=0xc000119900 sp=0xc0001198c8 pc=0x40b64b
github.com/rosbit/luago._Cfunc_lua_error(0x123e058)
_cgo_gotypes.go:290 +0x47 fp=0xc000119928 sp=0xc000119900 pc=0x4dbf87
github.com/rosbit/luago.go_struct_set.func7(0x123e058)
.../luago-test/luago/go-meta-value.go:351 +0x3b fp=0xc000119960 sp=0xc000119928 pc=0x4e235b
github.com/rosbit/luago.go_struct_set(0x123e058, {0x52a100?, 0xc000014150?, 0x13?})
.../luago-test/luago/go-meta-value.go:351 +0x2f2 fp=0xc000119a18 sp=0xc000119960 pc=0x4e2192
github.com/rosbit/luago.go_obj_set(0x123e058)
.../luago-test/luago/go-meta-value.go:477 +0xe5 fp=0xc000119a58 sp=0xc000119a18 pc=0x4e2ee5
_cgoexp_0f81209084c0_go_obj_set(0x7ffef4783d0c)
_cgo_gotypes.go:653 +0x1e fp=0xc000119a70 sp=0xc000119a58 pc=0x4e6e9e
runtime.cgocallbackg1(0xc0000061c0, 0x43c8e0, 0xc0000061c0)
..../.gobrew/current/go/src/runtime/cgocall.go:403 +0x2a5 fp=0xc000119b30 sp=0xc000119a70 pc=0x40bd85
runtime: g 1: unexpected return pc for runtime.cgocallbackg1 called from 0xc000119b38
stack: frame={sp:0xc000119a70, fp:0xc000119b30} stack=[0xc000118000,0xc00011a000)
0x000000c000119970:  0x0000000000000013  0x000000c000014178
0x000000c000119980:  0x000000c0001199e0  0x00000000004db36c <github.com/rosbit/luago.(*ptrStore).lookup+0x00000000000000cc>
0x000000c000119990:  0x0000000000525a60  0x000000c0001081b0
0x000000c0001199a0:  0x000000c000000004  0x0000000000000001
0x000000c0001199b0:  0x0000000000000199  0x000000000051ec00

Row number might be a bit off since I've edited it a bit. But it's this part:
	fv := structE.FieldByName(name)
	if !fv.IsValid() {
		pushString(ctx, "name not found")
		C.lua_error(ctx) // <-- here
		return 1
	}

Is this something that you can look into?
The idea here is that it should just report that "t" doesn't exist or some sort, but as you can see, this becomes a crash. It would be nice if this was handled more gracefully.
Thanks!

I know it doesn't have the field name t. The point here is to handle it gracefully. Like doing:
	fv := structE.FieldByName(name)
	if !fv.IsValid() {
		pushString(ctx, fmt.Sprintf("%s not found", name))
		C.lua_error(ctx)
		return 1
	}

But the problem is the C.lua_error(ctx) call where we get this crash.

Good suggestion. I update it. Thank you.

But that didn't fix the crash.

Crash occurs only in development scenarios. In production environment, such codes like v1.t = 1 should be revised or removed.
If no crash occurs, I am afraid that bad assigning action will be ignored easily, and luago doesn't know how to process the rest codes.

So, the idea is that if someone writes Lua code that uses a member in a Go struct that doesn't exist, one should get a nice little error message about it, not crash. Is there no way to do this so it doesn't crash?

lua_error in cgo  will crash. After all there's difference between C and cgo.
Do you want to use luago in application for users who can write lua codes? In such case, my suggestion is pure go lua implementation is your choice.
For myself, both application and embedding lua codes are written by myself. So lua_error doesn't matter me.

Can you explain why it crashes? Why would stacking an error message crash the Lua runtime? Shouldn't the stacking of a message and calling C.lua_error just print some stack trace and exit(1)?

Good idea.  Stack tracing message is printed before calling C.lua_error.

Yay! That seems to work! No crash now!

------
key "t" not found
stack traceback:
	vector-test.lua:9: in main chunk
------
fatal error: exitsyscall: syscall frame is no longer valid

goroutine 1 gp=0xc0000061c0 m=0 mp=0x6427a0 [syscall, locked to thread]:
runtime.cgocall(0x4e6b40, 0xc000117960)
...

So the output works but as soon as we call C.lua_error(ctx) we get the crash.

~Yay! That seems to work! No crash now!~
Edit: Scratch that. I didn't have the C.lua_error(ctx) call in my test here. If I remove that call it works fine. It still crashes if the call to C.lua_error(ctx) is made.

That's true. If you don't want to crash in such cases, you can fork the codes and remove the C.lua_error(ctx).

Will do! Thanks!


Using DynaSim in Octave

So I tried getting DynaSim working in Octave and wanted to document my progress here.
I tried 3 different approaches based on the instructions here (https://github.com/DynaSim/DynaSim/wiki/Frequently-Asked-Questions#high-performance-computing-hpc-linux-cluster-faq). For the first 2 approaches, I was not able to get Octave to load. For the 3rd approach, I was able to load Octave and tried running dsDemos. However, it threw an error on line 23 of the demo script. See below.
Did anyone else get further than me using Octave? @kupiqu , what is your setup for running Octave? It seems, at least for me, to be a bit more complicated than I would have expected.
EDIT: I thought the issue might be something in my .bashrc or .bash_profile files, so I tried deleting (renaming) these files and starting a fresh terminal session. Unfortunately, I still go the same error messages. Starting a bash session with bash --norc produced similar a result.
Here is the output from my 3 approaches:
1. Running Octave on login node with loading modules. Here's what I did:
stanleyd@scc2:~$ module use /share/module/centos7
stanleyd@scc2:~$ module load octave/4.2.1
stanleyd@scc2:~$ octave
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: error while loading shared libraries: libhdf5.so.8: cannot open shared object file: No such file or directory
stanleyd@scc2:~$ octave
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: error while loading shared libraries: libhdf5.so.8: cannot open shared object file: No such file or directory

Result: could not get Octave running

2. Running Octave in an interactive session on a CentOS node. Here's what I did:
stanleyd@scc2:~$ qrsh -l centos7=TRUE

********************************************************************************
          This machine is governed by the University policy on ethics.
            http://www.bu.edu/tech/about/policies/computing-ethics/

                   This machine is owned and administered by
                               Boston University.

 See the Research Computing web site for more information about our facilities.
                   http://www.bu.edu/tech/support/research/

                    For Cluster specific documentation see:
       http://www.bu.edu/tech/support/research/computing-resources/scc/

        Please send questions and report problems to<EMAIL_ADDRESS>
********************************************************************************

stanleyd@scc-wi3:~$
stanleyd@scc-wi3:~$  module use /share/module/centos7
stanleyd@scc-wi3:~$  module load octave/4.2.1
stanleyd@scc-wi3:~$
stanleyd@scc-wi3:~$
stanleyd@scc-wi3:~$ octave
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctgui.so.2)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /lib64/libGraphicsMagick++-Q16.so.12)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/arpack/lib/libarpack.so.2)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/liblapack.so.3)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/libblas.so.3)
stanleyd@scc-wi3:~$

Result: Octave fails to load.

3. Running Octave on login node:
stanleyd@scc2:~$ octave
GNU Octave, version 3.4.3
Copyright (C) 2011 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type `warranty'.

Octave was configured for "x86_64-redhat-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/help-wanted.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.

For information about changes from previous versions, type `news'.

warning: dispatch is obsolete and will be removed from a future version of Octave; please use classes instead
octave:1>
octave:1>
octave:1> ver
----------------------------------------------------------------------
GNU Octave Version 3.4.3
GNU Octave License: GNU General Public License
Operating System: Linux 2.6.32-696.10.3.el6.x86_64 #1 SMP Tue Sep 26 18:14:22 UTC 2017 x86_64
----------------------------------------------------------------------
Package Name  | Version | Installation directory
--------------+---------+-----------------------
       image *|  1.0.14 | /usr/share/octave/packages/image-1.0.14
      octcdf *|   1.1.2 | /usr/share/octave/packages/octcdf-1.1.2

octave:2> cd ~/src2/
octave:6> cd DynaSim/
octave:9> cd demos
octave:10> % Add DynaSim to path if it's not already there
octave:10> if exist('setupDynaSimPath','file')
>     setupDynaSimPath;
> else
>     error('Add the DynaSim folder to the MATLAB path - e.g.) addpath(genpath(''/path/to/dynasim''))');
> end
octave:11>
octave:11> % Set where to save outputs
octave:11> output_directory = dsGetConfig('demos_path');
warning: meaning may have changed due to change in precedence for && and || operators
parse error near line 751 of file /projectnb/crc-nak/stanley/model-dnsim-kramer_IB/DynaSim/functions/dsSimulate.m

  syntax error

>>> if isempty(options.studyinfo)
      ^

error: called from:
error:   /usr/share/octave/3.4.3/m/help/which.m at line 29, column 7
error: evaluating argument list element number 1
error: evaluating argument list element number 1
error:   /projectnb/crc-nak/stanley/model-dnsim-kramer_IB/DynaSim/functions/internal/dsGetRootPath.m at line 3, column 14
error: evaluating argument list element number 1
error:   /projectnb/crc-nak/stanley/model-dnsim-kramer_IB/DynaSim/functions/internal/dsGetConfig.m at line 6, column 14
octave:11>

Result: Fails on line 23 of dsDemos: output_directory = dsGetConfig('demos_path');

Here are a few resources I found on the DynaSim GitHub for using Octave:
Using Octave
https://github.com/DynaSim/DynaSim/wiki/Frequently-Asked-Questions#high-performance-computing-hpc-linux-cluster-faq
Octave & DynaSim
https://github.com/DynaSim/DynaSim/wiki/GNU-Octave-support-in-DynaSim
https://github.com/DynaSim/DynaSim/wiki/GNU-Octave-vs.-DynaSim-limitations
Relevant issues:
https://github.com/DynaSim/DynaSim/issues/235
https://github.com/DynaSim/DynaSim/issues/311
https://github.com/DynaSim/DynaSim/issues/260

Hi Dave, I'm happy you tried, but certainly it is disappointing that you didn't get it to work... Please see if the instructions below help you:
There are two steps you must do before trying to launch GNU Octave 4.2.1 in SCC:

Edit your bash profile ~/.bash_profile and add these lines:

module use /share/module/centos7
module load octave/4.2.1

Login in a centos 7 node:

qrsh -l centos7=TRUE
Once inside you should be able to enter into GNU Octave by running octave-cli in the terminal
Please let me know if these steps work for you as they do for me...
If you can succesfully launch Octave, we can then see how to run DynaSim in it...

Oops I think I wrote too fast before... corrected what I really meant

From your 3 options, option 2 is the proper one (but somehow it failed for you :/). The difference wrt my instructions is that you manually loaded the modules instead of adding them to your bash profile so they are loaded automatically.
Then, you launched Octave by running octave in the terminal. This is in principle fine but tries to run Octave in its GUI, which is not possible in the SCC node:
This is what happens when I do that:
octave: X11 DISPLAY environment variable not set
octave: disabling GUI features
GNU Octave, version 4.2.1
Copyright (C) 2017 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

If instead you run octave-cli (command line interface), the GUI problem is avoided:
GNU Octave, version 4.2.1
Copyright (C) 2017 John W. Eaton and others.
This is free software; see the source code for copying conditions.
There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  For details, type 'warranty'.

Octave was configured for "x86_64-pc-linux-gnu".

Additional information about Octave is available at http://www.octave.org.

Please contribute if you find this software useful.
For more information, visit http://www.octave.org/get-involved.html

Read http://www.octave.org/bugs.html to learn how to submit bug reports.
For information about changes from previous versions, type 'news'.

I am not quite sure why you got something different when trying to run Octave in your option number 2... can you try following the same steps but launching Octave with octave-cli instead?

Wondering, are you using a GUI-friendly connection with the cluster, vnc or sth like that? it may be that IT installed only the libraries to launch octave-cli.
If the session is ssh it doesn't really matter if you run octave or octave-cli as the display is disabled anyway, but perhaps in vnc or alike it really tries to start octave gui and fails miserably.
That would explain why I can run it and you cannot, I guess...

My bashrc
# # Load BU SCC Modules
# Stuff for making git compatible with submodules
module load git/2.6.3
module load libcurl

# Stuff for running Octave
module use /share/module/centos7
module load octave/4.2.1

Current modules
stanleyd@scc2:~$ module list
Currently Loaded Modulefiles:
  1) matlab/2017a     2) git/2.6.3        3) libcurl/7.48.0   4) octave/4.2.1
stanleyd@scc2:~$

Start interactive session
stanleyd@scc2:~$ qrsh -l centos7=TRUE
Run octave:
stanleyd@scc-wi1:~$ octave-cli
octave-cli: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /lib64/libGraphicsMagick++-Q16.so.12)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/arpack/lib/libarpack.so.2)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/liblapack.so.3)
octave-cli: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/libblas.so.3)
stanleyd@scc-wi1:~$
stanleyd@scc-wi1:~$

Check modules and try running normal octave:
stanleyd@scc-wi1:~$ module list
Currently Loaded Modulefiles:
  1) matlab/2017a     2) git/2.6.3        3) libcurl/7.48.0   4) octave/4.2.1
stanleyd@scc-wi1:~$ octave
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctgui.so.2)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.18' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctinterp.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /share/pkg/octave/4.2.1/install/lib/octave/4.2.1/liboctave.so.4)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libstdc++.so.6: version `GLIBCXX_3.4.15' not found (required by /lib64/libGraphicsMagick++-Q16.so.12)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /share/pkg/octave/4.2.1/install/arpack/lib/libarpack.so.2)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/liblapack.so.3)
/share/pkg/octave/4.2.1/install/libexec/octave/4.2.1/exec/x86_64-pc-linux-gnu/octave-gui: /usr/local/matlab/sys/os/glnxa64/libgfortran.so.3: version `GFORTRAN_1.4' not found (required by /lib64/libblas.so.3)
stanleyd@scc-wi1:~$

It looks like there is some conflict Matlab modules / environment variables I have loaded. I'll try resetting things and see if it helps.

Ok, I had the following in my .bashrc, which I was using to allow me to compile Matlab.
# Compiled Matlab: Library path for running
# insert the following to your .bashrc file
# source .bashrc to make the additions effective for current session
# points to system default version of matlab
MCRROOT=/usr/local/matlab
LD_LIBRARY_PATH=${MCRROOT}/runtime/glnxa64 ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/bin/glnxa64 ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRROOT}/sys/os/glnxa64;
MCRJRE=${MCRROOT}/sys/java/jre/glnxa64/jre/lib/amd64 ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/native_threads ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/server ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE}/client ;
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${MCRJRE} ;

Removing this and replacing it with
LD_LIBRARY_PATH=/share/pkg/octave/4.2.1/install/openblas/lib:/share/pkg/octave/4.2.1/install/suitesparse/lib:/share/pkg/libcurl/7.48.0/install/lib
seems to have solved the problem.
I'll resume testing DynaSim now.

Mmm, ok. I don't think I had to do all these things....
Could it be because of Matlab 2017a instead of Matlab 2017b? Btw, any reason you prefer 2017a?

Also first thing I load is the Octave stuff, maybe that helps, somehow?!?
Anyway, if we cannot figure it out in a robust way tomorrow, perhaps it's better to ask IT about it.

Oh, I see you got it working, missed that part...
For DynaSim test, please follow these steps:

use the dev branch
run dsDemos_cluster_noGUI_noVerbose

You may found 'controled' errors due to missing Octave packages, I'm trying to get the list of those, and you will be able to install them internally to Octave this way:
pkg install -forge package_name

I realize that I have to update the wiki with all this info... Once we get DynaSim working for you in Octave, I will...

Just to let you know that I updated the guideline (above) for getting DynaSim working in GNU Octave

Messed the package dependencies before, it should all be ok, now

Sure, thanks for all the feedback. I'll try running dsDemos_cluster_noGUI_noVerbose tomorrow.

By the way, have you encountered errors with verLessThan before? From playing around a bit in Octave (just running the default dsDemos script), I've seen this error come up a few times, but haven't been able to isolate it.
I also download a pre-compiled Octave bundle for Mac (Octave v4.0.3), so I'll try this one out tomorrow as well.

By the way, have you encountered errors with verLessThan before? From playing around a bit in Octave (just running the default dsDemos script), I've seen this error come up a few times, but haven't been able to isolate it.

To avoid those problems, DynaSim should use UIverlessthan, which is Matlab and Octave compatible:
DynaSim/functions/dependencies/UIverlessthan.m

I also download a pre-compiled Octave bundle for Mac (Octave v4.0.3), so I'll try this one out on my laptop tomorrow as well.

Could you please follow this guide and install Octave 4.2.1 instead (Octave 4.0.3 is not supported. I tested it in the cluster before and raised many errors).
http://www.schoeps.org/home/2017/10/octave-on-macos-with-gui/


fix specs for ruby 3 treatment of hash arg

Just fixes ruby 3.0+ failures with specs expecting intracoversion between final hash argument and keyword args.

Just FTR, this is not Ruby 3.x, but https://github.com/rspec/rspec-mocks/pull/1394 / https://github.com/rspec/rspec-mocks/issues/1460

@voxik Ah! thanks - makes sense - feel free to rename to make more sense.

I'm closing this in favour of joint PR #780 as per https://github.com/rails/thor/issues/781#issuecomment-1059234876


Possible memory-leak feedback loop?

Not that it probably matters that much, since taking down the relay is fairly pointless for anyone to actually do. But reading through the code, I noticed something in the cleaning process that I think keeps all applications, ever, in memory.
https://github.com/warner/magic-wormhole-mailbox-server/blob/60c924a28c35370a9904bd63b28da49591aa92fb/src/wormhole_mailbox_server/server.py#L589-L596
Because get all apps is used, every app_id from the db is loaded, and then through app = self.get_app(app_id) it is put into the dictionary, spawning the object.
Since the apps dictionary itself is never pruned, any nefarious script kiddie could just ping made up apps all day long filling the dictionary right?
I suppose the fix would be during pruning to get the remaining in-use applications after mailbox/nameplate pruning, then clean out the dictionary from there.

Hmm.. I'd have to think about it. If there are any active channels for an appid (any open nameplates, mailboxes, or messages), then yeah get_all_apps() will make sure there's an AppNamespace instance for it. If nobody has used that appid for a while, the DB rows for its nameplates/mailboxes/messages should get pruned, and after that point, get_all_apps() should stop returning it.
The AppNamespace object will still exist in self._apps for as long as the process runs, but it ought to be empty (specifically its self._mailboxes dict should be empty once they're all pruned). So it consumes a little space, but not a lot, and only until the next time the server crashes :). Looking at my logs, apparently I reboot the public mailbox server about once every two weeks, on average, mostly for OS upgrades of some sort.
But yeah, I think you're right, someone could consume a chunk of memory by looping through all possible appids and just opening a mailbox on each one. They'll get removed after 20-ish minutes, but the memory will be used up for as long as they care to continue the attack.
prune_all_apps() should probably be named something like prune_contents_of_all_apps() instead.. maybe we should have another function that looks for AppNamespace instances that are empty, and delete them.

Yeah seems like a minor issue if it really is one. I was mostly pointing out that the first step of that function is too get all the app IDs from the database before pruning. And since self.get_app(app_id) will create the in-memory dictionary for the IDs, an object is spawned. Only at the end of the function does the DB actually get pruned, but never the in-memory cache. So if I'm reading the logic correctly, the Server's self._apps dictionary only grows and never shrinks.
Tiny memory footprint of course. And a restart will obviously clear that right up :)


macOS: missing custom title bar when restoring multiple windows

Steps to Reproduce:

configure in settings to restore fullscreen windows
open 2 windows fullscreen
quit
startup

=> only the one window goes into fullscreen, not the other (this is a electron limitation: https://github.com/microsoft/vscode/issues/148698). but the window that is not in fullscreen has misaligned control buttons:

In fact the custom title bar seems to not be there.

thanks for the repro, I've never seen this but I've seen it mentioned with no reliable repro.

Yeah I think @jrieken was seeing this and reported it if I recall correctly.


Discuss generic solutions for the following

Discussion needed to find generic solutions of the following, vote for all that applies then we could open them up to separate issues and rediscuss.

[ ] Adding some personally identifiable information to the schema.This is a subject to internationalization and localization.

[ ] Find generic ways to support multiple languages over the schema which can further be used for converting to different forms of languages.This is a subject to internationalization.

[ ] Add additional personnel master data e.g. DOB,Citizenship etc.

[ ] To represent current work in the work section :
can we use endDate as null while having an option at the editor as "presently work here " that will  mark endDate as null by itself and can be updated anytime when it is no more an organization where the person currently works.

I don't like personally identifiable information, but in some countries it's necessary, but in some illegal. So I would move that into a special subsection. And in the editor hide it with a note that filling it out might not be necessary and asking for this data might also be illegal. Basically supporting people not knowing their rights. Might even link to some wikipedia site for clairification.

The best solution I found was actually having one base language and then substituting strings within the metadata section. Basically the base languages is the one holding the most data and the rest is basically string translation by a tool. Either this can be directly integrated into the editor ui or we provide a separate tool. In the issue there is one suggestion about how this might work in the metadata section.
Another idea was to use a separate schema file per language,. It makes the schema file itself cleaner, but might lead to outdated versions. Having one schema file we could easily notify the user that languages x and y are out of date and the following strings need to be translated or something like that.

Not sure on the specifics. Definitely would like more context on this.

Please also add your opinion and ideas. I might be biased having worked on it for a long time. So I might not see the easiest/best solution.

1- +1

I find the use of metadata section more appropriate as it does not create multiple schema files for the same data.Using multiple schema files for the same schema data would occupy more space in the storage in the long run for the data that we already have in one language.

Would say rediscuss after v1


Fix index.json

Smh strenche

Repository has been deleted. For future PR's, please put a proper title and description, otherwise they will be declined.


Can't strip dead people

I think that is illegal but still errors "He/She/They can't unequip that"

Fixed by #1704


circleci: Remove Xenial CI suite and run frontend tests on bionic.

Branched out from #14278.

Merged as the series ending with c1f7a1878e7f39d5022522119535791d9f13fe82, after reordering and some commit message tweaks.  Thanks @amanagr!
I think there's an immediate follow-up we should do to docs/development to stop advertising Xenial as a supported platform in the development environment; and then also to the tools/provision toolchain to drop support for it.


Overheating and Sileo issues

Device Model
iPad Air 5
iOS Version
17.0
Bootstrap Version
Beta 1.2.6
Serotonin Version
No response
What happened
After installing bootstrap and installing some small tweaks and apps I noticed my device started heating up real bad, I tried removing some tweaks that I thought were the issue but it didn’t help, I also tried disabling tweaks and URL schemes in bootstrap but it didn’t help…
I also have an issue with Sileo where after I put some tweaks in queue the queue list just goes missing, I assume it’s off screen somewhere because when I flip the screen I can see like the side of it but can’t click anything, and if I click on the queue button on a tweak it just turns the screen gray. The search bar also breaks after I search something.
Also does anybody know how I can disable bootstrap without uninstalling?
Log output
No response
Acknowledgement of README and FAQ

[X] I have read both the README and the FAQ.

enable the sKiBi4Div2 label

1: Install CocoaTop from the roothide repo and use it to see the CPU usage of processes (click on the "%" in the table header to sort)
2: Regarding Sileo, there may be some potential bugs on iPad, can you record a video for us to analyze?

It seems like there were some Filza leftovers and one plist that was using 99% cpu, I deleted those and termed the process and ima check now if it fixed the heating issue.
I will send the Sileo video later it sometimes works sometimes doesn’t

what plist using 99%???

I killed it before taking a picture but it was some weird Filza file or
something, if you can give me a picture of that app’s processes I might be
able to point out
On Sun, 8 Sep 2024 at 17:01 roothider @.***> wrote:

what plist using 99%???
—
Reply to this email directly, view it on GitHub
https://github.com/roothide/Bootstrap/issues/276#issuecomment-2336697598,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKRXGATNM5VSVAAQNALLF5TZVRKEXAVCNFSM6AAAAABN223ZNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGY4TONJZHA
.
You are receiving this because you authored the thread.Message ID:
@.***>

I killed it before taking a picture but it was some weird Filza file or something, if you can give me a picture of that app’s processes I might be able to point out
…
On Sun, 8 Sep 2024 at 17:01 roothider @.> wrote: what plist using 99%??? — Reply to this email directly, view it on GitHub <#276 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRXGATNM5VSVAAQNALLF5TZVRKEXAVCNFSM6AAAAABN223ZNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMZWGY4TONJZHA . You are receiving this because you authored the thread.Message ID: @.>

please to give us details if it happens again

is the Filza installed in trollstore or from roothide repo in sileo?

is the Filza installed in trollstore or from roothide repo in sileo?

It was installed from sileo with the special roothide patch

it happens again

ok take a screenshot it happens again

Regarding the Sileo issue.
https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

Regarding the Sileo issue. https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

whats your device language?

Regarding the Sileo issue. https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

whats your device language?

Oh its an old enchanting table language, also known as Hebrew 😂

Regarding the Sileo issue. https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

whats your device language?

Oh its an old enchanting table language, also known as Hebrew 😂

👌 i will test, before that you can try running Sileo in iphone view via Stage Manager on ipad

Regarding the Sileo issue. https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

whats your device language?

Oh its an old enchanting table language, also known as Hebrew 😂

👌 i will test, before that you can try running Sileo in iphone view via Stage Manager on ipad

And I assume opening the app and putting it to the side should work too? (like the multitasking thing)

Regarding the Sileo issue. https://github.com/user-attachments/assets/5ff8f588-2356-4117-89ad-4293d0230b1a

whats your device language?

Oh its an old enchanting table language, also known as Hebrew 😂

👌 i will test, before that you can try running Sileo in iphone view via Stage Manager on ipad

And I assume opening the app and putting it to the side should work too? (like the multitasking thing)

yes, the bug comes from when you return to sileo from the patcher, the taskbar in the right buttom disappears

unfortunately I was not able to reproduce this bug on iPad Air (ios16), Perhaps you could provide more details on how to trigger this bug?

Usually it happens when I return from the patcher, but then again it sometimes works sometimes doesn’t…
Does Sileo got a log file somewhere I can share?

Usually it happens when I return from the patcher, but then again it sometimes works sometimes doesn’t… Does Sileo got a log file somewhere I can share?

Sileo itself does not have log output, if you have macos I can send you a version of Sileo that adds log output.
I have two guesses about this issue:
1: this may be related to the language of the system settings (representing the UI layout direction). You can try to change the system language to English to see if this bug is still triggered.
2: this may be related to ios17. I used Bootstrap to test it on an ipad air5 (ios16) but failed to reproduce this bug.

I finally figured it out. when you rotate the iPad screen, the view size of the sileo changes, and the Task Bar at the bottom switches between inline and float. When you rotate the screen multiple times quickly, it may trigger a bug that causes the Task Bar to no longer appear.

I finally figured it out. when you rotate the iPad screen, the view size of the sileo changes, and the Task Bar at the bottom switches between inline and float. When you rotate the screen multiple times quickly, it may trigger a bug that causes the Task Bar to no longer appear.

Do you know if it's fixable?

try this beta, should be fixed:
https://cdn.discordapp.com/attachments/1002450165443072041/1282774333374205995/org.coolstar.sileo_2.5-15_iphoneos-arm64e.deb?ex=66e09431&is=66df42b1&hm=b96a935adaf9c9a1048978c0aecc047d3acdd0e201c006125a117e79b86d302d&

try this beta, should be fixed:
https://cdn.discordapp.com/attachments/1002450165443072041/1282774333374205995/org.coolstar.sileo_2.5-15_iphoneos-arm64e.deb?ex=66e09431&is=66df42b1&hm=b96a935adaf9c9a1048978c0aecc047d3acdd0e201c006125a117e79b86d302d&

Can I switch to my previous language?

try this beta, should be fixed:
https://cdn.discordapp.com/attachments/1002450165443072041/1282774333374205995/org.coolstar.sileo_2.5-15_iphoneos-arm64e.deb?ex=66e09431&is=66df42b1&hm=b96a935adaf9c9a1048978c0aecc047d3acdd0e201c006125a117e79b86d302d&

Can I switch to my previous language?

sure, It now supports RTL languages better

try this beta, should be fixed:
https://cdn.discordapp.com/attachments/1002450165443072041/1282774333374205995/org.coolstar.sileo_2.5-15_iphoneos-arm64e.deb?ex=66e09431&is=66df42b1&hm=b96a935adaf9c9a1048978c0aecc047d3acdd0e201c006125a117e79b86d302d&

Can I switch to my previous language?

sure, It now supports RTL languages better

Is this Deb file already converted or do I need to do that?

try this beta, should be fixed:
https://cdn.discordapp.com/attachments/1002450165443072041/1282774333374205995/org.coolstar.sileo_2.5-15_iphoneos-arm64e.deb?ex=66e09431&is=66df42b1&hm=b96a935adaf9c9a1048978c0aecc047d3acdd0e201c006125a117e79b86d302d&

Can I switch to my previous language?

sure, It now supports RTL languages better

Is this Deb file already converted or do I need to do that?

its a roothide package, just install it via sileo/zebra/filza directly, then relaunch sileo app

It seems like the queue tab is fixed now but the search bar still breaks

whats wrong with it?  can you take a video?

Here
https://github.com/user-attachments/assets/3c89dfe4-eb57-40b8-89e4-4e40ab26b513

Also I tried installing the iGameGod app and I got this weird log (it also took some time to install)
Reading package lists... Building dependency tree... Reading state information... The following packages were automatically installed and are no longer required:   arpoison libnet9 libpcapa network-cmds p7zip unrar unzip ws.hbang.alderis   zip Use 'apt autoremove' to remove them. The following NEW packages will be installed:   com.gamegod.igg.rootless 0 upgraded, 1 newly installed, 0 to remove and 55 not upgraded. After this operation, 206 MB of additional disk space will be used. Selecting previously unselected package com.gamegod.igg.rootless. (Reading database ... 12645 files and directories currently installed.) Preparing to unpack .../com.gamegod.igg.rootless_0.4.3_iphoneos-arm64e.deb ... Unpacking com.gamegod.igg.rootless (0.4.3) ... Setting up com.gamegod.igg.rootless (0.4.3) ... Rootless No matching processes were found Processing triggers for org.coolstar.sileo (2.5-15) ... Processing triggers for uikittools (2.1.6-2) ... Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Error: sizeofcmds is not a multiple of 8. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Error: sizeofcmds is not a multiple of 8. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x3f0. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x544. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x258. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x324. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Ignoring unknown command: 0x3ac. Error: sizeofcmds is not a multiple of 8. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Ignoring unknown command: 0x4bc. Updating Icon Cache

the package need to be update

Here
RPReplay_Final1726166266.mp4

I still don't understand what's going on
And why is your search bar in the middle of the screen instead of on the left?
And I assume your system language is set to Hebrew, and you changed the app language in Sileo, right?

Yea my system language is it Hebrew, and I didn’t change any settings in
Sileo…
And that’s exactly what I’m asking why the search bar is bugged…
On Fri, 13 Sep 2024 at 1:21 roothider @.***> wrote:

Here
RPReplay_Final1726166266.mp4
I still don't understand what's going on
And why is your search bar in the middle of the screen instead of on the
left?
And I assume your system language is set to Hebrew, and you changed the
app language in Sileo, right?
—
Reply to this email directly, view it on GitHub
https://github.com/roothide/Bootstrap/issues/276#issuecomment-2347342392,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKRXGAWYTZJPOBNQQNALZQDZWIHU7AVCNFSM6AAAAABN223ZNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBXGM2DEMZZGI
.
You are receiving this because you authored the thread.Message ID:
@.***>

Can you describe in detail what is wrong with your search bar? I don't see any functional issues in your video (except that it is not displayed on the left).
and check language setting in Sileo->Featured Page-> Your personal Icon on the left-top ->Settings->Language

My language is set to English, and the issue is the search bar keeps
randomly glitching out. As you can see in the video I had to click on a
random spot to start writing again and the cancel or X buttons won’t work
On Fri, 13 Sep 2024 at 4:58 roothider @.***> wrote:

Can you describe in detail what is wrong with your search bar? I don't see
any functional issues in your video (except that it is not displayed on the
left).
and check language setting in Sileo->Featured Page-> Your personal Icon on
the left-top ->Settings->Language
—
Reply to this email directly, view it on GitHub
https://github.com/roothide/Bootstrap/issues/276#issuecomment-2347893183,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AKRXGAUJFIP7EECANKXFKZDZWJBDRAVCNFSM6AAAAABN223ZNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBXHA4TGMJYGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

My language is set to English, and the issue is the search bar keeps randomly glitching out. As you can see in the video I had to click on a random spot to start writing again and the cancel or X buttons won’t work
…
On Fri, 13 Sep 2024 at 4:58 roothider @.> wrote: Can you describe in detail what is wrong with your search bar? I don't see any functional issues in your video (except that it is not displayed on the left). and check language setting in Sileo->Featured Page-> Your personal Icon on the left-top ->Settings->Language — Reply to this email directly, view it on GitHub <#276 (comment)>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKRXGAUJFIP7EECANKXFKZDZWJBDRAVCNFSM6AAAAABN223ZNCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGNBXHA4TGMJYGM . You are receiving this because you authored the thread.Message ID: @.>

Do you mean you set the system language to English or the language of the sileo app to English?
Does this bug occur every time or does it only occur randomly after certain operations?

My system is in Hebrew and the app is in English.
and this glitch occurs like 90% of the time when I search for something, open the tweak/leave that tab and return

My system is in Hebrew and the app is in English.
and this glitch occurs like 90% of the time when I search for something, open the tweak/leave that tab and return

can you try this to see if it works:
1: disable tweak injection in the settings of Bootstrap
2: relaunch sileo app


Change SQL API to support node-like callbacks

I.e. 1st argument is always an error, and 2nd is the successful data.
This enabled to know when a describeXXX method fails, e.g.
sql.describeGeom('SELECT * FROM foobar', 'the_geom', function(err, data) {
  if (err) throw err;

  console.log(data) // => { simplified_geometry_type: "line", …
})

@xavijam can you review?
cc @alonsogarciapablo

:+1:


Parcel plugin should process existing sourcemaps

The parcel module Lume uses doesn't support passing a source-map. However, it is possible to merge them, and it doesn't look too difficult. See https://github.com/parcel-bundler/parcel-css/issues/219#issuecomment-1173149370.

Ok, I'll take a look.
Thanks!

@oscarotero Update: at the moment, the @parcel/source-map module doesn't work with Deno (See https://github.com/parcel-bundler/source-map/issues/110).

Unpkg serves the code as CommonJS, which Deno doesn't like

May be fixed in https://github.com/parcel-bundler/source-map/pull/111

Esm.sh does serve the code as ESM. But, the way it servers WASM files means that the JS can't import it.

Open issue https://github.com/esm-dev/esm.sh/issues/358

I managed to get it working, by rewriting some of the module locally, but that's not an ideal situation.

Very interesting info, thanks!
I guess we have to wait until this PR is merged: https://github.com/parcel-bundler/source-map/pull/111
Another option is use temporary your fork

ParcelCSS just released a new version with support for incoming source maps.
Using the development version of lume (lume upgrade --dev), this configuration should work:
import lume from "lume/mod.ts";
import postcss from "lume/plugins/postcss.ts";
import parcel_css from "lume/plugins/parcel_css.ts";

const site = lume();

site.use(postcss({
  sourceMap: true
}));
site.use(parcel_css({
  sourceMap: true
}));

export default site;