Multi-field sort?

It's not readily apparent from the documentation how to structure a sort with secondary sort criteria. For example, I usually do a secondary sort by name. I can make it work by calling the secondary compare function inside the primary function, but that seems to defeat the Ramda philosophy.

do you have some example code?

Yes. This is the result of refactoring some existing code to use Ramda. The recency sort puts items with the most recent errors first. Items with no recorded error go at the end of the list. For items with the same timestamp or no timestamp, the sort is by name.
var nameLowercase = R.pipe(R.prop('Name'), R.toLower);

var compareByName = function (a, b) {
	return nameLowercase(a) < nameLowercase(b);
}

var compareByRecency = R.comparator(function (a, b) {
	if (!a.LastErrorTimestamp && !b.LastErrorTimestamp) return compareByName(a, b);
	if (!a.LastErrorTimestamp) return false; // 'b' has an error and 'a' doesn't
	if (!b.LastErrorTimestamp) return true; // 'a' has an error and 'b' doesn't
	if (a.LastErrorTimestamp == b.LastErrorTimestamp) { return compareByName(a, b); }
	return a.LastErrorTimestamp > b.LastErrorTimestamp;
});

var sort = {
	"alpha": {
		label: "Alpha",
		fn: R.sortBy(nameLowercase)
	},
	"recency": {
		label: "Recent Errors First",
		fn: R.sort(compareByRecency)

	}
}

Somehow I missed this issue when it came up.
Do you have a suggested API, even one that breaks backward compatibility?

Couple options here were discussed heavily for underscore and lodash

function returning an array and comparing each item of the array https://github.com/jashkenas/underscore/pull/1751
Array of strings or functions https://github.com/jashkenas/underscore/pull/1815
Array of strings or objects https://github.com/lodash/lodash/issues/414

Also see https://lodash.com/docs#sortByAll

One possibility I see is a three-function API:
R.sortByAll([
    R.ascend(R.prop('name')),
    R.descend(R.prop('age'))
], people)

My idea was that ascend and descend returned comparators:
ascend :: (Obj -> String) -> Obj -> Obj -> -1 | 0 | 1
descend :: (Obj -> String) -> Obj -> Obj -> -1 | 0 | 1
sortByAll :: [(Obj -> String) -> Obj -> Obj -> -1 | 0 | 1] ->[Obj] -> [Obj] (sorted)

Or maybe it would be better if sortByAll also returned a comparator, and it was used like this:
R.sort(R.sortByAll([
    R.ascend(R.prop('name')),
    R.descend(R.prop('age'))
]), people)

Some thoughts, anyway.

@megawac: I don't particularly like any of those APIs.
https://github.com/jashkenas/underscore/pull/1751 is the most interesting, but I would prefer something that could be composed out of pieces than something that tries to do it all in one shot like this.  The semver use-case is very nice, though.
The other two end up based on strings, and although I'm guessing that sorting on properties is the most common way people would want to sort, I would not want to be so restrictive.  And while Underscore and lodash do plenty of function-or-string processing, that's an anathema to Ramda.

Based on my limited knowledge of sorting algorithms, you would want to sort each item in the collection by the primary comparator while keeping track of which items have functional equivalence (groups of 2+). Next, sort each equivalent group by the second comparator, and so on, until there are no comparators or no groups left to sort.
This seems to imply a variadic sort function.
sort(comparator1, comparator2[, ...])
However, with curry, you'd never know when you're done. So that seems to imply the sortN convention.
sortN(3)(fn1, fn2, fn3)(list)
and
sortByN(2)(fn1, fn2)(list)
Does this api have more appeal?

Didn't we have this already? You can use R.or to compose comparators. That was also the reason for #442

Thats not sufficient for multiple fields which can be truthy
On Apr 16, 2015 9:12 PM, "Bergi"<EMAIL_ADDRESS>wrote:

Didn't we have this already? http://stackoverflow.com/q/26323317/1048572
You can use R.or to compose comparators. That was also the reason for #442
https://github.com/ramda/ramda/issues/442
—
Reply to this email directly or view it on GitHub
https://github.com/ramda/ramda/issues/994#issuecomment-93872536.

@megawac: You would or the comparators, which by definition return 0 only when they see the two values as equal.  So this works fine, but...
@bergus: or is binary.  We don't have a version that works on a list of functions.  So somehow it would have to be folded.  I'm not sure of the best way to do so, but obviously it could be done.

@CrossEye Yeah, for a list of functions you'd use a fold, however I think that is quite trivial:
var sortByAll = R.reduceRight(R.or, function(){return 0}) // foldr1 would've been better imo

I would think that should suffice, you very seldomly have more than 2 or 3 comparison functions to chain.

Whoops, didn't realize you were suggesting to use sort instead of sortBy. Anyway I'd love an API like:
var set = [{a: 1, b: 2}, {a: 3, b: 1}, {a: 2, b: 2}]
sortByAll([prop('a'), prop('b')], set)

// => [{"a":1,"b":5},{"a":2,"b":2},{"a":2,"b":3}]

I dislike reduce and or logic because it (probably) will not short-circuit.

@AutoSponge: This sort of reduction (which has to be run against R.either, due to a recent renaming) would actually short-circuit.
Imagine
var test = R.reduceRight(R.either. R.always(false));
var fn = test([R.propEq('a', 1), R.propEq('b', 2)]);
fn({a: 1, b: 5}); //=> true
fn({a: 3, b: 2}); //=> true
fn({a: 6, b: 7}); //=> false

because that reduce is essentially equivalent to
var fn = R.either(R.propEq('a', 1), R.either(R.propEq('b', 2), R.always(false)));

and the implementation of either is a curried version of
function either(f, g) {
  return function _either() {
    return f.apply(this, arguments) || g.apply(this, arguments);
  };
}

So in this case it would short-circuit.  However, the result is not curried as well as we might like.
test([R.propEq('a', 1), R.propEq('b', 2)], {a:1, b:2}); //=> :: Object -> Boolean
test([R.propEq('a', 1), R.propEq('b', 2)])({a:1, b:2}); //=> true

But that's another discussion entirely.

@AutoSponge: This sort of reduction (which has to be run against R.either, due to a recent renaming) would actually short-circuit.
Imagine
var test = R.reduceRight(R.either. R.always(false));
var fn = test([R.propEq('a', 1), R.propEq('b', 2)]);
fn({a: 1, b: 5}); //=> true
fn({a: 3, b: 2}); //=> true
fn({a: 6, b: 7}); //=> false

because that reduce is essentially equivalent to
var fn = R.either(R.propEq('a', 1), R.either(R.propEq('b', 2), R.always(false)));

and the implementation of either is a curried version of
function either(f, g) {
  return function _either() {
    return f.apply(this, arguments) || g.apply(this, arguments);
  };
}

So in this case it would short-circuit.  However, the result is not curried as well as we might like.
test([R.propEq('a', 1), R.propEq('b', 2)], {a:1, b:2}); //=> :: Object -> Boolean
test([R.propEq('a', 1), R.propEq('b', 2)])({a:1, b:2}); //=> true

But that's another discussion entirely.

@megawac:
The problem with that API is that it does not grant the flexibility to sort ascending or descending.  It would be doable for numeric values because we could just negate.  But it's not general.
That's why I suggested an API that took general comparators, similar to the on function @bergus described in that stackoverflow post.  That suggestion is still more flexible, and probably better than mine above.

Closing without prejudice for lack of activity.

@CrossEye
What does this supposed to return? (It returns 0 actually, BUT why?)
let heightComp = R.comparator((a, b) => a.height < b.heigth)
let ageComp = R.comparator((a, b) => a.age < b.age)

let a = {height: 90, age: 10}
let b = {age: 20, height: 100}

R.or(heightComp, ageComp)(a, b)

Does R.or even supposed to take functions as arguments?

R.or is a function that captures js boolean || operator. So it will return the first value if it's truthy, otherwise the second value. R.comparator takes a predicate function and turns it into a function that will return 1, 0, or -1, which is useful for sorting.
it's not clear to me why you are passing a sorting comparator to a boolean operation. As to why it returning a 0: that is because of the typo in line 1: b.heigth. Correct that, and the function returns -1

I was wondering how to write more eleganlty with ramda:
let heightComp = R.comparator((a, b) => a.height < b.heigth)
let ageComp = R.comparator((a, b) => a.age < b.age)

// items are like {age: 20, height: 100}, first sort by height, then by age:
let sortedItems = item.sort((a, b ) => heightComp(a,b) || ageComp(a,b) )

The original discussion here was closed; no one pursued it.  But your request makes me think of two reasonable APIs that we could have for a multiple-field sorting.
First of all, what you have above should work, with only one modification, but only because of some JS trickery.  We renamed or to either in Issue 843.  I believe your code would work with either, and if you folded over multiple eithers, it should work for more comparison fields.  But it only works because of Javascript's conflation of 0 and false, which some abhore, and you might too.  Nonetheless, it should work.
But this also makes me think that it would be a useful API to make it easy to combine these, either by replacing comparator with something that takes a list of functions instead or by adding a new function (comparators? multiComparator?) which accepts a list of existing comparators and does this dirty work, either simply folding with either or more explicitly calling each function in turn and returning the first non-zero result or the last result.
Does anyone find this compelling?

:-1: from me. I'd prefer to provide the tools to build such a thing rather than provide it directly.

I'd prefer to provide the tools to build such a thing rather than provide it directly.

Yeah, but you've already made it clear you're on the less-is-more side!  :smile:

@CrossEye

I believe your code would work with either, and if you folded over multiple eithers, it should work for more comparison fields. But it only works because of Javascript's conflation of 0 and false

Right I found that eigher works didn't write about it. But the problem that it works only in JS, but can not use it in TypeScript as either requires boolean predicates.
Do you think this can be solved by allowing either predicates to be non boolean?

The original discussion here was closed; no one pursued it. But your request makes me think of two reasonable APIs that we could have for a multiple-field sorting.

@CrossEye, I remember struggling a lot to find a decent API too and I'm still not satisfied about the decisions I made; anyway here's what I came up with at the time.
In a nutshell I decided to have two functions sorter and sorterDesc to build sorting criteria, a Sorter type, to be passed to the sorting function. The Sorter type has two members: a boolean indicating whether the intended sorting is descending and a compare function (more on this later).
The sorting function then accepts either multiple simple "reader" functions or multiple Sorters. Some examples here.
I let the easiness of use win as, for starters, I dislike having optional arguments in the sorter function and having the sort functions accepting multiple types, but I think that the result is quite clean.
Having:
var _ = require("lamb");

You can:
var weights = ["2 Kg", "10 Kg", "1 Kg", "7 Kg"];
var sortAsNumbers = _.sortWith(parseFloat);

sortAsNumbers(weights) // => ["1 Kg", "2 Kg", "7 Kg", "10 Kg"]

Or:
var persons = [
    {"name": "John"},
    {"name": "Mario"},
    {"name": "James"},
    {"name": "Jane"}
];

var sortByNameDesc = _.sortWith(_.sorterDesc(_.getKey("name")));

sortByNameDesc(persons) // => [{"name":"Mario"}, {"name":"John"}, {"name":"Jane"}, {"name":"James"}]

Having a compare member in the Sorter type allows to use existing interfaces:
var chars = ["a", "è", "à", "é", "c", "b", "e"];
var sortAsItalian = _.sortWith(new Intl.Collator("it"));

sortAsItalian(chars) // => ["a", "à", "b", "c", "e", "é", "è"]

Having a sorter and a sorterDesc also tackles a very little thing that has always bothered me.
If the sorting function is agnostic about the sort order, when you reverse a "stably-ascending-sorted" array you won't get the same result you would have by performing a descending sort.
Note to self: remember that in your notes this could have been material for a blog post to start promoting your work and instead you are writing in the issue tracker of an already well-established library.

I think this issue should be re-opened.
I've read through the thread - and while there are some really interesting API suggestions - I'd like a simple implementation similar to Lodash.
Lodash supports an array of iteratees to sort by: https://lodash.com/docs/4.16.4#sortBy
I have a performant backwards compatabile implementation in my fork:
module.exports = _curry2(function sortBy(fns, list) {
  if (_isFunction(fns)) {
    fns = [fns];
  }
  return _slice(list).sort(function(a, b) {
    var aa, bb
    var i = 0
    while (aa === bb && i < fns.length) {
      aa = fns[i](a)
      bb = fns[i](b)
      i += 1
    }
    return aa < bb ? -1 : aa > bb ? 1 : 0;
  });
});

This allows sorting by multiple fields:
R.sortBy([R.prop('score'), R.prop('title')], albums)

or
R.sortBy([
    R.prop('genre'),
    R.prop('score'),
    R.prop('title')
], albums);

Keys with numerical values can be made "descending" with R.negate
R.sortBy([
    R.compose(R.negate, R.prop('score')),
    R.prop('title')
], albums);

This may not be the perfect API. But I think it makes sortBy a lot more useful in many real world situations.
cc: @CrossEye

I think  I'd really prefer an API like
R.sortWith([
    R.ascend(R.prop('genre')),
    R.descend(R.prop('score')),
    R.ascend(R.prop('title'))
], albums);

And if someone wanted to add their own gloss that used, say 'genre, -score, title', more power to them.

@CrossEye I don't think that ascend/descend API is feasible (though it looks pretty :))
Perhaps
R.sortByMultiple([
  [R.prop('genre'), R.ascend],
  [R.prop('score'), R.descend]
])

@CrossEye @megawac I like the sortWith proposal from @CrossEye.
If I understand correctly then R.ascend would be an alias of R.comparator.
The code could look like this:
function ascend(fn) {
  return function(a, b) {
    var aa = fn(a)
    var bb = fn(b)
    return aa < bb ? -1 : aa > bb ? 1 : 0;
  }
}

function descend(fn) {
  return function(a, b) {
    var aa = fn(a)
    var bb = fn(b)
    return aa > bb ? -1 : aa < bb ? 1 : 0;
  }
}

function sortWith(comparators, list) {
  return _slice(list).sort(function(a, b) {
    var result = 0
    var i = 0
    while (result === 0 && i < comparators.length) {
      result = comparators[i](a, b)
      i += 1
    }
    return result;
  });
}

@megawac what about the proposed API isn't feasible?
 As I mentioned in my earlier I think this is an important addition to the API. In many cases where sorting is required - it will be by more than one factor.

@davidgtonge:
Yes, I would probably favor deprecating comparator in favor of ascend.
I could also see deprecating sort, although really I'd prefer to use that name for sortWith, we couldn't do that in a single step without risking too much breakage.

@davidgtonge:
I'm having some connectivity troubles at home (for the umpteenth time; some day I'll pony up the big bucks to run cable lines the 400 feet from the road to my house.)  When I can get things working, I will create a PR for this, unless someone beats me to it.  (Hint, hint! :smile:)

Ah my mistake, I thought R.ascend/R.descend were taking a single element
(ala sortBy)
On Wed, Oct 19, 2016 at 9:28 AM, Scott Sauyet<EMAIL_ADDRESS>wrote:

@davidgtonge https://github.com/davidgtonge:
I'm having some connectivity troubles at home (for the umpteenth time;
some day I'll pony up the big bucks to run cable lines the 400 feet from
the road to my house.) When I can get things working, I will create a PR
for this, unless someone beats me to it. (Hint, hint! 😄)
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/ramda/ramda/issues/994#issuecomment-254812053, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ADUIEOvUP3lE0Qwsa8YdgsKF-nNUIl-3ks5q1hrmgaJpZM4D4gNq
.

@CrossEye understood re connectivity :-)
I'll see if I can beat you to it with a PR

Please see the above pull request for an example implementation.
I misunderstood the current comparator method. It actually has a different purpose from ascend.

I misunderstood the current comparator method. It actually has a different purpose from ascend.

Damn, I should really remember that.  I'm quite sure I wrote both!

@CrossEye @davidgtonge @megawac how would you guys dynamicaly compose this functions (ascend, descend, ...) together?
Let's assume there were a table and by clicking on sorting buttons the user would generate such a definition of the sorting:
[{prop: "score", reverse: true}, {prop: "title"}]

or just
[{prop: "title"}]

Something like this would probably do it:
const toSorter = compose(sortWith, map(
  dir => (dir.reverse ? descend : ascend)(prop(prop('prop', dir)))
))

const directions = [{prop: "score", reverse: true}, {prop: "title"}]
const tableSorter = toSorter(directions)

tableSorter([
  {score: 35, title: 'def'},
  {score: 22, title: 'ghi'},
  {score: 49, title: 'jkl'},
  {score: 35, title: 'abc'},
]) //=> [{score: 49, title: 'jkl'}, {s: 35, t: 'abc'}, {s: 35, t: 'def'}, {s: 22, t: 'ghi'}]

This looks funny, but makes sense: prop(prop('prop'...

Yes,  this is the whole point. One would always find a workaround but this thread is all about having a nice API and one would mostly need to sort a list dynamically. If you looked at toSorter separately you would struggle to understand what the function does. At least I think that there definitely is space for improvement.

I guess I'm a little confused what you're asking for.
I wrote that quick solution as a way to convert your specific format to a useful sort function.  It certainly is not how I'd suggest writing a one-off sorter for such data.  For that, I would simply write
const tableSorter = sortWith([
  descend(prop('score')),
  ascend(prop('title'))
])

which to me looks quite readable.
Ramda's sorting API offers five functions:

sort is an immutable take on the built-in sorting, taking a comparator and a list and returning a sorted version of that list.
sortWith extends that to take a list of comparators, which are checked in turn for the first non-zero response,
sortBy allows you to sort on representations of your objects in some ordered type (Number, String, Date) by accepting a function that returns such a representation and a list.
ascend and descend create comparators in the same way as sortBy, but don't do any sorting themselves.  The results of these can be fed to sort, sortWith, or Array.prototype.sort.

These allow you to build up all manner of sorting functions.  But Ramda is intentionally a fairly low-level library: offering you useful tools, but leaving final assembly of them to the user.
So I doubt Ramda would ever be interested in directly supporting the sort of API of tableSorter above.  It's too specific, and not flexible enough.  If you're looking for that directly from Ramda, I'm guessing you're out of luck.  But I think it's easy enough to write something like that on top of the functions Ramda offers.

All I wanted is to adjust the function toSorter and the input directions in order to make it more readable.

I don't know what would count as more readable to you.  This has all the steps really spelled out:
const toSorter = (sortCriteria) => {
  const sortFunctions = map(criterion => {
    const sortField = prop('prop', criterion)
    const sortDescending = propOr(false, 'reverse', criterion)
    if (sortDescending) {
      return descend(prop(sortField))
    }
    return ascend(prop(sortField))
  }, sortCriteria)
  return sortWith(sortFunctions)
}

It's much the same idea, but I would prefer this version:
const toSorter = (sortCriteria) => {
  const sortFunctions = map(criterion => {
    const sortField = prop('prop', criterion)
    const sortDescending = propOr(false, 'reverse', criterion)
    return sortDescending ? descend(prop(sortField)) : ascend(prop(sortField))
  }, sortCriteria)
  return sortWith(sortFunctions)
}

Each of these should have the same behavior as the one I listed above.
But I really have no idea if that's what you're looking for.  I don't know how you would update the input to this function.  I was under the impression that these were fixed.

Thank you @CrossEye. Please do not take it personally. I wanted to involve the community and see how different people would approach this task.

@1024gs:
I didn't take it personally.  It just wasn't -- and still isn't -- clear to me what you're looking for.  I can't tell if what I just supplied helps or not.

Hello. I've tried your algo @CrossEye to sort my data with 2 criterions, but I can't make it work...
Here is my code :
const data = [   { label: "oignon", reference: "21", isVariation: "true" },   { label: "oignons nouveaux", reference: "12", isVariation: "false" },   { label: "tomate", reference: "13", isVariation: "true" },   { label: "courgette", reference: "54", isVariation: "true" }, ];
const sortCriterions = [   { field: "label", order: "ASC" },   { field: "isVariation", order: "DESC" }, ];
`const toSorter = () => {
const sortFunctions = map(criterion => {
const sortField = prop('field', criterion)
const sortDescending = prop('order', criterion) === "DESC"

return sortDescending ? descend(prop(sortField)) : ascend(prop(sortField))

}, sortCriterions)
return sortWith(sortFunctions)
}
`
const sortedData = toSorter(data)

I refactor the sort function: less code, more simple:
const orderMap = {
  ASC: ascend,
  DESC: descend
};

const sortWithCriterions = (criterions, data) =>
  R.sortWith(
    R.map((c) => orderMap[c.order](R.prop(c.field)), criterions),
    data
  );

const sortWithCriterionsV2 = R.useWith(R.sortWith, [
  R.map(({ field, order }) => orderMap[order](R.prop(field))),
  R.identity
]);

console.log(sortWithCriterions(sortCriterions, data));

console.log(sortWithCriterionsV2(sortCriterions, data));

@dinaramaro You should call toSorter() first to return sortWith(sortFunctions), as follows:
const sortedData = toSorter()(data)

Aaah yes ok, I didn't realize that we need to execute toSorter() fist many thanks !
Great for the refacto, thank you! 🚀

@adispring What is the purpose of returning idendity ?

R.identity does nothing but return the parameter supplied to it.
In the above example, R.identity will just pass the data to R.sortWith's second parameter without transformation.
If you want to know why and what happened, you need to figure out the meaning of R.useWith. And compare the implementation of sortWithCriterions and sortWithCriterions, they do the same thing.

@adispring, @dinaramaro:

@dinaramaro You should call toSorter() first to return sortWith(sortFunctions), [as follows] (https://codepen.io/adispring/pen/bGWByaY?editors=0010):
const sortedData = toSorter()(data)

And this is necessary because your code changed the original in an unanticipated manner.  The original had this:
const toSorter = (sortCriteria) => { ... }

Dina's version looks like this:
const toSorter = () => { ...}

and uses the sortCriteria as a global.  The idea of my version and of @adispring's refactoring is that this is a function that takes a configuration and returns a sorting function for your data.  There are many variants of this possible, as the whole thread above demonstrates.


Ignore protobuf is warned by Python 3.7

Jenkins, test this please.

Jenkins CI test (for commit e4dc8a3a19eb9019fa0648e4e198c5ce05b68fbe, target branch master) failed with status FAILURE.
(For contributors, please wait until the reviewer confirms the details of the error.)

Jenkins, test this please.

Jenkins CI test (for commit e4dc8a3a19eb9019fa0648e4e198c5ce05b68fbe, target branch master) succeeded!

LGTM!


Add --commits command line option

For CI, it would be great to have a --commits options that allows one to specify a comma separated list of commits id to track.

I'd like to use this feature. I'm willing to contribute, but would probably need some pointers on what would be the best way to approach this.

I did some research, but I'm not sure this will be easy.

Hi I am interested in this, more specifically in allowing the user to pass in a range of commits.
I have a version of the code which works with a new argument --since-commit so git lint can be invoked as git lint --since-commit master to lint all the changes between a given commit/branch/tag and HEAD.
@sk- I don't have much knowledge of mercurial so I am not adding that feature there. If you still take PRs I'll send you one in a couple days.

@YBadiss mind sharing your solution? I'm looking for something that will fail CI builds if there's lint in the changeset.

@mistercrunch I found a supremely kludgy approach to using git-lint to fail CI if there's new lint in a PR. I accomplished it by means of a Make target which stores the current commit hash, does a git soft reset back to the latest common ancestor of the branch in the PR and origin/master, runs the linter (since all the changes from the commits in the PR are now staged), then resets back to the current commit.
.PHONY: lint
lint:
        CURRENT_COMMIT=$$(git rev-parse HEAD)                           ;\
        CURRENT_BRANCH_NAME=$$(git rev-parse --abbrev-ref HEAD)         ;\
        ANCESTOR=$$(git merge-base $$CURRENT_BRANCH_NAME origin/master) ;\
        git reset --soft $$ANCESTOR                                     ;\
        pipenv run git lint                                             ;\
        EXIT_CODE=$$?                                                   ;\
        git reset $$CURRENT_COMMIT                                      ;\
        exit $$EXIT_CODE

This works both locally and on CI (tested on CircleCI), and will work locally as well. I'm still a little suspicious of what I'm doing with the git resets, but in my testing, it seems to be just fine. Let me know if this approach works for you!

For the ones looking on how to integrate git-lint in a CI environment, I just integrated it into Travis CI, (see the .travis.yml config).
Basically you do:
git reset --soft ${TRAVIS_COMMIT_RANGE%...*} && git lint

A similar approach could be done in Circle CI using the environment variable CIRCLE_COMPARE_URL

@jombooth just saw this, since then a lot happened and somehow I never pushed that change anywhere. Will look into it again soon.

@sk- I've got something working that uses git rev-list to get the commits/diff in a variety of manners.
If you wanted everything on branch a but not branch b (for example, a PR) you'd do something like
git lint --git-diff 'a ^b'

If you wanted a commit range
git lint --git-diff 'aeb273ab9..8203bce9089'

Basically if it works with git diff-tree and git rev-list it'll work.  If you'd like I can clean it up, write some tests, and submit a PR


make getRecent not require an OAuthToken

This pull request fixes the following things:

Added a stack.yaml file to make it easier for stack users to build this repository.
Formatted Users.hs to make the code more uniform.
Changed Instagram.Users.getRecent to not require an OAuthToken.
Bumped version to 0.5.

This fixes issue #15.

Looks good to me!  I won't merge right away just in case you may want to change the line which I commented above.

Thanks for the review, I will merge this.


AppKitNavigation

Hello everyone, I love AppKit. I am very pleased to see that UIKit has such an excellent framework available.
I have also watched videos from pointfreeco, where it is mentioned more than once that domain modeling is the most important thing, and using tools can make any platform serve the model.
I spent some time porting part of the API, and most of the NSControl can be use. Next, I will add some AppKit-specific navigation, such as sheet, modal, and some macOS-specific controls, and a lot of documentation still needs to be refined, as well as example projects and tests.
This PR is not yet complete, so please do not merge it yet!
For those who are interested, you can try running the example project

Awesome work! We're looking forward to diving into it soon :smile: I've converted things to a draft for now, so just tap the "Ready for review" button whenever you think things are in a good place.

Oh, and another note: let's not worry about documentation or case studies at all right now. Those are typically things we save till the end when we're close to release, and we can discuss how we may want to approach that when things are further along and everything else has landed in main.

@stephencelis I understand your point now. This branch is mainly for quickly implementing my ideas and verifying if they're effective. I'll follow your suggestion and break them down into smaller units, then submit PRs for each one individually.


[Bug] [javasrc2cpg] Memory leak

Description
javasrc2cpg seems to have issues reclaiming memory back between scans.
For instance, here's what it's memory usage looks like when running its unit-tests back-to-back 3 times:

This is problematic when using Joern as a library to run multiple scans, as memory usage will keep growing over time.
Discussion
With a profiler, I traced this issue at least back to JdkJarTypeSolver.addArchives (and registerPackagesForJar). It seems that every time we repeat this process (of creating a new JdkJarTypeSolver with JDK jars) we are unable to reclaim a considerable chunk of memory back.
However, I couldn't figure out much past this point. I have my suspicions on classPool.
A temporary workaround
I implemented a JdkJarTypeSolver.fromJdkPath cache, so that for each JDK path we build at most one JdkJarTypeSolver. It's discussable whether this is appropriate or not. For some use-cases, it certainly is safe to assume the JDK path contents won't change in between scans.
Repeating the same unit-tests back-to-back 3 times now yields the following graph:

No changes in the tests' outcome. Even though this isn't a real fix, it's now much more manageable.
Is this something worth of a PR?
cc @johannescoetzee

@johannescoetzee is on vacation until 01/19/24.
So I think it's a good idea to simply go ahead and take your PR.


Tex rendering fails silently

Occasionally tex rendering will begin and then fail before sending the rendered document.
(Possibly related and automatically fixed by #37)

Test case: $n^{\frac{1}{\log{\log{n}}}}$

Another test case: $2^{O(\sqrt{\log n \log \log n})}$. My instinct is that it's something to do with weird heights? Both examples I've seen have complicated exponents.

A few minimal test cases I've managed to find are $1^\frac12$ and $1^{1^1}$, but things like $\frac{1^2}{2}$ don't. The actual error is thrown from within the image saving routine (https://github.com/UWCS/apollo/blob/0db0711a924b8cd1485c88ccd89a5a52e0ace452/cogs/commands/tex.py#L98) with a index error, which makes me think it might be to do with the cropping algorithm immediately preceding it.


Add better details on how using seasons in the forecast file

At the 2024 ICES course, there was a person that had a seasonal model and was having difficulty getting it to run with a forecast file. Jason was trying to help the person debug the model/forecast file but also realized that the user manual wasn't very clear on how to set up the forecast file with a seasonal model.

Did the user look at echoinput.sso?


Document updated transaction_fetch config option

Document updated transaction_fetch engine configuration option. See https://github.com/ConsenSys/sumo/pull/2522 and check that it is merged first.

Feature not needed. Per Jakub Trad:

Hey, my bad, we have since changed the approach and the documented configuration options will soon be removed. I'll make sure not to use the doc-change-required unless the feature is stabilized


3rd linked remote shows undefined, cannot be removed

I tried to link multiple remotes to one shade. This resulted in the third shade showing undefined, undefined. (see attached picture) I cannot remove the entry - the garbage icon asks yo delete, if I confirm then nothing changes.
By the way, how many remotes can be linked? I have three telis4, one on every floor. All of them can control the blinds, in total 6 codes per blind because all remotes use the fifth group to control all blinds.

You can link up to 5 remotes per shade.  First go to the updates tab and generate a backup then post it here.  This will let me know if I somehow got the indexing incorrect.  Then try restarting the ESPSomfy RTS device and refresh the browser.

Hi, I tried rebooting, refreshing the browser, ipad and PC but the undefined one remained. I never could get more than three items visible in the list, one of which "undefined". I added the backup, if I interpret it correctly the first blind has 5 remotes, but I'm not sure which ones anymore, and remove does not seem to work anymore.
ESPSomfyRTS 1970-01-01T01_39_56.zip

I'll have a look.  Interestingly, I see a valid address for the linked remote in the output so this might be the buffer size for the screen display.

Thank you very much!

Please pull v1.5.0.  I also increased to max number of linked remotes to 7 from 5.  If you use Home Assistant do not forget to update that component as well.

I updated both HA and the firmware. It now works properly, I was able to remove remotes and add all of them back.
One small thing though, I think you have a similar problem with buffer in the linking process. If I link more than say 5 remote codes at once, the list shows undefined still. When I save and edit the shade again, it is shown correctly.
Thanks again for all your effort.

You are correct the output from the link and unlink remote needed to be changed as well.   This will be fixed in the next update.  Thanks for reporting it, I do not have that many remotes so I had to make all ESPSomfy RTS devices link to a single roller shade to even test it.


Don't install python packages during startup

Issue: after installing the extension Slicer takes a long time to start up which could make users think the program has hung.
In this image you can see that many python packages are being installed when the module is being detected, but this would not be visible to most users who launch from a icon.

Suggested fix:
This code should be moved so that it doesn't run during module discovery:
https://github.com/ImagingDataCommons/SlicerIDCBrowser/blob/dc7b361cd2735fb6dc9c5ded9fb266ffd4a0dca7/IDCBrowser/IDCBrowser.py#L36-L38
Instead, it would be good to follow the practice like in the TotalSegmentator extension, where installation of large packages is done specifically when the user requests it and GUI feedback is provided.

Agreed, good point!

@pieper please reopen if you have any concerns after checking out the updated version!


The following _CastError was thrown building

Environment
ios
Version:
layout: ^1.0.2
Description
I'm having a red error screen when wrapping Layout around MaterialApp and using context.layout.breakpoint
Here is the error :
The following _CastError was thrown building FwpApp(dirty, state: _FwpAppState#4edf4):
Null check operator used on a null value
...
The relevant error-causing widget was:
  FwpApp FwpApp:file:///Users/pierrebresson/Documents/Code/fwp/lib/setup_app.dart:53:22

When the exception was thrown, this was the stack:
#0      Layout.of (package:layout/src/layout.dart:55:68)
#1      LayoutBuildContext.layout (package:layout/src/layout.dart:163:35)
#2      _FwpAppState.build (package:fwp/app.dart:129:18)

Which I believe is caused by the ! operator inside 'src/layout.dart'  line 54 :
static LayoutData of(BuildContext context) => context
      .dependOnInheritedWidgetOfExactType<_LayoutInheritedWidget>()!

Steps to reproduce
You can reproduce the issue on this repo. You will get the error if you add Layout and then simply try to use context.layout.breakpoint

I think you haven't added the Layout widget anywhere in your app no?
https://github.com/PierreBresson/flutter-wordpress-podcast/search?q=Layout&type=code

Yeap, I was testing it locally, here is the example commited : https://github.com/PierreBresson/flutter-wordpress-podcast/blob/22b53e2788dbf25cd0c9ae454854e641e6deb529/lib/app.dart#L135


Node list not showing

Pagination.js:165 TypeError: Cannot read properties of undefined (reading 'restGatewayUrl')
    at Function.formatNodeInfo (NodeService.js:110:35)
    at NodeService.js:68:64

This one is fixed.


Dockerfile additions

addition of two Dockerfile's for ephemeral runtime environments

beautiful, merged :) Thank you :) Will include this in our dev update channel ;)


superinit not catching "An error was encountered while accessing Keycloak"

➜  lemondrop superinit -s lemondrop
➜  lemondrop cray uas list
Usage: cray uas list [OPTIONS]
Try 'cray uas list --help' for help.

Error: Internal Server Error: An error was encountered while accessing Keycloak
➜  lemondrop cray auth login
Username: alanm
Password:
Success!

➜  lemondrop cray uas list
[]

Fixed with c39e56b8408161bb9e7a372809cc2538d11c5b90


HBASE-23030 Update completebulkload hadoop jar usage in related doc

:confetti_ball: +1 overall

Vote
Subsystem
Runtime
Comment

:blue_heart:
reexec
6m  3s
Docker mode activated.

_ Prechecks _

:green_heart:
dupname
0m  0s
No case conflicting files found.

:green_heart:
@author
0m  0s
The patch does not contain any @author tags.

_ master Compile Tests _

:green_heart:
mvninstall
8m  7s
master passed

:blue_heart:
refguide
7m  9s
branch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.

_ Patch Compile Tests _

:green_heart:
mvninstall
7m 17s
the patch passed

:green_heart:
whitespace
0m  0s
The patch has no whitespace issues.

:blue_heart:
refguide
7m  4s
patch has no errors when building the reference guide. See footer for rendered docs, which you should manually inspect.

_ Other Tests _

:green_heart:
asflicense
0m 25s
The patch does not generate ASF License warnings.

37m 28s

Subsystem
Report/Notes

Docker
Client=19.03.2 Server=19.03.2 base: https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-630/1/artifact/out/Dockerfile

GITHUB PR
https://github.com/apache/hbase/pull/630

Optional Tests
dupname asflicense refguide

uname
Linux d618561ed7ba 4.15.0-58-generic #64-Ubuntu SMP Tue Aug 6 11:12:41 UTC 2019 x86_64 GNU/Linux

Build tool
maven

Personality
/home/jenkins/jenkins-slave/workspace/HBase-PreCommit-GitHub-PR_PR-630/out/precommit/personality/provided.sh

git revision
master / 1cb4f687c1

refguide
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-630/1/artifact/out/branch-site/book.html

refguide
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-630/1/artifact/out/patch-site/book.html

Max. process+thread count
86 (vs. ulimit of 10000)

modules
C: . U: .

Console output
https://builds.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-630/1/console

versions
git=2.11.0 maven=2018-06-17T18:33:14Z)

Powered by
Apache Yetus 0.11.0 https://yetus.apache.org

This message was automatically generated.


Travis: install sphinx for docs build

Currently the docs don't build on travis because sphinx isn't installed. Fix that

I think my previous cleanup #417  was to aggressive.
On a second though we'll also need
-sphinx-rtd-theme
-jsonschema
-sphinxcontrib-jsonschema

Yes adding that now. Once the docs build more cleanly we should imho make failing to build the docs a hard failure on travis


Extract documentation comments

Would be nice to have documentation in C and Swift as well.
Not sure if it's possible.

In progress now https://github.com/royalapplications/beyondnet/commit/e4c6db8d7b6b0a8ee518256d15bb9887eb604e2f


Add aboveLayerID to UserLocation

Description
Fixes #534
We can now specify a layer id above which all UserLocation layers should render, effectively allowing us to render UserLocation above everything else on our map.
Checklist

[x] I have tested this on a device/simulator for each compatible OS
[X] I updated the documentation with running yarn generate in the root folder
[x] I mentioned this change in CHANGELOG.md
[X] I updated the typings files (index.d.ts)
[ ] I added/ updated a sample (/example)

Screenshot OR Video
Before:

After

@davidlcorbitt there are prettier errors in GH actions. Can you please fix those:

/home/runner/work/maps/maps/javascript/components/UserLocation.js
145
Error:    34:28  error  Replace showsUserHeadingIndicator,·heading,·aboveLayerID with ⏎··showsUserHeadingIndicator,⏎··heading,⏎··aboveLayerID,⏎                                                                                prettier/prettier
146
Error:   251:12  error  Replace ·children,·visible,·aboveLayerID,·showsUserHeadingIndicator,·onPress,·animated·}·= with ⏎······children,⏎······visible,⏎······aboveLayerID,⏎······showsUserHeadingIndicator,⏎······onPress,⏎······animated,  prettier/prettier
147
Error:   252:5   error  Replace · with }·=                                                                                prettier/prettier
148
Error:   276:21  error  Insert ⏎·········                                                                                prettier/prettier

I'll actually close this PR for now since it appears that specifying aboveLayerID is not enough to prevent layers from re-rendering above the location indicator if those layers are removed from the map and then added back in.  I'll have to fall back on the native iOS user location indicator and style that instead.
Thanks for looking at this @mfazekas


Request for Ownership Transfer

Hello @kennethreitz
I am using it many of my Django projects and I want to maintain it to take it forward.
Can you please transfer me this project?
I have added my comment here

I have asked the DSF if they are interested, first. This is an extremely important project.

Will also ask Heroku, potentially.

Okay @kennethreitz , Sounds Good :+1:

This project is now owned by @jacobian, who will move it into django, at an appropriate time.

Hey @ParthS007 thanks for the offer! There's definitely still room for others to help out if you're still interested, please see #120.


Use a descriptive error if service ID is not found

Summary
Make a small change to service keeper to return a more descriptive error if the requested service ID is not found.
Issue
Make the error more self explanatory if the service ID, specified in the query, does not exist.
Type of change
Select one or more:

[ ] New feature, functionality or library
[ ] Bug fix
[x] Code health or cleanup
[ ] Documentation
[ ] Other (specify)

Testing

[x] Unit Tests: make go_develop_and_test
[ ] LocalNet E2E Tests: make test_e2e
[ ] DevNet E2E Tests: Add the devnet-test-e2e label to the PR.

Sanity Checklist

[x] I have tested my changes using the available tooling
[ ] I have commented my code
[x] I have performed a self-review of my own code; both comments & source code
[ ] I create and reference any new tickets, if applicable
[ ] I have left TODOs throughout the codebase, if applicable

@adshmh Bump on this.


New tag

@karmafeast Please accept this merge and add a tag 1.0.5.

@karmafeast Following up on this.

@karmafeast Following up on this. Can you please do the needful?

@karmafeast  Following up on this. Can you please do the needful?

@karmafeast Following up on this. Can you please do the needful?


Autocomplete: Missing display value after value selection

I use the Autocomplete control but after selecting any value it is not displayed in the UI. Against my expectactions the selected value IS binded correctly. Here a short code snippet:
<FormikAutocomplete
                label="Super Document"
                value={documentFormPayload.superDocument.value}
                name="superDocument"
                onLoadOptions={(query: String) => {
                  return documentFormPayload.superDocument.values;
                }}
                valueProp={o => o}
                textProp={o => o.id + ": " + o.name}
              />

Hi,
i can't replicate your problem.
Seems like this is something specific to your application.
@waretec  You could try to replicate the problem in a codesandbox to share it with us.


test(reactivity): modify reactive tests

Just want to perfect the unit test,make the coverage rate 100%.This is my first pr..hope it can be helpful

不要发垃圾 PR。再犯直接 block。


Replace subscriptions-transport-ws with graphql-ws

In the new version<EMAIL_ADDRESS>switched from subscriptions-transport-ws to graphql-ws to handle Subscriptions.
But the new implementation does not seems complete. The client (@bluelibs/ui-apollo-bundle) still uses the older subscriptions-transport-ws. And on the server the GraphQL context is not properly initialized for Subscription resolvers.
I tried patching the package on my side, and came to do these modifications in order to have a fonctionning websocket server for GraphQL Subscriptions.
I open a Pull Request here in order to share the modifications, if my problem is found to be a real bug on bluelibs, fell free to  consider this for merging.
Else if I was the only having this error, I will close this PR and try to find where in my installation the problem is.

Perfect.

<EMAIL_ADDRESS>


homebrew-autoupdate is not working with sudo -uH or su -

homebrew-autoupdate is not working with sudo -uH admin or su - admin
Homebrew is installed within an administrator account (not root).
For daily use I granted a normal user to manage homebrew via sudoers-entry.
So things like sudo -Hu admin brew install/update/etc or su - admin and afterwards brew install/update/etc are working flawlessly.
The only thing which is not working is homebrew-autoupdate.
If I were logged in as admin - everything is fine.
But if I was logged in as a normal user, sudo -Hu admin brew autoupdate --start 7200 --upgrade --cleanup --enable-notification --debug or first su - admin and afterwards the previous brew autoupdate command, results in:
Warning: Please note if you use Casks that require `sudo` to upgrade there
are known issues with that use case and this command unless using
`SUDO_ASKPASS`.

  https://github.com/Homebrew/homebrew-autoupdate/issues/40

/usr/local/Homebrew/Library/Homebrew/brew.rb (Formulary::FormulaLoader): loading /usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/terminal-notifier.rb
Homebrew will now automatically update every 2 hours, or on system boot.
/usr/local/Homebrew/Library/Homebrew/brew.rb:125:in `exit'
/usr/local/Homebrew/Library/Homebrew/brew.rb:125:in `<main>'

sudo -Hu admin brew autoupdate --status reports:
Autoupdate is installed but stopped.

Autoupdate was initialised on 04/18/21.

Also if I log in first as admin, run brew autoupdate --start 7200 --upgrade --cleanup --enable-notification --debug, log out and log in afterwards as a normal user sudo -Hu admin brew autoupdate --status reports the same:
Autoupdate is installed but stopped.

Autoupdate was initialised on 04/18/21.

What is more, even if the setup works with a local admin account logon - as soon as the admin user is logged out, the launch daemon application.com.github.domt4.homebrew-autoupdate.autoupdater.42866421.42866425 is no longer running.

I don't have a particularly easy way to test this without messing around with my local system, but my initial very vague suspicion would be that this tool uses things like File.expand_path("~/Library/LaunchAgents/#{name}.plist") instead of ENV["USER"], leaving the daemon being launched from the wrong user, essentially.
Can you check if the logs/etc exist in either the admin or normal user's ~/Library/LaunchAgents and ~/Library/Logs/com.github.domt4.homebrew-autoupdate?

You're right. Both, the LaunchAgent /Users/admin/Library/LaunchAgents/com.github.domt4.homebrew-autoupdate.plist and the log file /Users/admin/Library/Logs/com.github.domt4.homebrew-autoupdate exist at the admin user (which is called with sudo).
Since the admin user is hardly or not logged in at all, the homebrew-autoupdate LaunchAgent is never started either. Is there a way to rebuild the script so that homebrew-autoupdate is executed under the logged-in user?

Is there a way to rebuild the script so that homebrew-autoupdate is executed under the logged-in user?

I'd be happy to review a PR that attempts this in a sensible way, but I don't have the time to do so myself now I'm back to working full-time sadly. Happy to come back to this in future if I can.


WebApp - Bug related to Swap feature

Describe the task

[x] Not allow close popup "Still there" when out focus

Actual: When out focus (click on background) then popup "Still there" is closed and quote do not reset
Expect: Do not close popup "Still there" when out focus

[x] Add validate require for Amount and validate Amount > 0

[ ] Handle case show history of the recipient account in case recipient account in wallet

Actual: Do not show history
Expect: Show history

[ ] UI bug with large number

[ ] UI bug when Select token

[ ] Update style

[ ] Update style token name

Bugs on responsive

[x] UI bug on the Term of service screen

[ ] Disable all actions when submitting data

[ ] Swipe up and down on the pop-up screen but scroll on the bottom screen

Example: Swipe up and down on the Swap quote pop-up but scroll o Swap quote details screen

[ ] Update popup

[ ]  Handle case Ledger account

Actual: Still show token which not supported
Expect: Filter out token not support

[ ] Update UX in case swap with XCM

[ ] Add message on XCM confirmation screen when swap

Header: Action needed

Message: The amount you entered is higher than your available balance on X network. You need to first transfer cross-chain from Y network to X network to continue swapping

Type message: info

[ ] UI bug


Update advanced menu click

1. Why is this change necessary?
On a tablet device the menu does't open on first click.
If you have a sub menu, it make sense.
But without it should open directly.
2. What does this change do, exactly?
It fix it.
3. Describe each step to reproduce the issue or behaviour.
4. Please link to the relevant issues (if any).
5. Which documentation changes (if any) need to be made because of this PR?
6. Checklist

[ ] I have written tests and verified that they fail without my change
[x] I have squashed any insignificant commits
[x] 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.

Could you please fill out step 3. so we are able to reproduce the problem more easily? Also, what cases/devices did you check your change with?


Fluentd drainer fails when compressConfigFile is enabled

Describe the bug:
When compressConfigFile is set to true, the drainers pods are generated without the initContainer responsible for the config decompression. Fluentd starts with defaut /fluentd/etc/fluentd.conf and the job goes into error after some time.
Expected behaviour:
The fluentd drainer jobs support the compressConfigFile and is populated with the right config file.
Steps to reproduce the bug:

Create default Logging stack with compressConfigFile: true
Scale down one fluentd
Observe the drainer definition and its status

Environment details:

logging-operator version (e.g. 3.9): 3.17.10

/kind bug

It is even worse than that, these drainers use the default fluentd config. It looks like they stay in the kubernetes service pool and continue to pick up fluentbit logs. However, they are not able to forward them. I'll investigate this more seriously tomorrow and let you know.


Prompt before overwriting .hyper.js

Currently, if there is an error in ~/.hyper.js when Hyper is loading up, it will overwrite the file with the default configuration with no prompt.
Going along with #796, I think we should provide better errors for what's wrong with the file, or at the very least make the user confirm whether or not the config should be overwritten.
Otherwise someone else may find themselves with a not-so-pleasant surprise when their settings are gone 😨

Did you mean to refer to #796 ? :thinking:

@flybayer Ah yes, I did :sweat_smile:
Thanks for catching that!

Pretty frustrating lost my entire config because of a trailing comma.

Hey there, please try again with the new Hyper v2 release and open a new issue if the problem stills exists. Thank you!


Remove the extra quotes and add the missing ones

Test workflow is also turned on for PRs. Also renamed run_action.py just to action.py and removed X bits for that file.

@platisd

Can we avoid the rename?

Yes, we can, but it nevertheless doesn't need the X bits.


[alpaka] Simplify the interface for host and device buffers

0-dimensional (scalar) buffers now implement the dereference * and member access -> operators.
1-dimensional buffers now implement the array subscript [] operators.
all buffers implement the .data() method to access the underlying pointer.

Thanks.
This (and the following changes in #296 and later) are not expected to jhave any impact on the performance: they only change the interfaces, but not what underlying code gets called.
The usual --validation checks pass, and I could not observe and change in performance - but currently the measurment are very noisy, so only major regressions could be visible,


Plate character segmentation with OpenCV error

Hi,when trying to determine the contours of the license characters,I am getting an error called digit_w and digit_h are undefined.I tried replacing these with the extracted box's width and height.And then the code is working again.

Hi, thanks for pointing out. I was testing something in another cell and forgot to update. I have updated and fix the error.

Hi,thanks for getting back.Also ,I was trying to test the model on other car plates.Like japanese.However in those cases,the result comes out to be 0 digits detected.
My assumption is that for japanese plates,we need to fine tune the segmentation and contour procedure right.Let me know if I am on the right track


[Bug] Softaculous still on the non open source version

What happened?
Please describe the problem
On softaculous it wants me to buy pro
the version is 0.0.1 NOT the current branch
BoxBilling Version
Current Master Branch
What version of PHP are you running?
PHP 8.1
Additional Notes
Additional notes

I'm not sure if any of us have a way to maintain the softaculous version of BoxBilling
@fordnox can you?

Need just to ping Softacoulus team that there is a stable release (not beta) and they will update it on their side

Also Installatron: https://installatron.com/boxbilling
It was last updated in 2013, it's on 3.6.11.

We kinda need them to update it to the open source version..
I don't think the last "stable: release works anymore now that we have gotten rid of the licensing API and such

I went ahead and sent them an email - they won't add FOSSBilling until it's stable. They have gotten rid of BB though

I went ahead and sent them an email - they won't add FOSSBilling until it's stable. They have gotten rid of BB though

I'm surprised it took them as long as they did to remove BB


ARROW-3274: [Packaging] Missing glog dependency from conda-forge recipes

Builds are running here: https://github.com/kszucs/crossbow/branches/all?utf8=✓&query=build-310

Thanks!


Please include cstdint for gcc 13 or later

I met compilation errors on gcc 13.2.1.
It seems to be lack of include <cstdint>.
This PR tries to solve it.

compilation errors on gcc 13.2.1
In file included from include/ftp/replies.hpp:28,
from include/ftp/file_list_reply.hpp:28,
from src/file_list_reply.cpp:25:
include/ftp/reply.hpp:40:24: error: expected ‘)’ before ‘code’
40 |     reply(std::uint16_t code, std::string_view status_string);
|          ~             ^~~~~
|                        )
include/ftp/reply.hpp:48:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
48 |     [[nodiscard]] std::uint16_t get_code() const;
|                        ^~~~~~~~
|                        wint_t
include/ftp/reply.hpp:52:27: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
52 |     static constexpr std::uint16_t unspecified = std::numeric_limitsstd::uint16_t::max();
|                           ^~~~~~~~
|                           wint_t
include/ftp/reply.hpp:55:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
55 |     std::uint16_t code_;
|          ^~~~~~~~
|          wint_t
In file included from include/ftp/file_size_reply.hpp:28,
from src/file_size_reply.cpp:25:
include/ftp/reply.hpp:40:24: error: expected ‘)’ before ‘code’
40 |     reply(std::uint16_t code, std::string_view status_string);
|          ~             ^~~~~
|                        )
include/ftp/reply.hpp:48:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
48 |     [[nodiscard]] std::uint16_t get_code() const;
|                        ^~~~~~~~
|                        wint_t
include/ftp/reply.hpp:52:27: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
52 |     static constexpr std::uint16_t unspecified = std::numeric_limitsstd::uint16_t::max();
|                           ^~~~~~~~
|                           wint_t
include/ftp/reply.hpp:55:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
55 |     std::uint16_t code_;
|          ^~~~~~~~
|          wint_t
include/ftp/file_size_reply.hpp:42:44: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                                            ^~~~~~~~
|                                            wint_t
include/ftp/file_size_reply.hpp:42:52: error: template argument 1 is invalid
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                                                    ^
include/ftp/file_size_reply.hpp:42:30: error: ‘’ in namespace ‘std’ does not name a type
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                              ^~~~~~~~~~~~~~~~~~~~~~~
include/ftp/file_size_reply.hpp:45:31: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                               ^~~~~~~~
|                               wint_t
include/ftp/file_size_reply.hpp:45:39: error: template argument 1 is invalid
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                                       ^
include/ftp/file_size_reply.hpp:45:17: error: ‘’ in namespace ‘std’ does not name a type
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                 ^~~~~~~~~~~~~~~~~~~~~~~
include/ftp/file_size_reply.hpp:47:24: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
47 |     std::optionalstd::uint64_t size_;
|                        ^~~~~~~~
|                        wint_t
include/ftp/file_size_reply.hpp:47:32: error: template argument 1 is invalid
47 |     std::optionalstd::uint64_t size_;
|                                ^
include/ftp/file_size_reply.hpp:47:10: error: ‘’ in namespace ‘std’ does not name a type
47 |     std::optionalstd::uint64_t size_;
|          ^~~~~~~~~~~~~~~~~~~~~~~
[ 76%] Building CXX object CMakeFiles/ftp.dir/src/ostream_adapter.cpp.o
gmake[2]: *** [CMakeFiles/ftp.dir/build.make:174: CMakeFiles/ftp.dir/src/file_list_reply.cpp.o] Error 1
gmake[2]: *** Waiting for unfinished jobs....
In file included from include/ftp/observer.hpp:28,
from include/ftp/client.hpp:28,
from src/client.cpp:25:
include/ftp/reply.hpp:40:24: error: expected ‘)’ before ‘code’
40 |     reply(std::uint16_t code, std::string_view status_string);
|          ~             ^~~~~
|                        )
include/ftp/reply.hpp:48:24: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
48 |     [[nodiscard]] std::uint16_t get_code() const;
|                        ^~~~~~~~
|                        wint_t
include/ftp/reply.hpp:52:27: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
52 |     static constexpr std::uint16_t unspecified = std::numeric_limitsstd::uint16_t::max();
|                           ^~~~~~~~
|                           wint_t
include/ftp/reply.hpp:55:10: error: ‘uint16_t’ in namespace ‘std’ does not name a type; did you mean ‘wint_t’?
55 |     std::uint16_t code_;
|          ^~~~~~~~
|          wint_t
include/ftp/observer.hpp:37:58: error: ‘std::uint16_t’ has not been declared
37 |     virtual void on_connected(std::string_view hostname, std::uint16_t port) { };
|                                                          ^~~
In file included from include/ftp/client.hpp:30:
include/ftp/file_size_reply.hpp:42:44: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                                            ^~~~~~~~
|                                            wint_t
include/ftp/file_size_reply.hpp:42:52: error: template argument 1 is invalid
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                                                    ^
include/ftp/file_size_reply.hpp:42:30: error: ‘’ in namespace ‘std’ does not name a type
42 |     [[nodiscard]] const std::optionalstd::uint64_t & get_size() const;
|                              ^~~~~~~~~~~~~~~~~~~~~~~
include/ftp/file_size_reply.hpp:45:31: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                               ^~~~~~~~
|                               wint_t
include/ftp/file_size_reply.hpp:45:39: error: template argument 1 is invalid
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                                       ^
include/ftp/file_size_reply.hpp:45:17: error: ‘’ in namespace ‘std’ does not name a type
45 |     static std::optionalstd::uint64_t parse_size(const reply & reply);
|                 ^~~~~~~~~~~~~~~~~~~~~~~
include/ftp/file_size_reply.hpp:47:24: error: ‘uint64_t’ is not a member of ‘std’; did you mean ‘wint_t’?
47 |     std::optionalstd::uint64_t size_;
|                        ^~~~~~~~
|                        wint_t
include/ftp/file_size_reply.hpp:47:32: error: template argument 1 is invalid
47 |     std::optionalstd::uint64_t size_;
|                                ^
include/ftp/file_size_reply.hpp:47:10: error: ‘’ in namespace ‘std’ does not name a type
47 |     std::optionalstd::uint64_t size_;
|          ^~~~~~~~~~~~~~~~~~~~~~~
src/file_size_reply.cpp: In constructor ‘ftp::file_size_reply::file_size_reply(const ftp::reply&)’:
src/file_size_reply.cpp:40:5: error: ‘size_’ was not declared in this scope; did you mean ‘size_t’?
40 |     size_ = parse_size(reply);
|     ^~~~~
|     size_t
src/file_size_reply.cpp:40:13: error: ‘parse_size’ was not declared in this scope
40 |     size_ = parse_size(reply);
|             ^~~~~~~~~~
src/file_size_reply.cpp: At global scope:
src/file_size_reply.cpp:43:38: error: no declaration matches ‘const std::optional& ftp::file_size_reply::get_size() const’
43 | const std::optionalstd::uint64_t & file_size_reply::get_size() const
|                                      ^~~~~~~~~~~~~~~
src/file_size_reply.cpp:43:38: note: no functions named ‘const std::optional& ftp::file_size_reply::get_size() const’
include/ftp/file_size_reply.hpp:34:7: note: ‘class ftp::file_size_reply’ defined here
34 | class file_size_reply : public reply
|       ^~~~~~~~~~~~~~~
src/file_size_reply.cpp:48:30: error: no declaration matches ‘std::optional ftp::file_size_reply::parse_size(const ftp::reply&)’
48 | std::optionalstd::uint64_t file_size_reply::parse_size(const reply & reply)
|                              ^~~~~~~~~~~~~~~
src/file_size_reply.cpp:48:30: note: no functions named ‘std::optional ftp::file_size_reply::parse_size(const ftp::reply&)’
include/ftp/file_size_reply.hpp:34:7: note: ‘class ftp::file_size_reply’ defined here
34 | class file_size_reply : public reply
|       ^~~~~~~~~~~~~~~
gmake[2]: *** [CMakeFiles/ftp.dir/build.make:188: CMakeFiles/ftp.dir/src/file_size_reply.cpp.o] Error 1
src/client.cpp: In member function ‘ftp::replies ftp::client::rename(std::string_view, std::string_view)’:
src/client.cpp:210:15: error: ‘class ftp::reply’ has no member named ‘get_code’
210 |     if (reply.get_code() == 350)
|               ^~~~~~~~
src/client.cpp: In member function ‘ftp::reply ftp::client::process_login(std::string_view, std::string_view, ftp::replies&)’:
src/client.cpp:432:15: error: ‘class ftp::reply’ has no member named ‘get_code’
432 |     if (reply.get_code() == 331)
|               ^~~~~~~~
src/client.cpp: In member function ‘ftp::reply ftp::client::process_abort(ftp::replies&)’:
src/client.cpp:522:15: error: ‘class ftp::reply’ has no member named ‘get_code’
522 |     if (reply.get_code() == 426)
|               ^~~~~~~~
gmake[2]: *** [CMakeFiles/ftp.dir/build.make:132: CMakeFiles/ftp.dir/src/client.cpp.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/ftp.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2

Thanks!

@toge
Do I need to release these changes to move forward with conan center index?

@deniskovalchuk
If possible, it would be very helpful!
I would like to package the upstream source as is without making patches as much as possible.

@toge
OK. v0.4.1 is now available.


please add *.svc as no_proxy in install guide behind a proxy

In the document for installing behind proxy (https://microk8s.io/docs/install-proxy), *.svc should be added to no_proxy and NO_PROXY.
The document says to add internal IP ranges to no_proxy to prevent requests within cluster going through proxy.
Considering that domains ending with .svc is also only used kubernetes coreDNS, I find no reason why *.svc should not be added in no_proxy.
It can be quite painful when debugging why mutatingwebhook calls fail for some addons, because corporate proxies will likely give x509: certificate signed by unknown authority when request from kube-apiserver arrives to proxy server with k8s certificate, not the corporate one. This can mislead to thinking the problem is certificate issue between kube-apiserver and webhook server.
There are several issues related to this, and I see no reason now to add *.svc to /etc/environment when installing microk8s behind a proxy
I am quite new to the programming world, so please let me know if I'm getting something wrong.
Thank you :)

https://github.com/canonical/microk8s/issues/4540


Set disabled attribute also on checkbox hidden element

Fix for #7286. This mainly is a split up of #7287, but with a correct unittest.

Merged to develop for release with 2.4. Thanks, @Martin-P !