Pinned_Dependencies check stops on faulty shell files when it is meant to continue

Describe the bug
When the shell parser returns an error the check stops when it should continue to the next file.
Reproduction steps
Steps to reproduce the behavior:
./scorecard --repo=https://github.com/openssl/openssl --checks=Pinned-Dependencies

RESULTS
-------
Aggregate score: ?

Check scores:
|-------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|
| SCORE |        NAME         |             REASON             |                                             DOCUMENTATION/REMEDIATION                                              |
|-------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|
| ?     | Pinned-Dependencies | error parsing shell code:      | https://github.com/ossf/scorecard/blob/71e8698617d25b006cf0935da5e1fb5487bff292/docs/checks.md#pinned-dependencies |
|       |                     | 5:19: a command can only       |                                                                                |
|       |                     | contain words and redirects;   |                                                                                |
|       |                     | encountered (                  |                                                                                |
|-------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|

Expected behavior
Rather than quit on the first faulty shell file the check should continue, process the rest of the files, and still return some score.
Additional context
A simple fix (PR upcoming) gives the following more useful result:
RESULTS
-------
Aggregate score: 6.0 / 10

Check scores:
|--------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|
| SCORE  |        NAME         |             REASON             |                                             DOCUMENTATION/REMEDIATION                                              |
|--------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|
| 6 / 10 | Pinned-Dependencies | dependency not pinned by hash  | https://github.com/ossf/scorecard/blob/71e8698617d25b006cf0935da5e1fb5487bff292/docs/checks.md#pinned-dependencies |
|        |                     | detected -- score normalized   |                                                                                |
|        |                     | to 6                           |                                                                                |
|--------|---------------------|--------------------------------|--------------------------------------------------------------------------------------------------------------------|

Hi @lehors, thanks for starting this issue. I was about to respond to your email on ossf-scorecard-dev@ group, but glad that you started this issue as this is easier to track.
Yes, this is a known issue but its not on our roadmap right now due to resource constraints. Happy to discuss possible solutions and/or review PRs for it. @chrismcgehee who is the most familiar with this code.

I ran into this issue and I think the check should keep going as well.

PR upcoming

@lehors are you planning to add something like https://github.com/ossf/scorecard/pull/1297 to that PR? If so, I'll go ahead and close that PR

The patch to get the check to continue is actually trivial. It took me more time to write the test for it. :-)
I haven't included your fix @evverx so keep your PR open. I agree that's a useful change too!

This was addressed by PR#1312.


Testing fix

https://bugs.launchpad.net/juju/+bug/2028094 -- fix is available in 3.1/edge

GRRRR AGAIN WRONG BASE, I deeply aplogize...


Added logo image class in the navbar issue #5310

It would be great to be able to add the logo in the navigation bar as an image rather than a text. It is not the same as adding a (small) icon on the left of the logo text as the idea is that it is placed like the logo and can be bigger than the icon.
issue #5310

It would be good to define a default value for  $navbar-logo-image-height in _variables.scss , typically 100%.

It would be good to define a default value for $navbar-logo-image-height in _variables.scss , typically 100%.

This makes not much sense. In general it should be

So far the PR is incomplete.
See the failing Travis test
Running "sass:gh" (sass) task
Verifying property sass.gh exists in config...OK
Files: sass/ghpages-materialize.scss -> css/ghpages-materialize.css
Options: precision=10, outputStyle="compressed", sourcemap=false
>> [no-notifications] title: materialize-css sass:gh
>> [no-notifications] message: Error: Undefined variable: "$navbar-logo-image-height".
>>         on line 72 of sass/components/_navbar.scss
>> >>       height: $navbar-logo-image-height;
>>    --------------^
>> Error: Undefined variable: "$navbar-logo-image-height".
>>         on line 72 of sass/components/_navbar.scss
>> >>       height: $navbar-logo-image-height;
>>    --------------^


WSSecurityCert without Timestamp and only xml-exc-c14n#

For a client we are writing a Timestamp field is not allowed, and also http://www.w3.org/2000/09/xmldsig#enveloped-signature is not supported. Therefore I made some changes to make both configurable: { hasTimeStamp: false, signatureTransformations: [] }
It should have no breaking changes, and should be fully backwards compatible.

Coverage increased (+0.01%) to 93.352% when pulling 18023cacbbb5d8617d745370bb560ff53caf54f5 on team529nl:more-config into 6e3567057786144b0cc23daabb7d0627439648ff on vpulim:master.

thanks a ton @RaymondKroon - we appreciate it a lot 👍


Can't connect to hub

This used to work but now it does not. This is the error output:
Connecting to hub at 192.168.1.***
errorhub { Error: connect ETIMEDOUT 192.168.1.:5222
at Object._errnoException (util.js:1022:11)
at _exceptionWithHostPort (util.js:1044:20)
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1198:14)
code: 'ETIMEDOUT',
errno: 'ETIMEDOUT',
syscall: 'connect',
address: '192.168.1.',
port: 5222 }

check your network connection and/or try to rediscover you hub useing harmonyhubjs-discover.

Thanks for the comment but it does not help me except to be sure that it is of course a problem with my setup not your project. I had been using your project and the other code for a number of years along with Alexa. Logitech has started supporting skills with Alexa so I have gotten away from doing my own as a hobby. The hub works fine and I had always used the local ip given in the DHCP Client Table without issue. Why it does not work now is beyond me. I am by far no expert on networks.

there was no new release recently. i only can assume that something in your set up changed, either network or software wise 😔
maybe you can try investigate based on your nodejs version or something. otherwise there is really nothing i can do for you based on the stacktrace you provided.

It works now after allowing public in addition to private communication through the firewall for node.js: Server-side JavaScript. I thought of it after my ftp server stopped responding and I had to allow it access. Thanks again for the feedback.
From: Manuel Alabor<EMAIL_ADDRESS>Sent: Tuesday, April 17, 2018 01:40
To: swissmanu/harmonyhubjs-client<EMAIL_ADDRESS>Cc: github22222<EMAIL_ADDRESS>Author<EMAIL_ADDRESS>Subject: Re: [swissmanu/harmonyhubjs-client] Can't connect to hub (#41)
there was no new release recently. i only can assume that something in your set up changed, either network or software wise 😔
maybe you can try investigate based on your nodejs version or something. otherwise there is really nothing i can do for you based on the stacktrace you provided.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub https://github.com/swissmanu/harmonyhubjs-client/issues/41#issuecomment-381850606 , or mute the thread https://github.com/notifications/unsubscribe-auth/AI0QItj135udyO4WHzfCot5l2tvmxWk4ks5tpYBBgaJpZM4TVIab .  https://github.com/notifications/beacon/AI0QIsjnjDpR2It5Xb4yiolZMRwh-iDpks5tpYBBgaJpZM4TVIab.gif


Feature Request: Animate between a "start" width and a "final" width

It would be like: startwidth=X , finalwidth=Y and animationspeed=Z.
It would give some cool effect and I think it would be easy to implant.
The url would look like: https://rezmason.github.io/matrix/?startwidth=100&finalwidth=20&animationspeed=5.
The animation speed could be in second or in milliseconds.

Thanks for your interest in the project!
To clarify, what's the difference between the "start" width and the "final" width? Is the goal to make glyphs approach the screen over time? Or is your idea something different?

What I want to say is that parameter could be change in time by setting the parameter at start and telling where you want it to finish. The time it take to get from the "start' value to the "finish" value .

@Rezmason I think @H3NR1-Creator meant that there should be some outro option, similar to skipintro=false option. It'd be great to have this kind of feature.

Outro is not currently planned, though I may revisit that decision down the road— basically there needs to be some solid vision of what that looks like, that most people would agree on.
I suppose one use case for an outro would be if someone is using the effect as a transition between pages of their website or something. That could be the basis for an example of a different technique that'd still do the job.


Escape key will close Peak

Description of the new feature / enhancement
Current: Must use Alt+F4 or manually close by pressing Close (X) button
Enhancement: Like on MacOS, pressing Esc key will close Peak
Scenario when this would be used?
I use Peak because I want to view the file quickly, but manually closing Peak view takes same time as open the file directly
Supporting information
No response

I found that you can also use the activation shortcut again to close the window (default Ctrl-Space).
But it should also accept Esc to close.
I didn't even realise there was an "X" close button, they're in white and don't show up until you hover over them (with windows in a light theme).

/dup #26137


How to use

I want to play chess with AlphaGo ,I have python 3.5,so how can I use it

@AbdielNie First of all, AlphaGo is for Go actually, not for chess. Secondly, it's recommended, that you have python 2.7. And finally, AlphaGo is still in the development stage, please be patient and come back soon.

@Nefeste I just want to play with alphago,I am soooo boring that I want to have something to play with me.And I will try my best for this toy.


Use Xcode 10 and Swift 4.2

Codecov Report

Merging #77 into master will increase coverage by 0.57%.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master   #77      +/-   ##
=======================================
+ Coverage   92.42%   93%   +0.57%
=======================================
  Files           6     6
  Lines         132   100      -32
=======================================
- Hits          122    93      -29
+ Misses         10     7       -3

Impacted Files
Coverage Δ

Sources/ReactorKit/Reactor.swift
82.5% <0%> (-7.98%)
:arrow_down:

Sources/ReactorKit/StoryboardView.swift
100% <0%> (ø)
:arrow_up:

Sources/ReactorKit/AssociatedObjectStore.swift
100% <0%> (ø)
:arrow_up:

Sources/ReactorKit/Stub.swift
100% <0%> (+26.66%)
:arrow_up:

Continue to review full report at Codecov.

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

Thanks!


Backbone and ES6 Classes

With the final changes to the ES6 class spec (details here), it's no longer possible to use ES6 classes with Backbone without making significant compromises in terms of syntax.  I've written a full description of the situation here (make sure to click through to the comments at the bottom for an additional mitigating option), but essentially there is no way to add properties to an instance of a subclass prior to the subclasses parents constructor being run.
So this:
class DocumentRow extends Backbone.View {

    constructor() {
        this.tagName =  "li";
        this.className = "document-row";
        this.events = {
            "click .icon":          "open",
            "click .button.edit":   "openEditDialog",
            "click .button.delete": "destroy"
        };
        super();
    }

    initialize() {
        this.listenTo(this.model, "change", this.render);
    }

    render() {
        //...
    }
}

is no longer valid in the final ES6 spec.  Instead you effectively have 3 (not very appealing) options if you want to try to make this work:
Attach all properties as functions
Backbone allows this, but it feels dumb to write something like this:
class DocumentRow extends Backbone.View {

    tagName() { return "li"; }

    className() { return "document-row";}

    events() {
        return {
            "click .icon":          "open",
            "click .button.edit":   "openEditDialog",
            "click .button.delete": "destroy"
        };
    }

    initialize() {
        this.listenTo(this.model, "change", this.render);
    }

    render() {
        //...
    }
}

compared to the current extends syntax
Run the constructor twice
I don't view this as a real option due to the issues it would cause running initialize a second time with different cids, etc.
Pass all properties as default options to the superclass constructor
This was suggested by a commenter on my blog and is probably the most practical current option.  It looks something like this:
class MyView extends Backbone.View {
  constructor(options) {
    _.defaults(options, {
      // These options are assigned to the instance by Backbone
      tagName: 'li',
      className: 'document-row',
      events: {
        "click .icon": "open",
        "click .button.edit": "openEditDialog",
        "click .button.delete": "destroy"
      },
      // This option I'll have to assign to the instance myself
      foo: 'bar'
    });

    super(options);

    this.foo = options.foo;
  }
}

Since all of these current options involve clear compromises relative to the current Backbone extends syntax, it would be wonderful if a better solution could be developed.  I'm not totally sure what this should look like, but one idea that came to mind while I did the writeup for my blog was the addition of a "properties" function that would output a hash of properties. The constructor could then run that function and add them to the instance prior to the other processing done by the constructor.

Yeah this is definitely a bummer. Thanks for doing the legwork.
I guess moral of the story is don't use ES6 classes with Backbone, at least until static property support lands. Of the fallback options you proposed my preferred solution is defining the strings / objects as return values. A key part of Backbone's API design is in these prototype-shared strings and objects, and it would dirty up the API to require devs to assign each property to the instance in the constructor (not to mention being memory wasteful).
Aside from consistency, is there any reason to use the class keyword with Backbone over extend?

Great blog post. I'd been wonder how ES6 and Backbone classes would play together. As for you solutions:

Attach all properties as functions: I'm not super opposed to this. It's not as clean as setting the object directly on the prototype, but I've seen a ton of code trip up on mutating prototype objects. This way is immune, which is why I think ES6 chose not to include class properties.
Pass all properties as default options: Isn't this how you'd do something in a more classical language? I feel like this is a even less clean solution than the above.
Run the constructor twice: Ick.

I guess moral of the story is don't use ES6 classes with Backbone, at least until static property support lands.

Even class properties come after the super() call. :disappointed:

Aside from consistency, is there any reason to use the class keyword with Backbone over extend?

I addressed this in the blog post.  Practically?  No.  In theory it would allow Backbone in the long term to reduce code and additional concepts, but realistically its going to be at least a few years before ES6 classes are widely supported on all relevant browsers without transpiling, and the code reduction would be next to nothing.
But don't underrate the consistency aspect.  If this becomes "the way" of doing Object Oriented programming in JavaScript (seems likely given the standardization on this from Ember/Angular/React/Typescript/Aurelia etc), Backbone not using it will be an added learning curve for the library relative to other options.  Especially for Junior developers. I'm not sure that necessarily merits a change.  But it's not just for pedantic "hobgoblin of small minds" consistency.

I agree with @akre54 and @jridgewell that the "attach all properties as functions" approach is probably the best of the proposed options. FWIW, I remember that when I was originally learning backbone as a relative js newcomer, I was a bit confused by these "static" properties and how they should be used.

ES7 will have correct class properties, I guess https://gist.github.com/jeffmo/054df782c05639da2adb

The ES7 proposal is just that, a very early community driven proposal.  Not at all clear it will actually ever be part of an official spec.  Current implementations cause properties to be added to the instance AFTER the constructor runs, so it doesn't help with Backbone.  (see jridgewell's link above or try it yourself with Babel 5.0.0)

@jridgewell I was referring to this part of @benmccormick's post:

React Developers have noted the same issues with property initializers that Backbone users encounter. As part of version 0.13 of React, they're supporting a special property initialization syntax for classes, which may eventually be standardized. There's more info on that in this ESDiscuss thread. This standard is still being worked out but an experimental support version is available in Babel 5.0.0. Unfortunately that version defines class properties as being instantiated after the superclass constructor is run, so this doesn't solve Backbone's issues here.

See for example wycats' js-decorators strawman or the original (superseded) harmony classes proposal.
I might suggest that we use getters with class properties:
class Row extends Backbone.View {
  get tagName() { return 'li'; }
}

As an absolute last resort, we could check for instance or static props with a helper a la _.result:
_.instOrStaticVar = function(instance, property) {
  if (instance == null) return void 0;
  var value = instance[property] || instance.constructor[property];
  return _.isFunction(value) ? value.call(instance) : value;
}

Yup, but:

Unfortunately that version defines class properties as being instantiated after the superclass constructor is run, so this doesn't solve Backbone's issues here.

So, ES5'd:
// ES6
class View extends Backbone.View {
  tagName = 'li';

  constructor() {
    // Do anything that doesn't touch `this`
    super();
    // Do anything that touches `this`
  }
}

// ES5
function View() {
  // Do anything that doesn't touch `this`
  Backbone.View.apply(this, arguments);

  // Add class properties
  this.tagName = 'li';

  // Do anything that touches `this`
}
View.prototype = _.create(Backbone.View.prototype, {
  constructor: View
});

Our element would still be constructed before we got a change to set the instance variable.

See for example wycats' js-decorators strawman...

Can you explain how the decorators would apply?

I might suggest that we use getters with class properties:

:+1:. I see that as the same boat as attach all properties as functions. Not as clean as what we currently have, but perfectly acceptable and mutation proof.

As an absolute last resort, we could check for instance or static props with a helper a la _.result:

That could be interesting...

You could do:
class MyView extends Backbone.View {
  constructor() {
    super({ tagName: 'h1' });
    this.el.textContent = 'Hello World';
  }
}

@thejameskyle That's the Pass all properties as default options to the superclass constructor option. :stuck_out_tongue:

Instead of relying on super() to setup the class, you could simply have an initialize() function or something.
class DocumentRow extends Backbone.View {

    constructor() {
        this.tagName =  "li";
        this.className = "document-row";
        this.events = {
            "click .icon":          "open",
            "click .button.edit":   "openEditDialog",
            "click .button.delete": "destroy"
        };
        this.initialize();
    }

    initialize() {
        this.listenTo(this.model, "change", this.render);
    }

    render() {
        //...
    }
}

@milesj hmm?  That will error out immediately with the final ES6 class spec

In a derived class, you must call super() before you can use this

Even if it did work you're never actually calling the Backbone constructor and will not get its initialization code.

@milesj: The thing is, you have to call super() before setting this.tagName or the like. And, since we ensure an element in the View's constructor, we've already created an element before we'll ever set this.tagName.

@milesj that's still not allowed when you are subclassing.
@jridgewell Oh sorry, I missed that. It does seem like the most natural option. I spoke to jeffmo and sebmck about this.
To give you guys some backstory, the reasoning is because in order to support extending native types (i.e. Array) this isn't determined until you call the super() method. Otherwise you run into initialization issue in the DOM (and presumably other places).

@jridgewell @thejameskyle Then simply call super() first (updated example). I really don't see the issue here as I've done the same thing in my ES6 classes.

That's a lot of very expensive code to run twice.

@milesj did you read the original blog post?  Running super first means the properties aren't processed.  See here for a full in depth explanation: http://benmccormick.org/2015/04/07/es6-classes-and-backbone-js/

Yes, I've read it, and I'm still curious why this is not a solution. Everyone keeps talking about the views constructor needing to be called, but that isn't necessarily the case. Why isn't something like the following not a solution (albeit a bit contrived)?
var View = Backbone.View = function(options) {
    this.cid = _.uniqueId('view');
    // extend()ing options is no longer needed if properties are set directly
};

View.prototype.setup = function() {
    this._ensureElement();
    this.initialize.call(this, arguments);
};

class DocumentRow extends Backbone.View {
    constructor() {
        super();
        this.tagName =  "li";
        this.className = "document-row";
        this.events = {
            "click .icon":          "open",
            "click .button.edit":   "openEditDialog",
            "click .button.delete": "destroy"
        };
        this.setup(...arguments);
    }
}

Then the default View class wouldn't work since the constructor never calls #setup. And, forcing a subclass call anything other than super() is going to be super annoying.

That's an issue that all ES6 classes have to deal with, not just Backbone. I personally solved it by using the Babel ES7 class properties spec.

@milesj As stated before ES7 class properties do not solve this issue as they aren't instantiated until the end of the constructor.
I spoke to jeffmo and sebmck about doing this:
class Root {
  rootProp = 'root';
  constructor() {
    console.log('Root', this.rootProp);
    console.log('Root', this.derivedProp);
  }
}

class Derived extends Root {
  derivedProp = 'derived';
  constructor() {
    super();
    console.log('Derived', this.rootProp);
    console.log('Derived', this.derivedProp);
  }
}

Desugaring to:
function Root() {
  this.rootProp = 'root';
  console.log('Root', this.rootProp);
  console.log('Root', this.derivedProp);
}

function Derived() {
  super();
  this.derivedProp = 'derived';
  console.log('Derived', this.rootProp);
  console.log('Derived', this.derivedProp);
}

But that still doesn't fix the issue and leads to inconsistency:
new Derived();
// >> 'Root' 'root'
// >> 'Root' undefined
// >> 'Derived' 'root'
// >> 'Derived' 'derived'

That's an issue that all ES6 classes have to deal with, not just Backbone.

Hm?

I personally solved it by using the Babel ES7 class properties spec.

You're gonna have a lot of DIV elements with no classNames. See the last point of https://github.com/jashkenas/backbone/issues/3560#issuecomment-90739676 and https://github.com/jashkenas/backbone/issues/3560#issuecomment-91601515.

I see. In that case, I'd suggest going with the "Pass all properties as default options to the superclass constructor" option, or the last line about creating a "properties" method (which doesn't touch the constructor).
class DocumentRow extends Backbone.View {
    loadProperties() {
        return {
            tagName: 'li',
            className: 'document-row',
            events: {
                "click .icon": "open",
                "click .button.edit": "openEditDialog",
                "click .button.delete": "destroy"
            },
            foo: 'bar'
        };
    }
}

// Contrived example
var View = Backbone.View = function(options) {
    this.cid = _.uniqueId('view');
    options || (options = {});
    _.extend(this, this.loadProperties(), _.pick(options, viewOptions));
    this._ensureElement();
    this.initialize.apply(this, arguments);
};

I did something similar in Toolkit, which can be seen here: https://github.com/titon/toolkit/issues/107

Hi.
If I understand correctly the discussion here - the Backbone developers are discussing workarounds and best practice, but have no intention of actually making changes to the BB core to deal with this issue? (not that I'd have any idea what those changes could be). In other words, is the suggestion to use either all properties as functions or getters the final word on the topic? Thanks.

@gotofritz We're discussing workarounds because ES6's solution of forcing all properties to live on instances doesn't scale. Backbone's class system is doing the right thing here.
There's some discussion about adding static prototype properties to ES7 classes but so far nothing concrete. In the meantime I'd say stick with Backbone's extend.

Thanks. I'll try ES6 classes for a little longer... :-)
For the benefit of anyone else stumbling upon this, in practice I find the "Pass all properties as default options to the superclass constructor" better - for example, our app has dynamic (localized) routes that need to be passed in at instantiation time, and having a routes() method just doesn't work. Whereas the following does
class Router extends Backbone.Router {

 constructor (localizedRoutes) {
    _.defaults(localizedRoutes, {
        "nonLocalizedRouteA/": "routeA"
        "*actions": "defaultRoute"
     });
 super({ routes: localizedRoutes });
}

I've just had a look at this, and I think that both workarounds don't work for the idAttribute property that a Model has. A method won't work as Backbone uses model.idAttribute to access the property; And the model constructor doesn't seem to support adding properties as options altogether.

I think that both workarounds don't work for the idAttribute property

Excellent catch. I'll work on a PR addressing this. In the meantime, you can use getter notation to supply custom idAttribute (and cidPrefix):
class Model extends Backbone.Model {
  get idAttribute() {
    return '_id';
  }

  get cidPrefix() {
    return '__c';
  }
}

I've just had a look at this, and I think that ,A method won't work as Backbone uses model.idAttribute to access the property; And the model constructor doesn't seem to ?,, the property; And the ??,

A method won't work as Backbone uses model.idAttribute to access the property

get idAttribute() { return '_id'; } is a getter method, which is accessed just like a normal property. this.idAttribute === '_id';.

Thanks."..

This is beginning to sound like a major rewrite is required. Backbone v2 perhaps?

This is beginning to sound like a major rewrite is required. Backbone v2 perhaps?

Not at all, we already support ES6 subclassing (with the exception of Models). I think it'd be interesting if someone explored @akre54's static property suggestion, but even that isn't necessary with the two solutions in the original post.

@jridgewell, many thanks for the quick solution!

The same issues with property initializers that Backbone users encounter. As part of version 0.13 of React, they're supporting a special property initialization syntax for classes, which may eventually be standardized. There's,, -Models,

Decorators were mentioned above in this thread (specifically Yehuda Katz's proposal), and it was unresolved whether that would solve this issue.
I was just playing around with them as proposed, and you can write a decorator like this:
function props(value) {
    return function decorator(target) {
        _.extend(target.prototype, value);
    }
}

and then the example we've been using can be written like this

@props({
      tagName: 'li',
      className: 'document-row',
      events: {
        "click .icon": "open",
        "click .button.edit": "openEditDialog",
        "click .button.delete": "destroy"
      }
    })
class DocumentRow extends Backbone.View {

    initialize() {
        this.listenTo(this.model, "change", this.render);
    }

    render() {
        //...
    }
}

This seems to work just fine for me.  The decorator is applied to the class prior to the class constructor being executed.  This is just a declarative version of saying
class DocumentRow extends Backbone.View {

    initialize() {
        this.listenTo(this.model, "change", this.render);
    }

    render() {
        //...
    }
}
_.extend(DocumentRow.prototype, {
      tagName: 'li',
      className: 'document-row',
      events: {
        "click .icon": "open",
        "click .button.edit": "openEditDialog",
        "click .button.delete": "destroy"
      }
})

Actually, I haven't tested it, but you could probably make the entire backbone extend function the decorator if you wanted both static and prototype props.
Unfortunately this is just a proposal for now, but Babel supports it behind an experimental flag, so if people are feeling adventurous, it's a possible solution here.

@benmccormick, the decorator technique works well for me.  Other than this just being a proposal for now, are there other concerns about going with this approach?

@andrewrota I'm literally writing a blog post following up on this stuff right now (was reading through this thread when you commented).  That is a big "other than", but I don't personally see any.  I actually think we can do better than what I described above though, and create some nice new interfaces for Backbone with decorators.
See this gist from @StevenLangbroek that got me thinking about this originally:  https://gist.github.com/StevenLangbroek/6bd28d8201839434b843

Here's a preview of the followup post I'm putting up: http://benmccormick.org/p/7b30626d-ed93-499f-9d03-2236e3f0e36a/
It'll move to a permanent url early this week sometime.  But the basic summary from this thread and what I've learned is:
There are 3 approaches to making Backbone properties work with the current ES6 classes spec (the first 2 need #3684 to be considered fully supported):

Pass all properties to the super in the constructor
Treat all properties as methods
Add properties directly to the prototype after a class has been declared

I still see all of these as limiting expressiveness to some extent or another.  But I think the problem will more or less be solved if decorators become an official specification.  With decorators there are 2 more options.

Add a props decorator that takes the props at the top of the class and adds them to the prototype
Create several special purpose decorators that allow for a more expressive/fine-grained interface.

I don't think any of these solutions require any additional modifications to Backbone other than #3684, but there would be an interesting role for a backbone-decorator library if/when decorators become standardized.
Would love any feedback on the post before I publish it on Monday/Tuesday.

@benmccoormick I figured decorators are evaluated before any construction happens, thanks for the correction. I'll update the gist in a bit. also: thanks a million for the mention in the blog post :) ping me on twitter when you publish it? :+1:
We could use the same syntax for modelEvents and collectionEvents in Marionette, just not for triggers. Those could be exposed through a class decorator (like tagName and template in your blog post), but I was thinking: can't we use static properties for this? Or does that not work in Backbone?
I understand decorators are still stage 0, but I think they'll be a great upgrade in the way we write Backbone apps, especially the method decorators over an events hash, it's the sort of programming style that makes me prefer gulp over grunt too.

@StevenLangbroek see above for discussion about static properties.
The syntax as currently specced creates a local property on each instance rather than adding to the prototype.  Those properties are added after the super constructor is run.

@benmccormick, the post looks good and I think does a good job at explaining the trade offs with each of the options.  At this point, I really like the special purpose decorators approach, and it seems to be the best approach assuming decorators make it into the spec.

Should @benmccormick's decorator call _#extend with the constructor not the prototype and then @akre54's _.instOrStaticVar method is used in place of _#result? I realise that would be a breaking change, but it seems cleaner that way IMHO. Like @akre54 pointed out properties defined that way are prototype-shared strings and objects (i.e. shared across all instances) therefore they should be accessed via the class, right?

I am going further and made to work class properties as the way we need. Class properties can be annotated too, and we can create special annotation, which attaches annotated property to prototype.
class TodoView extends Backbone.View {
  @protoprop
  static tagName = 'li';
}

function protoprop(target, name, descriptor) {
  target.prototype[name] = descriptor.initializer()
}

See Babel REPL with example. It is relied on experimantal things, but works.

@just-boris as discussed in my blog comments, the behavior you're seeing there is an implementation detail of Babel's handling of the class properties and decorators specs.  Its not defined behavior in any proposal right now.  If you want to do things that way you'll want to make issues here and/or here to make decorators on class properties a standardized behavior.  Otherwise what you're doing could (and probably will) break at any time.

@benmccormick https://github.com/wycats/javascript-decorators already has extra definition regarding property initializers.
The main concern there that property initializers is a usual descriptor, as well as class methods, so decorators can wrap them as well. I don't see reasons to worry, while spec in that section remains unchanged

Ah very cool, I hadn't seen that.  Thanks for pointing that out.
On Mon, Sep 21, 2015 at 11:29 AM, Boris Serdiuk<EMAIL_ADDRESS>wrote:

@benmccormick https://github.com/benmccormick
https://github.com/wycats/javascript-decorators already has extra
definition regarding property initializers
https://github.com/wycats/javascript-decorators/blob/master/INITIALIZER_INTEROP.md
.
The main concern there that property initializers is a usual descriptor,
as well as class methods, so decorators can wrap them as well. I don't see
reasons to worry, while spec in that section remains unchanged
—
Reply to this email directly or view it on GitHub
https://github.com/jashkenas/backbone/issues/3560#issuecomment-142015454
.

Just wanted to know the pros/cons on using https://github.com/typhonjs/backbone-es6 vs the method technique suggested by @benmccormick.
Btw, thanks @benmccormick for the excellent blog post!

In addition to the Proposal (#121) pull-request attaching here properties method in action https://github.com/dsheiko/backbone-abstract/tree/master/demo-es6/src/Js
As @akre54 mentioned Justin has already proposed a similar solution (preInitialize method). While already using it on my branch, it really solves the problem to me. Appeared to be also useful in TypeScript despite they don't ban declarative class properties.

Really wish we'd see a new class properties proposal that sets them on the prototype. It seems that many involved with the proposal are worried about the implications, but I find it incredibly inconsistent that class methods get directly attached to the prototype, while jeffmo's proposal puts them in the constructor.
Had they gone with attaching properties directly to the prototype you'd be able to migrate pretty much any React/Backbone code to ES2015 classes.

awesome blog post @benmccormick !! going to use those decorators in my project

@benmccormick, I whipped up with another way to declare classes with default properties, take a look: https://github.com/epicmiller/es2015-default-class-properties
It runs normally in any environment that natively supports classes, transpiles well, and looks far nicer than defining them in the constructor or after the declaration. With proposals for decorators and class properties coming down the pipeline for ES2016/ES2017 this may be more of an academic exercise than the long term solution for Backbone, but something like this is definitely a viable option if 2-3 years is too long of a wait.

Well, the thing is that Class Properties is still at stage 1 in the Ecmascript proposal stage system. I have no idea why, since it seems like a gimme in terms of "what the user gets". Of course, I have no idea what sort of things it might break under the hood.

Reading through this I find https://github.com/epicmiller/es2015-default-class-properties a good approach. When trying I realized Backbone having build-in support for this. For example:
class MyModel extends Backbone.Model.extend({
   idAttribute: 'id'
}) {
   // ...
};

The above code will set the MyModel.prototype.idAttribute properly. Notice, for TypeScript the declaration file needs to be adjusted slightly to return a constructor function interface, but that's a detail irrelevant to ES6 users...

@t-beckmann that's a quite nice solution - looks readable and requires minimal changes. Thanks!

I realize this thread is going on 2 years now, but it's still one of the top (and only) results when searching for Backbone & ES6 Classes, and I thought I'd share a potential solution making use of class properties mentioned several times here.
Now that class properties are in Stage 2 and widely available with the babel preset, I thought I'd give it another look. As stated, the issue with instance/member properties is that they don't get applied to the prototype until after constructor(), but many of the properties needing to be set are used within the constructor. Static properties are applied immediately, but (by design) are not copied to instances of the class.
The following shim copies static properties from the constructor onto the instance before running the constructor (effectively creating a new constructor, applying the properties, and then executing the original constructor). While it's definitely a hack, I'm pretty pleased with the result:
The shim:
function StaticShim(Ctor) {
    const NewCtor = function shim(...args) {
        Object.keys(this.constructor).forEach(key => (this[key] = this.constructor[key]));
        Ctor.apply(this, args);
    };

    Object.keys(Ctor).forEach(key => (NewCtor[key] = Ctor[key]));
    NewCtor.prototype = Object.create(Ctor.prototype);
    NewCtor.prototype.constructor = NewCtor;

    return NewCtor;
}

And then in usage:
class TestModel extends StaticShim(Backbone.Model) {
    static idAttribute = '_id';
    static urlRoot = '/posts';

    initialize() {
        console.log(this.url()); // Correctly logs "/posts/{id}"
    }
}

Just wanted to drop it here in case it helps anyone else, or anyone has any thoughts about it. Thanks!

Obligatory sorry for reviving an old issue.
Would it be possible or worth it to write a babel plugin that transforms a class declaration to use Backbone.*.extend({...})?

@enzious definitely seems possible.  Whether it is worth it is up to you :)

@t-beckmann's solution seems the most straightforward. should we integrate that into backbone itself?

For me it looks not properly, wouldn't it be more proper to have a method that sets the idAttribute?
Additionally, it would be amazing if there are Promise support. which is a more native approach than using jquery Deferred, which I personally would love to see deprecated within Backbone.

The story here is still very unclear for refreshing legacy Backbone applications to utilize modern tooling and language features. It's especially disappointing to see things like Symbol.iterator implemented and not available in a production release.
For those still looking for clearer answers to this question, I'm adding TypeScript to a backbone app and found the solution from this comment most helpful.
So far it's working nice enough, with the drawback of having to explicitly annotate properties passed through the decorator rather than having nicer inference.
export function Props<T extends Function>(props: AnyObject) {
  return function decorator(ctor: T) {
    Object.assign(ctor.prototype, props);
  };
}

@Props({
  routes: {
    home: "home",
    about: "about",
    dashboard: "dashboard",
    blog: "blog",
    products: "products",
    accountSettings: "accountSettings",
    signOut: "signOut",
  },
})
export class Router extends Backbone.Router {
  home() {}
  about() {}
  // ...
}

@Props({
  model: CategoryModel,
  comparator: (item: CategoryModel) => item.display_value,
})
export class CategoryCollection extends Backbone.Collection<CategoryModel> {}

@raffomania, @jridgewell & Co., for what it's worth, my team got around this problem by adding idAttribute to the prototype outside of the class.
class Example extends ParentExample {
// Class methods etc here
}
x.Example = Example;
x.Example.prototype.idAttribute = 'customIdAttr';

@kamsci i did the same in this branch where i converted  Backbone to ES6 classes

Backbone uses configuration to the point of the config objects being declarative. This is nice but it's never going to to play nice with inheritence. (Clone the class, then configure it. That's not inheritance.)
If we're going to write new code using backbone, It's okay to to think differently. Cutting and pasting ES5 code and then making it look like ES6 doesn't work. So what?
I don't have any problem at all passing in everything through a config object. How we expose the contents of that config, or make it easier to read/work with, is a problem to solve, not to cry about.
Nobody want to run a constructor twice. That's silly. But, the pattern of
Foo = BackboneThing.extend({LONG DECLARATIVE OBJECT LITERAL}) is mother-loving ugly, too.

FYI: I have a large Marionette project, and wanted to use ES6 syntax. I created a jscodeshift transformer that translates Backbone extends declarations into ES6 classes. It makes many simplifying assumptions, but may still be useful for some of you, if only as a starting point. It follows the syntax proposed by @t-beckmann as I ran into issues with decorators.
https://gist.github.com/maparent/83dfd65a37aaaabc4072b30b67d5a05d

There is a weird misnomer to me in this thread. 'static properties' to ES6 are properties on the constructor which exist on the Class without instantiation. In this thread 'static properties' seems to refer to named attributes on the prototype with a 'static' value. Have I got that right?
Either way, constructor/class static properties aren't inherited in backbone as they are in ES6. Backbone copies class static properties each time with the extend function rather than having these properties inherit as ES6 does. I have made a pr to fix that here https://github.com/jashkenas/backbone/pull/4235
I would appreciate some comments / feedback, I'm not sure if it'll break anything, I've tested it out quite a bit.


unknown command line arguments: /external:W0, /external:I when using VS2022

Hi!
Just wanted to try this promising looking tool (version 0.5.2) but upon compiling my game with it (Engine Source Build based on UE 5.1, VS 2022), these errors appear:

What could the issue be here? It looks like the build still succeeds at the end and I can launch the game.
Thank you very much!

It looks like the build still succeeds at the end and I can launch the game.

Yeah, this is by design. When octobuild sees compiler flags that it doesn't understand, it disables caching but still runs the task normally.
These /external flags come from here: https://github.com/EpicGames/UnrealEngine/blob/5.1.1-release/Engine/Source/Programs/UnrealBuildTool/Platform/Windows/VCToolChain.cs#L177-L185
Which means, you're using VS2022 that I didn't tests against.

@markusstephanides could you please try .msi from this commit? If that works for you, I'll roll out a new release with the fix.

Thank you very much for the quick response and the quick fix, it works now!
Are there any downsides to setting the cache directory to a shared network drive? Or is it recommended to only use a local cache for now?

Are there any downsides to setting the cache directory to a shared network drive?

If you're in a trusted environment (i.e. malicious user cannot put bad stuff into cache), that workflow definitely could work.

Yeah it's only available within the local network and I was looking to share the cache between team members and build servers to speed up compilation times, would that work that way?
Also does Octobuild also accelerate shader compilation times or only C++ code compilation?

to speed up compilation times, would that work that way?

Definitely depends on your network speed. I guess you should do some benchmarks. I'm only using local caching, so have no idea how profitable your approach will be.

Also does Octobuild also accelerate shader compilation times or only C++ code compilation?

Only C++ for now.

Fix for this issue included in octobuild 0.5.3 that is currently being released. Note that publishing to WinGet/Chocolatey/Homebrew will take several hours.


Token Revocation

Are there any standard implementations for revoking the Firebase token if the user no longer has access in the 3rd party authentication provider which was used to create the custom token?
We use an internal OAuth provider for authentication and would like to use Firebase along with it. However, I can't find any documentation on standard practice for revoking the Firebase token if the OAuth provider revokes access to the user. It looks like the client can indefinitely keep refreshing the Firebase token once they authenticate with the 3rd party provider just once.

@gbenthomas this is a good question. Firebase tokens are JWT ID tokens and there is no way to remotely "revoke" them.  They expire after an hour by default.  And you're right, the client can keep getting a new token every hour as long as the refresh token is valid.
If you detect that the user's OAuth credentials are valid and you want to block them from getting another Firebase token, you can disable the user (call update and set disabled to true):
https://firebase.google.com/docs/auth/admin/manage-users#update_a_user
Disabling is better than deleting here because the user will not simply be able to sign up again using the same email, they will be blocked from signing in / signing up / refreshing tokens until you re-enable the user.


Failed to get a session bus

I have a fresh install of wired self builded from github
When I try running wired as a normal user I get the following error:
$ ./target/release/wired
Found a config file: /home/solon/.config/wired/wired.ron, but couldn't load it, so will use default one for now.
If you fix the error the config will be reloaded automatically.
	Error: Problem with config file: 3:1: Expected struct

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', src/cli.rs:50:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

And when I run it as sudo it says
# sudo ./target/release/wired
Found a config file: /home/solon/.config/wired/wired.ron, but couldn't load it, so will use default one for now.
If you fix the error the config will be reloaded automatically.
	Error: Problem with config file: 3:1: Expected struct

A wired socket exists; taking ownership.  Existing wired processes will not receive CLI calls.
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 1, kind: PermissionDenied, message: "Operation not permitted" }', src/cli.rs:50:47
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

I couldn't find anything about it here or on the internet. I'm thankfull for every help

Seems like it's struggling to remove the existing socket (/tmp/wired.sock).  Can you remove it manually and try again?
This happens when you've run wired as admin or a different user, so the socket gets created with permissions we can't access.  Maybe I should try changing the perms when we create it.
I should also update the error to be more descriptive.

Closing as now the error is more descriptive.


[Feature] Create a ApplicationTemplate CRD for allowing Kubevela to template the Application object itself

Is your feature request related to a problem? Please describe.
The component and trait system kubevela suggests is great, but an application manifest can turn out to be very large and complex since everything is in a single file. Many developers might not have the necessary skills to even use the right components and pass the right arguments to it.
I suggest we make another CRD called "ApplicationTemplate". This will contain a cue template to render an application itself. We can use this "ApplicationTemplate" Directly in the "Application" resource by referring to a template instead of providing and array of components and traits.
This will greatly simplify developer experience and devops teams can noe create different "ApplicationTemplates" for each use case they have while developers have to provide just a few parameters to create an Application from it.
Describe the solution you'd like
Already did above
Describe alternatives you've considered
Use helm to template out the "Application" object. But i was hoping to avoid helm altogether if possible.
Additional context

Good suggestion, this is in our roadmap. Welcome for detail design including following questions:

how would the ApplicationTemplate crd looks like?
what will the rending mechanism work? it should works in CUE align our current mechanism.
how could the current Application be exported as an ApplicationTemplate?
and many more related considerations are welcome to discuss.

The ApplicationTemplate is like the addon, we could base the ApplicationTemplate to define some SaaS or typical applications. So, CRD maybe is not the best shape.

Welcome for detail design
I'll put my thoughts down shortly.

The ApplicationTemplate is like the addon, we could base the ApplicationTemplate to define some SaaS or typical applications. So, CRD maybe is not the best shape.

I was suggesting that we use a CRD for two reasons

each "ApplicationTemplate" will most likely have a few input variables to template based on and can change. Kubevela operator will most likely have to keep a hot cache of all these templates in memory.
A deployable manifest should be able to refer to this template at run time whenever the 'kubectl apply` command is invoked. I think it will be easier to manage this if the template and the instance object are applied (and hence managed) in a similar way, i.e. by the oeprator

Is it possible to reference other components in component, to implement the ApplicationTemplate?

Is it possible to reference other components in component, to implement the ApplicationTemplate?

Thats a good idea. But wouldn't that make things a bit too convoluted? The end-goal I had in mind was to make an "Application" reproducible with the smallest set of inputs. Also, since components are designed to be byte sized anyways, referencing other components wouldn't really help in reducing verbosity. This is just my opinion.

I'm not sure, but my experience with helm sub chart is very good. In helm, you can directly reference other charts as sub-charts, and you can configure all charts with just one values file.
Indeed, this is too complicated for vela.

As we already have the addon system, the application template feature will be more like the addon ( https://github.com/kubevela/catalog/tree/master/addons ).

Written in CUE, have parameters and all kinds of templating&validating features leveraged with CUE.
Leverage OCI Infrastructure and align with Helm Charts format.

\cc @wangyikewxgm

Hi, wanted to share how I went about implementing this for my project:
I first tried implementing my template as an addon but couldn't use it since:

The goal of addons seems to be to create new components definitions and not augment existing Applications
It's seems overengineered for the use case I was trying to solve for.

This is how I actually went about it:

Created two CRDs AppTemplate and App.
AppTemplate has the exact same spec has a normal Kubevela Application.
App has the same spec has a Kubevela Application as well. The only difference is a appRef field at the root level which refers to a AppTemplate resource.

I'm using a AppTemplate to define the base version of my application. It doesn't actually create a Kubevela Application. Example:
apiVersion: example.com/v1alpha1
kind: AppTemplate
metadata:
  name: python-app
spec:
  components:
    - name: backend
      type: webservice
      properties:
        ports:
          - port: 11000
            expose: true
        cpu: "0.5"
        memory: "512Mi"
      traits:
        - type: cpuscaler
          properties:
            min: 1
            max: 10
            cpuUtil: 60

Then I create an application by:
apiVersion: example.com/v1alpha1
kind: App
metadata:
  name: service-a
spec:
  appRef: python-app
  components:
    - name: backend
      type: webservice
      properties:
        image: myrepo/myimage:latest
      traits:
       - type: cpuscaler
          properties:
            cpuUtil: 80

Upon creating the above resource the controller spits out the following kubevela Application after recursively merging all component and trait properties defined in the App with the ones in AppTemplate
apiVersion: core.oam.dev/v1beta1
kind: Application
metadata:
  name: service-a
spec:
  components:
    - name: backend
      type: webservice
      properties: myrepo/myimage:latest
        image:
        ports:
          - port: 11000
            expose: true
        cpu: "0.5"
        memory: "512Mi"
      traits:
        - type: cpuscaler
          properties:
            min: 1
            max: 10
            cpuUtil: 80

Advantages:

Developers don't really have to copy paste length kubevela Application resources anymore. They can simply refer to a AppTemplate and override the properties they want. They can even add new components or traits if needed.

Disadvantages:

No mechanism to remove a component / trait defined in the AppTemplate


Missing images for Go 1.21

I see that mcr.microsoft.com/devcontainers/go:1.21 is mentioned on the readme, https://github.com/devcontainers/images/blob/52478448feafce54fdbe69a49236ab5ef3afde1b/src/go/README.md
But it does not seem to be available when I look in MCR

@samruddhikhandale the image mentioned in the readme doesn't exist. There is no mcr.microsoft.com/devcontainers/go:1.21 even though the readme mentions it, so we have to choose an OS 👍

I see your point now, thanks for reporting. It was a bug with our release builds. https://github.com/devcontainers/images/pull/784 fixes it, it should be updated with next release.


[Spark-27416][SQL]UnsafeMapData & UnsafeArrayData Kryo serialization breaks when two machines have different Oops size

What changes were proposed in this pull request?
Finish the rest work of https://github.com/apache/spark/pull/24317, https://github.com/apache/spark/pull/9030
a. Implement Kryo serialization for UnsafeArrayData
b. fix UnsafeMapData Java/Kryo Serialization issue when two machines have different Oops size
c. Move the duplicate code "getBytes()" to Utils.
How was this patch tested?
According Units has been added & tested

Can one of the admins verify this patch?

Can one of the admins verify this patch?

cc @cloud-fan @sandeep-katta @rxin
Please have a look

Can one of the admins verify this patch?

@srowen updated as discussed, please recheck when available. thanks

OK do we need to add these classes to the list that is automatically registered with Kryo by default too?

OK do we need to add these classes to the list that is automatically registered with Kryo by default too?

I am not quite sure what's the main advantage. If that's for performance, I think in this case it makes no difference.


Metacatalog newattr 20180312

Added metadata to better manage kylo related features + new semantics metadata

Closed because it was surpassed by a new PR that will be made by @lilloraffa


Action buttons (dismiss, snooze)

Is your feature request related to a problem? Please describe.
There's no dismiss button and I can't swipe the notification away
Describe the solution you'd like
Add snoozeActionLabel and dismissActionLabel at least
Describe alternatives you've considered
I have to press power button to stop ringing /vibrating
Additional context
Android 12, api level 31

Hi @ShadichyDev,
The alarm plugin uses Android’s Foreground Service to ensure the alarm can trigger at any time, even if the app is killed. However, this requires making the notification non-dismissible for Android 12+ due to Android’s rules.
Regarding notification action buttons (stop & snooze), they are on my to-do list. However, as I mostly work alone on the plugin and have limited time, it may take a while to implement.
I am closing this issue as it is a duplicate of issue #58. I will keep you updated there.

I did not get the term "non-dismissible". Isn't it just invoke 'stopAlarm' when presssing Dismiss button if present?

When I said "non-dismissible" I meant that you can't swipe away the notification. But yes, when I'll add notification action buttons, it will call stopAlarm. But it's not that simple because I will have to do it native-side, that's where I manage the notifications. I also have to update the local storage. Let me know if you have any question.


Customization suggestion: allow chaning the 'tag' character

Just thinking it would be handy to allow changing the 'tag' character from @ to whatever you want (I copy-paste tasks between text and Wunderlist which uses # ) just like you can change the 'task' character etc

This would take a bit of refactoring, so I'll take a look and see what I can do!

This should be implemented with v2.2.0 (commit f6960e22f76831e80931e3f1403827611af16a90).


Caveats search keyword takes you to legacy link

Searching for caveats at what seems to be the top level results in a link to the legacy API doc (https://authzed.com/docs/reference/api#caveats) and I would expect it to send me here: https://authzed.com/docs/reference/caveats
Start of search:

Search result top of page:

Search result bottom of page:

Search result bottom of page, expanded:

Where search result should go:

This appears to be fixed with the new docs.


Hostname to IP Address conversion

Hostname to IP Address conversion

@imatiach-msft This looks great, could you squash it and give it a good Commit message? Thank you!!

@mhamilton723 I've updated the PR as suggested, thank you!


"ignoreEmpty" ui option

There are times when we want the dropdown accordion to just be a UI element and only be present in the output data if a child is selected. In these cases, it should not have a checkbox next to it and the key should only be added to the object if a child is selected.
This could be configured via ignoreEmpty and another option for disabling the checkbox or it could be a standalone setting that does both - maybe accordion or something.

@brollb Hey, I don't really remember the details of the "and another option for disabling the checkbox or it could be a standalone setting that does both - maybe accordion or something" part. Do you mind expounding on how this other option would work / the use case?

Sure. Consider a vocabulary accordion. We might want to expand it to view the terms and then decide not to select any and just download the tags that we have populated. In this case, we don't really want to have to close the vocabulary accordion nor do we really want to have a checkbox by the vocabulary since it doesn't make any sense to select a vocabulary without a term in the vocab.
Does that make sense?

How does that differ from the "ignoreEmpty" option? What would be the difference between how to two work?

Really just a UI difference (ie, hide the checkbox so it looks and feels more like a simple UI accordion).

Hmm, do we need the checkbox for the "ignoreEmpty" option? I guess the only situation where we do would be when an accordian with the "ignoreEmpty" option has default options? Checking it would add the default data. Whereas for this other option, it's like an "ignoreEmpty" where it's permanently selected. So if it has default values, they'd exist in the data already.
Does that sound right?


perf: replace startsWith with ===

Description
This pr use str[0] === 'x' instead of str.startsWith('x') for better perf. We can prove that:

=== should be faster according to startsWith source in theory

perf test data[0] === 'x' wins most of the time

I also test the initial vite dev startup time five times with this repo before and after this PR

test(ms)
1st
2nd
3rd
4th
5th

before pr
2406
2314
2079
1914
1686

after pr
2305
2216
2025
1949
1565

It improves!

Additional context
I guess we can use str[str.length - 1] === 'x' rather than str.endsWith('x') too.

What is the purpose of this pull request?

[ ] Bug fix
[ ] New Feature
[ ] Documentation update
[x] Other

Before submitting the PR, please make sure you do the following

[x] Read the Contributing Guidelines.
[x] Read the Pull Request Guidelines and follow the PR Title Convention.
[x] Check that there isn't already a PR that solves the problem the same way to avoid creating a duplicate.
[x] Provide a description in this PR that addresses what the PR is solving, or reference the issue that it solves (e.g. fixes #123).
[x] Ideally, include relevant tests that fail without this PR but pass with it.

Awesome! I didn't expect the perf diff of this change alone to be noticeable 🙌🏼 I think the endsWith is worth doing at least if it is in a hot path.

I will give it a shot.


Allow building using Link Time Optimizations (LTO)

Proposed patch set fixes "missing linker plugin" issue when building with -flto flag enabled. Also it switches default debug optimization level to Og witch saves some memory while still being compatible with debugging. Plus I've noticed that qm_rtc.c is missing implementation of qm_rtc_read().
I hope that you'll find proposed changes useful.
Best,
K.

Thanks for the contribution, @keton .
-1 due to some minor comments around.
Also, please make sure you have a look at https://github.com/quark-mcu/qmsi/blob/master/doc/commit_style.rst and follow the style there on your commit messages, ok?
thanks again!

please rebase this PR and check my comment above.

Rebased on top of v1.3.0, discarded LTO and debug optimization patches and fixed code style as instructed. Hope I didn't broke anything.

LGTM

Left 2 comments, @keton . I will merge next version of this PR.
thanks!

Rebased on top of 1.3.1, hopefully description matches your standards. @jeez thanks for help with git-fu. I completely forgot that I can locally delete and recreate branch.

This LGTM, thanks @keton.
@danicarles @dalessan @mprinn let's merge this and cherry-pick, ok?


When left clicking left outside of the grid, It selects all tools and the Component at 0,0

there is also something going on with the IsPlacedInGrid property that is in the model and in the viewmodel but it does not seem to be connected (?)


Update logo with correct version

It's been pointed out that the logo used at pycon.sk doesn't build on the official visuals but uses a derivative of the snakes element. This oversight on our side has been fixed. A new logo, approved by the Python Software Foundation, is now available (thanks Juraj for your quick action!): the site needs to be updated accordingly.

Logo at Twitter and Facebook has been updated as well. Closing the issue. Thank you @ricco386!


miss a function name()

In the class of GangliaReporter, the function prefix() used a function name(), but name() did not define in the class GangliaReporter, neither in it's superclass

It should be coming from the static import, see (here)[https://github.com/dropwizard/metrics/blob/3.2-development/metrics-ganglia/src/main/java/com/codahale/metrics/ganglia/GangliaReporter.java#L18]


Semicolon ?

Errors:
Line 6, col 16: Missing semicolon.
why do i need semicolon in JavaScript strictly.

Sorry for the late reply. It is a mandatory thing currently in the linter I use. In the future version, I will add the possibility to change linter settings.

Sorry for the late reply. It is a mandatory thing currently in the linter I use. In the future version, I will add the possibility to change linter settings.

one year later, lol


Version Control System Integration with Github does not work

Details

Project URL: http://docs.platformio.org
Build URL (if applicable): http://readthedocs.org/projects/platformio/builds/5610848/
Read the Docs username (if applicable): ikravets

Expected Result
@PlatformIO documentation is located in separate repository which is "mounted" to core repository.
We override "html_context" with own settings for Github, see conf.py.
Also, see build log and cat docs/conf.py.
So, the "Edit" links still follow to "platformio-core" repository instead of "platformio-docs".
Actual Result
"Edit" links should follow to "platformio-docs" repository.

Does this work locally for you? If not, this is an issue with our theme, otherwise, an issue with an override we are applying here.

Yes, it works locally.

Do you have any news? Thanks!
We have related report https://github.com/platformio/platformio-docs/pull/19#issuecomment-340908571 by @giogziro95

@agjohnson could you fix that? Thanks!

RTD overrides the html_context
https://github.com/rtfd/readthedocs.org/blob/e923c0cdf7547e63b4d2a9ab2b5e69b527bb482b/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl#L76-L133
I think some values can't be allowed to be overridden by the user, but some values like
https://github.com/platformio/platformio-docs/blob/58574c074149656f1cfc5290122251ea6a5344c6/conf.py#L281-L285
make sense to allow the user do it. Probably this could be solved having a black list of settings that the user can't override. Something like
required_context = {
  'using_theme': using_rtd_theme,
  'html_theme': html_theme,
  'MEDIA_URL': "{{ settings.MEDIA_URL }}",
  'PRODUCTION_DOMAIN': "{{ settings.PRODUCTION_DOMAIN }}",
  ...
}
context = {
    'github_user': '{{ github_user }}',
    'github_repo': '{{ github_repo }}',
    'github_version': '{{ github_version }}',
    'display_github': {{ display_github }},
    ...
}
if 'html_context' in globals():
    context.update(html_context)
context.update(required_context)
html_context = context

We are trying to build a new context for similar issues at https://github.com/rtfd/readthedocs.org/pull/3490 . Would you like to take a look at and give us some feedback?
In fact, I added this note https://github.com/rtfd/readthedocs.org/pull/3490/files#diff-bcc75ef2283eeb5c14031ea7d530d5a8R155 exactly for the same reason that this issue raised here. So, if we want to allow changing this behaviour we are still on time, I guess :)

I've had a quick look over the new documentation, but indeed as long as this stands, we can't customize much:

Take into account that the Read the Docs context is injected after your definition of html_context so, it's not possible to override Read the Docs context values.

Wouldn't it be better for the Read the Docs context to be prepended to the user-defined html_context, to let users override it as they wish? If they break their RTD build with a bad custom context, it's their responsibility.

We have a flag that allows projects to override the html_context from rtd (we need to setup this on the db)
https://github.com/rtfd/readthedocs.org/blob/c37b00995c1bbc5ee51d3552ef176546373bb912/readthedocs/doc_builder/templates/doc_builder/conf.py.tmpl#L119-L125
I also think that rtd should allow to override this values by default, not sure how else we can fix this issue.

We use a temporary solution with replacing links via DOM

https://github.com/platformio/platformio-docs/blob/develop/_templates/footer.html#L114:L119

I think this issue is solved by the feature flag DONT_OVERWRITE_SPHINX_CONTEXT (https://docs.readthedocs.io/en/latest/guides/feature-flags.html) and can be closed at this point.
Please, let me know if you want to enable this feature flag in any of your projects and I will do it for your.
If there is anything actionable in this issue, I will close it soon.

@humitos I'm still not sure why we override by default. Feature flag feels like the default behavior for my

It's legacy. I suppose they should not avoid other people to override RTD internals here. I'd :+1: on changing this behavior if it does not break projects --which is hard to know.

I still think this feature flag should be the default behaviour, or at least something users can enable themselves in their conf.py or RTD dashboard...
Still, in the meantime, I'd be glad if it could be enabled for godot: https://readthedocs.org/projects/godot/

I'd +1 on changing this behavior if it does not break projects

I think it will only break projects that are already broken locally, I mean building outside rtd.

Still, in the meantime, I'd be glad if it could be enabled for godot: https://readthedocs.org/projects/godot/

@akien-mga I've enabled this in godot. Please, let me know if it works as you expected. Otherwise, open a new issue so we can track it there. Thanks!

:) Oh... Why did a bot close this issue? :) Could someone summarize what should be done on our https://docs.platformio.org side?

@ivankravets it was closed automatically because it didn't have any activity.
If you need to override html_context let us know, and we can activate a flag for your project. We are going to sample some projects before making this the default.

Aha, got you. Please activate for our project too. Currently, we overwrite "Edit page" with JS hook. Thanks!

@ivankravets done!

Thanks! It works now!

We are keeping this issue open till we came with a final decision if enabling the flag by default doesn't break anything :)

The original issue is solved. The discussion if enabling it by default or not is going to happen in another place since we need more data to make it. There is no need to keep this issue open here until then.
There are not too many users with this problem and we have a solution (feature flag) for the ones that need it (just need to ask for it). I'm closing it.


requestDeviceCameraAuthorization never worked

Issue Description
According to the API readme, there are two functions called checkDeviceCameraAuthorizationStatus() and requestDeviceCameraAuthorization(). How to get it working? I tried to call the method but there is no reaction in the program. And if I call the method checkDeviceCameraAuthorizationStatus manually, it returns an object with the keys like "_40" "_56" something I do not understand.
Since request permission function is built,  can we get more detailed instruction on how to get it to work correctly?
Steps to Reproduce / Code Snippets / Screenshots
  cameraAuthorization = async () => {
    const isCameraAuthorized = await CameraKitCamera.checkDeviceCameraAuthorizationStatus();
    if (!isCameraAuthorized) {
      const isUserAuthorizedCamera = await CameraKitCamera.requestDeviceCameraAuthorization();
      // Alert.alert(isUserAuthorizedCamera);
    }
  }

I called cameraAuthorization in the componentWillMount().
 if (StartScanner) {       return (         <View style={{ flex: 1 }}>           <CameraKitCameraScreen             showFrame             scanBarcode             colorForScannerFrame="blue"             onReadCode={event => this.onQRCodeScanDone(event.nativeEvent.codeStringValue)             }           />         </View>       );
This is a part of the code of my render().
Environment

React Native Navigation version: [0.59.9]
React Native version: [16.8.6]
Platform(s) (iOS, Android, or both?): [ios]
Device info (Simulator/Device? OS version? Debug/Release?): [Device/ios 12.2/Debug]

[ ] `_**

**_`

Please use the community permissions library to manage permissions. The permissions integration will soon be removed.
Closing due to inactivity

Please remove it from the docs its quite confusing


Unable to build SLES 11 SP3 docker image

Login failed. (https://nu.novell.com/repo/$RCE/SLES11-SP3-Updates/sle-11-x86_64/repodata/repomd.xml?credentials=NCCcredentials): The requested URL returned error: 401
Repository 'SLES11:SP3:Updates' is invalid.
[|] Valid metadata not found at specified URL
Please check if the URIs defined for this repository are pointing to a valid repository.
Problem loading data from 'SLES11:SP3:Updates'
Resolvables from 'SLES11:SP3:Updates' not loaded because of error.
No provider of 'filesystem' found.
No provider of 'glibc-locale' found.
No provider of 'libgcc_s1' found.
No provider of 'libstdc++6' found.
No provider of 'openssl-certs' found.
No provider of 'zypper' found.
failed
Mar-31 18:49:19 <3> : Base initialization failed                      failed
Mar-31 18:49:19 <3> : KIWI exited with error(s)
Mar-31 18:49:19 <1> : Complete logfile at: /tmp/sle2docker20150331-21534-1cyp3up/result/build/image-root.log
Something wrong happened during the build process

I have tried this with our own internal mirror as well as the novell one with the same results. I've also pulled in the latest by running 'gem install --no-format-exec sle2docker' instead of the zypper method. Same results. Any way I can resolve this?

The initial error could be caused by bad credentials. Are you sure you are using your NCC mirror credentials? Try to open the same url using your browser.
Please do the same thing also when using the internal mirror. Is the url working inside of a browser?

Thank you for getting back to me. I think you are right. The commands worked for the docker SLES12 but not SLES11SP3.

Building from ISOs is not supported yet.
You have to chances:

figure out if your local SMT server is mirroring the SLE11SP3 Pool and Update repositories
figure out if your NCC mirror credentials are working fine with SLE11SP3 (the web browser test I suggested above).

In the near future we are going to release pre-built Docker images via rpms (so you will have to do a zypper in sles11sp3-docker-image).

We got it sorted out on our end. Thank you! Let us know when that is available. THanks!!!

I am glad to hear that. Don't worry, we will make noise once the pre-built images are out :)

Whats the status on the SLES11SP3 / SP4 Docker images?  I 'think' they used to be available, but a look today via sle2docker list didn't show any.
Many thanks!

You have to install the pre-built SLE images for Docker with zypper. For more details take a look at the official documentation.
Pre-built Docker imags for SLE11SP3 and SLE11SP4 are already inside of the "containers" module.

On 10/19/2015 07:06 AM, Vincent Passaro wrote:

Whats the status on the SLES11SP3 / SP4 Docker images? I 'think' they
used to be available, but a look today via sle2docker list didn't show
any.

You need to install them from the containers module. If you are
subscribed to that module, just do a "zypper install
sles11sp4-docker-image sles11sp3-docker-image"

Many thanks!
—
Reply to this email directly or view it on GitHub
https://github.com/SUSE/sle2docker/issues/6#issuecomment-149099356.

Got it, thanks.  I was confused and thought sle2docker pulled the images, rather than being the middle man.  Thanks!


Method possibly missing a [super awakeFromNib] call

Is there any reason it should not call [super awakeFromNib]  in awakeFromNib ?
- (void)awakeFromNib {     [self setup]; }
there is show this warning in latest Xcode version (8.3), can you help us fix this?
thank you very much!
I love this repo, it's help me a lot.

I don't think so. If you submit a pull-request, we'll get it merged. Good call, and thanks @puyanlin !

ok, I just sent a pr for this issue, thank you.


Minimal swagger ui setup

This PR introduces a basic swagger ui setup.
If you are curious about the setup, feel free to follow appropriate link provided in the Readme file.
Don't hesitate to ask questions, comment, share ideas and hunt the bugs :)

Have you seen this django app https://django-rest-swagger.readthedocs.io/en/latest/ ?

Please update readme, other than that lgtm :)


Anonymize Bot is not accessible!

Hi,
It seems Telegram banned Anonymize Bot.

Please reactivate this Great Bot with new Identity.
Thanks in advance.

Yeah we all wanted it to be back please


Project Status

Can one or many of the contributors comment on the current state of the project? Both the master and development branches haven't seen commits in quite some time, and with many open issues and open pull requests, we're wondering if the project has been abandoned or is stale for lack or time, or in favor of a better component.

It's primarily stale due to lack of available time to make improvements. This is the busiest time of the year for our company as open enrollment is underway in the insurance markets. We are hoping to resume effort on this, though I don't have any definitive timeframe. In the mean time feel free to submit pull requests with enhancements, additional tests, or ask questions. We are open to additional contributors, it's just a matter of vetting out who is capable and willing to help.

Hi @shellscape. Thanks for your interest.
I personally wouldn't even use the word "stale". @mtscout6 and @aabenoja did a great job of cutting a v4 alpha and have been addressing issues as time permits.
Let us know if you have any more questions!

Thanks for the follow ups.

I'll close this as 4.0.0 has been released.


[14.0] ISPN-14836 Updates Spring 6 and Spring Boot 3 dependencies

https://issues.redhat.com/browse/ISPN-14836

Merged, thanks


Fix a typo + better code formatting in README

some missing julia> were precluding for code to be simply copied-pasted in the REPL

Thanks!


Update azure-storage-account-limits-standard.md

@xyh1 : Thanks for your contribution! The author(s) have been notified to review your proposed change.

#sign-off

#sign-off

@xyh1: I'm sorry - only the author of this article, @tamram, can sign off on your changes. But we do have an exception process - if you are on the Microsoft content or product team for this product area, you can ask the PR review team to review and merge it by sending mail to the techdocprs alias.


fix: with MSVC, SP_LIKELY takes no effect

MSVC intentionally defined __cplusplus to 199711L, ignoring the actual standard, hence MACRO definitions of SP_LIKELY and SP_UNLIKELY go to wrong branches in MSVC build.

Why
MSVC builds struct_pack with no [[likely]] attribute.
see /Zc:__cplusplus

What is changing
Just copied-pasted from iguana/Common.h
Example

LGTM


Neural Network

This notebook is working on the Neural Network mode

Great job Ruitang! Thanks a lot :)


Severe performance degradation once Iris shaders get enabled

Describe the Bug
The moment shaders are enabled, performance takes an unplayable hit resulting in an obvious bottleneck that is preventing GPU usage from increasing.  The shaders I use are complementary v4.4, but I've tried a bunch of others and all result in the same problem.  I've tried swapping to GravalVM and Open J9 to see if it's a Hotspot issue but nothing changed (in fact J9 made the performance plummet even more, down to literally a handful of frames).  Originally I thought this world is just pushing the limits of contraptions and shaders, but upon creating a new test world with the same seed, dropping barely anything in it, the problems start to show themselves and the FPS drop is already significant.
I have 2 kelp farm based furnage engines. a windmill, and a bunch of automated belt lines for crushing, washing, blasting, mixing and pressing.  Based on some of the nutty things I've seen people build, I'm not even convinced this is "a lot".  My included screenshots will show the base (in the screenshots, the large, long building is empty).  I have included screenshots with the RTSS overlay showing the issue both in the "real" in use world, and the test world, made with the same seed, to show the perf without create objects in it, and with, and what contraptions I have in the world.  You'll have to pardon the need to zoom in to see anything since I play at 5120x1440 so the shots are "interesting".
When I start to walk away from the area, the screenshots will show the FPS bounce back up and eliminating the small hit printscreening does, I go back up to 70FPS and higher with shaders fully on blast once I've walked far enough away and am not looking towards the direction of the create setups.  In the test world, standing still I can get up to 110+ FPS in the spot I took the screenshot in, but dropping just the schematic of the iron farm I use and the schematic of my furnace engine kelp farm setup already drops the FPS considerably, and the furnace engine setup isn't even running.  Also moving close to the iron farm and walking already shows the clock speeds and usage starting to show the dropping behavior just with this stuff in it, standing still will bring it back up but moving immediately drops it.  The FPS in this shot is already below 50.
Despite having the nvidia panel set to always go to max perf, and I even have nvidia inspector Multi display power saver running telling the system to forcefully activate 3D usage with X% usage, 15% to be exact to test, although I start to wonder if the driver is overriding this, there is something holding clocking back big time as the clocks stay locked at 1350mhz in the issue, despite the usage being reported at or above the 20% mark, and as I back away from the area they slowly start to crank up.  Forcing the clocks locked at 2100mhz maybe add an FPS or two but the low clocks aren't the perf problem, they are just an interesting symptom of the bottleneck.
This is with build #548 and Iris and sodium, and sodium's respective add-ons lithium, indium and phosphor, are all latest.  I have gone back to the first working and least bug free of the early 1.18.2 builds and same thing happens with those. The log has nothing in it being spammed to indicate an issue so instead of I have launched the built in profiler and attached it here.  Note, I have tested the idea that Iris and complementary's shadowing is the problem, but despite turning off real-time shadows, block and entity shadows fully off, no difference is made.  Something is just really turning off Iris somewhere.  Maybe my world is asking too much, maybe my system just has an issue.  This funky FPS problem has left me scratching my head for I cannot pinpoint whose at fault, even if I make a test world and start blowing away contraptions the issue only really goes away fully once everything is gone.
Reproduction Steps

Get iris and complementary shaders
Make a world and add contraptions and create builds
Enable shaders and watch the FPS tumble
...

IrisCreatePerformance.zip
Expected Result
Shaders to work, even with a performance drop, but one that still allows things to be playable.
 Run a spark profile and send it.

Make sure flywheel is enabled, might fix it bit. Run a spark profile and send it.

I was testing out if there was any difference with flywheel on or off (instancing or batching) and I feel like it's made it slightly worse.

Make sure flywheel is enabled, might fix it bit. Run a spark profile and send it.

Enabling shaders automatically disabled Flywheel, as I believe this is intended.  Turning it on doesn't make a difference anyways, forgot to mention that in the original post.

That's weird, I did a quick test right now. When I set flywheel to instancing I saw my fps drop as far as 49 compared to flywheel off, which went low as 55. I don't know if this is just luck.

Flywheel off spark profile
Flywheel instancing on spark profile
If there is a specific type of command just let me know

moving blocks with create does drop the fps, i thought it was because of flywheel  not being fully optimized with shaders yet. try sildurs i get 60-70 fps with gtx 750ti and i dont use too much block rotation or windmill just stationary stuff

All the spark profiles you've sent are server side, make sure to run sparkc and not spark.

Crap, terribly sorry about that in my rush to get this out before heading out I didn't pay attention!
Flywheel off
Flywheel instancing on
Bonus, flywheel instancing but shaders are OFF (so "vanilla")

moving blocks with create does drop the fps, i thought it was because of flywheel not being fully optimized with shaders yet. try sildurs i get 60-70 fps with gtx 750ti and i dont use too much block rotation or windmill just stationary stuff

As mentioned in the OP, shader type doesn't matter.  I have sildurs which has funky issues in general and it exhibits the same problems, if not even worse performance.

60-70 fps with a 750ti is quite impressive considering I get the same fps with a 1660 super and having all of my machines stationary except 1 shaft that spins slowly.

60-70 fps with a 750ti is quite impressive considering I get the same fps with a 1660 super and having all of my machines stationary except 1 shaft that spins slowly.

i tweaked it alot plus the fabric performance modders are great lol

Yes they are, fabric modders in general are great. For some reason the MSPT Max with instancing is higher than having it off.
Instancing with shader
Off with shader
Instancing without shader
Off without shader
Instancing is great without shaders on with keeping the FPS up but the MSPT max is much higher than it being off.

Having any shaders enabled at all disables instancing for technical reasons, regardless of your settings.

Having any shaders enabled at all disables instancing for technical reasons, regardless of your settings.

Pretty much what I figured based on what I know of flywheel, I haven't put much more time into this since I haven't had any, but the small glances I took at the stack trace and code, I'm not too confident that any meaningful optimizations are really possible anywhere.  But, don't quote me on that of course, I'm no expert in the create/flywheel code nor shader code in this game.

Don't want to seem like I'm imposing anything here, but curious if anyone has gotten a chance to look at it and formulate a hypothesis?  I've spent most of this weekend upgrading and doing some long overdue maintenance on my machine, so the most I've done is test some theories out in the game itself that haven't have much fruit.  Once the tile entities are loaded that's pretty much it and the bottleneck hits.  The only thing I can think, from a "client side" non code approach is tomorrow if I have time I will try the Entity Culling mod, since the one built in Sodium seems to be playing it pretty safe.  If this is unoptimizable from create/Iris side the hope is at least that mod's more aggressive path tracing to culling can make the general area playable, and the factory itself will just have to be toggled off.

Yeah entity culling helps a bit more, but the problem is that create is not very optimized with shaders, check flywheel discord they are aware of the performance drop , but there are no clear plans for it yet

I use this additional mod: https://www.curseforge.com/minecraft/mc-mods/iris-flywheel-compat
It forces the Flywheel optimizations on even when shaders are enabled. I still get a performance drop when I place down complex models like the waterwheels, but it's wayyyy better than without the mod.

No need to necro a year old post.
This issue is related to flywheel and how instancing doesn't run with shaders, will probably be fixed in flywheel 1.0.0 and isn't really a create issue


Change bare-enum behavior for strict json

Fixes #2257.
This makes the behavior more consistent for strict mode json.

please review


[Gitter harikachepuri04] - Example of multipart/form-data in zerocode

TODO-

Create a Spring end point which accepts multipart/form-data
Write a zerocode test to assert that it has uploaded successfully.

@santhoshTpixler, yes, it is possible.
But. one of us will put an example soon. It should include both end-point and a test to verify. (In the mean time if you wanted a quick turn around, you can simply upload using Apache Http client's import org.apache.http.entity.mime.MultipartEntityBuilder;, org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity and execute the step in Zerocode.).
@aghorpade, can you please add an end point to the spring-boot demo project which accepts a multi-part form data and just log it to console, then returns 200/201 upon success?

@nirmalchandra - PR has been raised against spring boot demo project for file upload code

Thanks @aghorpade . PR-3 and PR-4 are pending review.
@santhoshTpixler, before merged, you can refer to this test case in the mean time.
In case you want to run it before the PRs are approved/merged, you need to clone/download this repo and run locally (branch ISS-107_file_up and run the test integrationtests.uploadfile.VerifyFileUpload.java).

@nirmalchandra Thank you for the example.

Hi,
I tried using the same test case for uploading a pdf file but i am getting  400 error code[E_INPUT_MESSAGE_NOT_READABLE]. Aren't we supposed to send parameters like content-type and Content-Disposition ..

@harikachepuri04,

name="content"; filename="abc.pdf"

This above is what the server expects. If you send the below, the upload will not work.

name="file"; filename="abc.pdf"

Hence I have put the respective review comments to take care of this aspects in the example PR.
The test will look like below and it enables one as well as more files to upload to the server.
(Of course you can override this behaviour in your HttpClient to match your project requirement, that's the advantage of the Zerocode framwork).

Example-1

{
    "scenarioName": "Upload a file to the server and assert success @@Harikachepuri04 And Santhoshkumar@@",
    "steps": [
        {
            "name": "upload_a_pdf_file",
            "url": "/api/abc-bank/upload",
            "operation": "POST",
            "request": {
                "headers": {
                    "content-type": "multipart/form-data"
                },
                "body": {
                    "files": ["file:project_files/my_zip_file.zip"]

                    // Comments -
                    // file: match this field name "file:<path>" to what your server expects
                    //    -- e.g. "file": "content:project_files/my_zip_file.zip"
                    //    -- e.g. "file": "binary:project_files/my_pdf_file.pdf"
                    //    -- e.g. "file": "file1:project_files/my_file.txt"
                    //    -- e.g. "file": "file2:project_files/my_zip_file.zip" etc
                    // and-
                    // "project_files/my_zip_file.zip": Allows 'test/resources' path or full absolute path
                }
            },
            "assertions": {
                "status": 200,
                "body": {
                    "message": "$CONTAINS.STRING:File uploaded successfully !"
                }
            }
        }
    ]
}

Example-2

{
    "scenarioName": "Upload two files and send more key-value request params Santhoshkumar@@",
    "steps": [
        {
            "name": "upload_a_pdf_file",
            "url": "/api/abc-bank/upload/filesAndRequestParams",
            "operation": "POST",
            "request": {
                "headers": {
                    "content-type": "multipart/form-data"
                },
                "body": {
                    "files": ["file:project_files/my_zip_file.zip", "file2:project_files/pdf_file.pdf"],
                    "trainList" : "Jubilee, Central, Bakerloo",
                    "id" : "LONDON-TUBE-UNDERGROUND"

                    // Comment-
                    // It uploads two files ".zip" and ".pdf" file
                    // Also sends two key-value param to server
                    // Server just prints these key-value(see in the server console)
                }
            },
            "assertions": {
                "status": 200,
                "body": {
                    "message": "$CONTAINS.STRING:File uploaded successfully !"
                }
            }
        }
    ]
}

See below how to run the above examples(Nothing different, except the @UseHttpClient)?

@TargetEnv("application_host.properties")
@UseHttpClient(ProjectApacheHttpClient.class)  //<--- Implements Apache multipart upload api.
@RunWith(E2eJunitRunner.class)
public class VerifyFileUpload {

    @Test
    @JsonTestCase("integration_tests/upload_file/file_upload_test.json")
    public void test_uploadFile() throws Exception {
    }

    @Test
    @JsonTestCase("integration_tests/upload_file/file_upload_and_more_params_test.json")
    public void test_uploadFileAndPassMoreParams() throws Exception {
    }

}

@UseHttpClient(ProjectApacheHttpClient.class) - This client has the upload code(We will put this into core framework in the next major release), until then you can use as it is or modify it to match your project needs.
e.g. If you need a "boundary" you can pass as below-
               {
                    "files": ["file:project_files/my_zip_file.zip"],
                    "boundary" : "--1122-boundry-8980912-sadf098-werwer"
               }

Hope it helps !
Did you clone the spring-boot demo repo and tried to run? That will make lot things easy.
You can simply change the server address and run these tests(or a bit of amendment) against your deployed app.

Finally, I have implemented a BasicHttpClient in order to fit my requirements. Thank you for providing such a useful piece of software. I was saved from reinventing the wheel.

@santhoshTpixler, glad to know that it helped you 👍
We will put this into the core framework in the next major release, so that everyone gets this out of the box.
I will merge this PR now and close this issue.

In my case I was need to send file along with json body.
What I have done:

Controller
@ResponseBody  public ResponseEntity<TranslationResponse> createTranslationRequest(          @RequestPart(value = "createTranslationRequest") @Parameter(name = "createTranslationRequest")  CreateTranslationRequest createTranslationRequest,          @RequestPart @Valid List<MultipartFile> attachments) {

Scenario
...
"request": {
"headers": {
"Content-Type": "multipart/form-data"
},
"body": {
"createTranslationRequest": "{"request":{"repoKey":"fiber","locales":["en_US","fr_FR"],"requestItems":[{"key":"key1"},{"key":"key2"}],"description":"Some description"}}",
"files": []
}
},
...

Create local copy of org.jsmart.zerocode.core.httpclient.utils.FileUploadUtils and put it in project java files along with tests to let classloader pick it up
Change PLAIN_TEXT content type to application/json

line 61:  multipartEntityBuilder.addPart(entry.getKey(), new StringBody((String) entry.getValue(), APPLICATION_JSON));


fixed line break issue on form labels for iOS

1. Why is this change necessary?

fixes a linebreak bug on iOS

2. What does this change do, exactly?

prevents line break after label

3. Describe each step to reproduce the issue or behaviour.

Just adapted the twig file

4. Please link to the relevant issues (if any).
5. Checklist

[ ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[ ] I have written or adjusted the documentation according to my changes
[ ] This change has comments for package types, values, functions, and non-obvious lines of code
[x] I have read the contribution requirements and fulfil them.

hey @jensgswiss
thanks for your contribution. I think this is a bugfix we could do in a bugfix release. would you mind targeting your PR against the 6.2 branch?

@mitelg no it's fine for me. I found another issue related to this. I'll go for one request then, to fix both. Thanks for the reply.

thank you, too :blush: :+1:


Command to clear keychain info for the app?

In the iOS app that we're testing, user session data persists to the keychain, even after removing and re-installing the app. Due to this a clearState property does not seem to be sufficient to get a clean state of the app in a such a scenario, as the previously logged in user will stay logged in.
In Appium we found a workaround for this being to force reset iOS Simulator itself when establishing session capabilities, as it is not capable of cleaning the keychain for a specific app (frankly, not sure that iOS even allows this technically).
Is something like clearing keychain info or a clean simulator restart command possibly coming in future versions of Maestro?

We use Facebook's IDB under the hood and it does seem to have an ability to clear the keychain (https://fbidb.io/docs/commands#clear-the-keychain), so this could be added 👍

This is now a part of version 1.7.1