Document RestoreUseStaticGraphEvaluation to increase speed of noop restore

We need to document the opt-in setting RestoreUseStaticGraphEvaluation in NuGet 5.5 and VS16.5 to speed up restore for large solutions.
@jeffkl
Grabbed the following from https://github.com/NuGet/Home/issues/8791#issuecomment-595309456:
<PropertyGroup>
  <RestoreUseStaticGraphEvaluation>true</RestoreUseStaticGraphEvaluation>
</PropertyGroup>

Or for one time use:
msbuild /t:Restore /p:RestoreUseStaticGraphEvaluation=true
/cc: @karann-msft @aortiz-msft

Feel free to assign to me

@aortiz-msft - here is the issue we spoke about.

Lets document it and talk about it a bit more for everybody to use it and provide us with feedback. @jeffkl can you document it? Should it go here: https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets?
P.S. We may want to refactor the pack and restore options separately. But another issue :)

/cc: @JonDouglas

I fixed up the title cause this really goes beyond no-op. It's about commandline restore in general.
For large solutions, even actual restore could see significant improvements.

https://docs.microsoft.com/en-us/nuget/reference/msbuild-targets is one place, but I really think that we need to have in some other places too.
That's a reference doc, not necessarily one where we advertise new features :)

Just throwing stuff out there. Does NuGet have a conceptual doc piece today just about improving restore performance? Nothing comes up other than half of Jeff's work and NuGet / CI release notes about improved caching / features.
I feel like many aspects are scattered everywhere & not necessarily all MSBuild features are documented outside of release notes / specs, so it might be an opportunity to make up for the MSBuild 15/16 versions of features that we didn't document with respect to restore performance.
We can then expand upon the no-op / full restore scenarios alongside what all these flags mean with regards to improving overall NuGet restore performance & throw in some best practices as well.
Thoughts?

We can then expand upon the no-op / full restore scenarios alongside what all these flags mean with regards to improving overall NuGet restore performance & throw in some best practices as well.

I've been wanting to write a blog around that. Talking about our journey to improving performance. I have context as far as ~4.5 goes and I have the numbers from recent versions linked in https://github.com/NuGet/Client.Engineering/issues/533.

As far as perf improvements go, for the most part, they've been enabled automatically, static graph is one of the few behind a feature flag.

Here's an example using Jeff's huge repo of projects:
Restore 1 (Fresh)
Target Performance Summary:
        0 ms  ValidateToolsVersions                      1 calls
        0 ms  ValidateProjects                           1 calls
       12 ms  _GenerateRestoreProjectPathItemsCurrentProject 1000 calls
       13 ms  _GenerateRestoreGraphProjectEntry        1000 calls
       13 ms  CollectFrameworkReferences               1000 calls
       14 ms  _GenerateProjectRestoreGraphCurrentProject 1000 calls
       15 ms  CollectCentralPackageVersions            1000 calls
       15 ms  _GenerateProjectRestoreGraph             1000 calls
       16 ms  _CheckForUnsupportedTargetFrameworkAndFeatureCombination 1000 calls
       21 ms  _GetRestoreSettingsCurrentProject        1000 calls
       24 ms  CollectPackageReferences                 1000 calls
       25 ms  CollectPackageDownloads                  1000 calls
       27 ms  _CheckForUnsupportedCppNETCoreVersion    1000 calls
       31 ms  _GenerateRestoreDependencies             1000 calls
       38 ms  _CheckForObsoleteDotNetCliToolReferences 1000 calls
       59 ms  ValidateSolutionConfiguration              1 calls
       62 ms  _GetRestoreSettingsOverrides             1000 calls
       66 ms  _GetProjectJsonPath                      1000 calls
       74 ms  _GetRestoreSettingsPerFramework          1000 calls
       87 ms  _CheckForLanguageAndFeatureCombinationSupport 1000 calls
       90 ms  _LoadRestoreGraphEntryPoints               1 calls
      176 ms  _GenerateRestoreSpecs                    1000 calls
      177 ms  _GenerateRestoreProjectPathItems         1000 calls
      291 ms  ApplyImplicitVersions                    1000 calls
      297 ms  IncludeTargetingPackReference            1000 calls
      304 ms  _GenerateRestoreProjectSpec              1000 calls
      357 ms  CheckForImplicitPackageReferenceOverrides 1000 calls
      397 ms  _GetRestoreTargetFrameworksOutput        1000 calls
      420 ms  _IsProjectRestoreSupported               1000 calls
      445 ms  _GenerateDotnetCliToolReferenceSpecs     1000 calls
      555 ms  _GetRestoreProjectStyle                  1000 calls
      658 ms  _GenerateRestoreProjectPathItemsPerFramework 1000 calls
     1154 ms  _GenerateProjectRestoreGraphPerFramework 1000 calls
     4983 ms  _GenerateRestoreGraph                      1 calls
     8103 ms  _FilterRestoreGraphProjectInputItems       1 calls
     8674 ms  _GetRestoreSettings                      1000 calls
    19598 ms  _GetAllRestoreProjectPathItems             1 calls
    155854 ms  Restore                                    1 calls
    4671178 ms  _GenerateRestoreProjectPathWalk          1000 calls

Task Performance Summary:
        1 ms  NuGetMessageTask                           1 calls
        4 ms  WarnForInvalidProjectsTask                 1 calls
       67 ms  GetRestoreSolutionProjectsTask             1 calls
      106 ms  Message                                  2002 calls
      109 ms  GetRestorePackageDownloadsTask           1000 calls
      121 ms  GetReferenceAssemblyPaths                1000 calls
      129 ms  GetRestoreFrameworkReferencesTask        1000 calls
      164 ms  CheckForImplicitPackageReferenceOverrides 1000 calls
      168 ms  ApplyImplicitVersions                    1000 calls
      186 ms  GetRestorePackageReferencesTask          1000 calls
      204 ms  GetProjectTargetFrameworksTask           1000 calls
      262 ms  GetRestoreProjectStyleTask               1000 calls
      284 ms  GetRestoreProjectReferencesTask          1000 calls
      310 ms  GetRestoreDotnetCliToolsTask             1000 calls
      314 ms  ConvertToAbsolutePath                    2000 calls
     2185 ms  RemoveDuplicates                         2003 calls
     8518 ms  GetRestoreSettingsTask                   1000 calls
    155834 ms  RestoreTask                                1 calls
    4700229 ms  MsBuild                                  1005 calls

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:03:09.28

Restore 2
Target Performance Summary:
        0 ms  ValidateToolsVersions                      1 calls
        0 ms  ValidateProjects                           1 calls
       13 ms  _GenerateRestoreProjectPathItemsCurrentProject 1000 calls
       14 ms  CollectPackageDownloads                  1000 calls
       17 ms  ValidateSolutionConfiguration              1 calls
       18 ms  _GenerateProjectRestoreGraph             1000 calls
       19 ms  CollectCentralPackageVersions            1000 calls
       19 ms  CollectFrameworkReferences               1000 calls
       19 ms  _GetRestoreSettingsCurrentProject        1000 calls
       20 ms  _CheckForUnsupportedTargetFrameworkAndFeatureCombination 1000 calls
       23 ms  _GenerateRestoreGraphProjectEntry        1000 calls
       24 ms  _GenerateRestoreDependencies             1000 calls
       25 ms  _GenerateProjectRestoreGraphCurrentProject 1000 calls
       28 ms  CollectPackageReferences                 1000 calls
       38 ms  _CheckForObsoleteDotNetCliToolReferences 1000 calls
       44 ms  _CheckForUnsupportedCppNETCoreVersion    1000 calls
       59 ms  _LoadRestoreGraphEntryPoints               1 calls
       64 ms  _GetProjectJsonPath                      1000 calls
       70 ms  _CheckForLanguageAndFeatureCombinationSupport 1000 calls
       75 ms  _GetRestoreSettingsPerFramework          1000 calls
       78 ms  _GetRestoreSettingsOverrides             1000 calls
      114 ms  _GenerateRestoreProjectPathItems         1000 calls
      121 ms  _IsProjectRestoreSupported               1000 calls
      141 ms  _GenerateRestoreSpecs                    1000 calls
      224 ms  IncludeTargetingPackReference            1000 calls
      296 ms  _GenerateRestoreProjectPathItemsPerFramework 1000 calls
      306 ms  _GenerateRestoreProjectSpec              1000 calls
      310 ms  ApplyImplicitVersions                    1000 calls
      332 ms  CheckForImplicitPackageReferenceOverrides 1000 calls
      363 ms  _GetRestoreTargetFrameworksOutput        1000 calls
      465 ms  _GenerateDotnetCliToolReferenceSpecs     1000 calls
      567 ms  _GetRestoreProjectStyle                  1000 calls
     1217 ms  _GenerateProjectRestoreGraphPerFramework 1000 calls
     5012 ms  _GenerateRestoreGraph                      1 calls
     7209 ms  _FilterRestoreGraphProjectInputItems       1 calls
     8044 ms  _GetRestoreSettings                      1000 calls
    19262 ms  _GetAllRestoreProjectPathItems             1 calls
    41194 ms  Restore                                    1 calls
    4969350 ms  _GenerateRestoreProjectPathWalk          1000 calls

Task Performance Summary:
        1 ms  NuGetMessageTask                           1 calls
        5 ms  WarnForInvalidProjectsTask                 1 calls
       49 ms  GetRestoreSolutionProjectsTask             1 calls
      100 ms  Message                                  2002 calls
      100 ms  ConvertToAbsolutePath                    2000 calls
      106 ms  GetReferenceAssemblyPaths                1000 calls
      142 ms  GetRestoreFrameworkReferencesTask        1000 calls
      154 ms  GetRestorePackageDownloadsTask           1000 calls
      170 ms  ApplyImplicitVersions                    1000 calls
      170 ms  CheckForImplicitPackageReferenceOverrides 1000 calls
      188 ms  GetRestorePackageReferencesTask          1000 calls
      198 ms  GetProjectTargetFrameworksTask           1000 calls
      252 ms  GetRestoreProjectStyleTask               1000 calls
      320 ms  GetRestoreDotnetCliToolsTask             1000 calls
      334 ms  GetRestoreProjectReferencesTask          1000 calls
     2092 ms  RemoveDuplicates                         2003 calls
     7899 ms  GetRestoreSettingsTask                   1000 calls
    41167 ms  RestoreTask                                1 calls
    4997375 ms  MsBuild                                  1005 calls

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:01:13.08

Restore 3 w/ Static Graph
Target Performance Summary:
        0 ms  ValidateToolsVersions                      1 calls
        0 ms  ValidateProjects                           1 calls
       17 ms  ValidateSolutionConfiguration              1 calls
    16277 ms  Restore                                    1 calls

Task Performance Summary:
        0 ms  Message                                    1 calls
    16268 ms  RestoreTaskEx                              1 calls

Build succeeded.
    0 Warning(s)
    0 Error(s)

Time Elapsed 00:00:16.56

Source: https://github.com/jeffkl/nuget-restore-performance
We should definitely blog this item & additionally make another couple articles for no-op as well?

Yeah, we have numbers inhttps://github.com/NuGet/Client.Engineering/compare/dev-nkolev92-perfData, that test open source projects.
For example, NuGet.Client's no-op goes from ~8.5s to 3.5s just by enabling static graph restore. There are many more insights from those runs + it's super easy to run even more.

As discussed in https://twitter.com/rrelyea/status/1321157839163801603. when this is documented, please be sure to include information about why it's currently opt-in and what sort of potential problems you could encounter with it turned on.
Without that information, it's hard to understand when you'd want to enable it and why you might not want to.

@bording  Here's one place where you get burned https://github.com/NuGet/Home/issues/9280 its fixed now, but as shown in the case there are many vendors across many technologies that didn't always "play by the rules" rolling it out slow captures those cases, hopefully those that care enough are on the cutting edge to find it and are wise enough to report it.

For reference, I have created https://github.com/NuGet/Home/issues/9803 epic, which tracks all potential problems with static graph restore.
At this point the differences are contained to edge cases, and in @aolszowka's case, it was an error case.
For people considering adopting, if you are concerned about any potential discrepancies, I'd recommend running:

Restore with static graph.
Restore without static graph

one after the other.
You should see something like  All projects are up-to-date for restore.
If you see that, your restore works 100% the same in both cases.
I will post this information on the epic issue.

Do twitter posts count as documentation. https://twitter.com/nikolchekolev/status/1321151230559752192


get_compiled_select repeating prefix!

When I do
$this->db->select('tablename.column').get_compiled_select('tablename', FALSE);
$rows = $this->db->get()->result_array();
Fires an error as table prefix is repeated
SELECT prefix_tablenameprefix_tablename.column FROM tablename

This is not valid CI code, and it is unclear even what you'd be trying to do with it:
$this->db->select('tablename.column').get_compiled_select('tablename', FALSE);

And then this ...
 SELECT prefix_tablenameprefix_tablename.column FROM tablename

It's not the prefix repeated, it's the prefixed tablename repeated in the SELECT portion of a query, while it is not at all prefixed in the FROM clause (and that looks really questionable to be true).
Please elaborate and be clear on what the issue is.

@narfbg,  in user-guide
http://localhost/ciAdmin/user_guide/database/query_builder.html?highlight=query builder#id12
The example with database.php('dbprefix' => 'prefix_';),
then prefix will be repeated as mentioned!

The linked user-guide page doesn't even contain 'dbprefix' or prefix_ within it ...

@narfbg
assume we set ( $db['default']['dbprefix']='mytbl_'; ) in /application/config/database.php, to 'ca_';
table [users] columns are ['first_name', 'last_name']
do the following:
		$sql = $this->db
			->select('users.first_name', 'users.last_name')
			->get_compiled_select('users', FALSE);
		$rows = $this->db->get()->result_array();

[as in the example I mentioned above, you will get the following database error]
Error Number: 1054
Unknown column 'ca_ca_users.first_name' in 'field list' SELECT ca_``ca_users.first_nameFROMca_users`

Trying to reproduce any sort of problem on the develop branch, I set 'dbprefix' => 'prefix_' in `application/config/database.php'.
Then in a controller, I did
$this->load->database();
echo $this->db->select('tablename.column')->get_compiled_select('tablename', FALSE);

This produces
SELECT "prefix_tablename"."column" FROM "prefix_tablename"

which seems fine.
....
Just saw your new reply. The method signature for select is:
public function select($select = '*', $escape = NULL)

You need to pass an array of column names as the first parameter and probably don't want to pass a second parameter at all.
echo $this->db
    ->select(array('tablename.column', 'tablename.col2'))
    ->get_compiled_select('tablename', FALSE);

SELECT "prefix_tablename"."column", "prefix_tablename"."col2" FROM "prefix_tablename"

I don't see a bug here.

@zploskey
awesome, now do as in the example
$rows = $this->db->get()->result_array();

Fix your call to select like I showed and it should work. There's nothing wrong with the query that got generated as long as you pass an array to select.

@zploskey I already tried that, it throw an error as mentioned.

Please post exactly the line of code, exactly the query generated, and exactly the error produced, formatted as code so that we can actually read them.

Thanks @zploskey
Just for the record, I am using CI 3.1.5.
considering 'dbprefix' is 'ca_' !
Home controller
class Home extends CI_Controller {
	public function __construct()
	{
		parent::__construct();
		$this->load->database();
		$sql = $this->db
			->select(array('users.first_name', 'users.last_name'))
			->get_compiled_select('users', FALSE);
		echo $sql;  // output is perfect
		$rows = $this->db->get()->result_array(); // Error code 1054 [shown in attachment]
		die(var_export($rows));
	}
}

Thanks. We can work with this.
For the record, the query shown in the error is:
SELECT `ca_``ca_users`.`first_name`, `ca_``ca_users`.`last_name` FROM `ca_users`

Based on the syntax I assume this is on MySQL.
In the future please post text as text. Images tend to become unavailable after a while.
What happens if you do this?
->select(array('first_name', 'last_name'))

or this
->select('table_name.first_name, table_name.last_name')

or even just this
->select('first_name, last_name')

I couldn't find any examples in the docs using the dot notation like you were doing. They all either pass a string to select or an array of only the field names. It's possible it's not supported to do it the way you're doing it. There are some tests that use the second form above, so that should work.

Thanks @zploskey,
in fact, I made it as simple, but with [ ->join()  ] then [table_name] is required for column select as SQL goes!
And yes, I am beginner and I am using MySQL.

Doing some experimenting, I've found out a couple of things.

select() does not generally accept an array. You should give it a string. It just so happens to work for simple arrays of field names, but won't work for array('table.field1', 'table.field2') etc. So don't rely on that behavior. Makes you wish you were working in a statically typed language. Please forgive my earlier suggestion to do this--I don't actually use the query builder in production so I'm a little unfamiliar with it.
Queries like this with tablename.fieldname will fail unless you supply a from('tablename'), get('tablename'), or maybe if you have table alias set in the model class (I didn't really look into this).

This seems to work OK regardless of whether you set the dbprefix or not:
$this->db->dbprefix('prefix_');
$rows = $this->db->select('table_name.first_name, table_name.last_name')
                 ->get('table_name')
                 ->result_array();

So anyways, that should be how to do it. You were getting a different query from get_compiled_select() because you were supplying the table name in that call.
I'm pretty sure this is not a bug, but it does seem like some sort of error message would be appropriate if a developer omits get('table_name') or from('table_name') or we otherwise don't know the table name. For example I get this one sqlite:
$rows = $this->db->select('table_name.first_name')->get()->result_array();
// Gives: SQLite3::query(): Unable to prepare statement: 1, no such column: table_name.first_name

which is a bit misleading. It does exist, but the table name isn't set on the query.
So I guess there is some question of whether we should infer the table name from the select if it was of the form table_name.field_name, but I think it might be most appropriate to just throw an exception saying you need to supply the table name. I could also see leaving it as is but maybe spelling this out a little in the documentation.

@zploskey Thanks for your help on this.
However, the following (that you said) is patently false:

select() does not generally accept an array. You should give it a string. It just so happens to work for simple arrays of field names, but won't work for array('table.field1', 'table.field2') etc.

The very first thing that select() does is explode(',', $string_input) if the input is a string. Everything is stored as an array internally, and as strings are inherently unreliable, we shouldn't encourage their use.
Arrays are more than fine. It's just that there are way too many lazy developers that would riot if we disabled the string option.
The issue here had nothing to do with this either. See the referenced commit.

Interesting. The reason I thought this was not supported was that the documentation for select() says it only accepts a string.
https://github.com/bcit-ci/CodeIgniter/blob/1db998348e8850db79c4afa2d057fa31fb6bc12c/system/database/DB_query_builder.php#L276-L282
Anyways, thanks for fixing the problem here.


CSSResourcePlugin - resources are not being copied to ./dist

In my SCSS file I import some SCSS files from node_modules
@import "../../node_modules/photoswipe/src/css/main.scss";
@import "../../node_modules/photoswipe/src/css/default-skin/default-skin";

These files use some resources from the "../../node_modules/photoswipe/src/css/default-skin/ directory.
If CSSResourcePlugin() plugin is not activated then in the output app.css file the path remains unchanged - as expected.
When the CSSResourcePlugin() is enabled then I can see the paths  in the output CSS app.css being changed, but no images are copied to ./dist/
The plugin is initialized as follows:
CSSResourcePlugin({
  dist: './dist/resources/',
}),

The ./dist/resources/ is created, but it's empty.
It looks like a bug.

I have no idea what I did, but now it works fine and files are being copied to ./dist/resources/ properly.  Maybe I messed up the plugins order? Sorry for the confusion.

@wujekbogdan warning yes, we should give the info on which file, which URL has failed to resolve.


strip dylibs

Fixes conda-forge/conda-forge.github.io#682 and fixes https://github.com/conda-forge/r-base-feedstock/pull/62

Any idea what's dragging openblas in still @isuruf? Sometimes stopping doesn't happen when it seems like it should so ideally we'd not add it in the first place, still really good to make progress here.

Thanks @isuruf! R recipes are building again.

Shouldn't you be added to the maintainers @jdblischak?

@mingwandroid I'd be happy to be added as a maintainer. I've attempted to add myself in past PRs, but I don't have a very good track record for getting my PRs merged to r-base:
https://github.com/conda-forge/r-base-feedstock/pulls?q=is%3Apr+is%3Aclosed+author%3Ajdblischak

@jdblischak this "problem" also  happens on the go-feedstock repo.
I made modifications to the 'upload_or_check_non_existence.py' so that all packages within a multiple outputs recipe is uploaded before the error shows up.
For the moment we have been able to simply ignore the error message and the "red-badge" from AppVeyor.

@sodre Thanks for the explanation!


Raidboss skin

A raidboss makeover to fit the FFXIV Theme a bit better
This is by far not the most beautiful way to implement this.

This looks great! I hope, this will get implemented, as the classic bahamut-timeline skin looks extremely outdated xD

Don't worry they are both still work in progress.
I managed to trim the skin to just a js file using the deep combinator. It will mention that it's deprecated. Also i need to alter the TimerBar.draw() function.
Setting the skin via Options.skin might be pretty complicated since the browser overlay wont allow local file loading it has do be done via the plugin and you may need a similar structure as for the trigger and timeline files.

I'm a little surprised about the change to the draw function().  Correct me if I'm wrong, but in local testing, both the old and the new draw functions both have a little gap when timers complete:

But the new function really doesn't behave properly with "active" timers with a duration that are supposed to fill in reverse:

It kind of crosses over? That's probably not intentional, right? Am I guessing that the new draw function is to try to address that gap?

Yeah, I think removing the -2px from that line you changed instead of doing scale is the correct answer.  I'll see if I can fix up the original css to not need it.

I didn't commit this pull request directly, as I wanted it to be CSS rather than JS, but I set you as the author in my commit.  Let me know with another pull request if 2d60b9c3bba1c is confusing or doesn't work for you, or if I broke anything you intended.
Thanks again for all this work.  Sorry about taking so long to get around to integrating this, but I really appreciate it and I think a whole lot of other folks will too.


Reports package

Hi @claytondus, I found that you haven't published Claytondus.AmazonMWS.Reports package, so I'm just wondering if you're doing it?

The functions of the Reports module can be found in the Feeds module.  I need to remove the redundant code from the repo (Claytondus.AmazonMWS.Reports shouldn't exist).

thanks, don’t know that


Add ability to customise WebSocket OkHttp client and fallback to existing implementation

Summary
This is a follow-up PR to #19632 for which @cpojer called upon. Disclaimer: I don't have much experience in the Android/Java field.
Quoting the original PR:

Prior to 22efd95, users could customise the OkHttp client used by React Native on Android by calling setOkHttpClientFactory in OkHttpClientProvider.

This functionality has a variety of legitimate applications from changing connection timeouts or pool size to Stetho integration. In this commit also provide the ability for WebSocket.

I believe I found a work-around but was not able validate the failing tests @cpojer experienced. Because of that I would label my PR as WIP.
Closes #18920
Fix Description
getOkHttpClient creates a client in-place, if a sClient == null.
public static OkHttpClient getOkHttpClient() {
    if (sClient == null) {
      sClient = createClient();
    }
    return sClient;
  }

connect of the WebSocketModule makes no use of this in-place client, it initalizes a client by itself (uses a "virgin" client).
  @ReactMethod
  public void connect(
    final String url,
    @Nullable final ReadableArray protocols,
    @Nullable final ReadableMap options,
    final int id) {
    OkHttpClient client = new OkHttpClient.Builder()
      .connectTimeout(10, TimeUnit.SECONDS)
      .writeTimeout(10, TimeUnit.SECONDS)
      .readTimeout(0, TimeUnit.MINUTES) // Disable timeouts for read
      .build();

 //...

The original fix uses getOkHttpClient thus WebSocketModule implicitly receives a pre-loaded client, if no explicit sClient is set.
This PR adds a hasOkHttpClient Method to the OkHttpClientProvider, so that the WebSocketModule can select if it will use the explicitly set client from the provider or fall back to using the "virgin" client.
Changelog
[ANDROID] [Changed] - Added custom OkHttpClient injection into WebSocketModule only if custom OkHttpClient is configured
Test Plan
Quoting the original PR:

Create React Native application and set a custom factory in the constructor, e.g. OkHttpClientProvider.setOkHttpClientFactory(new CustomNetworkModule());

Where a custom factory would look like:
class CustomNetworkModule implements OkHttpClientFactory {
   public OkHttpClient createNewNetworkModuleClient() {
       return new OkHttpClient.Builder().build();
   }
}

I was unable to locate the existing unit or integration test files for the OkHttpClientProvider and WebSocketModule, so I am unsure if unit tests are expected.

It seems like this PR changes the default behavior similarly to the other PR, and it makes our e2e tests fail :(

Hm, okay. There is one edge case in which my fix wont accomplish what we want. If at some point getOkHttpClient is called (without checking hasOkHttpClient before), a sClient instance is created and any further hasOkHttpClient calls will return true.

I guess the best way to understand the issue is if you could explain what OkHttpClientProvider.getOkHttpClient().newBuilder() does differently from the method we are using now. I assume it uses slightly different defaults – what are they?

So there are 2 cases I believe:

getOkHttpClient() is called after checking hasOkHttpClient() (hasOkHttpClient() == true):
The custom client is provided, with the defaults the developer selected
getOkHttpClient() is called without checking hasOkHttpClient() (maybe at some other point in the code):
The default client from the createClient() method is created and the returned. Any consecutive call to hasOkHttpClient() will return true, even if there is no custom client intended as in 1.

Besides these 2 cases (when hasOkHttpClient() returned false), the defaults selected are the ones already present before this PR.

Unfortunately this approach breaks internal use cases at FB so we cannot merge it at this time :(

@cpojer do you have any advise how to improve or modify this PR so it can be merged eventually? We have a specific use case where we have to customize the OkHttpProvider to accept a single custom root CA in order to establish a secure connection. While this works for HTTPS connections via React Native, it seems that this issue above is preventing us from connecting via WebSocket.

@arabold Well you could fork my fork and rebase all master commits onto it, then build react-native and use that version 🤷♂
Though there would be no guarantees that facebook/react-native provides (explicit or implicit). It seems that there are edge-cases in the e2e tests, which cannot be published but prevent this PR to be merged.


Fix #258

Pull request type

Bugfix

What is the current behavior?

Issue Number: #258
What is the new behavior?

Fixes #258
Separates column lifecycle from model lifecycle, so that the behaviour of empty columns is deterministic, in that they stay "alive" until the editor is closed.

Does this introduce a breaking change?

N/A
Other information

Pull request checklist
Please check if your PR fulfills the following requirements:

[ ] Tests for the changes have been added or the PR is neither a bug fix nor a feature
[ ] Docs have been reviewed and added / updated if needed or the PR is neither a bug fix nor a feature
[ ] The Unreleased section in CHANGELOG.md has been amended to reflect the changes in this PR if needed
[ ] Build (mvn verify) was run locally and any changes were pushed
[ ] The pull request is against the correct branch (master for bug fixes, develop for new functionality)
[ ] Dependencies and citation templates have been updated where necessary or there are no new dependencies

Checklist for maintainers
Releases

Do NOT push the green merge button on GitHub.
Follow the latest version of the developer/maintainer docs for making releases.
Check that license and citation information for dependencies are complete (each dependency has a folder in /THIRD-PARTY/).

Superseded by #319. Closing.


Start a dev branch

To avoid long-standing and frequent complaints about Docs From The Future, I propose after we land #153 and do #106, we start a develop branch, and merge stuff to that.

Sounds good @bollwyvl
Will do this!

Done!

Added a line on the CONTRIBUTING file to make PRs against develop. Need to double check as new PRs keep coming and update the target branch on existing PRs @bollwyvl

Looks good. Will add pr template to #159 so it's more front-and-center.
Can the existing dangling branches be deleted?

Can the existing dangling branches be deleted?

Will do


Changes on bottom sheet.

-We don’t need a selection of the bottom sheet is now showing. Probably we need a Home bottom menu option.

-Able to see the bottom tab style changes.


Do not remove a xcconfig entry if value is empty

Why this change
Because each key will be used in build setting side as substitution, if we just remove the key if value is empty, we will end up not having the substitution to work with in the first place. Here we simply preserve the key value pairs with empty values.
Tests done

rspec to red-green test
integartion tests that red-green
tested with downstream project that is affected by this and indeed it works.

Also did the following changes:

Remove xcode-select step as it was not working and I don't think any integration tests here depends on a specific xcode version?
Update gitignore, and test.yml for experiement_feature integartion spec

I'm a little confused by the PR description. It would be helpful to include a concrete example of what was broken by this and why. The question I was left wondering is if we couldn't add the missing key when needed in the upstream consumer. Having a setting set to an empty string isn't the same as having it not set. The former will stomp any Xcode default values.

Sorry to hear that, in the rspec there is a new EMPTY_CONFIG that is not preserved before the fix but now is. Correct that having a setting set will stomp any xcode default values, but in this fix the pre-condition is that the key is already present/set by podspec side so the author of podspc has the intention to set it to empty? I could not think of a case where we will accidentally write off other settings and I will run a CI job on the downstream project to ensure about it.

... in this fix the pre-condition is that the key is already present/set by podspec side so the author of podspc has the intention to set it to empty?

Sounds good, thanks for the clarification!

should have done more check but right now downstream gets lot of changes that might backfire. I start to think this omitting empty values is done intentionally and it's not really a good idea to fix it via this way. I think I should close this for now

Closing for now as this might do more harm than good without some proper testing. Will bring out the good changes out of this PR as another PR though


How to open journal files without adding entry?

I am looking for a way to just open today's journal entry and not add a timestamp entry...
The documentation on org-journal-new-entry is confusing
https://github.com/bastibe/org-journal/blob/master/org-journal.el#L289-L298

"Open today's journal file and start a new entry.
Giving the command a PREFIX arg will just open a today's file,
without adding an entry. If given a TIME, create an entry for the
time's day. If no TIME was given, use the current time (which is
interpreted as belonging to yesterday if smaller than
org-extend-today-until).

The documentation makes it sound like want to invoke it with a PREFIX

Giving the command a PREFIX arg will just open a today's file,
without adding an entry.

Great that's what I want.
I am invoking C-u 0 M-x org-journal-new-entry
This still adds a new time stamp header entry to the file

C-u M-x org-journal-new-entry should do the trick.

Thanks @bastibe that worked


List of all the available environment variables

Good Day,
Is there somewhere like documentation on all the environment variables that fastlane uses in all of the tools so that we maybe know what we can set and what the usage is for each of them.
I'll be happy to help setup this documentation if I have a list of all the environment variables. :smile:

Hey @Darkreaper101,
Sorry, that doesn't exist right now. All tools that are already migrated to the new configuration system show you the available environment variable when you use sigh --help
If you quickly want to generate a list, clone all main repositories, including credentials_manager and fastlane_core and search for ENV[.
If you decide to aggregate all of them, it would be great if you could create a markdown file in the docs folder of this repository :+1:

Hi @KrauseFx,
No worries just wondering. I'll see if I can do that over the weekend. :smile:
Thanks for the response.


Vulnerability roundup 97: nextcloud-19.0.4: 2 advisories [8.1]

search, files

[ ] CVE-2020-8259 CVSSv3=8.1 (nixos-20.09, nixos-unstable)
[ ] CVE-2020-8152 CVSSv3=4.4 (nixos-20.09, nixos-unstable)

Scanned versions: nixos-20.09: 50c8d1e0deb; nixos-unstable: 83cbad92d73.
Cc @bachp
Cc @fpletz
Cc @globin
Cc @ma27
Cc @schneefux

Upstream gives the following advisory: https://nextcloud.com/security/advisory/?id=NC-SA-2020-040

It is recommended that the Nextcloud Server is upgraded to 20.0.0.

If there will be no patch for 19.x I think it would be best to mark nextcloud19 as insecure (like for version 18.x in both 20.09 and unstable.

I feed a bit uneasy about Nextcloud's product update policy but this is nothing NixOS can change

So, it's not very clear to me where the issue got fixed: e.g. https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2020-8259 states that the issue is in 19.0.1, however there were a few releases after it.
As I don't really get where the issue got fixed, I can't just check if the relevant patches got backported.
Also, the recommendation to upgrade to v20 seems a bit weird to me since their administration manual states that v19 is supposed to be supported until June 2021.
I guess, I'll just contact their support and ask about that. After that I'd file an update PR here :)

OK, apparently I'm not the only one who was a bit confused by their way of handling these issues: https://help.nextcloud.com/t/fixes-for-cve-2020-8259-cve-2020-8152-in-nextcloud-18-19/98289 :D
Will file an update PR now. Since https://nvd.nist.gov/vuln/detail/CVE-2020-8259 is rated as "High" (in contrast to their website where the impact is rated as "Low") and I just checked that the affected encryption feature actually works on NixOS, I guess I'll mark v19 as insecure.


ExpandableTextView inside an ExpandableListView - collapsing problem

I'm trying to get some ExpandableTextView inside an ExpandableListView.
I run into a problem like so:

Expand the ExpandableListView
Expand the ExpandableTextView
Collapse the ExpandableListView
Reopen the ExpandableListView and at first everything seems OK...
Collapse the ExpandableTextView, it doesn't collapse properly

I've prepared a gif

And a git repo to reproduce the problem:
https://github.com/mendhak/expandable-textview-in-expandable-listview-problem
Is there anything I can do to prevent this, maybe some way of forcing the ETV to collapse in the ELV click handler?

Hello, I think i know, how we can resolve this issue.
add this code after line #119 in ExpandableTextView (onClick method):
if (0 == mCollapsedHeight) {
                mCollapsedHeight = mTv.getLineHeight() * Math.min(mMaxCollapsedLines, mTv.getLineCount());
            }


updated pipeline and vue for 100 years timeline

These changes update the pipeline and associated Vue code to update website for new direction. The new approach is going to be to have a CONUS-wide view of the 2000 most severe exceptional droughts (2%, 7day threshold) from 1921-2020.
Changes:

Instead of just the western states, pipeline now builds all of CONUS. There is one target that sets up the CASCs, to be used in the next step.
Instead of droughts from only one dataset (1951-2020), this pipeline builds a full drought record (all three child items) and then takes the 2000 most severe, 2%-exceptional droughts from the full drought record for building the tiles. The rational for this is that with just the 300 gages that have the full 100-year record, there is a geographical bias to the eastern US and the 1950s drought(s). By incorporating the fullest record possible (3000 sites from 1980s-2020), we are able to capture the 2000 most severe of those, which is less biased geographically. This also allows many of the recent, very severe western droughts to be captured, which fell out of the original record because they are newer gage sites (not in the 1950s dataset).
Removed the code to build the horizontal charts. Added some toggled options (by commenting them in/out) in the chart code to have years annotated so that the alignment can be tested in the Vue build.
Renamed charts and updated Vue code correspondingly.
Updated the example annotations and SVG arrows to correspond with the newer 100 year record. Also added an SVG with the timeline as a second layer that is for editing in Illustrator. To update the locations of arrows, open the copy svgs/annotations_drawings-forEditingInAI.svg in Illustrator. Add and/or adjust the arrows/lines as needed. Then save. To make those updates be reflected in the annotations on the Vue build, manually copy and paste the new coordinates into the svgs/annotations_drawings-01.svg file in VSCode.

Known issue: The website build requires nvm use 14.17.0 to run npm run serve
Next steps:

Create CASC (Climate Action Science Center) violin charts of the timeline for a zoomed out view at the bottom of the timeline.
Complete story telling through annotations
Update annotation locations and the corresponding drawings (arrows, etc) for mobile view

Small change: The last few events were dropping out. To fix that, I had to make the map y scale limits so they included the end of the events, not just the beginning:
limits = c(as.Date(min(swarm_data$date)), as.Date(max(swarm_data$date + swarm_data$duration)))
Likewise, I had to change the vue timeline to include the ending scale, which was as.Date(max(swarm_data$date + swarm_data$duration)) = "2020-04-01"

oh good catch!!


vscode.workspace.onDidCloseTextDocument takes about 3 minutes above to fire

vscode.workspace.onDidCloseTextDocument takes about 3 minutes above to fire.
I search accross the issues to find out with no luck.
I know it is designed, but it is quite confusing.
In my extension

Start a tcp server in extension
A client process (not extension itself) connect to the server and send some data
Write recieved data to a tmp file
Open file with vscode.workspace.openTextDocument
Show it with vscode.window.showTextDocument

Then I need to know when this doc is closed(when tab is closed), because I need to close the tcp connection. The client process need to know closed event immediately because it is blocking there until tcp connection closed. That's all I need.
I am going to give it up, somebody help me please! Many thanks!

I think you probably mean the Close event not Save? I think this is essentially what's discussed at https://github.com/microsoft/vscode/issues/15178. VS Code gives no way to know which files are "open in editors" as a user would considered open, but rather its APIs cover only its internal definition of the file being open, which persists for up to 3 mins after the user closes an editor.

Yes, I do mean Close event, not Save. Forgive my mistake.
I've already see #15178, The difference is I donot need to know what files are opened. I just need a notifaction when file closed, if that file is open by me, then I can do some cleanup. That's what I want.

I understand, but all issues relating to that are being closed as dupes of that one (for ex. see https://github.com/microsoft/vscode/issues/43056). The reason there's a request for open editors is because of the way the close event works (otherwise we could use it to track our own list of open editors).
I feel your pain, it's caused me issues too (https://github.com/Dart-Code/Dart-Code/issues/778).

Ok. How I can solve this? Any ideas? @eamodio come up with workbench.action.nextEditor cmd to loop through editors, but it is not suit for my case.

I don't think there are any other workarounds (lots of us would be very happy if there were).

/duplicate of https://github.com/microsoft/vscode/issues/15178


Module 0 not working with multichannel tif hyperstack

Describe the bug
Data structure not created properly when using a tif hyperstack. Not sure if it's because of the particular tif structure or because of ACDC, so wanted to check. Test tif file included at this Google drive link: https://drive.google.com/file/d/1NunHk991rXsczrw7tW1rep_PhiltA8jV/view?usp=sharing
To Reproduce
Steps to reproduce the behavior:

Starting from many individual tif files (one per time frame and channel), use FIJI to construct a hyperstack where one channel is Phase, one is fluorescence (for example). Final dimensions: 121 time frames, 2 channels (phase and fluo), 1 z stack.
Open CellACDC.
Open Module 0.
Load tif. Metadata window correctly previews phase and fluo channels as separate.
Run Module 0.
Open GUI and load position; for some reason, both channels become the fluo, so there's no phase. Checking in FIJI confirms that the two tifs saved in the position folder are both for the fluo channel, so the Phase is never saved as a tif.

Expected behavior
When loading a .zvi, this issue doesn't happen; each channel is saved separately as a .tif in the "Position_X" folder, and loads into the GUI accordingly.
Desktop (please complete the following information):

Python 3.9.7
OS: Windows 10
Cell-ACDC v1.2.4rc4

Hi Jordan, thanks for reporting this, I fixed it, but if you don't mind I would wait to implement also the other features that you requested (about the metrics) before releasing. It should take a week, is that ok? If you need the fix immediately I can release it earlier, let me know, thanks

Hi Francesco, I would actually like to use it as soon as possible if it's not too much trouble to just release that fix. But if that would cause problems I can wait a week. Looking forward to the new features!

Sure no problem, I will release on Monday then!
In the meantime (and in general when you have problems with module 0) since you are already using Fiji you can always generate the required data structure manually using Fiji. There is a section in the manual called "Manually create data structure from microscopy file(s)" that will guide you through that process. If you try it let me know if it works or you think some parts are not clear.

Hi Jordan, I published the release. Activate the environment and run the command pip install --upgrade cellacdc to get the latest version. Let me know if it works, thanks!

Hi Francesco, the update worked perfectly! Thanks so much, saves me a lot of time from doing the data structures manually.


Enable Widevine support

In case anybody is interested i threw together this quick nix shell to package arm64 widevine for nixos. This uses the great widevine-installer tool from AsahiLinux.
Unfortunately I don't have much time to work on a proper contribution to this project, so I figured I would just leave this here in case anybody wants to use it/take it and add it to this repo!
https://gist.github.com/afilini/7fb5624c850f39af4938f4a5d087f2dc

(Ideally I think this should be reworked into a nixpkgs pull req that uses widevine-installer on arm64 rather than downloading and extracting widevine from the .deb file like it currently does for x86)

@afilini Where do you put the script or how do you run it?

I turned this into an overlay if thats useful to anyone else: https://gist.github.com/psanford/1f70a0838c308d28478cf27a9b55c43d
I can confirm this works for me.

@psanford How? Did you cd into downloads and run nix-shell or something else?
Also, what's the difference between your script and Afilini's?

You can run afilini's simply by running nix-shell shell.nix. You can add my overlay to your configuration.nix like so:
nixpkgs.overlays = [
 (import ./overlays/chromium-widevine-overlay.nix)
]

These are both pretty normal things in nix. I'd suggest you read the nix documentation for more details on how this works.

@psanford so the nix shell doesn’t work on its own?

@psanford so the nix shell doesn’t work on its own?

i'd take @psanford's advice on this:

These are both pretty normal things in nix. I'd suggest you read the nix documentation for more details on how this works.

@cmacrae I ran the nix shell, and nothing happened

This also works for Firefox by just setting MOZ_GMP_PATH to <widevine-path>/gmp-widevinecdm/system-installed, and adding the requisite preferences (https://github.com/AsahiLinux/widevine-installer/blob/main/conf/gmpwidevine.js).
Not sure of the best way to package this up, but I was able to make it work for myself by setting it in environment.sessionVariables and sticking the preferences in user.js.

To be clear about the steps:
I've created a file in a new directory, /etc/nixos/overlays, then per @psanford 's comment above, added:

nixpkgs.overlays = [
 (import ./overlays/chromium-widevine-overlay.nix)
]

To my configuration.nix, with the few changed lines from @diegobfernandez as I'd like to enable this for Firefox.
Running a sudo nixos-rebuild switch runs a lot of the widevine-installer installPhase logic, and I can see the MOZ_GMP_PATH set in my environment.
MOZ_GMP_PATH=/nix/store/7hdjbkwphkfxhv7s4k849j9172yyxdz0-widevine/gmp-widevinecdm/system-installed
> ls /nix/store/7hdjbkwphkfxhv7s4k849j9172yyxdz0-widevine/gmp-widevinecdm/system-installed
libwidevinecdm.so  manifest.json

I don't have any seemingly relevant preferences in the about:preferences view in firefox, nor any GMP widevine type strings in about:config, and DRM type pages like Spotify's web player are still throwing widevine errors. I had some custom firefox confs loaded prior as I've been testing trying to get this working for a while, but checking at the moment it doesn't look like they're loaded, so I don't think my prior dirty conf is colliding.
Any of those that are more knowledgeable see anything wrong with my approach as described? Thanks.

I turned this into a flake, I have published it in case this speeds up anyone's workflow at all: https://github.com/epetousis/nixos-aarch64-widevine

I don't have any seemingly relevant preferences in the about:preferences view in firefox, nor any GMP widevine type strings in about:config

@TLMcNulty I believe this is standard behaviour since the profile has already been defined, not 100% sure though. The widevine-installer repo has a .js file that is meant to define these preferences, but you can use them as a reference point for creating the options manually in about:config too: https://github.com/AsahiLinux/widevine-installer/blob/main/conf/gmpwidevine.js

Changing the profile did not auto-load anything. Manually defining the preferences listed in the gmpwidevine.js file DID allow streaming protected content in Spotify.
I don't know enough to troubleshooting the manual loading of the JS into Firefox prefs, but that doesn't matter so much to me now that it's working.
I also don't know if the manual fixup steps I ran prior, or the overlay is what put the conf onto the system correctly. If/when I rebuild from scratch I can tell. Either way, it's incredibly handy to have it in the DSL, as the configuration can now be safely stored.
I am in all of your debts, many blessings.

Changing the profile did not auto-load anything. Manually defining the preferences listed in the gmpwidevine.js file DID allow streaming protected content in Spotify.
I don't know enough to troubleshoot the manual loading of the JS into Firefox prefs, but that doesn't matter so much to me now that it's working.
I also don't know if the manual fixup steps I ran prior, or the overlay is what put the conf onto the system correctly. If/when I rebuild from scratch I can tell. Either way, it's incredibly handy to have it in the DSL, as the configuration can now be safely stored.
I am in all of your debts, many blessings.

It seems as there was something wrong with extraPrefsFiles, it was not being applied. Perhaps something is wrong in the firefox wrapper itself. I modified that part to work around this issue. I also wrapped the environmental variable right into firefox, so now just applying the overlay will be enough for widevine to work on firefox.

#337261


Update README.md

Mistake on the output second row:Missing three decimals on the fourth number(-0.56|10000.000)

Oh Thank you ! Have a great day !!!
2015-01-22 17:52 GMT+02:00 Nikolay Kostov<EMAIL_ADDRESS>
Merged #10 https://github.com/TelerikAcademy/CSharp-Part-1/pull/10.
—
Reply to this email directly or view it on GitHub
https://github.com/TelerikAcademy/CSharp-Part-1/pull/10#event-223092365.

Thank you for helping us :)


joined nodes of alp plate outline path

Problem
While trying to create a 3D extrusion of the top plate (alps) I noticed that the paths of the outline were not connected. FreeCad constantly failed to create the 3D shape despite many attempts to correct it.
Change
Using Inkscape I've manually joined the nodes of the paths that form the outside contour of the left and right plates. The geometry was unchanged. Just hoping to save others some time.

Thanks


Swagger/Swashbuckle OAuth2 Authorizations not set

I've found an issue and I'm not sure where it stems from. The point where it fails in inside a Swagger js library (swagger-ui-js), but it might either because of a misconfiguration in Swashbuckle, or an actual bug in Swagger (version: v2.1.0-M2).
The issue I found was after upgrading Swashbuckle from 4.x to 5 (in 4.x it worked without a hitch), and it manifests in the following way:
I've a couple of WebAPI services exposed using Swashbuckle, and I've configured them (just the same as I've configured 4.x) to use a local OAuth2 token issuer. I hit the [On/Off] button on a particular service, and start the OAuth2 requests, finalizing with the access_token stored locally in swagger (the [On/Off] button is [On], meaning authentication succeeded).
When I attempt to perform the actual call to the WebAPI service, it breaks locally in the javascript code, in swagger-ui-js, at line nr 900, at the point where it tries to call apply(obj, authorizations) on the reference retrieved from this.authz["oauth2"]
result = value.apply(obj, authorizations); // it breaks here because value is an empty js object, and apply is undefined
I've uploaded a screenshot of the firefox debugger: http://oi61.tinypic.com/2q1wk6e.jpg
I've traced where this.authz[key] is set, and its in the
SwaggerAuthorizations.prototype.add = function (name, auth) {
this.authz[name] = auth;
return auth;
};
I've then traced it, at least I hope I traced it correctly, to:
window.swaggerUi.api.clientAuthorizations.add.apply(window.swaggerUi.api.clientAuthorizations, arguments);
and I noticed arguments is an array, and the "oauth2" key has an empty js object, but I've not been able to find out where that arguments object is populated from.
Anyone else had this issue? Could this be just because of a misconfiguration server-side on my part? I would imagine if this was the case, the OAuth2 flow would break a lot sooner than when trying to perform the actual request with the received bearer token.
Thanks, and I hope someone is able to shed some light on this, and I'm stumped.

You are further than I am. I don't even know what you mean by On/Off button. Even the sample (Dummy.Core/Dummy.WebHost) in latest code that is supposed to be configured for OAuth2 doesn't seem to do anything in terms of requesting a token, passing it down to controllers.The controllers themselves in the sample do not validate any security. I am at lost as well.

I've only had issues after upgrading from 4.x to 5. It worked fine before.

@danutzplusplus - thanks for pointing this out, I'm also able to repro. This seems to have been introduced by the swagger-ui upgrade to v2.1.0-M2 and so I believe that's where the issue lies but I'll need to investigate further. Stay tuned ...

It's good to hear it's not just me then. I also started an issue on swagger github for this.
https://github.com/swagger-api/swagger-ui/issues/1134

Great - the Swagger guys are awesome so lets keep an eye on that thread and assist in any way we can

@domaindrivendev The guys at Swagger said if we could re-test the applied fix. I was using Swagger through Swashbuckle  so I'm not sure how easy it is for me to test it. Could you please re-test it to see if it's fixed?
https://github.com/swagger-api/swagger-ui/issues/1134#issuecomment-92439065

I got this error after upgrading from 5.0 to 5.1. It appears that initOAuth(opts) is giving me the following error:
0: "missing appName"
1: "missing client id"
2: "missing realm"
length: 3
Uncaught ReferenceError: log is not definedswagger-oauth-js:190
initOAuthindex:67
window.swaggerUi.SwaggerUi.onCompleteindex.js:24
window.SwaggerUi.Backbone.Router.extend.renderindex.js:24
options.successspec-converter.js:123
SwaggerClient.buildFromSpecmodel.js:144
Resolver.resolveresolver.js:208
obj.on.responsespec-converter.js:515
(anonymous function)index.js:24
Request.callbackindex.js:24
(anonymous function)index.js:24
Emitter.emitindex.js:24
xhr.onreadystatechange

The only custom javascript I have is: https://github.com/exceptionless/Exceptionless/blob/master/Source/Api/Content/docs.js to change the auth schemes.

I went back to 5.0.4 and I get this in the console but everything works:
XHR finished loading: GET "http://localhost:50000/schema/v2".
swagger-ui-js:75 auth unable initialize oauth: missing appName,missing client id,missing realm

@danutzplusplus - when I wire up the develop_2.0 branch, the on/off buttons for oauth don't show up anymore. Just a no-show - no console errors.
However, if I apply the one-line fix from the PR on it's own the whole flow works end-to-end. So, the fix looks good (although it should also be added to dist/lib/swagger-oauth.js) but it seems something else in the develop_2.0 branch is preventing oauth from being enabled.

An update from webron: https://github.com/swagger-api/swagger-ui/issues/1134#issuecomment-92482900 (it's getting silly with me pasting references from one issue to the other :D)

@domaindrivendev I guess Swagger the fix hasn't been deployed on version 5.1.1 of Swashbuckle, on nuget yet? I updated to that version and it still behaves the same. Thanks

I need to wait for a stable release of swagger-ui (with the fix) before I can embed it into SB. I don't believe this is available yet

In the meantime, I've just monkey patched the version of swagger-ui that comes with SB.
Check the latest release - 5.1.2, should be fixed.

@domaindrivendev Thanks for the fix. It worked. Have a good one. :)


fastlane init does not ask if app should be created in iTC / Dev Portal

New Issue Checklist

[x] Updated fastlane to the latest version
[x] I have read the Contribution Guidelines

Issue Description
I just wanted to use fastlane init for a project, that is not intended to be published (it's a simple test app), and according to the docs fastlane init will ask, if the app should be created in iTunes Connect / the Developer Portal, but this is not the case. It just gives me the option to confirm the values or enter them manually.
Complete output when running fastlane, including the stack trace and command used
$ fastlane init
[12:53:48]: Detected iOS/Mac project in current directory...
[12:53:48]: This setup will help you get up and running in no time.
[12:53:48]: fastlane will check what tools you're already using and set up
[12:53:48]: the tool automatically for you. Have fun!
[12:53:48]: Created new folder './fastlane'.
Your Apple ID (e.g. fastlane@krausefx.com): <hidden>
[12:54:25]: Verifying if app is available on the Apple Developer Portal and iTunes Connect...
[12:54:25]: Starting login with user '<hidden>'
Two Fator Authentication for account '<hidden>' is enabled
Please enter the 6 digit code: <hidden>
Requesting session...

+----------------+------------------------------------------------------------------------------------------+
|                                              Detected Values                                              |
+----------------+------------------------------------------------------------------------------------------+
| Apple ID       | <hidden>                                                                                |
| App Name       | App                                                                                |
| App Identifier |                                                                                |
| Project        | /Users/ffittschen/Development/test-app/Test App/Test App.xcodeproj                       |
+----------------+------------------------------------------------------------------------------------------+

[12:55:24]: This app identifier doesn't exist on iTunes Connect yet, it will be created for you
[12:55:24]: This app identifier doesn't exist on the Apple Developer Portal yet, it will be created for you
Please confirm the above values (y/n)
n
App Identifier (com.krausefx.app): ^C
Cancelled... use --verbose to show the stack trace

Environment
fastlane version (run fastlane -v):
fastlane 1.99.0
Do you use bundler to execute fastlane (i.e. bundle exec fastlane)?
Yes ✅
Do you use a Ruby environment manager (e.g. chruby, rbenv, rvm)?
rbenv

Hi @ffittschen Thanks for reaching out. Can you let me know what happens if you go through the manual setup? What happens if you use an invalid iTC account? Thanks!

Ahh I just tried to enter invalid iTC account details which brings me to the manual setup and after I entered the App Identifier, the init asked if the app should be created on iTC and the Developer Portal. Sorry, my fault...
I was assuming it will be created automatically, because it said so 4 lines above.
I'm just cautious, because this once happened to me with an early version of produce and now I've got a test application stuck in my iTC account

@ffittschen No problem. Really glad to hear you are sorted. Hope that you have a wonderful weekend! 👍


Clear with transport: auto

Issue description:
I noticed that clear button with transport auto as param not working properly. Can you guys take a look at this issue ?
Version used:
Version 3.0.45 WP
(Did you try using the develop branch from GitHub? There's a chance your issue has already been addressed there)
Using theme_mods or options?
theme_mods
Code to reproduce the issue (config + field(s))
Kirki::add_field( 'my_theme_config', array(
	'type'        => 'color',
	'settings'    => 'my_color',
	'section'     => 'section_02',
	'choices' 	  => array (
		'alpha' => true
	),
	'transport' => 'auto',
	'output' => array(
		array(
			'element' => '.top-header',
			'property' => 'border-color',
		),
	),
) );

@andreg @DannyCooper @felipeelia @manchumahara can anyone fix it ?

It seems to work good here on my end, @Stas0238. Can you please elaborate a bit further? Thanks!

@felipeelia yes it looks ok with simple colors but when I use multicontrol like background which has a part of color then clear button is not working - https://gyazo.com/05af00ba5ff193d2296c762ad24f1f09
Also I downloaded your demo https://github.com/aristath/kirki-demo and checked there. But the same deals go on https://gyazo.com/4726fba3fa4310a2bb144e0bf58202fb

@Stas0238 it seems you're using a modified version of the demo, am I right? Don't you have a default set there, do you?
Can you please share the exact code required to reproduce the error? Checking out the kirki-demo it seems to work properly. I've tried to combine two color fields affecting the same element (background-color and border-color) and it worked.

Yes, I made some changes just only to check if the reason of not clearing was not in my theme.
The code to reproduce below:
Kirki::add_field( 'kirki_demo', [
'type'        => 'background',
'settings'    => 'background_setting',
'label'       => esc_html__( 'Background Control', 'kirki' ),
'description' => esc_html__( 'Background conrols are pretty complex - but extremely useful if properly used.', 'kirki' ),
'section'     => 'color',
'default'     => [
'background-color'      => '',
'background-image'      => '',
'background-repeat'     => '',
'background-position'   => '',
'background-size'       => '',
'background-attachment' => '',
],
'transport' => 'auto',
'output' => array(
array(
'element'  => '.control-section-demo.color-control .demo-color-container',
),
array(
'choice' => 'background-color',
'element' => '#kirki-color',
'property' => 'background-color',
)
),
] );

Why don't you simply define a normal color instead of an empty string?

The clear in colors doesn't always work. It's not a bug, it's not a design flaw, it's just how it works because there is no other way for it to work.
When there is a color already saved, CSS gets generated and that gets echoed in the head of the document.
When you are in the customizer and you're changing colors, a new stylesheet gets appended to the head containing the new styles - and that overrides the ones that are already echoed via PHP.
When the color in empty, naturally the browser just falls back to the previously valid value, and that is the value in the existing styles.
"clear" will only work correctly if the previously saved value when you opened the customizer is empty, or if changing the value refreshes the preview instead of apply the styles via js.
It can't work any other way - unless you custom-code something for your specific use-case.
My advice would be to just use a normal value for default instead of leaving it empty. Even if the default value is rgba(0,0,0,0) which would make it transparent - therefore empty.

@aristath Thanks for so full answer. I have one more about it. How then it works good with simple color control, therefore from your logic only if previous value was empty then it will work good and if the value was already set up then the only way to get in clear is to set it up to rgba(0,0,0,0) but how does it work correct with simple color control ? the value in this control type works with empty value before and clear make it to empty as well ? ->

When you are in the customizer and you're changing colors, a new stylesheet gets appended to the head containing the new styles - and that overrides the ones that are already echoed via PHP.
When the color in empty, naturally the browser just falls back to the previously valid value, and that is the value in the existing styles.

It has the same limitations.
So if you save a color (not empty value), then exit the customizer and reopen it, it should have the same issue.

ok then i will use all my fields with default values. thanks for responds


Web-app with user logins for playlist creation

Hi,
I'm building an app to create playlists, so I need the app users to log in and give me the right to do so.
I want to host it on huggingface's spaces (https://huggingface.co/spaces).
Locally, my app works well, it opens a log in page and I can create my playlists. I use:
os.environ['SPOTIPY_REDIRECT_URI'] = 'http://localhost:8080/'
scope = "playlist-modify-public"
token = util.prompt_for_user_token(scope=scope)
sp = spotipy.Spotify(auth=token)

Now I want to put it online. I update the SPOTIPY_REDIRECT_URI to the home page of my app both on the dashboard and in the app script.
Here is the error I get:
2022-09-09 17:33:34.597 User authentication requires interaction with your web browser. Once you enter your credentials and give authorization, you will be redirected to a url.  Paste that url you were directed to to complete the authorization.
2022-09-09 17:33:34.598 Opened https://accounts.spotify.com/authorize?client_id=394d4c00bf404a97977b0b494a571679&response_type=code&redirect_uri=https%3A%2F%2Fhuggingface.co%2Fspaces%2Fccolas%2FEmotionPlaylist%2F&scope=playlist-modify-public in your browser
2022-09-09 17:33:34.598 Uncaught app exception
Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 115, in _get_user_input
    return raw_input(prompt)
NameError: name 'raw_input' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/user/.local/lib/python3.8/site-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
    exec(code, module.__dict__)
  File "/home/user/app/app.py", line 265, in <module>
    setup_streamlite()
  File "/home/user/app/app.py", line 123, in setup_streamlite
    sp, user_id = get_client()
  File "/home/user/app/app.py", line 41, in get_client
    token = util.prompt_for_user_token(scope=scope)
  File "/home/user/.local/lib/python3.8/site-packages/spotipy/util.py", line 99, in prompt_for_user_token
    code = sp_oauth.get_auth_response()
  File "/home/user/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 499, in get_auth_response
    return self._get_auth_response_interactive(open_browser=open_browser)
  File "/home/user/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 450, in _get_auth_response_interactive
    response = self._get_user_input(prompt)
  File "/home/user/.local/lib/python3.8/site-packages/spotipy/oauth2.py", line 117, in _get_user_input
    return input(prompt)
EOFError: EOF when reading a line

This seems related to this issue and to that one
From what I read there, this has to do with the fact that the server cannot open a new tab for the login page. There seem to be some complicated trick to generate a long-term token for a given user (me), then to use that to connect.
But I want to have many users and I can't ask them to each go through the generation of this long term token.
So what's the solution? For sure there must be a way to build a non-local spotify app that requires users login and allows playlist creation.
What did I miss?

I think you have multiple problems with your project but let me give you some tipps to improve and work with the spotify authorization scheme.
Take a good look at session handlers and how the spotify authorization flow works. Especially if you are using Flask you can take very valuable informations from the example using the FlaskSessionHandler app.py. That one works great example to extend with your own ideas.
Your current app depends on sending back the url spotify gives you to your app. But there is a way simpler method by using cache-/session handlers.
Then the cache handler will store the auth & refresh token for you for every session, that is how i understood it worked.
Then your users just have to login with spotify and you will be redirected to your app automatically and the user gets a cookie assigned. If you don't use Flask you can use Redis for example.
I myself got most of the informations to build a multi-user app from the examples so i hope i could help you out.
(If you are using Flask and are trying to use the FlaskSessionHandler please refer to this issue#838

Thanks, I checked the cache handler stuff and found a way to achieve what i wanted.
Here it is with comments.
scope = "playlist-modify-public"
cache_handler = StreamlitCacheHandler(session)  # same as the FlaskSessionCacheHandler
auth_manager = spotipy.oauth2.SpotifyOAuth(scope=scope,
                                                                         cache_handler=cache_handler,
                                                                         show_dialog=True)
# if there is no cached token, open the sign in page
if not auth_manager.validate_token(cache_handler.get_cached_token()):
   auth_url = auth_manager.get_authorize_url()  # log in url

   # if you're redirected from the sign in page, there is a code in the url
   if 'code' in st.experimental_get_query_params():
       auth_manager.get_access_token(st.experimental_get_query_params()['code'])  # use the code to generate the token
       sp = spotipy.Spotify(auth_manager=auth_manager)
   else:  # if no code, add a button linking to the log in url
       add_button(auth_url, 'Log in')  # this adds a button linking to the authorization page
return sp

@ccolas running into the same issue - where is StreamlitCacheHandler being imported from? also where does the 'session' argument come from? I am using Django

The StreamlitCacheHandler is a copy paste from the Flask one I defined myself:
class StreamlitCacheHandler(spotipy.cache_handler.CacheHandler):
"""
A cache handler that stores the token info in the session framework
provided by streamlit.
"""
    def __init__(self, session):
        self.session = session

    def get_cached_token(self):
        token_info = None
        try:
            token_info = self.session["token_info"]
        except KeyError:
            print("Token not found in the session")

        return token_info

    def save_token_to_cache(self, token_info):
        try:
            self.session["token_info"] = token_info
        except Exception as e:
            print("Error saving token to cache: " + str(e))

With streamlit, the session is streamlit.session_state. It's a dict that stays cached across page reloads. I'm assuming Django has something similar, so you should use this.

hi
the session argument is streamlit's session state: streamlit.session_state. If you use streamlit you might not need flask? I don't know how flask works.
sp is the spotify client, once created you can use it with the spotify api, eg sp.recommendation_genre_seeds()['genres'] gives you the list of spotify genres, etc.

Thanks for the reply.
I have made the following changes to my code to make use of what I have been taught.
class StreamlitCacheHandler(spotipy.cache_handler.CacheHandler):
    """
    A cache handler that stores the token info in the session framework
    provided by streamlit.
    """
    def __init__(self, session):
        self.session = session

    def get_cached_token(self):
        token_info = None
        try:
            token_info = self.session["token_info"]
        except KeyError:
            print("Token not found in the session")

        return token_info

    def save_token_to_cache(self, token_info):
        try:
            self.session["token_info"] = token_info
        except Exception as e:
            print("Error saving token to cache: " + str(e))

def authorization():
    scope = "playlist-modify-public"
    cache_handler = StreamlitCacheHandler(st.session_state)  # same as the FlaskSessionCacheHandler
    auth_manager = spotipy.oauth2.SpotifyOAuth(scope=scope,
                                                cache_handler=cache_handler,
                                                show_dialog=True)
    # if there is no cached token, open the sign in page
    if not auth_manager.validate_token(cache_handler.get_cached_token()):
        auth_url = auth_manager.get_authorize_url()  # log in url

    # if you're redirected from the sign in page, there is a code in the url
    if 'code' in st.experimental_get_query_params():
        auth_manager.get_access_token(st.experimental_get_query_params()['code'])  # use the code to generate the token
        sp = spotipy.Spotify(auth_manager=auth_manager)
    else:  # if no code, add a button linking to the log in url
        st.button(auth_url, 'Log in')  # this adds a button linking to the authorization page
    return sp

However, the following error code is displayed.This was found to be the case with the variable 'sp' not containing any authentication information, i.e. the authentication was not successful. Is there anything wrong with my code?
  File "/home/appuser/venv/lib/python3.9/site-packages/streamlit/runtime/scriptrunner/script_runner.py", line 563, in _run_script

    exec(code, module.__dict__)

  File "/app/rms_sourse/app.py", line 208, in <module>

    main()

  File "/app/rms_sourse/app.py", line 18, in main

    sp = authorization()

  File "/app/rms_sourse/app.py", line 71, in authorization

    return sp

UnboundLocalError: local variable 'sp' referenced before assignment


Why so many versions of opencv

I don't understand what this is trying to do.  Why are so many versions of OpenCV being installed?  Why is OpenCV an imaging toolkit needed for speech processing?

Also there are a couple different versions of numpy being installed.
Finally, do you know Jarvis is a registered trademark for NVidia voice assistant? 😆

By default, it just downloads the latest version of OpenCV, but because of dependencies, it might require some other versions.
I know Jarvis is NVidia's registered trademark, which is why this one is known as JarvisAI and it is an entirely open source project.


nnUNetv2_predict: not found

Processing Teeth Segmentation.
sh: 1: nnUNetv2_predict: not found
Generating Prior Maps.
Automatic centroid calculation selected.
Processing Teeth Instance Segmentation.
sh: 1: nnUNetv2_predict: not found
Renumber the instance
请问这个要怎么处理

您好，这应该是nnUNet没install成功？可以参照Installation部分。

您好，请问又报nnUNet_raw is not defined and nnU-Net can only be used on data for which preprocessed files are already present on your system. nnU-Net cannot be used for experiment planning and preprocessing like this. If this is not intended, please read documentation/setting_up_paths.md for information on how to set this up properly.
应该是这些路径没找到：
nnUNet_raw = os.environ.get('nnUNet_raw')
nnUNet_preprocessed = os.environ.get('nnUNet_preprocessed')
nnUNet_results = os.environ.get('nnUNet_results')
请问该怎么处理

vi ~/.bashrc
export nnUNet_raw = "/home/path/to/TIPs/nnUNet_raw"  # raw_data_path
export nnUNet_preprocessed = "/home/path/to/TIPs/nnUNet_preprocessed"  # preprocessed_data_path
export nnUNet_results = "/home/path/to/TIPs/nnResults"  # models_path
source ~/.bashrc

不配置nnUNet_raw和nnUNet_preprocessed也能跑通


Fix issue and add features

Fix issue: Update project parameter fail;
Add API for listing user assignment;
Add parameter 'is_active' for listing user and project

I will merge this PR, but also will refactor it


Copying/moving files

Is there any way to copy/move files using LFS?
I found this from a couple years ago asking for this very feature.
Any updates?
And if not what are the reasons this hasn't been implemented yet?

It can be done in pure Lua I think. That said; if you can contribute a PR, that would be most welcome I think.

@Tieske yes, it can. I have similar pure-Lua code in luarocks.fs.* using lfs. Might even move it out of there and into an lfs/util.lua module here, or something.

@Tieske As far as my research goes, the way to do it in pure lua is to use os.execute, but the problem with that is that Unix and Windows have different commands, so the OS needs to be checked first and then there can be an if...then...elseif... statement to switch depending on the OS.
And for files that can be opened using the io.read can be done by making another file (in the destination directory) and copying over the contents.
Is this something similar to what you mean?
@hishamhm Also could you copy and paste a snippet of your code here? It would really help if I could see how you did this. Thanks!

And for files that can be opened using the io.read can be done by making another file (in the destination directory) and copying over the contents.

Yes, this is what the LuaRocks code does for pure-Lua copying, and os.rename can be used for moving. Using lfs to create folders, there's no need to os.execute.

Hi, old thread, but I would like to contribute the copying files feature to LFS, using the aforementioned method, should I add this as a function to
util.lua? Or am I supposed to put it somewhere else?


Different values of the Name property of ModuleFederationPlugin can cause bugs

Describe the bug
``I am trying to use swr in my host component, but when I use ModuleFederationPlugin, I get an error “hooks can only be called inside of the body of a function component”.
The error in question says:  Error "hooks can only be called inside of the body of a function component". Attached is a screenshot of the error

I have followed the quick start guide that can be found on the module federation web site.  https://module-federation.io/guide/start/quick-start.html
I also tried using a repository that already had an example of federation 2.0 module.https://github.com/annfredin/mfe-manifest-example
Using this last repository I stopped having the bug, but I didn't understand why it was due to the fact that both codes were practically identical. Finally I found the cause of the error, everything is due to the variable name that is set in ModuleFederationPlugin
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { ModuleFederationPlugin } from "@module-federation/enhanced/rspack";

export default defineConfig({
  server: {
    port: 2000,
  },
  tools: {
    rspack: (config, { appendPlugins }) => {
      appendPlugins([
        new ModuleFederationPlugin({
          name: "federation_consumer",
          remotes: {
            remote1:
              "federation_provider@http://localhost:3000/mf-manifest.json",
          },
          shared: ["react", "react-dom"],
        }),
      ]);
    },
  },
  plugins: [pluginReact()],
});

If we change the federation_consumer name property to host, the code works correctly. Names like “test , “host-app” or “mf” make the application work. However names like “app”, “app-host”, “consumer”, “MF” or “federar” make the application work. , “MF” or “federation”, cause this bug.
I add a test repository with already integrated SWR
Reproduction
https://github.com/FrancicoVerdu/MF-Bug.git
Used Package Manager
npm
System Info
System:
    OS: Linux 6.5 Ubuntu 22.04.4 LTS 22.04.4 LTS (Jammy Jellyfish)
    CPU: (12) x64 Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz
    Memory: 9.79 GB / 15.43 GB
    Container: Yes
    Shell: 3.7.1 - /usr/bin/fish
  Binaries:
    Node: 20.11.0 - ~/.local/share/nvm/v20.11.0/bin/node
    npm: 10.2.4 - ~/.local/share/nvm/v20.11.0/bin/npm
    pnpm: 9.1.1 - ~/.local/share/nvm/v20.11.0/bin/pnpm
  Browsers:
    Chrome: 124.0.6367.118

Validations

[X] Read the docs.
[X] Read the common issues list.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
[X] Make sure this is a Module federation issue and not a framework-specific issue.
[X] The provided reproduction is a minimal reproducible example of the bug.

Taking a look at this now

Setting react as a singleton seems to fix it.
But we will double check out runtime
import { defineConfig } from "@rsbuild/core";
import { pluginReact } from "@rsbuild/plugin-react";
import { ModuleFederationPlugin } from "@module-federation/enhanced/rspack";

export default defineConfig({
    server: {
        port: 2000,
    },
    tools: {
        rspack: (config, { appendPlugins }) => {
            appendPlugins([
                new ModuleFederationPlugin({
                    name: "federation_consumer",
                    remotes: {
                        remote1: "federation_provider@http://localhost:3000/mf-manifest.json",
                    },
                    shared: [
                        {
                            "react": {
                                singleton: true,
                            },
                        },
                        {
                            "react-dom": {
                                singleton: true,
                            },
                        },
                    ],
                }),
            ]);
        },
    },
    plugins: [
        pluginReact({
            splitChunks: {
                react: false,
                router: false,
            },
        }),
    ],
});

This issue is because not set singleton:true, @ScriptedAlchemy  how about set singleton:true as default shared config ?

Yea. It is strange that changing the name of the reference changes the behaviors tho. But yes I'll update docs as react should be singleton.


Please make a new release

The current release fails tests for me with a lot of:
E               AttributeError: 'AsyncGenerator' object has no attribute 'port'

FWICS it was fixed in 3b6f4e78204e5f487ca6962374e498805c8b7cba. Could you make a new release including this commit?

there haven't been any code changes that affect the runtime, which is why I've delayed making a release
You shouldn't see errors when running tests if you use the pinned dependencies.  For example:
git checkout 0.9.2
python3.8 -m venv venv
source venv/bin/activate
pip install -r requirements-dev.txt
make test  # PASSES

I'd like to understand what you're trying to do, and what version of Python and dependencies you're using when running the tests.

I'm packaging it for Gentoo. We test against the same versions that are will be used in production, i.e. the newest versions at the time. Otherwise (in general), we can't guarantee that the package still works, as automated testing can't distinguish failures due to incompatible code from failures due to incompatible tests.

We test against the same versions that are will be used in production, i.e. the newest versions at the time.

It sounds a little strange, since any Python library may specify version constraints on their dependencies.  So in the end, when preparing the environment for a particular Python app, distros must accommodate historical versions of Python packages, in order to satisfy dependencies.

This is a complex problem, and we do our best to keep things working which sometimes involves backporting patches to make packages compatible with newer versions of their dependencies. Believe me, you don't wanna know how painful and ungrateful work this is.

Thank you!


[BUG] Configure_cudf fails, emitting a misleading error, if cudf isn't installed in the conda environment

Describe the bug
During a clean build, without the appropriate cuDF version installed in the environment, we will call Configure_cudf. When this fails to find the package locally, it will attempt to pull cudf and apply a patch file that is no longer relevant, failing in a way that obfuscates the actual problem.
Steps/Code to reproduce bug
See above.
Expected behavior
If we don't support cuDF builds from source, we should just fail the build an emit an error telling the user to install cuDF in their python envionrment.

This issue also applies outside of conda environments.

rapids_cpm_find is no longer used in Configure_cudf.cmake. Closing