Inference of type arguments to generic method calls.

For the following example:
class Wrapper<T> {}

doSomething<T>(Wrapper<T> wrapper, T value) {}

main() {
  final wrapper = Wrapper<int>();
  doSomething(wrapper, 'this is not an int');
}

the CFE will infer the type argument to doSomething as Object:
static method main() → dynamic {
  final x::Wrapper<core::int*>* wrapper = new x::Wrapper::•<core::int*>();
  x::doSomething<core::Object*>(wrapper, "this is not an int");
}

Some users find this, understandably, a bit confusing and would prefer to get a compile-time error for such code (which one obviously gets by changing doSomething(wrapper, ...) to doSomething<int>(wrapper, ...))
The dart analyzer's linter does not seem to flag this, even if always_specify_types is turned on.
@stereotype441 Is there an existing lint for enforcing explicit type arguments to generic method calls?
/cc @lrhn @leafpetersen

I think we should consider variance control explicitly for this discussion: If Wrapper<T> is considered to be properly covariant in T then it's not a problem to pass a Wrapper<int> as an actual argument where a Wrapper<Object> is required. Similarly, the string argument is also good enough for a receiver that wants an Object.
So the reason why this could be considered wrong is that Wrapper<T> "should" have been contravariant (or even invariant) in T, but for the fact that we can't (yet) specify that.
But if we allow class type parameters to have explicit variance modifiers we could manage the issue like this:
class Wrapper<in X> {...} // That is, `Wrapper<X>` is contravariant in `X`.

doSomething<T>(Wrapper<T> wrapper, T value) {}

main() {
  final wrapper = Wrapper<int>();
  doSomething(wrapper, 'this is not an int'); // Compile-time error.
}

wrapper would get the inferred type Wrapper<int> as before, but that's just not a subtype of Wrapper<Object> any more. Using inout X and making X invariant would also have the same effect, and could be used if Wrapper uses X in all kinds of variance positions. It would also be possible to use use-site invariance to get a similar effect.
So I think we could say that this kind of issue can be solved in known ways, and we might get there in a reasonably near future.

cc @pq regarding Martin's question about the linter

I don't know of a lint for this case, but @srawlins has been doing some work related to this.

This wouldn't be covered by any of the static analysis I have lined up, but @leafpetersen did mention this case. Basically when LUB results in Object, but none of the input types were Object, that should be a red flag. It could be covered by strict-inference if we so desired.

Not necessarily Object, it could be another type (e.g. GenericMessage):
doSomething(Wrapper wrapper, T value) {}
class Type1 extends MyType {}
class Type2 extends MyType {}
final wrapper = Wrapper();
doSomething(wrapper, Type2());

It could be covered by strict-inference if we so desired. - Please!

It could be covered by strict-inference if we so desired. - Please!

I am not sure if this is related or if it is a bug, but this code:
typedef void Builder<C extends Controller>(C controller);

class View<C extends Controller> {
  final Builder<C> builder;
  final C controller;
  const View({required this.controller, required this.builder});
}

class Controller {}

class MyController extends Controller {
  String title = 'Title';
}

class MyPage {
  // this works:
  var v = View(
      controller: MyController(),
      builder: (controller) {
        print(controller.title);
      });

  // this does not:
  build() {
    return View(
        controller: MyController(),
  // Strangely sees the type of builder as `void Function(MyController) builder` but still sees controller as `Object?`
        builder: (controller) {
          print(controller.title);
        });
  }
}

void main() {}

The analyzer and compiler correctly identify the type of the controller argument in v, but the code in build() produces an error identifying controller as Object?.
Dart SDK version: 2.13.0-150.0.dev (dev)

Not sure if this is a different bug or is covered by this issue
typedef void Builder<C extends Controller>(C controller);

class View<C extends Controller> {
  final Builder<C> builder;
  final C controller;
  View({required this.controller, required this.builder});
}

class Controller {}

class MyController extends Controller {
  String title = 'Title';
}

class MyPage {
  // works:
  var v = View(
      controller: MyController(),
      builder: (controller) {
        print(controller.title);
      });

  // does not:
  build() {
    return View(
        controller: MyController(),
        builder: (controller) {
          print(controller.title);
        });
  }
}

void main() {}

The declaration of the field v does not produce any error, but the function build() contains the same error discussed above.
Even though the analyzer infers the type of the View constructor in build() as
View<MyController> View({required MyController controller, required void Function(MyController) builder})

Making the  generic explicit resolves the issue>
// now it works:
  build() {
    return View<MyController>(
        controller: MyController(),
        builder: (controller) {
          print(controller.title);
        });
  }


Examples from presentation are missing?

I loved the examples you gave during the practice presentation but I can't find them readily in the repo.  Maybe links to them in the README.md would help if they are there?

fixed.


Use titles vs names on channel claim previews, but show name in channel areas

I took a stab at this, start here if it made sense: e1a04f288d98876838ec242c30cbf5c3843985fe
On the places where we show both the title and name, (i.e. channel pages / search results, etc), went back to showing the full channel name with @, and the title above (like we used to - but stripping out @ for channels that don't have a title). I think this makes more sense vs hiding the channel name, because we have places like https://odysee.com/$/search?q=bret where showing the name would be desired.
The trickier part was the side bar - not sure what the best way to get titles in there would be. Makes sense for it to match right? And then the search bar on sidebar would need to use this also. We can probably ship as is for now if this is harder.
And maybe this should be a setting eventually, similar how slack does full name vs nickname?

Re: Sidebar filter

And then the search bar on sidebar would need to use this also

We would need to resolve subscriptions to include title in the filtering :(

Re: Sidebar title + name

The trickier part was the side bar - not sure what the best way to get titles in there would be. Makes sense for it to match right?

Here's my attempt on top of your branch:  https://github.com/OdyseeTeam/odysee-frontend/commit/49bbb087a65b77ca284c36860d1f72fbdf5eadd3

don't we already resolve to get the thumbnails?

Only when they are displayed, so we don't know the titles for items hidden under "show more" for the search code to look up.
The prefs data only contains uri and name.

Ah, gotcha... I think it's fine to use the name search for now. If you can, get this into a PR.


[Catalog] Encode HTML Entities

Similarly, <@U04K72AGYBW>, the inclusion of
Docker image: and Elasticsearch for Kubernetes: causes the build to fail as well.
These characters should be allowed. Meshery Server and Cloud both need to encode html entities.
<@U04K72AGYBW> something that you can address?
Slack Message

Bump, poke, ping, pow

This issue has been solved


CASSANDRA-19968 Use SinglePartitionReadCommand for index queries that use strict filtering

patch by Caleb Rackliffe; reviewed by Ariel Weisberg for CASSANDRA-19968

Committed as https://github.com/apache/cassandra/commit/019c9118d4109ee1d394b65281c45495eb57e033


Update the version in master to 0.8

Since we're producing servicing releases from the release-0.7 branch,
this will let us produce preview releases that are on a separate version train.

I chatted offline about this with @miniksa. If we're going to keep a preview + servicing model, we'll want to make sure our preview version numbers are > our servicing ones.

@msftbot merge this in 1 hour


Update plutus-contract README

Fix #224

Pre-submit checklist:

Branch

[ ] Tests are provided (if possible)
[x] Commit sequence broadly makes sense
[x] Key commits have useful messages
[x] Relevant tickets are mentioned in commit messages
[ ] Formatting, materialized Nix files, PNG optimization, etc. are updated

PR

[x] Self-reviewed the diff
[x] Useful pull request description
[x] Reviewer requested

A lot of information has been removed from the README. Was it all obsolete?

Yeah, it was very outdated. At least 10 months old but I looked at the state of the repo at that time and seems even older.


FIX: Remove unnecessary manual includes

Core.php can rely on composer’s autoloader now that classes are PSR-4
compliant.
If you stuck to the core modules, you could even remove ClassLoader’s
autoloader, but this would break any module that hasn’t been updated
to support PSR-4, so I’ve left it in.
In the future, it would be good to apply SilverStripe’s auto-loader
only to those modules that aren’t coded to use PSR-4, as it would
make class loading more predictable.

Ooooh 😎 !

Welcome to the future


Provide project file declarations

Giving examples of the csc compiler arguments is of limited use, because I've never seen a project where the developers invoke csc themselves.
The docs page should include the MSBuild properties to add in the csproj/vbproj (fsproj?), so that the docs page contains sufficient information for developers to take action.

Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

ID: f94526da-6739-ad3b-c0eb-48652e70a062
Version Independent ID: 73c57596-00af-2739-b206-bcbea262fcbb
Content: How to: Sign an assembly with a strong name
Content Source: docs/standard/assembly/sign-strong-name.md
Product: dotnet-fundamentals
GitHub Login: @IEvangelist
Microsoft Alias: dapine

After creating this feedback, I noticed the second section gives instructions on how to modify the project in Visual Studio (I only glanced over the document looking for xml snippets to copy). So, someone could follow those instructions and then see how it changes the csproj.
I was looking to answer a related customer question, and I gave up looking for the right xml fragment and just linked them to this doc page instead. Hopefully they're using Visual Studio so can follow these docs. If they're using VSCode, I don't know what they should put in their project file.


Carthage support related changes

Moved the textview subclass to a framework

Hi, Thanks for your pull request, KMPlaceholderTextView has Carthage support now.


Acknowledging Document/Page Changes

Describe the feature you'd like
We use a knowledge base system where users see changes to documents, and one needs to press the "I have noted the changes" button for acknowledging those changes. Admins then can check if users have read the new information.
The acknowledge system could fit into "Recently Updated Pages" and the page view itself.
Describe the benefits this would bring to existing BookStack users
It could enable a quality management system for users to check if the information on BookStack is really transfered to humans and if they read the information.
Can the goal of this request already be achieved via other means?
As far as I know this is not possible yet.
Have you searched for an existing open/closed issue?

[X] I have searched for existing issues and none cover my fundamental request

How long have you been using BookStack?
Under 3 months
Additional context
No response

Thanks for the request @jrzwee but this request is really intent to support a specific business process which is something I generally try to avoid building for in BookStack.
If you're handy with code, it may be possible to build this externally (or integrate other apps/tools to help) using BookStack's methods of extension like webhooks, API and the logical theme system.

I can understand that you do not want to build specific processes, I will have a look in the extension methods :-)
Also, something like https://github.com/BookStackApp/BookStack/issues/560 would be a workaround for us, I guess.


Issue/deadlock on boot (#7454)

Pull request opened by the merge tool on behalf of #7454

Merged into branches iso7 in 691322172ab947f2b89e522c33bb2c5cd5a2f75d


⚠ Bofrost.lu has degraded performance

In 19e04e6, Bofrost.lu (https://www.bofrost.lu) experienced degraded performance:

HTTP code: 200
Response time: 1764 ms

Resolved: Bofrost.lu performance has improved in a89024b after 29 minutes.


renewing token when there is vault DR change

If we configure this authenticator as an initContainer instead of sidecar, then whenever there is DR switch on the vault side, the token needs to be renewed. What is actually happening is, container exits with non zero code because vault token is invalid (because of the Vault DR activity that shifted to a new datacenter and hence new vault instance). Now kubernetes keeps restarting THIS container again and again which re-uses the old token from the initContainer. There isnt a way to recreate the pod automatically so that initContainer runs again and gets the new token from the newly shifted datacenter. Is sidecar a better approach in this case instead of initContainer or is there a way to make initContiner run again to fetch the new token?

You can use consul-template to automatically renew that

Init containers are designed to run once and exit. You can use a sidecar, but that's going to introduce other problems (like signaling to children that there's a new token)

This is actually quite a tricky nut to crack. Been running into this issue that if the main container crashes and gets restarted by Kubernetes it will read a .vault-token that has maybe expired hours ago and there is no way to signal K8s to consider the whole pod failed and retry from start AFAIK.
Just came across this issue as my k8s pod had 2500 restarts because of the token.
Now the obviously simple solution would be to just keep renewing the token every few minutes to keep the token around for a restart - but the underlying issue remains that if the token manages to expire once (for whatever reason -> e.g. connectivity issues with vault for example) the k8s deployment will start going into a crash loop and never recover unless someone manually kills the pod 🤔
I tried with a sidecar container next but that has the obvious disadvantages of having to manage lifecycle and signalling etc.
Is there a new "default" way to do this I am not aware of? Because if not the obvious solution here would be to make my application not just vault-aware but also k8s aware and handle the requesting of the token by itself (also not the greatest solution)


Is there a way to set the parent page individually for each rst file rather than globally?

Is there a way to set the parent page individually for each rst file rather than globally?

Sorry, this is not a supported capability at this time.

Adjustments have been applied via #825 and merged into the development tree which now introduces support for a confluence_parent_override_transform configuration option. This configuration will be considered an advanced publish option and may not work as expected with other options (e.g. purging). The new transform will allow users to add into their configuration a function definition to override the target identifier a page is published under. An example configuration is as follows:
def my_publish_override(docname, parent_id):
    if docname == 'special-doc':
        return 123456

    return parent_id

confluence_parent_override_transform = my_publish_override

This configuration will be available in the next release (v2.2+). For users wanting this capability before a release is made, the development version of this extension can be installed.

v2.2 is now available on PyPI -- marking as closed.

Awesome Thanks!


WIP on #23

Preliminary implementation.
Just to see if this is heading the right way. Since I'm really new to Vue and it's plugin system I'd like to know if, beside the rather simplistic approach, this could be heading in the right direction.
The idea behind this is that the logger uses the options provided on install. It looks like this is not really working so I guess that we'll have to provide a new logger instance to Vue after changing the loglevel, but I'm not sure how to, after the instance has already gone through the install-phase.
My guess would be to call the install code block again with the new options:
        if (this.isValidOptions(options, this.logLevels)) {
            Vue.$log = this.initLoggerInstance(options, this.logLevels);
            Vue.prototype.$log = Vue.$log;
        } else {
            throw new Error(this.errorMessage);
        }

But then I think we've already lost access tom the Vue instance passed into the install method.
I guess I'm kinda stuck here lacking the knowledge of Vue and it's plugin system.

You might have already read this but here is more detail on how to create plugins for Vue.js @ https://vuejs.org/v2/guide/plugins.html
// calls `MyPlugin.install(Vue)
Vue.use(MyPlugin)

The install function is called once, upon calling Vue.use(). But you can expose a function on the Logger  ( Vue.$log ) itself to change the internal log level. You are on the right track, but this function needs to be modified so that const logger = {} can modify itself.
  private initLoggerInstance(options: ILoggerOptions, logLevels: string[]) {
        const logger = {};
        logLevels.forEach((logLevel) => {
                if (logLevels.indexOf(logLevel) >= logLevels.indexOf(options.logLevel) && options.isEnabled) {
                    logger[logLevel] = (...args) => {
                        const methodName = this.getMethodName();
                        const methodNamePrefix = options.showMethodName ? methodName + ` ${options.separator} ` : "";
                        const logLevelPrefix = options.showLogLevel ? logLevel + ` ${options.separator} ` : "";
                        const formattedArguments = options.stringifyArguments ? args.map((a) => JSON.stringify(a)) : args;
                        const logMessage = `${logLevelPrefix} ${methodNamePrefix}`;
                        this.printLogMessage(logLevel, logMessage, options.showConsoleColors, formattedArguments);
                        return `${logMessage} ${formattedArguments.toString()}`;
                    };
                } else {
                    logger[logLevel] = () => undefined;
                }
            },
        );
        return logger;
    }

I will have a look at this pull request this week. But feel free to update it.

@tuvokki
Something like this :
Logger = {
    debug () {
        console.log('var')
    },
    info () {
        console.log('var')
    },
    fatal () {
        console.log('var')
    },
   /// use params for new config ?
    updateSelf (params) {
        this.debug = function () {
            console.log('Overwriting the old debug')
        }
    }
}

Logger.updateSelf()
Logger.debug()

Logger = {
    threshhold : 0; // lets say 0 is for debug ...
    debug () {
        if ( threshhold)  == 0 ) console.log('var');
    },
    info () {
        if (threshhold >= 1) console.log('var');
    },
    fatal () {
       threshhold >= 2 console.log('var');
    }
}

Logger.threshhold =  1;
Logger.debug() // will not show

How about something like this...

I think you're on the right track regarding the desired functionality here. I wouldn't go as far as (dynamically) adding new loglevels here. For my use-case changing the loglevel to DEBUG for the duration of a single session would suffice.
About your proposal; isn't this yet another way to limit (or expand) the output of the logger? Changing the threshold looks like the same as changing the actual log-level. Or am I misunderstanding something here? I mean, if we can change the treshold in a running instance, wouldn't that be the same effort as changing the log-level itself?

@tuvokki

I think you're on the right track regarding the desired functionality here. I wouldn't go as far as (dynamically) adding new loglevels here. For my use-case changing the loglevel to DEBUG for the duration of a single session would suffice.
About your proposal; isn't this yet another way to limit (or expand) the output of the logger? Changing the threshold looks like the same as changing the actual log-level. Or am I misunderstanding something here? I mean, if we can change the treshold in a running instance, wouldn't that be the same effort as changing the log-level itself?

Yes, the log functions ( eg. this.$log.debug() ) are just simple functions that only console.log the input. Depending on the type of function it also does console.log, console.error or console.warn.
However, these functions are currently initialized on Vue.use(VueLogger) whichs calls :
initLoggerInstance(options: ILoggerOptions, logLevels: string[]) ;

This function only runs once, initialising the Logger object with its functions ( depending on set logLevel in config ). Lets say we pick 'fatal', then this.$log.debug() will be an empty function, that does nothing. Therefore with the current code we would need to override the empty functions to have the desired result of this PR.
The way to go might be to not initialize the ignored levels as empty functions, but with the actual print functionality.
Then inside the print function we can check the current loglevel and make it print or not. The logger object (this.$log) should then expose a function that allows you to modify the logLevel. Eg:
this.$log.setLogLevel('debug')
Does that make sense? What do you think about this approach?

Then inside the print function we can check the current loglevel and make it print or not. The logger object (this.$log) should then expose a function that allows you to modify the logLevel. Eg:
this.$log.setLogLevel('debug')
Does that make sense? What do you think about this approach?

That does make sense. It would even enable on-the-fly setting a different loglevel for a component (e.g. in the beforeMount/destroy method hooks) which would only show debug-logging for that one component.


jstree icon always present in treedropdown when using setFilterFunction to filter the children

The jstree-closed and jstree-open is always set in treedropdown when children are filtered with setFilterFunction.
PD. The icon is set when the treedropdown have children, ignoring the setFilterFunction
The temporal solution was removing $child->markingClasses()  in /forms/TreeDropdownField.php file:
$eval = '"
getName() . '-{$child->' . $this->keyField . '}" data-id="$child->'
. $this->keyField . '" class="class-$child->class"'
. ' . $child->markingClasses() . "">ID">" . $child->' . $this->labelField . ' . ""';
to:
$eval = '"
getName() . '-{$child->' . $this->keyField . '}" data-id="$child->'
. $this->keyField . '" class="class-$child->class"'
. ' . "">ID">" . $child->' . $this->labelField . ' . ""';

Although treedropdown and hierachy has been refactored in 4.x this problem possibly persists.

I think this is probably a "wontfix"... The only way to solve this is to execute the filter function on all nested elements so we have the right class? This feels like it's intentional as a performance feature...


ES6 export resolution behavior not respected properly

Basically all from http://www.ecma-international.org/ecma-262/6.0/#sec-resolveexport

Star exports should not include 'default'
// entry.js
import def from './a';
console.log(def);

// a.js
export * from './b';

// b.js
export default 'b-default';

should log undefined because export * from only applies to named exports, not default. This is the main one on this list that seems like a problem, because it silently does the wrong thing, and users may accidentally rely on it.

Local exports take precedence over star exports.
// entry.js
import {foo} from './a';
console.log(foo);

// a.js
export var foo = 'a-foo';
export * from './b';

// b.js
export var foo = 'b-foo';

should log a-foo since named exports take precedence over star exports. Currently it throws because the export * from tries to redefine the non-configurable property.

Local exports take precedence over indirect exports
// entry.js
import {foo} from './a';
console.log(foo);

// a.js
export var foo = 'a-foo';
export {foo} from './b';

// b.js
export var foo = 'b-foo';

should log a-foo since named exports take precedence over indirect exports. Currently it throws because the export * from tries to redefine the non-configurable property.

Indirect exports take precedence over star exports.
// entry.js
import {foo} from './a';
console.log(foo);

// a.js
export {foo} from './c';
export * from './b';

// b.js
export var foo = 'b-foo';

// c.js
export var foo = 'c-foo';

should log c-foo because indirect exports take precedence.

Isn’t that a Babel kinda related question, though? AFAIK, WebPack does not transform ES6 - or does webpack2? Because if that is the case, then I need to STFU and RTFM ^^.

Am 22.12.2015 um 23:48 schrieb Logan Smyth<EMAIL_ADDRESS>Basically all from http://www.ecma-international.org/ecma-262/6.0/#sec-resolveexport http://www.ecma-international.org/ecma-262/6.0/#sec-resolveexport
Star exports should not include 'default'
// entry.js
import def from './a';
console.log(def);
// a.js
export * from './b';
// b.js
export default 'b-default';
should log undefined because export * from only applies to named exports, not default. This is the main one on this list that seems like a problem, because it silently does the wrong thing, and users may accidentally rely on it.
Local exports take precedence over star exports.
// entry.js
import {foo} from './a';
console.log(foo);
// a.js
export var foo = 'a-foo';
export * from './b';
// b.js
export var foo = 'b-foo';
should log a-foo since named exports take precedence over star exports. Currently it throws because the export * from tries to redefine the non-configurable property.
Local exports take precedence over indirect exports
// entry.js
import {foo} from './a';
console.log(foo);
// a.js
export var foo = 'a-foo';
export {foo} from './b';
// b.js
export var foo = 'b-foo';
should log a-foo since named exports take precedence over indirect exports. Currently it throws because the export * from tries to redefine the non-configurable property.
Indirect exports take precedence over star exports.
// entry.js
import {foo} from './a';
console.log(foo);
// a.js
export {foo} from './c';
export * from './b';
// b.js
export var foo = 'b-foo';
// c.js
export var foo = 'c-foo';
should log c-foo because indirect exports take precedence.
—
Reply to this email directly or view it on GitHub https://github.com/webpack/webpack/issues/1792.

Webpack 2 does, number 2/3/4 also exist in Babel too and are also filed over there, I just figured I'd make sure they got tracked here too.

Oh, alright. Thanks for the heads-up :)

Uhg... I'll try to fix those edgecases issues... ;)

@loganfsmyth could you please check if this test case covers all issues above?
https://github.com/webpack/webpack/blob/master/test/cases/parsing/harmony-export-precedence/index.js

when i try to upgrade acorn to the latest version, errors come up.
see the code online with babel
it turns out that https://github.com/webpack/webpack/blob/master/test/cases/parsing/harmony-export-precedence/a.js has illegal syntax and that case doesn't cover the problem issued by @loganfsmyth.

I was wrong above, it covered the third case. However, the third case is illegal some how. See the spec about import @loganfsmyth

i was wrong above. It covered the third case. However, the third case is illegal. See the spec about module semantics @loganfsmyth

Seems like that test just needs to have the names of the exports tweaked.

The key problem is what's the point of case 3 compared to case 2?
And the comment of case3 is a little misleading:

should log a-foo since named exports take precedence over indirect exports. Currently it throws because the export * from tries to redefine the non-configurable property.

there is no export * from in case 3.

Local exports take precedence over indirect exports

this rule is not what the spec indicates.

You're totally right. I was describing the order of operations defined in http://www.ecma-international.org/ecma-262/7.0/#sec-resolveexport, but that doesn't take into account that duplicate export names are already disallowed in http://www.ecma-international.org/ecma-262/7.0/#sec-module-semantics-static-semantics-early-errors via an early error.

One interesting thing is, when i dig down the problem with babel and typescript, they both don't behave as 100% as the spec requires.
see my sample repo


Nonexisten import/rescan

Description
The only way I can introduce new content is by searching and then downloading it veeeery slowly.

There is no option to batch request all chapters. I get that the idea is to download them slowly and responsibly but clicking >150 times to get all chapters is unrealistic.
Importing new content does not work. A .cbz file is loaded into the UI, matched with the appropriate content either automatically or manually but nothing happens when I click Import. Nothing comes up in the logs either. It's like the frontend for importing isn't connected.
There is no way to rescan an existing library. I ran into this issue in conjunction with #54. The container filled all the available storage which resulted in a corrupt config file. Recreating the container and reconfiguring the backend, doesn't recover any previously downloaded content. It sits in the /data/mangas  directory but it's essentially invisible to the server.

Version
0.8.0
Steps to Reproduce
Described above
Screenshots
No response
Logs
No response
Platform
desktop
Device
Web
Operating System
Linux
Browser
Edge
Additional Context
No response
Code of Conduct

[X] I agree to follow Teemii's Code of Conduct

1 - As stated in the documentation:
You may queue multiple chapters for download one after the other; however, Teemii is designed to download them one at a time. This approach is deliberate to prevent excessive downloading and to ensure responsible use of resources.
The philosophy behind this is not to accumulate chapters that you may or may not read, but to download the ones you do read as you go along. It's not definitive, but that's how it's expected to work.
2 - If possible can you share the name of the cbz? Any log in the dev console of the browser?
3 - already proposed in the feature list: Feature: Directory Scan #18
ps: I move this issue to the discussions


Xarray open_mfdataset with engine Zarr

Continuation of work on https://github.com/pydata/xarray/pull/4003.

[ ] Closes #xxxx
[ ] Tests added
[ ] Passes isort -rc . && black . && mypy . && flake8
[ ] Fully documented, including whats-new.rst for all changes and api.rst for new API

Moved to https://github.com/pydata/xarray/pull/4187.


Openlayers/GeoServer WFS caching, tiles or any optimization

Hello,
I'm developping a Web application using OpenLayers 3.20.0 with layers coming from GeoServer, linked to an Oracle data source. This application is using mostly ImageWMS layer, and also a Vector layer for interaction and edition. The issue is that the map is very slow with more than 30000 polylines drawn, and I would like to make the process faster :-)
So I would like to know what is the best way to do. I found two ways :

change my Vector layer in ImageWMS layer, and load manually needed features only on selection or edition, but it asks me a certain amount of modifications in my code

use VectorTile layer instead of Vector layer, I guess it should work like ImageWMS and a tile system so that data are loaded only according to the view of the map (Am i good ?)

I looked for samples of VectorTile, but they are not very numerous (most of the time it's about OpenLayers 2), and the documentation is a little poor.
After some answers on StackOverflow (https://stackoverflow.com/questions/54784210/openlayers-geoserver-wfs-caching-tiles-or-any-optimization), I'm coming to this sample of code :
this._view = new ol.View({
    center: [74000, 96000],
    projection: 'EPSG:2169',
    zoom: 13,
    maxZoom: 24,
    minZoom: 11
});

this._map = new ol.Map(
    {
        view: this._view,
        controls: [
            new ol.control.Zoom(),
            new ol.control.ScaleLine()
        ]
    });

let vectorSourceURL: string = `/geoserver/ANF/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=ANF:myLayer&outputFormat=application%2Fjson`;

let source = new ol.source.VectorTile({
    format: new ol.format.GeoJSON({
        defaultDataProjection: 'EPSG:2169',
        geometryName: 'GEOLOC'
    }),
    tileUrlFunction: function (tileCoord, pixelRatio, projection) {
        return vectorSourceURL + '&bbox=' + source.getTileGrid().getTileCoordExtent(tileCoord).join(',') + ',EPSG:2169';
    },
    tileGrid: ol.tilegrid.createXYZ(),
    projection: 'EPSG:2169'
});

let layer = new ol.layer.VectorTile({
    source: source,
    renderOrder: null
});

layer.set('name', 'myLayer');
layer.set('title', 'myLayer');

This code falls to the following error :

ERROR TypeError: Cannot read property 'getUnits' of null at ol.renderer.canvas.VectorTileLayer.createReplayGroup_ (ol-debug.js:29814) at ol.renderer.canvas.VectorTileLayer.drawTileImage (ol-debug.js:29886) at ol.renderer.canvas.VectorTileLayer.ol.renderer.canvas.TileLayer.prepareFrame (ol-debug.js:26557) at ol.renderer.canvas.Map.renderFrame (ol-debug.js:30302) at ol.Map.renderFrame_ (ol-debug.js:42107) at ol.Map. (ol-debug.js:41013) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:421) at Object.onInvokeTask (core.js:3815) at ZoneDelegate.push../node_modules/zone.js/dist/zone.js.ZoneDelegate.invokeTask (zone.js:420) at Zone.push../node_modules/zone.js/dist/zone.js.Zone.runTask (zone.js:188)

It appears that the issue comes from EPSG:2169. A sample with EPSG:3857 works well.
I found this thread talking about the same issue : github.com/openlayers/openlayers/issues/6946
But I didn't really found an answer in my case.
The code works in EPSG:3857, so why does it not in EPSG:2169 ?
Am I missing something ?
Any help will be greatly appreciated.
Many thanks !

Your code is failing because OpenLayers does not know about EPSG:2169 out of the box. You need to define a projection for that, as shown e.g. in https://openlayers.org/en/latest/examples/wms-no-proj.html.
If you are unable to figure out the details after looking at that example, please take this discussion to Stack Overflow. This issue tracker is for bugs and feature requests in OpenLayers.


Copy value of trainable variable to another trainable variable.

Please make sure that this is a feature request. As per our GitHub Policy, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:feature_template
System information

TensorFlow version (you are using): 1.4.1
Are you willing to contribute it (Yes/No): No.

Describe the feature and the current behavior/state.
Now Tensorflow doesn't allow to copy value of trainable variable to another one. Operations like tf.assight, tf.identity, tf.Variable(source_variable.initialized_value()) or tf.contrib.copy_graph.copy_variable_to_graph(var, self.graph) DO NOT copy just value. After such operations the destination variable referes to the source variable and I can't pass this variable to optimizer for computing gradients: "ValueError: No gradients provided for any variable, check your graph for ops that do not support gradients, ... "
Will this change the current api? How?
This change won't change the existing functions, just will add new opportunity for trainable variables.
Who will benefit with this feature?
It will make more flexible structure that can be good for GANs, or when we have two networks and it is neccessary to copy values of one network parameters to second network parameters, and still train two networks independently.
Any Other info.

Please provide a small reproducible snippet of the problem.

Hi @ebrevdo !
I started working on several GANs architecture that based on cvpr paper 2018.

I have Discriminator_A and Generator_A. I train them.
Then I have to copy value of trainable variables of Discriminator_A to trainable variable of Discriminator_B. Then I train Discriminator_B and Generator_B.
In Tensorflow If I use tf.assign, tf.Varaible or even use two different graphs (tf.contrib.copy_graph.copy_variable_to_graph(var, self.graph)) I see that when I train Discriminator_B and Generator_B the Discriminator_A is also training. So what I’ve got: actually Discriminator_B refers to Discriminator_A parameters, but I just need after every epoch take the values from Discriminator_A and initialize Discriminator_B.

Example of code:
# original network from which I take values of trainable variables
D_vars = [var for var in self.train_vars if 'Discriminator_A' in var.name]

# The destination trainable variables
msg_D_vars = [var for var in self.train_vars if 'Discriminator_B' in var.name]

for var_idx, var in enumerate(D_vars):
     1)  tf.assign(msg_D_vars[var_idx], var)  -- DOESNT' WORK
     2) var = tf.contrib.copy_graph.copy_variable_to_graph(var, self.graph) -- DOESN'T WORK
    3) msg_D_vars[var_idx] = tf.Variable(var.initialized_value(), trainable=True) -- DOESN'T WORK

Also I tried to remove trainable variables before training after 1) or 2) or 3) step and then add them again for training. But this tricky approach doesn't work too as I need.
with self.graph.as_default():
        trainable_collection = tf.get_collection_ref(tf.GraphKeys.TRAINABLE_VARIABLES)
        variables_to_remove = list()
        for vari in trainable_collection:
             # uses the attribute 'name' of the variable
               if 'discriminator_B' % in vari.name:
                     variables_to_remove.append(vari)
       for rem in variables_to_remove:
           trainable_collection.remove(rem)

Thanks!

@Firyuza You need to initialize a temp for exchange.

Hello @Firyuza ! You might need to initialize a temp for exchange.
def hello(scopeName='sc1'):
    with tf.variable_scope(scopeName):
        a1 = tf.get_variable(name='test_var1', initializer=0.)
        b1 = tf.get_variable(name='test_var2', initializer=0.)

sess = tf.Session()
g=hello('sc1')
g2=hello('new')
g3=hello('old')
sess.run(tf.global_variables_initializer())
# params=tf.trainable_variables(scope='sc1')
t_vars=tf.trainable_variables()
var_in_sc1= [var for var in t_vars if 'sc1' in var.name]
var_in_new= [var for var in t_vars if 'new' in var.name]
var_in_old= [var for var in t_vars if 'old' in var.name]
print('save 0')
for var_idx, var in enumerate(var_in_sc1):
    sess.run(tf.assign(var_in_old[var_idx], var))

print('add 1')
for var in var_in_sc1:
    sess.run(tf.assign_add(var,1.))

print('save 1')
for var_idx, var in enumerate(var_in_sc1):
    sess.run(tf.assign(var_in_new[var_idx], var))

print('add 1')
for var in var_in_sc1:
    sess.run(tf.assign_add(var,1.))
print(sess.run(var_in_sc1))

print('load old')
for var_idx, var in enumerate(var_in_old):
    sess.run(tf.assign(var_in_sc1[var_idx], var))
print(sess.run(var_in_sc1))

print('load new')
for var_idx, var in enumerate(var_in_new):
    sess.run(tf.assign(var_in_sc1[var_idx], var))
print(sess.run(var_in_sc1))

Hope that this demo can help you!

Hello @zlichen!
Thank you for feedback!
Yes, this demo works. But I have to notice that it's not so good and intuitive way of making such kind of copy. I hope Tensorflow community will consider more flexible and obvious way of doing it. Otherwise I need to write this code on PyTorch, because it has such ability.
Also, we have to keep in memory temp variables and it's not effective. E.g. if I'm working with ResNet it will be really expensive memory storing trainable variables values from 50 or 100 layers.
Thanks!

Hello @Firyuza !
After testing the demo, I also found that is really time-consuming while copying the weight from a huge Neural Network. The demo below is a better and more effective way which is no need for a tmp.
import tensorflow as tf
with tf.Session() as sess:
    def hello(scopeName='sc1'):
        with tf.variable_scope(scopeName):
            a1 = tf.get_variable(name='test_var1', initializer=0.)
            b1 = tf.get_variable(name='test_var2', initializer=0.)

    g=hello('sc1')
    g2=hello('new')
    g3=hello('old')
    sess.run(tf.global_variables_initializer())

    t_vars=tf.trainable_variables()
    var_in_sc1= [var for var in t_vars if 'sc1' in var.name]
    var_in_new= [var for var in t_vars if 'new' in var.name]
    var_in_old= [var for var in t_vars if 'old' in var.name]

    print('save 0')
    for var_idx, var in enumerate(var_in_sc1):
        var_in_old[var_idx].load(var_in_sc1[var_idx].eval(),sess)
    print('add 1')
    for var in var_in_sc1:
        sess.run(tf.assign_add(var,1.))

    print('save 1')
    for var_idx, var in enumerate(var_in_sc1):
        var_in_new[var_idx].load(var_in_sc1[var_idx].eval(),sess)
    print('add 1')
    for var in var_in_sc1:
        sess.run(tf.assign_add(var,1.))
    print(sess.run(var_in_sc1))

    print('load old')
    for var_idx, var in enumerate(var_in_old):
        var_in_sc1[var_idx].load(var_in_old[var_idx].eval(),sess)
    print(sess.run(var_in_sc1))

    print('load new')
    for var_idx, var in enumerate(var_in_new):
        var_in_sc1[var_idx].load(var_in_new[var_idx].eval(),sess)
    print(sess.run(var_in_sc1))

Maybe still need a few lines of code. As far as I know, Keras (base on tensorflow) can also easily get or set the weights for the models or layers with only one line of code.

Hi @zlichen !
Thanks again for feedback! Your example is working, but now I noticed that If I create two networks in the same Graph and start to train first network I see that the second one is training too. They do not have sharable variables. I think maybe one of the my first approaches is working too, just the problem is on another plane...

Hi @zlichen !
Thanks again for feedback! Your example is working, but now I noticed that If I create two networks in the same Graph and start to train first network I see that the second one is training too. They do not have sharable variables. I think maybe one of the my first approaches is working too, just the problem is on another plane...
Thanks!

Hi! I guess you have to set different scope names for your two network in order to make distinction.

Hi @zlichen !
Thanks again for feedback! Your example is working, but now I noticed that If I create two networks in the same Graph and start to train first network I see that the second one is training too. They do not have sharable variables. I think maybe one of the my first approaches is working too, just the problem is on another plane...
Thanks!

Hi! I guess you have to set different scope names for your two networks in order to make distinction.

Hi @zlichen !

Hi @zlichen !
Yes, I gave different scope names for two networks, but it doesn't work. I think it's a Tensorflow paradigm, we cannot create two networks in the same graph when you want to train it independently. And  all copy operations that I discussed above do not make sense.
So if we wanna make copy value of variable -- your solution is right. But if we wanna make a copy of variable's value of one network to varaible of another one, there is another solution:

for training two different  networks independently, define two different graphs;
copying values of varables of one network to variables of another one:
for var_idx, var in enumerate(D_vars):      msg_D_vars[var_idx].load(D_vars[var_idx].eval(session=self.sess), self.sess_msg)

Thanks!


Event wasm token id is incorrect when token id has space at first or last position

When mint a CW721 token, if I mint a token id
 abc (has space at first position) or abc (has space at last position), wasm token id event returned is abc. It may be issue because the token ID is not the same as input

Found in wasm docs:
EVENTS.md
Why do you need trim space all value?

We do not want leading/ trailing whitespaces to provide a better user experience. Events are not purely technical for machine to machine communication but can be read by humans, too.
Therefore whitespaces where a big source of confusion in these systems. An alternative solution, would be rejecting them and failing the TX for consistency. Not sure if this better.
Maybe you can elaborate more on your business use case to help me understand the problem from your side.
With my current understanding, I see the issue in the cw721 contract which should reject tokens with leading/trailing whitespace instead. There are scam scenarios to prevent.

With my case, when I use LCD endpoint /cosmos/tx/v1beta1/txs?events= and pass argument wasm.token_id=' abc ', LCD return nothing because currently, wasmd save endpoint is  wasm.token_id='abc'.

@fibonacci998 Sorry, my question was: why does ' abc ' make sense for you/ your project?

Example, I'm developing a wallet which allow shows address's NFT. In my database, address A has token_id is abc, address B has token_id is abc. When I access token NFT history tx from address A, I cannot see correct tx by access LCD endpoint /cosmos/tx/v1beta1/txs?events= (because it displays all tx from address A and address B)

@fibonacci998 don't get me wrong. I do understand the query part. Just not the motivation to create a abc token_id in the first place. This is not wasmd related but how you are using the nft contract

I just don't understand why should you trim the value in event?

@fibonacci998 I have explained our motivation above already. I do understand that this is not the expected behaviour for you. Let's agree to disagree on the solution, unless you can provide more context on your use case and why whitespaces make sense in the token_id.

Agreed with your solution. But I was stuck about that how to search that tx onchain. I can search tx offchain by adding more column in my database, but it is complex because of database design and my business.


Error while trying to write files in the virutal file system.

Hi, I recently upgraded the firmware to the new version you provided, but i've encountered a strange bug.
My code looks like this:
with open("/log.txt" , "a+") as file:
    pass

camera.init(0, format=camera.JPEG)

for i in range(0,100):
    with open("/log.txt", 'a+') as log_file:
        print ("Test " + str(i))
        log_file.write("Test " + str(i) + "\n")

As you can see, after initializing the camera, I try to perform multiple write operations on a single file. However, after an undefined amount of these operations, the program execution blocks in the "write" statement and never leaves. I present to you some terminal output examples:
Test 0
Test 1

Test 0
Test 1
Test 2

After further examination, i have discovered that this issue only happens if the file, in this example "/log.txt`, existed before resetting the ESP32. What I mean is that doing this kind of operation works fine as long as the file is created in the same execution instance. However, if the file existed before powering on the ESP32, the writing operation will block.

Can you check out the new firmware? I think that could be a problem with the HEAP. Now it's better managed.

Thanks for reaching out! I close the issue then.


SW-6066 Added events and updater to handle file naming updates

#2461  👈
main

This stack of pull requests is managed by Graphite. Learn more about stacking.

Join @tommylau523 and the rest of your teammates on  Graphite


regression: Signature help not bolding current arg

before:

now:

Appears to be a vscode bug: https://github.com/microsoft/vscode/issues/108216


[DDW-307] improve mnemonics autocomplete component acceptance tests

This PR adds fine grained event simulation tests for Autocomplete.
Keydown tests include: tab key, enter key, space key, escape key, down arrow.
Click tests include: opening/closing Autocomplete, clicking the highlighted option

@DominikGuzei
I've done a good bit of refactoring to improve the way which context gets applied to components before they're exported. This allowed me to remove all the helper skins and helper context I was using. Now all skins work for both tests and production/development usage. I've also removed default exports everywhere and replaced them with named exports only. And of course installed the context patch for enzyme to make these changes work until enzyme cuts a new release. It should be ready to go now, but let me know if you find anymore areas to improve.

Great work @MarcusHurney, looks much better now! 🎉


Amplify version 10.4.0, there is a issue when run  "amplify env add <env_name>", if I run "amplify add notifications" for the current environment

Before opening, please confirm:

[X] I have installed the latest version of the Amplify CLI (see above), and confirmed that the issue still persists.
[X] I have searched for duplicate or closed issues.
[X] I have read the guide for submitting bug reports.
[X] I have done my best to include a minimal, self-contained set of instructions for consistently reproducing the issue.
[X] I have removed any sensitive information from my code snippets and submission.

How did you install the Amplify CLI?
npm
If applicable, what version of Node.js are you using?
14.5.5
Amplify CLI Version
10.4.0
What operating system are you using?
Mac
Did you make any manual changes to the cloud resources managed by Amplify? Please describe the changes made.
No, totally rely on Amplify Cli 10.4.0 version
Amplify Categories
notifications
Amplify Commands
env, push
Describe the bug
The issue is only Amplify cli 10.4.0, based on my test, I did not see the issue on Amplify cli 10.3.2.
While use

amplify add notifications with "Email" in one environment, for example "dev", and run amplify push to the environment
amplify env add prod to create a new environment "prod".

The following error message will occur "Failed to enable the Email Channel"
If ignore this error, and run "amplify push", will see error "Cannot set property 'Id' of undefined". And through Amplify Console, See "No enabled categories"
Expected behavior
No error shows while "clone a new environment"
All resources are in new environment
Reproduction steps

amplify init to init a project, the name is "pinamplify"
amplify add notifications And Choose Email for Push notifications, then, Amplify will interact to ask creating "Auth" and "Analytics (Pinpoint)". Looks like Amplify relying on Pinpoint to sending the "Push notification"
It will ask below questions

From email to send email
ARN of SES identity
IAM role

Once all finished, run amplify push, and it works

Then, change to another environment

amplify env add prod
It will pop up questions

From email to send email
ARN of SES identity
IAM role
However, an error occurs

Ignore the error and push, the following error shows

And in Amplify Console

GraphQL schema(s)

# Put schemas below this line

Project Identifier
No response
Log output

# Put your logs below this line

Additional information
No response

Does this also cover the case when I checkout an existing environment and try to push changes that include notifications? I received the same error in red.
"Cannot set property "Id" of undefined"

Does this also cover the case when I checkout an existing environment and try to push changes that include notifications? I received the same error in red. I'm on 10.5.1 and all new resources created successfully except for Notifications. "Cannot set property "Id" of undefined"

I have the same.
amplify pull failed with the same error 🛑 Could not initialize categories for 'testing': Cannot read property 'Id' of undefined .
Plus it's weird that amplify status shows Notifications's operation as Create although I can see the Pinpoint IDs in the ./amplify/team-provider-info.json .

@lazpavel Any updates? It's still an issue in 10.5.2. We added the Email category and now there is no work for us. When I checkout the environment that I just pushed up, I get this error below. amplify status also reports that everything will get a  Create operation even though if I look in AWS the resources are there - including pinpoint for 'myenv'. Any eta on a fix?
✔ Initialized provider successfully.
⠋ Retrieving channel information for Email.✖ There was an error initializing your environment.
🛑 Could not initialize categories for 'myenv':

@lazpavel I upgraded the CLI to 10.6.1. This issue still remains.
STR - Create new environment, push and you'll see this
✔ Code generated successfully and saved in file src/API.ts
🛑 Cannot set property 'Id' of undefined
Checkout original environment and then checkout the environment that I just created, and you'll see this again
✔ Initialized provider successfully.
⠋ Retrieving channel information for Email.✖ There was an error initializing your environment.

Hi team,
I have tried with 10.4.0 and 10.6.2 version of amply cli. However, looks like the issue is still there?

Hi forks,
I've come up with a workaround for this issue.
My idea is to remove the entire "notifications" property from amplify/backend/backend-config.json.
  "notifications": {
    ...
  },

If you want a one-liner command with jq, this is for you:
# Remove the "notifications" property from backend-config.json
cd amplify/backend; (rm backend-config.json; jq --monochrome-output --raw-output 'del(.notifications)' > backend-config.json) < backend-config.json; cd -

After creating a new environment, you can safely discard changes to this file without any effect.
# Create your new environment
amplify env add ${NEW_ENV_NAME}

# Discard changes to the file
git restore amplify/backend/backend-config.json

# Push to the remote and create resources
amplify push -y

You'll need to re-create notifications after pushing to the remote is complete.
# Add your notifications again
amplify add notifications


Enable className prop for ReactTrixRTEInput

This PR enables className prop for the ReactTrixRTEInput which allows a passing custom css classes for styling the editor. A new story and test was added that showcases the new functionality.
Addresses #30
Sidenote: I might need the same functionality for the toolbar later down the road.

Thanks @alejo4373 ❤


refactor: asset url resolution

Both the partner site and the public site rely on some helper functions (defined in shared-helpers) to determine the appropriate URL for an Asset object.  These functions collectively provide some level of abstraction, but are used inconsistently across the two sites, resulting in unnecessary duplication and widespread impact for otherwise minor changes.  They also encapsulate logic that could easily be consolidated on the backend with some minor changes.
The helpers that provide this functionality should be refactored into appropriately scoped and named functions that can be used by the sites to get the URLs needed with minimal knowledge about implementation.  They should be designed so that, should the logic be centralized on the backend, no additional changes would need to be made to frontend code for resolving file URLs.  Both sites should be updated to make use of the updated functions.

done, closing


HBASE-26798 improve balancer visibility

Improve our ability to understand how and why the balancer is/isnt balancing:

Report new metrics that match the values in the log output
Add existing metrics to the log statements
Add additional logging to report when the move cost is greatly impacting the ability for the balancer to take action

Ive omitted testing here since these changes are focused on logs + adding metrics to existing reporting.

When upstreaming things it is costly to take this approach so ideally each pushed solution is relatively complete.

This makes sense too. Would your approach be to deploy this in house and spend a little time watching and waiting?

Also, the TestStochasticBalancerJmxMetrics has some assertions that check for the specific outputted metrics. We should probably add the new "Imbalance" there, right? I'm also surprised that the test doesn't failure on the Percentage change.

So i went back an re-ran the tests I did locally and dug into the build output. I noticed a test was skipped? So maybe thats why it was successful?
mvn clean verify -pl hbase-server -am -Dtest=org.apache.hadoop.hbase.master.balancer.TestStochasticBalancerJmxMetrics,org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer  -DfailIfNoTests=false -Dhadoop.profile=3.0

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running org.apache.hadoop.hbase.master.balancer.TestStochasticBalancerJmxMetrics
[INFO] Running org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
[WARNING] Tests run: 1, Failures: 0, Errors: 0, Skipped: 1, Time elapsed: 0.041 s - in org.apache.hadoop.hbase.master.balancer.TestStochasticBalancerJmxMetrics
[INFO] Tests run: 15, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 134.914 s - in org.apache.hadoop.hbase.master.balancer.TestStochasticLoadBalancer
[INFO]
[INFO] Results:
[INFO]
[WARNING] Tests run: 16, Failures: 0, Errors: 0, Skipped: 1
[INFO]

Ill dig into how exactly that is working - and add the imbalance check !

I got the tests to work! Except I had to add a pause to allow the balancer to run (which can take some time - logs below) and then publish the metrics.
2022-03-17 11:46:31,679 INFO  [Time-limited test] balancer.StochasticLoadBalancer(557): Finished computing new moving plan. Computation took 778 ms to try 19200 different iterations.  Found a solution that moves 1 regions; Going from a computed imbalance of 0.23730422401518747 to a new imbalance of 0.0019379844961240308.

The tests also allowed me to see the moveCost logs - which atm they feel like too much
There are several hundred (at least) of these:
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=3.5 percentageOfCost=1.0. Consider lowering moveCost multiplier.
2022-03-17 11:46:31,677 INFO  [Time-limited test] balancer.StochasticLoadBalancer(621): MoveCostFunction greatly impacting overall cost of improvement plan. currentCost=2.333333333333333 percentageOfCost=1.0. Consider lowering moveCost multiplier.

Good catch on the new moveCost logs. Wonder if we can make it just log once at the start? Glad to see you could get the tests working again!
I don't follow regarding the pause -- i thought the balanceTable call was synchronous? I think a pause might cause issues upstream because pauses often result in flaky tests. When the tests are running all the time in the upstream CI system sometimes system load can cause things to run slower than expected. So 5s might work locally, but might fail sometimes in the CI system.
Is there any sort of state we can wait for instead of a pause? Or can we directly call something to trigger the metrics early/on-demand? Sometimes the devs will mock things or pass in like a CountDownLatch or other forms of flow control, but I don't have a great grasp on how helpful/possible those would be in this case.

Thanks for the feedback.
Ive update the move cost to print at most 5 times, though if one time is enough Im fine with that too.
I also reworked the tests to utilize the existing retry  functionality to ensure we get more than the tag.Context and tag.Hostname metrics.

Still had some tweaks on the tests, but was able to get them successfully work. I think there is some latency between when the metrics are shipped and consumable (seems like this is expected given the existing retry logic ). I added an additional check to make sure we got the correct number of metrics we expect.
Once i get final feedback from you on these changes (and the move cost log limit ) Ill squash these into one commit. :)


Make verbose mode way more verbose

I currently have this problem and trying to diagnose it, I noticed how non-verbose the verbose mode of dep is. It basically doesn't tell anything about what is going on.
It would be good that whenever a process is started that could potentially block (HTTP, file IO, dependency resolving calculation, ...), a message announces what it's doing.

Dep was officially deprecated earlier this year, and the proposal to archive this repository was accepted. As such, I'm closing outstanding issues before archiving the repository. For any further comments, please use the proposal thread on the Go issue tracker. Thanks!


fix: position when offset parent has a border

Seems like we don't want to take into account the border of the common offset parent. Works with both box-sizing: content-box and box-sizing: border-box.
Approach seem right?

While this fixed the offset issue, it looks like we need to also account for this problem...

Hmm Popper v1 is broken in this case as well: https://codepen.io/atomiks/pen/gObWgwz


fix(chart): Add healthz endpoint to BackendConfig

Closes #1241
When using .Values.cd.backendConfig.create inside the values.yaml a BackendConfig gets created with
healthCheck:
  requestPath:  `/health`

instead of the new endpoint /healthz.
The same holds for .Values.ingress.iap.enabled

@sven-urbanski-freiheit-com  The CI failure message says:
Error: google-github-actions/auth failed with: retry function failed after 1 attempt: the GitHub Action workflow must specify exactly one of "workload_identity_provider" or "credentials_json"! If you are specifying input values via GitHub secrets, ensure the secret is being injected into the environment. By default, secrets are not passed to workflows triggered from forks, including Dependabot.

So maybe this causes issues because it is triggered from my fork?
Do I need to adapt anything? I think I cannot create a branch in kuberpult repo itself?

@sven-urbanski-freiheit-com The CI failure message says:
Error: google-github-actions/auth failed with: retry function failed after 1 attempt: the GitHub Action workflow must specify exactly one of "workload_identity_provider" or "credentials_json"! If you are specifying input values via GitHub secrets, ensure the secret is being injected into the environment. By default, secrets are not passed to workflows triggered from forks, including Dependabot.

So maybe this causes issues because it is triggered from my fork? Do I need to adapt anything? I think I cannot create a branch in kuberpult repo itself?

This is a security feature of github so that only a handful of people can trigger CI runs.


Fix top bar for iOS

Currently iOS samples use constant offset from the top to show the content.
Instead we should calculate top bar height (that is different for different devices) and use it as offset.
The calculation should be done automatically and embedded to androidx.compose.ui.window.Application.
We probably also need a new parameter - topBarColor in this function to automatically color the top bar.
Then all iOS samples should b fixed to remove current constant offset workaround.

Isn't that approach a little bit too simplistic? See for example: https://blog.felgo.com/cross-platform-app-development/notch-developer-guide-ios-android

Useful links.
How it works on Android: /Users/dim/Desktop/github/dima-avdeev-jb/android-intets
Experiments on iOS: https://github.com/JetBrains/androidx/commit/36d9f9a0cefca52016ebb61fd6c29d59a2ac7413

Done in this PR:

https://github.com/JetBrains/compose-multiplatform-core/pull/586

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.


cilium kvstore fails on master with Consul running in developer VMs

Reproducing steps:

checkout master
start the developer VMs:
./contrib/vagrant/start.sh
check that cilium status shows that the key-value store is running:

vagrant@cilium-master:~/go/src/github.com/cilium/cilium$ cilium status
KVStore:                Ok         Consul: <IP_ADDRESS>:8300
ContainerRuntime:       Ok
Kubernetes:             Disabled
Cilium:                 Ok         OK
NodeMonitor:            Listening for events on 2 CPUs with 64x4096 of shared memory
Cilium health daemon:   Ok
Allocated IPv4 addresses:
 <IP_ADDRESS>
 <IP_ADDRESS>
 <IP_ADDRESS>
Allocated IPv6 addresses:
 f00d::a0f:0:0:74ca
 f00d::a0f:0:0:8ad6
Known cluster nodes:
 cilium-master (localhost):
  Primary Address:   <IP_ADDRESS>
   Type:             InternalIP
  AllocRange:        <IP_ADDRESS>/16
Controller Status (0/3 failing)

run cilium kvstore get, which fails:

vagrant@cilium-master:~/go/src/github.com/cilium/cilium$ cilium kvstore get
level=info msg="Waiting for consul to elect a leader"
Error: Unable to retrieve key: Unexpected response code: 400

Expected behavior:
Since cilium status shows that the key-value store is connected, cilium kvstore should be able to dump the contents of the key-value store.

Can you get any data from consul on that IP?

Turns out that you have to provide the prefix for Consul, otherwise it complains:
Successful case:
vagrant@cilium-master:~/go/src/github.com/cilium/cilium$ cilium kvstore get /cilium --recursive
level=info msg="Waiting for consul to elect a leader"
cilium/state/identities/v1/value/cmVzZXJ2ZWQ6aGVhbHRoPTs=/<IP_ADDRESS> => 38882
cilium/state/identities/v1/id/38882 => cmVzZXJ2ZWQ6aGVhbHRoPTs=
cilium/state/identities/v1/locks/cmVzZXJ2ZWQ6aGVhbHRoPTs=.lock =>
cilium/state/identities/v1/locks/id/38882.lock =>

Error case:
vagrant@cilium-master:~/go/src/github.com/cilium/cilium$ cilium kvstore get /
level=info msg="Waiting for consul to elect a leader"
Error: Unable to retrieve key: Unexpected response code: 400

If you use --recursive with / it works, though:
vagrant@cilium-master:~/go/src/github.com/cilium/cilium$ cilium kvstore get / --recursive
level=info msg="Waiting for consul to elect a leader"
cilium/state/identities/v1/id/38882 => cmVzZXJ2ZWQ6aGVhbHRoPTs=
cilium/state/identities/v1/locks/cmVzZXJ2ZWQ6aGVhbHRoPTs=.lock =>
cilium/state/identities/v1/locks/id/38882.lock =>
cilium/state/identities/v1/value/cmVzZXJ2ZWQ6aGVhbHRoPTs=/<IP_ADDRESS> => 38882

As discussed, this is a consul requirement. We can improve the CLI always add a / for all keys with consul


Homologacion add tests group 5 and 7

Released in v2.0.0-Beta7 -> https://github.com/project-openubl/xbuilder/releases/tag/v2.0.0-Beta7


Has Redux's Time Come and Gone

My team and I have spent a lot of time learning redux and have started to build a new application with it. I was listening to @gaearon on The Software Engineering Podcast found here http://softwareengineeringdaily.com/2015/09/18/flux-redux-and-react-hot-loader-with-dan-abramov/. At the 50 minute mark @gaearon said "but of course declarative data fetching is the future and redux does not offer you declarative data fetching so redux has past".
Should I build anything with Redux or should I be moving on to Relay / GraphQL?

https://github.com/rackt/redux/issues/464

Many people are pretty happy with Redux. You should ask around—I'm not really qualified to answer this question. I'd say if your app is very data-heavy a la Facebook (many nested entities with complex relationships) it's a good idea to invest in a GraphQL backend and learn Relay. I've only heard good things about it.
Redux of course is more explicit and doesn't solve declarative data fetching for you. There are attempts to integrate Redux and GraphQL but I can't evaluate them against Relay—I know too little about it.
Redux is much lower level than Relay, and us no more “past” than a plain JS objects and functions are “past”. Relay is a framework, and Redux, sans the sanity checks, is ten 10-liner functions, so it shouldn't be a surprise that they have different scopes. Pick what works best for you and let us know.

Declarative fetching of GraphQL is amazing, top-notch. However Relay still has a HoC API mainly, which isn't declarative per se. If Relay would offer a more flexible API, uncoupled from the component tree, then a proper Redux-binding could be written?

I think they are 2 types of systems that solve 2 distinct issues.
This ticket is like carpenters asking if the time of the hammer has passed.
graphql based systems I would argue are an over engineered solution for many apps, conversely apps with complex data structures are most likely under engineered if built using redux.

graphql based systems I would argue are an over engineered solution for many apps, conversely apps with complex data structures are most likely under engineered if built using redux.

Good way to put it; that's how I feel about it too.

@gaearon keep up the good work with redux! One of the best tools going! I am using it in 5 large apps and 2 small ones at my company and loving it!

@gaearon keep up the good work with redux! One of the best tools going! I am using it in 5 large apps and 2 small ones at my company and loving it!

:100:

i think their not the same:

relay - for solving data fetching management from the server
redux - for solving state management of application

many complex applications contains state which is not related to the server that you'll need to manage. i'll argue that if you'll use relay, you'll see yourself in the end need redux as well. according to the opposite, relay seems like a very nice boost but only for server related stuff

Question is how does Relay relate to flux inspired design patterns? Where does Relay end, when do we need Redux?  Is Relay Flux 2.0?
The Todo Relay example: does it render redux obsolete?

Maybe there is a way to tell your reducer how to map itself to and from GraphQL and when?  Not saything that isn't complex but what is the simplest way to make the state make sense.
Need to learn more about what Relay is.  It's not a couple of hundred lines of code that's for sure!

@oriSomething You are not quite right. Relay solves a lot of state management too.

@gyzerok i've meant client side application state

@oriSomething Yes, I'm talking about client-side application state

@gyzerok i've must missed it. can you give me a link about this?

@oriSomething there is no special link because Relay manage it implicitly. Maybe you can try to watch FB talks about Relay. They talking about how Relay solves cache problem. Client-side application cache = state. I do not remember definite talk, sorry.

@oriSomething the only place developer should do some explicit state management is here.

@gyzerok ok, so in that case, is there a state management that isn't related to the server that relay does? as far as i understand it doesn't, or is it?

@oriSomething If I understood you correctly Relay do all things about data normalization on the client and merging data from queries into single store.

yes, it does=> https://facebook.github.io/relay/img/Guides-Containers-HOC-Relay.png
Check: https://facebook.github.io/relay/docs/guides-ready-state.html#content
Only if there's insufficient data on the client, Relay sends a request to the server for more data.

Redux is much lower level than Relay, and is no more “past” than plain JS objects and functions are “past”. Relay is a framework, and Redux, sans the sanity checks, is ten 10-liner functions, so it shouldn't be a surprise that they have different scopes.

So I made slim-redux.js just for fun—a version of Redux without comments, developer warnings and sanity checks. It passes all the essential Redux tests (except the sanity check tests), and it's 99 lines :wink: . This should seal my point that Relay and Redux are tools with wildly different scopes.

@IwanKaramazow i think i wasn't clear enough, what i'm trying to say, is not all data is about the server, there is a data which is not related to the server to manage, and i truly don't think relay is the go to "tool" even if it can to manage this data

@oriSomething can you give an example?

Fully agree @mattapperson . Everything comes down to the definition of complex, or better, to where each individual recognize a "complex thing"

@IwanKaramazow I think he talks about client side form state for example

I moved from Redux => Relay because of GraphQL. Mostly all the resources in my application were hierarchical. They naturally made sense to be nested entities. Keeping a cache of these models in Redux was amazing. I had a sane view of my data and could quickly iterate with the awesome redux-devtools.
But without GraphQL, I had to do several round trips to map remote resources to the redux tree.

/resource1-list
/resource2-list?resource1=
/resource3-list?resource2=

Obviously this is a problem with REST, not Redux. Had I seen some Redux-GraphQL bindings earlier, perhaps I would be using those. Adopting Relay changed very little in my application. Instead of @connect I am using Relay.createContainer. Both products have the same vision of architecture with differing APIs. I wrote a quick post on this.

I am currently using both redux and relay/graphql and although relay is amazing for data fetching, i can see myself always using redux.  I currently use redux for 2 reasons and I can see myself finding more reasons in the future

Miscellaneous state that needs to be shared between components that do not live in the database
Form prep. I actually have one part of my application where I have a toolbar component that has a submit button, and a panel component that holds all my input fields. When I type in the form, I debounce my input into a "form reducer" stored in redux so that my toolbar can have access to the data before I submit.

Also, redux devtools is awesome.

Man oh man. I have been reading up on Relay today, and I have to admit the code is not easy to read nor is it easy to understand. I looked at a few examples of Redux and I was able to grasp the core concepts by just reading the code.
The tutorial or the Todo example seem anything but elegant. I think React and FLUX pride themselves on being simple. I don't get that feeling from Relay as of yet.

Given Relay's heavy ties to React and relative overkill in complexity for most apps, I've been more keen on Falcor lately. In fact, because of its promise-based interface, it fits in really nicely with how you do most async behavior in Redux. And because its decoupled from React, I can use it everywhere in my app more easily. Also, server-side rendering isn't fully baked yet, which is a non-starter for me.
I'm also liking react-resolver, which is sort of akin to a "Relay Lite". That one may end up being best for very simple projects or ones that rely on third-party REST APIs.

@timdorr Have you tried storing all of your state in Falcor? Having your reducers use a Falcor object, for example.

Not yet. I'm still in experimental mode with it and I've got bigger fish to fry on my projects, so I haven't given it enough attention yet.

I've played around with Falcor, and I'd highly recommend it. In fact, I'm working on integrating a Redux app with a Falcor backend right now. It doesn't give you the query aggregation of Relay, but it has a very sophisticated cache layer in its client library that prevents overfetching. I think that might be good enough, but time will tell.

@gaearon how does writing a React web app with declarative data fetching compare to writing the same app in Elm?

In regards to query aggregation, there's the Model.batch method.  It takes either an interval (in milliseconds) or a scheduler but, I'm not finding much documentation on schedulers.
If you don't mind me asking, how are you integrating Redux and Falcor?  All my attempts have left me frustrated.

I'd also be interested in seeing a redux Falcor example. I've read all the Falor docs and agree it's much simpler than relay/graphql. Albeit less powerful.

For anyone wondering about the relationship of Redux with Relay, and whether it makes sense to use them together, see: https://github.com/facebook/relay/issues/114
The gist is that Relay will eventually handle data from multiple sources (backend, local ephemeral data), so it replaces other Flux implementations you may be using.
https://github.com/facebook/relay/issues/168#issuecomment-135169255:

Note that Relay is an implementation of the Flux pattern (can Flux replace itself? ;-).

We're using both Redux and Relay heavily at OpenGov. It's true that since moving to Relay, our reducers/ folder has gotten far smaller. However, we've found that Redux is still quite useful for application-level, local state management. Perhaps one day Relay will supplant it in that area, too. But as @josephsavona put it once, the "Redux architecture" is really just... functions :) Even if one day you move on from Redux the library, you'll likely continue to use immutable state updates, reactive data flow, reducer functions, etc. for the forseeable future. That's the valuable part of Redux IMO, not necessarily the <100-line library that exists in this repo. (Oh, and the community, of course.)

I'd say if your app is very data-heavy a la Facebook (many nested entities with complex relationships) it's a good idea to invest in a GraphQL backend and learn Relay.

Agreed, but I'd argue GraphQL + Relay is a good investment even for modestly-sized apps, especially for new projects that are starting from scratch.

What do you guys think of https://github.com/gyzerok/adrenaline?

Not exactly fitting, because it doesn't use Relay, but what do you think of this opinionated full-stack approach out of the Meteor Community? https://github.com/mattkrick/meatier

Only a deep architecture like GraphQL/Relay or Datomic/Om.Next can solve the object/relational impedance problem... Here are my thoughts -- feedback appreciated.
GraphQL/Relay: The End of Redux? (Perhaps?)

Looks like there are a lot of people interested in this topic (Relay/Redux, GraphQL, and reducing complexity) I'm working on a design for a simple yet functional GraphQL client that will play very nicely with the Redux approach to app state.
Curious what people think about this set of design principles: https://github.com/apollostack/apollo-client/pull/7/files?short_path=83772ba

Just adding my 2cents here: I don't think there is an end to Redux. It's simple and beautiful, and sufficient in many cases. The JS ecosystem is so fast and hard to keep up, and Redux, like React in some way, is a milestone on which we can rely for some time. We just cannot evolve our workflow every month (or at least, I can't), and I think Redux is a really a good option right now. Relay (and data fetching in general) is just not required on many projects…

@gaearon it has been a few months since you made this post, and you just gave a talk on Redux at a React conference. Where would you say we are now in terms of GraphQL integration with Redux compared to Relay/, or perhaps a combination of all three?

@likeabbas if you're looking for GraphQL-Redux integration, try Apollo Client: http://docs.apollostack.com/apollo-client/index.html
We don't have 100% feature parity with Relay yet, but we are getting close.

@gaearon to echo the question from @likeabbas : "Where would you say we are now in terms of GraphQL integration with Redux compared to Relay/, or perhaps a combination of all three?"

A couple brief thoughts. Redux is a generic framework that provides a balance of just enough structure and just enough flexibility. As such, it provides a platform for developers to build customized state management for their use-cases, while being able to reuse things like the graphical debugger or middleware. That use case doesn't seem likely to go away, so rather than "has Redux's time come and gone", perhaps a more interesting question would be: If you are using GraphQL, does it make sense to build on Redux?
To which I would answer that it isn't clear that there is one right answer. Building on Redux may benefit from integration (shared tooling, shared data), while building a custom approach is more work but allows more domain-specific tooling and may enable better performance.

@josephsavona : that is a great summary of Redux!  We may have to steal that for the docs somewhere :)

Yeah the title of this thread is not optimal, and it seems like the question has been kind of exhausted. Perhaps it's time to move the discussion somewhere else.

.> lock the issue

I'll just close this out. Not sure if any resolution is to be had anyways. Redux works for some people and that's good enough for me.

Whoops, wrong button. Sorry about that 😄


Down to Swift version 2.3

Hi guys,
Unlucky, I'm maintaining an old project with Swift version 2.3. Client want to have a date picker like your implementation.
So, I ask for helping. Are there any solutions to down your current source to version 2.3? Or have you implement any 2.3 version git branch.
Thank you,

Hi,
Unfortunately not. I started this project after the release of Swift 3, so it was developed in Swift 3 only. I don't think it's a good idea to invest much time in Swift 2.3 at this point.
Anyway, thanks for your interest in JBDatePicker and success finding an alternative solution.
Kind regards,
Joost


add ipset utility

Address issue: https://github.com/rancher/rancher/issues/15718
Ipset is used to detect if ipvs mode for kube-proxy can be activated.

LGTM


[6.0] Send SIGKILL to swift-frontend indexing processes

Explanation: We were sending SIGINT to swift-frontend processes if they didn’t terminate after 2 minutes. However, swift-frontend doesn’t listen to SIGINT.

If a task running waitUntilExitStoppingProcessOnTaskCancellation is cancelled and the process doesn’t terminate on a SIGINT after 2 seconds, kill it.

Scope: Background indexing if a swift-frontend or clang process takes more than 2 minutes
Risk: Low, we would mostly be stuck in indexing in these cases
Testing: Added test case
Issue: rdar://130103147
Reviewer:   @hamishknight on https://github.com/swiftlang/sourcekit-lsp/pull/1500

@swift-ci Please test


Linking through CMake, error occurred: The following configuration files were considered but not accepted:

CMakeLists.txt is as followed:
cmake_minimum_required (VERSION 3.8)
project ("helloSEAL")
#告诉CMake那里去找你的SEAL库
set(SEAL_DIR E:\SEAL\build\cmake)
#去找SEAL库
find_package(SEAL 3.6 REQUIRED)
将源代码添加到此项目的可执行文件。
add_executable (helloSEAL "helloSEAL.cpp" "helloSEAL.h")
将SEAL库链接到该项目
target_link_libraries(helloSEALSEAL::seal)
TODO: 如有需要，请添加测试并安装目标。
when i run it. error occurred:
Could not find a configuration file for package "SEAL" that is compatible with requested version "3.6".
The following configuration files were considered but not accepted:
C:/Program Files (x86)/SEAL/lib/cmake/SEAL-3.6/SEALConfig.cmake, version: 3.6.4 (32bit)

It says that a 32-bit version of SEAL is installed, which is possibly not what you intended. Are you trying to build a 64-bit application? If so, you should make sure SEAL is built with the correct 64-bit build environment. README.md has the details of exactly how to do this.

i used ninja as generator, it did not say 64or32 bit, i thought it was 64 bit as default

Did you use x64 Native Tools Command Prompt for Visual Studio 2019?


Share file with camera using cache and FileProvider (for API 24)

Attempted fix for #457.

Codecov Report

Merging #727 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master    #727      +/-   ##
=========================================
- Coverage    6.05%   6.03%   -0.02%
=========================================
  Files          95      95
  Lines        5041    5050       +9
  Branches      450     451       +1
=========================================
  Hits          305     305
- Misses       4708    4717       +9
  Partials       28      28

Impacted Files
Coverage Δ

.../commons/contributions/ContributionController.java
0% <0%> (ø)
: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 0e655a0...cc26fc2. Read the comment docs.

It works well all the way through taking the camera photo and confirming it. But in ShareActivity, when I grant the necessary permissions to access storage as usual, this error will always occur:
06-08 18:07:22.890: E/AndroidRuntime(2983): Process: fr.free.nrw.commons, PID: 2983
06-08 18:07:22.890: E/AndroidRuntime(2983): java.lang.RuntimeException: Failure delivering result ResultInfo{who=@android:requestPermissions:, request=1, result=-1, data=Intent { act=android.content.pm.action.REQUEST_PERMISSIONS (has extras) }} to activity {fr.free.nrw.commons/fr.free.nrw.commons.upload.ShareActivity}: java.lang.IllegalArgumentException: column '_data' does not exist
06-08 18:07:22.890: E/AndroidRuntime(2983): 	at fr.free.nrw.commons.upload.FileUtils.getDataColumn(FileUtils.java:108)
06-08 18:07:22.890: E/AndroidRuntime(2983): 	at fr.free.nrw.commons.upload.FileUtils.getPath(FileUtils.java:76)
06-08 18:07:22.890: E/AndroidRuntime(2983): 	at fr.free.nrw.commons.upload.ShareActivity.getFileMetadata(ShareActivity.java:384)
06-08 18:07:22.890: E/AndroidRuntime(2983): 	at fr.free.nrw.commons.upload.ShareActivity.onRequestPermissionsResult(ShareActivity.java:337)

To get that error, you need to set the target SDK to 25 (which I did locally after pulling your branch).

Yeah that was as far as I tested. I should have mentioned, sorry.
Could you try it again? The new commit should make it significantly closer to solution. At least I was able to use camera and upload a picture from an API 25 device. (*)
It changes the part of the code I was not familiar with. More tests are welcome. I suspect there might still be bugs related to permission and/or EXIF/metadata and/or older devices.
(*) To be exact it was rejected by abuse filter, which is almost "done" from the app's perspective. https://commons.wikimedia.org/w/index.php?title=Special:AbuseLog&wpSearchUser=Whym+test0

@whym This works all the way to complete upload in my API 24 real device, nice. :)
Testing on API 23 (emulator) seems to still be problematic though. I can take the picture, but cannot confirm it in order to move on to the title/desc screen. It doesn't crash, but is stuck in the camera confirmation screen.
Error report:
06-09 17:04:25.738: E/ContributionController(4285): Could not create file: /storage/emulated/0/Commons/images/1496991865737.jpg
06-09 17:04:25.738: E/ContributionController(4285): java.io.IOException: open failed: ENOENT (No such file or directory)
06-09 17:04:25.738: E/ContributionController(4285): 	at java.io.File.createNewFile(File.java:939)
06-09 17:04:25.738: E/ContributionController(4285): 	at fr.free.nrw.commons.contributions.ContributionController.reGenerateImageCaptureUriInExternalStorage(ContributionController.java:44)
06-09 17:04:25.738: E/ContributionController(4285): 	at fr.free.nrw.commons.contributions.ContributionController.startCameraCapture(ContributionController.java:74)
06-09 17:04:25.738: E/ContributionController(4285): 	at fr.free.nrw.commons.contributions.ContributionsListFragment.onOptionsItemSelected(ContributionsListFragment.java:123)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:2314)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v4.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:3029)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v4.app.FragmentController.dispatchOptionsItemSelected(FragmentController.java:353)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:414)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.app.AppCompatActivity.onMenuItemSelected(AppCompatActivity.java:195)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:113)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:69)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:206)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:776)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:822)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:156)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:969)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:959)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.widget.ActionMenuView.invokeItem(ActionMenuView.java:623)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.support.v7.view.menu.ActionMenuItemView.onClick(ActionMenuItemView.java:154)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.view.View.performClick(View.java:5198)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.view.View$PerformClick.run(View.java:21147)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.os.Handler.handleCallback(Handler.java:739)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.os.Handler.dispatchMessage(Handler.java:95)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.os.Looper.loop(Looper.java:148)
06-09 17:04:25.738: E/ContributionController(4285): 	at android.app.ActivityThread.main(ActivityThread.java:5417)
06-09 17:04:25.738: E/ContributionController(4285): 	at java.lang.reflect.Method.invoke(Native Method)
06-09 17:04:25.738: E/ContributionController(4285): 	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
06-09 17:04:25.738: E/ContributionController(4285): 	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
06-09 17:04:25.738: E/ContributionController(4285): Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
06-09 17:04:25.738: E/ContributionController(4285): 	at libcore.io.Posix.open(Native Method)
06-09 17:04:25.738: E/ContributionController(4285): 	at libcore.io.BlockGuardOs.open(BlockGuardOs.java:186)
06-09 17:04:25.738: E/ContributionController(4285): 	at java.io.File.createNewFile(File.java:932)
06-09 17:04:25.738: E/ContributionController(4285): 	... 28 more

Doesn't it happen with master? Anyway, I seem to reproduce the issue and  I'll try solving it, too.

I decided to try eliminating the use of external storage as much as possible. Tested with:
API 22 (emulator)
API 23 (real device)
API 25 (emulator)
Please make sure resetting permission settings before testing.

@misaochan

I can take the picture, but cannot confirm it in order to move on to the title/desc screen.

I have been working on this with the patch I just have updated. I still see a similar issue, but it proceeds after waiting one minute or two. Is it the same for you? For me it only happens with debug builds and API 23. (Release builds are fine for API 23 too.)

Travis failed with this error, but I couldn't reproduce it on my machine.

Execution failed for task ':app:transformClassesWithDexForDebug'.
com.android.build.api.transform.TransformException: java.lang.RuntimeException: java.lang.RuntimeException: Unable to pre-dex '/home/travis/.gradle/caches/modules-2/files-2.1/com.google.guava/guava/19.0/6ce200f6b23222af3d8abb6b6459e6c44f4bb0e9/guava-19.0.jar' to '/home/travis/build/commons-app/apps-android-commons/app/build/intermediates/pre-dexed/debug/guava-19.0_4125dcfa4f861863282b818bae4a32a93b7a0016.jar'

I restarted the Travis build, but it throws the same error. I agree, builds fine on my machine as well. :/
What is the easiest way of testing a release build with the emulator? Do I actually need to sign it and load it manually into the emulator?

actually need to sign it and load it manually into the emulator

This is how I did it.
2017/06/11 午後6:26 "Josephine Lim"<EMAIL_ADDRESS>I restarted the Travis build, but it throws the same error. I agree, builds
fine on my machine as well. :/
What is the easiest way of testing a release build with the emulator? Do I
actually need to sign it and load it manually into the emulator?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/commons-app/apps-android-commons/pull/727#issuecomment-307616721,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AAApssmf1kv2TuH662soRM1W00iPAXfvks5sC7KrgaJpZM4NzcVD
.

Actually, the issue with API 23 doesn't happen for me anymore with the latest set of commits. Hopefully for you, too?

Oh, cool, the debug build on API 23 works for me now, too. :)
Would anyone else like to test this if possible? Sorry for the long merge delay @whym , just being a bit cautious since this is core functionality.

I will just take a leap and merge this. :)


Document that NFC only works from Screen 1

Request to update documentation to explain that the NFC component only works from Screen1.
This email topic describes the problem.
@halatmit @jisqyv

This has been fixed


Warning in XCode 9.1: 'characters' is deprecated

Wrap/Sources/Wrap.swift:265:63: 'characters' is deprecated: Please use String or Substring directly

Fixed in Wrap 3.0.0 that now uses Swift 4 🎉 Thanks for bringing this up @tomasikp 👍

np @JohnSundell 👍 💯


Documentation on toolchain update

Interesting. It could be that there was some inconsistency in your installation of rustup working files.  Multiple toolchains coexist and managed by a single rustup installation. For example, on my system multiple toolchains installed starting from 1.65 up to 1.69 inclusively and all versions in between, and I didn't have to uninstall anything. No harm to mention uninstalling and installing in the docs, so the PR is good.

Interesting. It could be that there was some inconsistency in your installation of rustup working files. Multiple toolchains coexist and managed by a single rustup installation. For example, on my system multiple toolchains installed starting from 1.65 up to 1.69 inclusively and all versions in between, and I didn't have to uninstall anything. No harm to mention uninstalling and installing in the docs, so the PR is good.

FWIW, same here. I have numerous co-existing toolchain versions and have had no issues (no uninstall or reinstall).


NullPointerException when not specifying the token_type_hint for the revoke token endpoint#170

Solving issue #170

I wanted to ask before changing a lot of things. Should we make that TokenType an Optional counting that we assume it might get null values. I'm not really a fan of using null. Let me know your opinion please :)

I also see now some other maybe unwanted behavior reported with issues #174 and #175. Maybe we can merge them as well with this solution if you agree. They seem all to be very related.

@lspil I agree that this issue is related to #174.
I just pushed a fix for #174 via 7f8aff7.
I'll close this as a duplicate.