Using private git repo's as npm modules

I would like to use an npm module from a private git repo. This can be done with npm in the following way.
"dependencies": {
    "myModule"<EMAIL_ADDRESS>}

npm docs
however when i deploy to azure i get the following error

npm ERR! git clone git@github.com:[redacted :)] Cloning into bare repository 'C:\DWASFiles\Sites\newvehicle\AppData\npm-cache_git-remotes\git-github-com-[redacted :)]-e17da321'...
npm ERR! git clone git@github.com:[redacted :)]
npm ERR! git clone git@github.com:[redacted :)] Could not create directory '/c/DWASFiles/Sites/newvehicle/UserProfile/.ssh'.
npm ERR! git clone git@github.com:[redacted :)] Host key verification failed.
npm ERR! git clone git@github.com:[redacted :)] fatal: Could not read from remote repository.
npm ERR! git clone git@github.com:[redacted :)]
npm ERR! git clone git@github.com:[redacted :)] Please make sure you have the correct access rights
npm ERR! git clone git@github.com:[redacted :)] and the repository exists.
npm ERR! Error: Command failed: Could not create directory '/c/DWASFiles/Sites/newvehicle/UserProfile/.ssh'.
npm ERR! Host key verification failed.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR!
npm ERR!     at ChildProcess.exithandler (child_process.js:637:15)
npm ERR!     at ChildProcess.EventEmitter.emit (events.js:98:17)
npm ERR!     at maybeClose (child_process.js:735:16)
npm ERR!     at Process.ChildProcess._handle.onexit (child_process.js:802:5)
npm ERR! If you need help, you may report this log at:
npm ERR!     http://github.com/isaacs/npm/issues
npm ERR! or email it to:
npm ERR<EMAIL_ADDRESS>npm ERR! System Windows_NT 6.2.9200
npm ERR! command "D:\Program Files (x86)\nodejs\0.10.21\node.exe" "D:\Program Files (x86)\npm\1.3.11\node_modules\npm\bin\npm-cli.js" "install" "--production"
npm ERR! cwd D:\home\site\wwwroot
npm ERR! node -v v0.10.21
npm ERR! npm -v 1.3.11
npm ERR! code 128

which in my limited understanding of the setup with git & azure etc, is because azure will generate a keypair and add this to the github project as a deploy key when i use the Set up deployment from source control button in azure management console. Which is awesome
However when npm tries to checkout the module from a seperate repo, azure will use the keypair it created which only has rights to the original repo and not the private submodule.
i tried adding my keypair into .ssh folder at the top level of my website via FTP to see if this would solve the problem but no luck.
Any advise, pointers, articles to read or whatever would be greatly appreciated

For anyone googling this issue, If you use use Git bash or Git for windows, when using this on Windows, you wont have any issues as long as you use the normal ssh key procedures for github/gitlab/whatever

For anyone googling this issue, If you use use Git bash or Git for windows, when using this on Windows, you wont have any issues as long as you use the normal ssh key procedures for github/gitlab/whatever

Can you please further clarify?
I am using the private gitlab instance behind https.
I have added the key found at:
https://my-app.scm.azurewebsites.net/api/sshkey?ensurePublicKey=1
I have added this key as a deployment key in all of my private node dependencies
this allows the app service to pull the project, but when installing I get the following error:
npm ERR<EMAIL_ADDRESS>Permission denied (publickey).


Error when using -B (--crawlbot) option

When using the diskover.py with -B option the following error message is returned -
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/lib/python2.7/threading.py", line 754, in run
self.__target(*self.__args, **self.__kwargs)
File "/root/diskover/diskover_crawlbot.py", line 76, in bot_thread
diskover.crawl_tree(path, cliargs, logger, reindex_dict)
File "/root/diskover/diskover.py", line 1328, in crawl_tree
wait_for_worker_bots()
File "/root/diskover/diskover.py", line 1461, in wait_for_worker_bots
logger.info('Found %s diskover RQ worker bots', len(workers))
NameError: global name 'logger' is not defined

I just pushed some patches to rc10 for crawlbot continuous scanner (-B), please update and let me know if it works for you now.

Hi,
I did pull down the new changes this morning, but I'm still getting the same error as above.
Thanks,
Owen

please reply back here your findings with using -B, I haven't had much time to really test that feature out.

@owenmurr I pushed some more updates today, please pull and let me know if any issues with crawlbot continuous scanner (-B).


Accessibility issue no label, id not rendering on multiselect tag

So I have the multiselect working well, and so happy to have it.  One thing that has come up is that it fails accessibility checks based on it not having a label.  There is a way to make that work by adding the label and using bootstraps sr-only(screen reader only) class, but the label needs to be bound to the multiselect and this is done with the for="id of multiselect", problem is when I add an id attribute to the multiselect in the html it does not render the id.  Any idea how to do this?

+1

My bad. Right now you can use the prop :input-id that will add the id to the input (so that it can work with a label).
This will be merged with :id prop for consisteny. Sorry about that!


ci: enable clang based RBE in Azure pipelines

Signed-off-by: Lizan Zhou<EMAIL_ADDRESS>Description:
Minimum configuration to enable RBE.
Risk Level: Low
Testing:
Docs Changes:
Release Notes:

@jmarantz this is ready to review, I will try to add more docs how to use RBE as follow up.

@jmarantz sorry if it wasn't clear in README.md, all files in bazel/toolchains/configs are generated without manual edit.

OK ignore my 'indentation' nits then :)

and cc_wrapper as well, they are not actually used but cc_config generates them, even in your local run. I'd leave them as it is as. :)

alright then...I probably should've read the README more carefully

/retest
/azp run

Merging this to roll out RBE runs on master. Azure pipelines are not marked required so it should not block PRs. Let's iterate from here.


Consider adding a strategy for lists with postive ints

This would include SmallInts and Large32BitIntegers

Tried it on tim/mixed-strategies, didn't work well


Clarification on Family.debugKeys (also request to change it to Family.keys)

Describe what scenario you think is uncovered by the existing examples/articles
Family.debugKeys is described vaguely as "debug-only" in the docs.
Possible Solution

Clarify why they are "debug-only" and scenarios describing why they should not be used.
I dig in the code, it seems that it is ok to use the debugKeys list, why cant we make remove the prefix "debug" (obviously in backward compatible way with proper deprecation warning): List debugKeys -> Set keys (Notice the use of Set instead of List since are easier to lookup), this could be really handy to check what keys are "active" (in case of .autoDispose) in the family.

Also I am new to Riverpod, I might be missing something. Feel free to correct me.

This list is unreliable and probably be removed entirely
Could you describe what is your use case for it?

I have two AutoDisposeStateNotifierProviderFamily  provider:

_getProvider : family that returns "single item" of a model, based on id
_getManyProvider`: family that return "multiple item" of model, based on a query object

Both of them are wrapped around ModelProvider which itself is provided by simple Provider.
Now the use case is, when any item from _getProvider is update/delete i need to rebuild/refresh/notify all active in _getManyProvider family.
This is a very common scenario I guess, for eg in TodoApp with TodoListPage and TodoDetailPage (with edit, delete options), any changes in TodoDetailPage should be reflected on TodoListPage appropriately.

Hope you get it.
I am trying to build a pub package around it, that could be used to create the "data layer" of the app.

The class that I have worked on so far, check the _refreshItem and _refreshList methods for the use case
class ModelProvider<T extends BaseModel, Q, E> {
  final ProviderReference ref;
  final BaseModelRepo<T, Q, E> repo;

  final AutoDisposeStateNotifierProviderFamily<_ListNotifier<T, Q>, Q>
      _getManyProvider;
  final AutoDisposeStateNotifierProviderFamily<_ItemNotifier<T>, String>
      _getProvider;

  ModelProvider(this.ref, this.repo)
      : _getManyProvider =
            StateNotifierProvider.autoDispose.family((ref, query) {
          return _ListNotifier<T, Q>(repo, query);
        }),
        _getProvider = StateNotifierProvider.autoDispose
            .family<_ItemNotifier<T>, String>(
                (ref, id) => _ItemNotifier(repo, id));

  AutoDisposeStateNotifierProviderFamily<_ListNotifier<T, Q>, Q> get getMany =>
      _getManyProvider;

  AutoDisposeStateNotifierProviderFamily<_ItemNotifier<T>, String> get get =>
      _getProvider;

  void _refreshItem(T item) {
    // refresh the ItemNotifier, if exists
    if (get.debugKeys.contains(item.id)) {
      ref.read(get(item.id)).refresh();
    }
  }

  void _refreshList([T item]) {
    // refresh all ListNotifier, where item is present
    // TODO refresh the ListNotifier in which the item is present
    for (final f in getMany.debugKeys) {
      ref.read(getMany(f)).refresh();
    }
  }

  void add(T item) {
    repo.add(item);
    _refreshList();
  }

  void update(T item) {
    repo.update(item);
    _refreshItem(item);
    _refreshList(item);
  }

  void delete(T item) {
    repo.delete(item);
    _refreshList(item);
  }
}

class _ListNotifier<T extends BaseModel, Q>
    extends StateNotifier<BuiltList<T>> {
  _ListNotifier(this.repo, [this.query]) : super(repo.getMany(query));

  final BaseModelRepo<T, Q, dynamic> repo;
  final Q query;

  void refresh() {
    state = repo.getMany(query);
  }
}

class _ItemNotifier<T extends BaseModel> extends StateNotifier<T> {
  _ItemNotifier(this.repo, this.id) : super(repo.get(id));

  final BaseModelRepo<T, dynamic, dynamic> repo;
  final String id;

  void refresh() {
    state = repo.get(id);
  }
}

Would the ability to dispose all the providers of a family at once work for you?

It would work, but I am thinking of adding logic, to only dispose those that are required - for performance sake (refetching queries from db or network)

Could you expand on what that logic is?

I am not sure, but I have thought of having a Map (or combination of other collectable) with (modelId => List<Q query>). in the repo that delivers the List based on query, i write a wrapper method, that populates this map.
Now if Family.keys is available it would simply the job of keeping track of active providers or else I have to maintain that manually - having a Set(Q query), extending AutoDisposeStateNotifierProviderFamily that populates this set when createState is called and onDispose removing it from it.

TLDR: Family.keys would really help in implementing this.
Also note, if Family.keys is exposed then it should be made immutable (with something like built_collection).

I am aware that this "optimization" could be slower than just disposing all (and recreating), hence this could be configured by the user.

What prevents you from manually creating this map yourself?
Like:
Set<RootProvder> _providers = {};

final provider = Provider.autoDispose((ref) {
  _providers.add(this);
  ref.onDispose(() => _providers.remove(this));
});

Since the providers are inside class and final, I need to initialize them:
class class ModelProvider<T extends BaseModel, Q, E>{
  ...
  final AutoDisposeStateNotifierProviderFamily<_ListNotifier<T, Q>, Q>
      _getManyProvider;
  final AutoDisposeStateNotifierProviderFamily<_ItemNotifier<T>, String>
      _getProvider;

 ModelProvider(this.ref, this.repo)
      : _getManyProvider =
            StateNotifierProvider.autoDispose.family((ref, query) {
          return _ListNotifier<T, Q>(repo, query);
        }),
        _getProvider = StateNotifierProvider.autoDispose
            .family<_ItemNotifier<T>, String>((ref, id) {
          return _ItemNotifier(repo, id);
        });
  ...
}

Dart does not allow using instance member in initialiser. Therefore something like following is not possible:
class ModelProvider<T extends BaseModel, Q> {
  ...
 final Set<String> _activeItemProviderKeys = {};

 ModelProvider(this.ref, this.repo)
      : _getManyProvider = ...
        _getProvider = StateNotifierProvider.autoDispose
            .family<_ItemNotifier<T>, String>((ref, id) {
          _activeItemProviderKeys.add(id);
          ref.onDispose(() => _activeItemProviderKeys.remove(id));
          return _ItemNotifier(repo, id);
        });
  ...
}

Possible workaround could be not making _getProvider and _getManyProvider final, is that OK? since ModelProvider itself will be provided with Provider. I did not "feel" right with using non-final attributes inside a class that will be "provided", globally. But thinking again I think this could be safe since I am just exposing the private member via just "getter" to outer world. What do you think @rrousselGit? Do I have you blessings?

That's fine, as long as you don't change the value

Closing this issue, since populating keys of the family provider can be done manually.


[SPARK-23549][SQL] Cast to timestamp when comparing timestamp with date

What changes were proposed in this pull request?
This PR fixes an incorrect comparison in SQL between timestamp and date. This is because both of them are casted to string and then are compared lexicographically. This implementation shows false regarding this query spark.sql("select cast('2017-03-01 00:00:00' as timestamp) between cast('2017-02-28' as date) and cast('2017-03-01' as date)").show.
This PR shows true for this query by casting date("2017-03-01") to timestamp("2017-03-01 00:00:00").
(Please fill in changes proposed in this fix)
How was this patch tested?
Added new UTs to TypeCoercionSuite.

If this approach is fine, I will create tests for .sql.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1407/
Test PASSed.

Test build #88101 has started for PR 20774 at commit 21368b4.

Test build #88101 has finished for PR 20774 at commit 21368b4.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88101/
Test PASSed.

Merged build finished. Test PASSed.

cc: @gatorsmile

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1584/
Test PASSed.

Test build #88346 has started for PR 20774 at commit a16deaa.

Test build #88346 has finished for PR 20774 at commit a16deaa.

This patch fails due to an unknown error code, -9.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88346/
Test FAILed.

Merged build finished. Test FAILed.

retest this please

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1586/
Test PASSed.

Test build #88348 has started for PR 20774 at commit a16deaa.

Test build #88348 has finished for PR 20774 at commit a16deaa.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88348/
Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1592/
Test PASSed.

Merged build finished. Test PASSed.

Test build #88357 has started for PR 20774 at commit 5fbbc30.

Test build #88357 has finished for PR 20774 at commit 5fbbc30.

This patch passes all tests.
This patch merges cleanly.
This patch adds no public classes.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88357/
Test PASSed.

Merged build finished. Test PASSed.

cc @gatorsmile

Test build #88403 has started for PR 20774 at commit a3dc357.

Build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1630/
Test PASSed.

Test build #88403 has finished for PR 20774 at commit a3dc357.

This patch fails due to an unknown error code, -9.
This patch does not merge cleanly.
This patch adds no public classes.

Build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88403/
Test FAILed.

Test build #88412 has started for PR 20774 at commit 4df6513.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1637/
Test PASSed.

Test build #88412 has finished for PR 20774 at commit 4df6513.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88412/
Test FAILed.

Retest this please

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1645/
Test PASSed.

Merged build finished. Test PASSed.

Test build #88425 has started for PR 20774 at commit 4df6513.

Test build #88425 has finished for PR 20774 at commit 4df6513.

This patch fails Spark unit tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88425/
Test FAILed.

Retest this please

Test build #88433 has started for PR 20774 at commit 4df6513.

Merged build finished. Test FAILed.

Test FAILed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1649/
Test FAILed.

Retest this please

Test build #88434 has started for PR 20774 at commit 4df6513.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1650/
Test PASSed.

Test build #88433 has finished for PR 20774 at commit 4df6513.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88433/
Test PASSed.

Test build #88434 has finished for PR 20774 at commit 4df6513.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88434/
Test PASSed.

Test build #88574 has started for PR 20774 at commit 5ca2341.

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/testing-k8s-prb-make-spark-distribution/1745/
Test PASSed.

Test build #88574 has finished for PR 20774 at commit 5ca2341.

This patch passes all tests.
This patch merges cleanly.
This patch adds the following public classes (experimental):
 case class PromoteStrings(conf: SQLConf) extends TypeCoercionRule
 case class InConversion(conf: SQLConf) extends TypeCoercionRule

Merged build finished. Test PASSed.

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/88574/
Test PASSed.

LGTM
Thanks! Merged to master


Switch from Token in ASM to using Service Account.

We're currently loading the API token into ASM and pulling that for the provider to use when making API calls.
We want to use a service account token instead.

@PaulHLiatrio  is this done?
cc. @pmpaulino

Patrick P. said it's done.


Update CONTRIBUTING.md to link to working link list on Upwork

This PR updates the link to the Upwork issues in Contributing.md, to link to an actual working page!

Details
The old link here went to a broken page. (Attached screenshot here). This one goes to a working page with the same search queries!
Fixed Issues
Not an actual issue that I've seen in the Github issues - just found it on my own. (Not expecting $$ for this -- just a little tweak!)
Tests
Navigate to the readme for Contributing.md
(Make sure you're logged in with any Upwork account in the same browser)
Click on the link for the Upwork job list under the Finding a job that Expensify posted subcategory. Compare the old link and the new one!
Old one:

New one:

Offline tests
N/A
QA Steps

Click on new link in Readme file - and see if it takes you to a page in Upwork that shows a list of Expensify's issues open on Upwork.

PR Author Checklist

[ ] I linked the correct issue in the ### Fixed Issues section above
[x] I wrote clear testing steps that cover the changes made in this PR

[x] I added steps for local testing in the Tests section
[ ] I added steps for the expected offline behavior in the Offline steps section
[x] I added steps for Staging and/or Production testing in the QA steps section
[ ] I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[ ] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
[ ] I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).

[x] I included screenshots or videos for tests on all platforms
[ ] I ran the tests on all platforms & verified they passed on:

[ ] Android: Native
[ ] Android: mWeb Chrome
[ ] iOS: Native
[ ] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[ ] MacOS: Desktop

[x] I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
[x] I followed proper code patterns (see Reviewing the code)

[ N/A] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick)
[ N/A] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[N/A ] I verified that comments were added to code that is not self explanatory
[N/A] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[N/A] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method

[N/A] If any non-english text was added/modified, I verified the translation was requested/reviewed in #expensify-open-source and it was approved by an internal Expensify engineer. Link to Slack message:

[N/A] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[ N/A] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[ N/A] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[N/A] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I followed the guidelines as stated in the Review Guidelines
[N/A] I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[N/A] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[N/A] I verified that if a function's arguments changed that all usages have also been updated correctly
[N/A] If any new file was added I verified that:

[ ] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[N/A] If a new CSS style is added I verified that:

[ ] A similar style doesn't already exist
[ ] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))

[N/A] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[N/A] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[N/A] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[N/A] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[N/A] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[N/A] I verified that all the inputs inside a form are aligned with each other.
[N/A] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[N/A] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[ ] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

I have read the CLA Document and I hereby sign the CLA

No testing needed, just pasting this to pass the check.
Reviewer Checklist

[x] I have verified the author checklist is complete (all boxes are checked off).
[x] I verified the correct issue is linked in the ### Fixed Issues section above
[x] I verified testing steps are clear and they cover the changes made in this PR

[x] I verified the steps for local testing are in the Tests section
[x] I verified the steps for Staging and/or Production testing are in the QA steps section
[x] I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
[x] I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)

[x] I checked that screenshots or videos are included for tests on all platforms
[x] I included screenshots or videos for tests on all platforms
[x] I verified tests pass on all platforms & I tested again on:

[x] Android: Native
[x] Android: mWeb Chrome
[x] iOS: Native
[x] iOS: mWeb Safari
[x] MacOS: Chrome / Safari
[x] MacOS: Desktop

[x] If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
[x] I verified proper code patterns were followed (see Reviewing the code)

[x] I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
[x] I verified that the left part of a conditional rendering a React component is a boolean and NOT a string, e.g. myBool && <MyComponent />.
[x] I verified that comments were added to code that is not self explanatory
[x] I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
[x] I verified any copy / text shown in the product is localized by adding it to src/languages/* files and using the translation method
[x] I verified all numbers, amounts, dates and phone numbers shown in the product are using the localization methods
[x] I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
[x] I verified proper file naming conventions were followed for any new files or renamed files. All non-platform specific files are named after what they export and are not named "index.js". All platform-specific files are named for the platform the code supports as outlined in the README.
[x] I verified the JSDocs style guidelines (in STYLE.md) were followed

[x] If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
[x] I verified that this PR follows the guidelines as stated in the Review Guidelines
[x] I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
[x] I verified all code is DRY (the PR doesn't include any logic written more than once, with the exception of tests)
[x] I verified any variables that can be defined as constants (ie. in CONST.js or at the top of the file that uses the constant) are defined as such
[x] If a new component is created I verified that:

[x] A similar component doesn't exist in the codebase
[x] All props are defined accurately and each prop has a /** comment above it */
[x] The file is named correctly
[x] The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
[x] The only data being stored in the state is data necessary for rendering and nothing else
[x] For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
[x] Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
[x] All JSX used for rendering exists in the render method
[x] The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions

[x] If any new file was added I verified that:

[x] The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory

[x] If a new CSS style is added I verified that:

[x] A similar style doesn't already exist
[x] The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)

[x] If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
[x] If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
[x] If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
[x] If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
[x] If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:

[x] I verified that all the inputs inside a form are aligned with each other.
[x] I added Design label and/or tagged @Expensify/design so the design team can review the changes.

[x] If a new page is added, I verified it's using the ScrollView component to make it scrollable when more elements are added to the page.
[x] If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
[x] I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: Native

Android: mWeb Chrome

iOS: Native

iOS: mWeb Safari

MacOS: Chrome / Safari

MacOS: Desktop

FYI I believe this was deployed to prod yesterday, from this checklist - https://github.com/Expensify/App/issues/47219


Using custom compression command (gzip --rsyncable)

I'm evaluating using this script together with mysqldump to do consistent backups that are splitted to several files for convenience. It looks incredibly well, I only found one missing feature.
I want to use the --rsyncable command-line option in gzip and pigz. This option is useful when the files are going to be transfered or backed up with any solution based on rsync. It can reduce the amount of data to transfer/store on consecutive dumps.
Now I think it's not possible to use this option without modifying the script.

Maybe making a script of your own in order to do an rsync of the output folder to your remote destination path. Anyway I hope you have done this since 2 years ;)

I think you haven't understood the issue. Anyway, I have moved past it, I didn't even remember about this.


Postgis - RuntimeError: Unsupported field datatype: geography

Hi everybody,
Since we turn on Rails 4.2 (coming from 4.1), we have the following error:
RuntimeError: Unsupported field datatype: geography
Everything was fine on Rails 4.1. As we used postgis, Is it possible to create the type geography? Ready to help but I don't have any clue how to deal with it.
Here's the backtrace of the error:
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields/types.rb:12 in "load"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:15 in "block in <module:Fields>"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:54 in "call"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:54 in "block (2 levels) in factory"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:54 in "each"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:54 in "detect"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:54 in "block in factory"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:50 in "each"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/fields.rb:50 in "factory"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/has_fields.rb:130 in "_fields"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/has_fields.rb:133 in "_fields"
/vendor/bundle/ruby/2.1.0/bundler/gems/rails_admin-c97d7164b6ed/lib/rails_admin/config/has_fields.rb:64 in "exclude_fields"

Thanks,
Charles

The issue #1681 has the same issue with a workaround.

I used
class RailsAdmin::Config::Fields::Types::Geography < RailsAdmin::Config::Fields::Base
  RailsAdmin::Config::Fields::Types::register(self)
end

which solved the problem.

Adding this gives me an endless loop.

Since we can ignore the column, I was able to get it working with
class RailsAdmin::Config::Fields::Types::Geography < RailsAdmin::Config::Fields::Types::Hidden
  RailsAdmin::Config::Fields::Types.register(self)
end

and excluding the field
RailsAdmin.config do |config|
  config.model 'YOUR_MODEL' do
    exclude_fields :lonlat
  end
end

I found that extending the Hidden type without reconfiguring the model produced some slightly strange behaviour, where the string representation of the geography was visible but the label was "false".
Building on the comments before, I found the following provides some reasonable default behaviour (visible but not editable or searchable), so admins are aware that the columns exist.
# Add Rails Admin support for the "geography" column type
class RailsAdmin::Config::Fields::Types::Geography < RailsAdmin::Config::Fields::Base
  RailsAdmin::Config::Fields::Types.register(self)

  # Add some sensible default behaviour. Can be overridden when
  # configuring models/fields

  register_instance_option :read_only? do
    true
  end

  register_instance_option :sortable do
    false
  end

  register_instance_option :searchable do
    false
  end

  register_instance_option :queryable? do
    false
  end

  register_instance_option :filterable? do
    false
  end
end

I guess it's all down to preference and whether you think your admin users will like or dislike the
POINT( 12.34 56.78 ) output.


Work with maven plugin

Version
0.6.1
What steps are needed to reproduce the behavior?
I tried to build docker image for java project with dockerfile-maven-plugin.
What you expected?
build docker image
What happened?
Receive error that cannot connect to localhost:2375
Additional context
By default dockerfile-maven-plugin try to connect to localhost:2375. We can configure it using env variable DOCKER_HOST. Could you please clarify what value it should be?

dockerfile-maven-plugin is abandoned for 3 years already
Stevedore currently doesn't have an option to expose TCP port. Note that even though Docker Desktop has such option.
I don't know whether dockerfile-maven-plugin can talk to Windows named pipes. If it can, you should be able to connect via //./pipe/dockerDesktopLinuxEngine

Stevedore is no longer providing support for Linux containers. See why. I recommend switching to Rancher Desktop, Container Desktop or Colima.


fixing isis_interface_level_passive_test with deviations

Added deviations for following leafs in the tests
1.passive
/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/config/passive:
/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/state/passive:
2.dis-system-id
/network-instances/network-instance/protocols/protocol/isis/interfaces/interface/levels/level/adjacencies/adjacency/state/dis-system-id
3.database-overloads
/network-instances/network-instance/protocols/protocol/isis/levels/level/system-level-counters/state/database-overloads:

Pull Request Functional Test Report for #3583 / 21bd5c58a9d857f75809a4e4c21e71a546a7170a
Virtual Devices

Device
Test
Test Documentation
Job
Raw Log

Arista cEOS

RT-2.11: IS-IS Passive is enabled at the area level
d1211500
Log

Cisco 8000E

RT-2.11: IS-IS Passive is enabled at the area level
87717366
Log

Cisco XRd

RT-2.11: IS-IS Passive is enabled at the area level
ff276972
Log

Juniper ncPTX

RT-2.11: IS-IS Passive is enabled at the area level
9c2a8fd8
Log

Nokia SR Linux

RT-2.11: IS-IS Passive is enabled at the area level
ae0fd4db
Log

Openconfig Lemming

RT-2.11: IS-IS Passive is enabled at the area level
f4332631
Log

Hardware Devices

Device
Test
Test Documentation
Raw Log

Arista 7808

RT-2.11: IS-IS Passive is enabled at the area level

Cisco 8808

RT-2.11: IS-IS Passive is enabled at the area level

Juniper PTX10008

RT-2.11: IS-IS Passive is enabled at the area level

Nokia 7250 IXR-10e

RT-2.11: IS-IS Passive is enabled at the area level

Help

Pull Request Test Coverage Report for Build<PHONE_NUMBER>2
Details

0 of 0   changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage remained the same at 55.268%

Totals

Change from base Build<PHONE_NUMBER>6:
0.0%

Covered Lines:
1983

Relevant Lines:
3588

💛  - Coveralls

/forest virtual

/fptest virtual


Some _khmermodule.cc refactoring

WIP, don't merge!
This fixes #38 and #728. The only item missing from #728 checklist is changing references from 'hash' to 'table' in all methods. All classes are also conforming to the CPython checklist.
TODO:

[x] ReadParser_Type: expose constants in tp_dict

Remaining questions:

Do we define tp_new for 'read-only' types, like ReadPairIterator_Type and Read_Type? They can't be constructed on Python land at the moment, and reflect internal components from C++ structures. (khmer_KSubsetPartitionType is also missing tp_new, but it is probably appropriate to deal with it in #802.)

Missing documentation for methods: see #832

khmer_KHashbitsType: Some methods deal with SubsetPartition, but doesn't touch the Hashbits directly. See #833

jenkins, test this please

Code review checklist

[ ] Is it mergable?
[ ] Did it pass the tests?
[ ] If it introduces new functionality in scripts/ is it tested?
Check for code coverage.
[ ] Is it well formatted? Look at make pep8, make diff_pylint_report,
make cppcheck, and make doc output. Use make format and manual
fixing as needed.
[ ] Did it change the command-line interface? Only additions are allowed
without a major version increment. Changing file formats also requires a
major version number increment.
[ ] Is it documented in the ChangeLog?
[ ] Was a spellchecker run on the source code and documentation after
changes were made?

CPython checklist

[ ] the CPython object name is of the form khmer_${OBJECTNAME}_Object
[ ] Named struct with PyObject_HEAD macro
[ ] static PyTypeObject khmer_${OBJECTNAME}_Type with the following
entries

[ ] PyVarObject_HEAD_INIT(NULL, 0) as the object init (this includes
the ob_size field).
[ ] all fields should have their name in a comment for readability
[ ] The tp_name filed is a dotted name with both the module name and
the name of the type within the module. Example: khmer.ReadAligner
[ ] Deallocator defined and cast to (destructor) in tp_dealloc

[ ] The object's deallocator must be
Py_TYPE(obj)->tp_free((PyObject*)obj);

[ ] Do not define a tp_getattr
[ ] BONUS: write methods to present the state of the object via
tp_str & tp_repr
[ ] Do pass in the array of methods in tp_methods
[ ] Do define a new method in tp_new

[ ] PyMethodDef arrays contain doc strings

[ ] Methods are cast to PyCFunctionss

[ ] Type methods use their type Object in the method signature.
[ ] Type creation method decrements the reference to self
(Py_DECREF(self);) before each error-path exit (return NULL;)
[ ] No factory methods. Example: khmer_new_readaligner
[ ] Type object is passed to PyType_Ready and its return code is checked
in init_khmer()
[ ] The reference count for the type object is incremented before adding
it to the module: Py_INCREF(&khmer_${OBJECTNAME}_Type);.

Ready for review @mr-c @ctb @camillescott.

jenkins, test this please

Jenkins, test this please

Looks great so far!

Fwoosh!


Ensure modifiers are passed in function which handles Tab key

Very small change to resolve Issue #230

Many thanks. And you can install the latest CI build to get this fix before the next release 😉


Segfault on macOS

Upgrading to cysignals 1.11.0 broke a CI run on macOS: https://github.com/flatsurf/e-antic/runs/4440314325?check_suite_focus=true
This happened with the latest cysignals from conda-forge. That package is not really patched otherwise when building for macOS. I am not entirely sure whether cysignals is the culprit here but downgrading cysignals fixes the issue.
I will try to get a hold of a mac and then debug this further.
These were the other packages that changed between the CI runs:
< clang_osx-64              11.1.0               hb91bd55_4    conda-forge
---
> clang_osx-64              11.1.0               hc8532ff_5    conda-forge
31c31
< clangxx_osx-64            11.1.0               h7e1b574_4    conda-forge
---
> clangxx_osx-64            11.1.0               h2c55bc3_5    conda-forge
37,39c37,39
< cppyy                     2.1.0            py38h9fc273b_0    conda-forge
< cppyy-backend             1.14.6           py38h12bbefe_1    conda-forge
< cppyy-cling               6.25.1           py38h6db56eb_1    conda-forge
---
> cppyy                     2.2.0            py38h9fc273b_1    conda-forge
> cppyy-backend             1.14.7           py38h12bbefe_0    conda-forge
> cppyy-cling               6.25.2           py38h6db56eb_1    conda-forge
41c41
< cpycppyy                  1.12.7           py38h12bbefe_0    conda-forge
---
> cpycppyy                  1.12.8           py38h12bbefe_1    conda-forge
44,45c44,45
< cysignals                 1.10.3           py38h501d8bb_2    conda-forge
< cython                    0.29.24          py38ha048514_1    conda-forge
---
> cysignals                 1.11.0           py38h501d8bb_0    conda-forge
> cython                    0.29.25          py38ha048514_0    conda-forge
80,81c80,81
< ipykernel                 6.5.0            py38h5fd9f69_1    conda-forge
< ipython                   7.29.0           py38h5fd9f69_2    conda-forge
---
> ipykernel                 6.6.0            py38h5fd9f69_0    conda-forge
> ipython                   7.30.1           py38h50d1736_0    conda-forge
104c104
< libcurl                   7.80.0               h97da3c1_0    conda-forge
---
> libcurl                   7.80.0               h97da3c1_1    conda-forge
154c154
< nest-asyncio              1.5.1              pyhd8ed1ab_0    conda-forge
---
> nest-asyncio              1.5.4              pyhd8ed1ab_0    conda-forge
165c165
< parso                     0.8.2              pyhd8ed1ab_0    conda-forge
---
> parso                     0.8.3              pyhd8ed1ab_0    conda-forge
175c175
< prompt-toolkit            3.0.22             pyha770c72_0    conda-forge
---
> prompt-toolkit            3.0.23             pyha770c72_0    conda-forge
198c198
< setuptools                59.2.0           py38h50d1736_0    conda-forge
---
> setuptools                59.4.0           py38h50d1736_0    conda-forge
201c201
< sqlite                    3.36.0               h23a322b_2    conda-forge
---
> sqlite                    3.37.0               h23a322b_0    conda-forge

Apparently this is not an issue with newer versions of cysignals anymore.


is there a java client?

I'm wandering web for socketcluster client for the most popular programming language and guess what nothing... one crappy android imlementation which uses some crappy js engine... seriously?

The android client is still in work in progress... Closing this for now.

any update for the android client?


Block organization name with HTML content

Purpose
The organization name can have any character as there is no specific regular expression defined to validate organization name. Due to that malicious organization names with HTML content can be created and those organization names will be shown in the email send for the user invitations etc..
Email templates can be updated with HTML content by the administrators also. But as we have the capability to validate the organization name with HTML content while creating and update organizations, its better to have a validation until proper organization name regular expression is defined.

PR builder started
Link: https://github.com/wso2/product-is/actions/runs/11870513482


Overhaul Lifetimes Section (was "Help Needed: Extend lifetimes section")

Hi,
As mentioned in #2, I'm trying to better document the lifetimes system of Rust, as it's the part all beginners trip on.
I was trying to combine the collective knowledge of what the nomicon already tells us about desugraing to see implicit lifetimes, and the intuition given by the answer of my stack overflow question (http://stackoverflow.com/questions/42807679/clarify-the-meaning-of-binding-two-references-to-differently-scoped-referents-to/42808207#42808207).
All was going well until I tried to show a counter example where the lifetime constraints imposed by a function signature can't be satisfied (the last rust code block added in this PR). At this point something has gone wrong, since I am unable to come to the same conclusion as the rust compiler. The compiler rejects the program, the intuitive method I am trying to explain within this PR does not reject the program!
Can an expert take a read of the stack overflow question, then the change in this PR and comment on where I have gone wrong?

Am I de-sugaring correctly?
Are the rules for converting lifetimes correct?
Are the rules for detecting an inconsistency correct?

I really wonder if there is a better way to express how the compiler is assigning and checking lifetimes, as it's not very intuitive as it stands. Before reading the nomicon, I've always though of the lifetime of a reference as the lifetime of the referent, but the nomicon seems to explain it in another way.
Cheers

(excuse the typos in the commit messages, I will squash this all into one nice commit at the end)

(excuse the typos in the commit messages, I will squash this all into one nice commit at the end)

No worries at all!

I think the problem here is the rules for "converting" lifetimes. I don't think it helps to think in that way.
Given the de-sugared code:
fn main() {
    'a {
        let s1 = String::from("short");
        'b {
            let res: &'b str;
            'c {
                let s2 = String::from("a long long long string");
                'd {
                    // Annonymous scope for the borrows of s1 and s2
                    // Assigning to the outer scope causes s1 and s2 to have 'b
                    res: &'b = shortest(&'d s1, &'d s2);
                    println!("{}", res);
                }
            }
        }
    }
}

fn shortest<'k>(x: &'k str, y: &'k str) -> &'k str {
    ...

The way my colleague see this is, the lifetimes are inconsistent because:

The sig of shortest() tells us the return value has the same lifetime as the two args.
The args were marked &'d by de-sugaring, so we must show that the lifetime we annotated on res, i.e. &'d, is consistent with the lifetime we annotated earlier: &'b.
To be consistent, &'d would have to live longer than &'d, which it does not, so after the call res may refer to a freed value.

Therefore the program is inconsistent. Makes sense to me, but there might be a more intuitive way of thinking about this.

Alright. Can someone with jedi rust skills check the most recent version.
I've borrowed (no pun intended) the style of this post, which makes a great deal of sense to me.
If you guys like this, then I would then need to go back and revise the prior sections to mark references with the lifetimes of their referents, and I would probably want to adjust the flow a bit too.
There's also the issue of (I think) move semantics giving rise to additional gotchas (since they limit the lifetimes of values), but I think I'd like to tackle that as a separate PR.
@steveklabnik Are you able to review this, or do you know someone who could?
Thanks.

(I'm unable to test under mdbook, due to https://github.com/ogham/rust-ansi-term/issues/27, so I've been just pushing and viewing in GH ;) )

@vext01 I will try to soon, but in addition, @aturon and I have been talking about having lang team / docs team coordination to work on the reference; we may want that for the nomicon as well.

OK great. Let me know if I can be of any help, as I'm keen to learn about this stuff.

Sorry to persist, but has anyone at moz had a chance to review this?

I have not, sorry :(

cc @Gankro

Thanks everyone for the comments.
Formatting aside, is what I have written correct? Notice how, when de-sugaring, I initialise references with the lifetime of the referent, whereas the previous examples do something slightly different, often using a narrower lifetime.
Of course, a narrower lifetime can be fine (and probably beneficial, if it can be shown valid), but I wonder if that can be considered a separate "optimisation" that we don't mention here. I think it's important that we have a single intuitive narrative for explaining this to new users. I can't understate this. Lifetimes are what make Rust unique, but are also very hard to grasp (I'm still grasping myself to be honest).
So assuming my de-sugaring is correct (I hope someone checked, because I'm really very new to this), should I go back and revise the earlier examples to fit this style too?
Thanks

Anyone? I was hoping this kind of PR would be prioritised, since the borrow checker is the one thing that no newcomer understands for a long time.

Sorry about that! We'll try to get you a review soon.
cc @steveklabnik @frewsxcv

Yes, sorry; I've been traveling and have not yet quite worked out how
lang + docs should collaborate on the reference; dealing with all of this
is one of my goals for the upcoming week.
On Sat, May 6, 2017 at 7:49 AM, Mark Simulacrum<EMAIL_ADDRESS>wrote:

Sorry about that! We'll try to get you a review soon.
cc @steveklabnik https://github.com/steveklabnik @frewsxcv
https://github.com/frewsxcv
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/rust-lang-nursery/nomicon/pull/4#issuecomment-299634683,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABsirm1jYgokpbV6RvwxMuYyCYzv7HHks5r3F5igaJpZM4MfiS5
.

Hey @vext01;
so, i was talking with @nikomatsakis and/or @aturon about how we can work through things like this; I think the plan will be to eventually go through everything with them, rather than looking at individual PRs. So, I don't think we need actual lang team signoff here.
I think that this is all correct, but it's not my area of specialty. It's unclear to me who should actually sign off on it for that reason :/ Maybe @Gankro himself?

So I'm a bit concerned that there seems to be some redundancy with other sections. For instance https://doc.rust-lang.org/nomicon/subtyping.html discusses this merging behaviour a bit already (though it comes later).
I need to re-read this chapter to see what gets discussed where.

I've fixed the comments on my new prose.
Outstanding topics we need to discuss (quoting my earlier comments):

Notice how, when de-sugaring, I initialise references with the lifetime of the referent, whereas the previous examples do something slightly different, often using a narrower lifetime.

There's also the issue of (I think) move semantics giving rise to additional gotchas (since they limit the lifetimes of values), but I think I'd like to tackle that as a separate PR.

We might decide to do these in separate PRs, as this PR will start to bitrot.
I'm glad the rust team are starting to think about how to deal with docs. I can't emphasize enough the importance of documenting rust, since it has radical new ideas which even lifelong programmers (including myself) are struggling to put to work. You need to make it as easy as possible to learn rust, and documentation is all you've got! :)
If you keep me in the loop, I am happy to review/comment of PRs. I hope I can offer the "newbie's-eye-view".

Fixed build.

@Gankro when you're happy with this, I think I'm happy with this 😄

I've implemented Rufflewind's recommended changes, and read the whole thing over.
I shortened a fair amount of my prose, as I felt I had been rambling a bit.
Let me know what you think.

btw, I killed the stuff on variance, as I felt it was confusing and vague.

I think the revised version look great!

Shall I squash?

ping

Ping?

I'm going to close this as there seems to be a lack of interest/time.


In-memory templates

#228 didn't really get an answer, and I think may also be outdated now.  Is there a way to load templates from memory?  Not all production uses require inheritance and other features, and writing a template to disk just to load it is a hack at best.
I think getLiteralTemplate(String templateName) might be it but the parameter is templateName with no way to pass in the template body, and the only addition to the description from getTemplate is using a StringLoader which I couldn't make heads or tails of.

getLiteralTemplate is indeed what you are after. It uses whatever string you pass to it as the template

Okay, thanks!  Perhaps the documentation could be expanded to make this clear.

StringLoader is heavily used in unit tests, for example: https://github.com/PebbleTemplates/pebble/blob/2634c1c7c1664e1b4d946bcc463cd1ca84d5f252/pebble/src/test/java/com/mitchellbosecke/pebble/TernaryExpressionTest.java#L32-L37
If you configure your PebbleEngine to use a StringLoader, then you simply need to call pebble.getTemplate("Hello, {{who | capitalize}}").


DemoCalculator

I'm trying to work through the tutorial. When I'm working on the App I can't select the reference because its not in the dialog box for section.
Amature

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

ID: 15b81f2c-0402-fa4e-fdc7-0edd1f3c4ba9
Version Independent ID: f2fbe0e0-67b6-995a-f1c1-2f1d135e07d5
Content: Windows Forms Designer tutorial - Visual Studio
Content Source: docs/designers/walkthrough-windows-forms-designer.md
Product: visual-studio-windows
Technology: vs-ide-designers
GitHub Login: @TerryGLee
Microsoft Alias: tglee

Greetings,
I have the same problem: any solution for this issue?
Thanks.

@MedVenturian Thanks for taking the time to write up this issue, and apologies for our delayed response to it. The instruction where it said to select Add Reference from the right-click context menu in Solution Explorer to open the Add Reference dialog box was incorrect. Here's what is correct:

For Visual Studio 2022 & Visual Studio 2019, select Add > Project Reference to open the Reference Manager dialog box.
For Visual Studio 2017, select Add > Reference to open the Reference Manager dialog box.

We have updated the page to reflect the correct UI. We'll close this issue now, but if you find that it doesn't solve the problem or if there are more problems with the page, please create a new GitHub Issue and we'll attend to it.
Meanwhile, thanks also to you for helping improve the documentation!


loadResnet18 error

Error(s) in loading state_dict for ResNet:
Missing key(s) in state_dict: "conv1.0.weight", "conv1.1.weight", "conv1.1.bias", "conv1.1.running_mean", "conv1.1.running_var", "conv1.3.weight", "conv1.4.weight", "conv1.4.bias", "conv1.4.running_mean", "conv1.4.running_var", "conv1.6.weight", "layer1.0.downsample.0.weight", "layer1.0.downsample.1.weight", "layer1.0.downsample.1.bias", "layer1.0.downsample.1.running_mean", "layer1.0.downsample.1.running_var".
Unexpected key(s) in state_dict: "conv1.weight".
size mismatch for bn1.weight: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.bias: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.running_mean: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for bn1.running_var: copying a param with shape torch.Size([64]) from checkpoint, the shape in current model is torch.Size([128]).
size mismatch for layer1.0.conv1.weight: copying a param with shape torch.Size([64, 64, 3, 3]) from checkpoint, the shape in current model is torch.Size([64, 128, 3, 3]).

Hi @zhangtianlun12
Thank you for pointing the error out, for resnet 18 and 34, we need to set deep_base = False. Now it is working.


add duration parsing

Hello,
This PR based on this draft adds duration parsing

Hi,
Could you describe what is left to do ?
After a first quick look: could you use a more modern Menhir syntax ? Using $1 instead of named values is hard to read IMO.

Hi,
Could you describe what is left to do ?
After a first quick look: could you use a more modern Menhir syntax ? Using $1 instead of named values is hard to read IMO.

Regarding how trivial the parser is, shouldn't it directly de implemented in the lexer, which would avoid the menhir dependency.

that would be nice, but I don't know how to do it in just ocamllex


Windows having problem with clean notebook

I think it should be possible to run nbdev on Windows without WSL. I got nbdev1 working a year ago and had lot's of fun with it. Decided to migrate with clean nbdev 2. I installed everything with pip install through cmd and the nbdev commands seemed to work fine.
However when committing to github the workflow failed:
Check we are starting with clean git checkout
Trying to strip out notebooks
/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/nbdev/clean.py:110: UserWarning: Failed to clean notebook
  warn(f'{warn_msg}')
/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/nbdev/clean.py:111: UserWarning: clean_ids
  warn(e)
/opt/hostedtoolcache/Python/3.9.13/x64/lib/python3.9/site-packages/nbdev/clean.py:111: UserWarning: clean_ids
  warn(e)
Check that strip out was unnecessary
Error: Notebooks and library are not in sync.  Please run nbdev_export.

I did note the nbdev_clean command gives a similar output. nbdev_export seems to work.
Any ideas? Example (nothing much changed to default install: link)

The diff is shown in the actions output - there appear to be two locations that need an as_posix added to normalize path separators. https://github.com/jvanelteren/testnbdev/runs/8178832482?check_suite_focus=true#step:2:261
Feel free to put in a PR for this if you're interested.


[Doc] fix 07-user-rights-en.md

https://github.com/OpenTenBase/OpenTenBase/issues/37
https://github.com/OpenTenBase/docs/pull/15
Fix some error.

@bartdong done

 Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.You have signed the CLA already but the status is still pending? Let us recheck it.


What versions do we need exactly to run this project?

I am trying to setup in windows and there is no version written
In Python every freaking version breaks older code which I hate the most
So what version of everything I need to run this app?
also Python 2.7 doesn't have SSL and pip so I had to install 2.7.9
Could anyone direct me to other necessary things to be installed?

I would also be interested in knowing what versions other people are using to get this to work. Been running into dependency issues all day


Content on bench pages jumps during loading.

There's no height specified for images on bench pages. Even on a connection with ~70MB/s down when I view a bench page I often see content jumping. E.g. the page looks like this for a couple seconds:

Then all the content shifts down once the images load, which is kind of ugly.
The aspect ratio of photos varies (e.g. some photos are portrait rather than landscape) so specifying a single height for all images wouldn't produce good results. I tinkered with this a while back and came up with something that worked out the height of an image by getting the dimensions of the original, then doing something like $h=(600/original_width)*original_height and putting height="$h" in the HTML. I can't find the code and the code around serving images has changed since.

Yup. There is now some image size code. So this should be incorporated.

https://github.com/openbenches/openbenches.org/blob/master/www/functions.php#L502

Causes some issues on small screens due to max width being set

It turns out the answer is "no".  When the viewport is narrow, this causes problems.
If the height is set - the width will be too wide.
So set the max-width? Nope - that changes the aspect ratio.
I'm going to set the compression to be slightly lower - 75% on JPG and WEBP - but I think the real delay is the CDN loading the images from our site.

Closing for now as we've moved to a much faster CDN. Let me know if it is still a problem.


added miranda

Hi, I added myself to the authors folder

👷 Deploy Preview for gladia processing.

Name
Link

🔨 Latest commit
6576a619849aca06c21fece19b3b502b70bfbbdf

🔍 Latest deploy log
https://app.netlify.com/sites/gladia/deploys/64a144a03350250008ba88a5

Hi, I added myself to the authors folder

merged (งツ)ว


Fix locale fa loading based on moment documentation.

Motivation
When you use the moment.loadPersian() function you will face an error that says the fa locale is not loaded.
Based on this document of moment this is a bug that prevents moment.locale from being loaded. And recommended solution is using this workaround:
var moment = require('moment');
require('moment/locale/cs');
console.log(moment.locale()); // cs

I applied this to solve the problem. And this PR also fix the #131.
And we want to change the fa locale using the moment.defineLocale function but we should use the moment.updateLocale() to change an existing locale. moment.defineLocale() should only be used for creating a new locale based on this.

This looks good 👍 But I'm not very familiar with the inner workings of moment.
@behrang This one needs your attention.

Sorry, I was very busy, and didn't find a time to look into this.


Add note to compile application for generators

A quick fix to #101 so that developers know to compile their application before they'll get the generators.

Coverage remained the same at 88.732% when pulling d1f7c2f816542d927af9c67c02aed71db2b78f81 on 101 into 5061f58ca2d9520e9957078dda4da4d5f1b8ad66 on master.

LGTM 👍


Bindings to Canvas.Left and Canvas.Top sometimes place the element at the incorrect coordinates

I've had this issue since I started using Avalonia in October 2018. It happens extremely infrequently and very randomly, but I finally captured the issue so I can report it:
https://gfycat.com/ColossalThirdGnat
The view in the bottom right randomly jumps to the left, then returns to normal on the next call of location setting.
What I have is a UserControl called PokemonView with a simple Location property:
        private Point location;
        public Point Location
        {
            get => location;
            set
            {
                location = value;
                OnPropertyChanged(nameof(Location));
            }
        }

And in my parent view I have simple bindings in a canvas:
    <views:PokemonView Name="Battler1_Right" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="1"/>
    <views:PokemonView Name="Battler1_Left" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="1"/>
    <views:PokemonView Name="Battler1_Center" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="1"/>
    <views:PokemonView Name="Battler0_Center" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="2"/>
    <views:PokemonView Name="Battler0_Left" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="2"/>
    <views:PokemonView Name="Battler0_Right" Canvas.Left="{Binding Location.X}" Canvas.Top="{Binding Location.Y}" Scale="2"/>

And every time a PokemonView needs changing I update the location of them all in code (it is inefficient but it is necessary for now before my code is finalized [yes, this code has been the same since October 2018, lol]):
                    case PBEBattleFormat.Triple:
                    {
                        TemporaryFix<HPBarView>("Bar0_Left").Location = new Point(50, 35);
                        TemporaryFix<HPBarView>("Bar0_Center").Location = new Point(204, 35);
                        TemporaryFix<HPBarView>("Bar0_Right").Location = new Point(358, 35);

                        TemporaryFix<HPBarView>("Bar1_Right").Location = new Point(50, 6);
                        TemporaryFix<HPBarView>("Bar1_Center").Location = new Point(204, 6);
                        TemporaryFix<HPBarView>("Bar1_Left").Location = new Point(358, 6);

                        TemporaryFix<PokemonView>("Battler0_Left").Location = new Point(-53, 51);
                        TemporaryFix<PokemonView>("Battler0_Center").Location = new Point(92, 31);
                        TemporaryFix<PokemonView>("Battler0_Right").Location = new Point(221, 76);

                        TemporaryFix<PokemonView>("Battler1_Right").Location = new Point(209, -1);
                        TemporaryFix<PokemonView>("Battler1_Center").Location = new Point(282, 16);
                        TemporaryFix<PokemonView>("Battler1_Left").Location = new Point(362, 8);
                        break;
                    }

(If you are wondering what "TemporaryFix" is, it is just an alternative to "FindControl" while #2562 exists, and this bug has been present when I was using FindControl all these months prior)
If I had to guess how often this bug occurred, I'd say once every 1500+ calls to this method. It's really so infrequent that it happens once over several weeks of me programming, and that's why I haven't had proof of this until now.
This also happens with the "HPBarView" in this code you see, because it has the same types of bindings to Canvas.Left and Canvas.Top as PokemonView. It also happens just as infrequently as you probably expected while reading this.
The one that is misbehaving in the example gif is "Battler0_Right", but I think it can happen to any of the 6 PokemonViews and any of the 6 HPBarViews. I can't remember off the top of my head or verify that claim, but I think it can happen to all of them.
I am also unsure if this would happen with Canvas.Right or Canvas.Bottom, since I do not use them anywhere.

I find it interesting that the scrollbar of the ListBox missed the bottom element (with ScrollIntoView) at the same time this PokemonView was placed at the incorrect location. I should also mention that all of this code to ScrollIntoView and change these locations is on the UI thread. However, that ListBox issue happens once every 20+ messages (which is a lot more frequent than this obviously, so I don't think they are related, but I am pointing it out just in case). I also think there exists an open issue for the ListBox measurement issue, so I didn't create one.

I'll keep a look out for this, but it's a bit hard to diagnose the problem without a decent repro :( In the meantime, maybe you could add some debug logging to your positioning code to check that it's not that that's occasionally doing something wrong?

Well the position code is always as you see there, there are no variables for the positions and the switch statement will always jump to the same case for all calls since the battle format doesn't change at all.
I looked through the Canvas code and also don't see anything that would show problems, so I'm unsure what it could be aside from binding errors or something.


TypeError: instance is not a function

Hey, this seems like the most legit uploader lib i've seen so far, but i'm having a little trouble implementing the imperative API version in a redux action, maybe you can shed light on what I'm doing wrong or if there is actually an issue. When I run the UploadRequest on a file I get back this value for instance which is undefined.

Which logs the following error:

Here is what my call looks like:

I've verified all the params url, hash, mimetype, auth etc.
This is for a multipart file uploader (for my work) and there aren't really a whole lot of other nice options to do this out there at the moment, so would love to get this very elegant one to work.

I’ll look into this first thing tomorrow, thanks for the report and glad
you like it :)
On Tue, Oct 31, 2017 at 17:52 Eric Wexler<EMAIL_ADDRESS>wrote:

Hey, this seems like the most legit uploader lib i've seen so far, but i'm
having a little trouble implementing the imperative API version in a redux
action, maybe you can shed light on what I'm doing wrong or if there is
actually an issue. When I run the UploadRequest on a file I get back this
value for instance which is undefined.
[image: screen shot 2017-10-31 at 5 35 39 pm]
https://user-images.githubusercontent.com/1851296/32250635-b49a3796-be63-11e7-8e5d-ad8c0050ff42.png
Which logs the following error:
[image: screen shot 2017-10-31 at 5 44 52 pm]
https://user-images.githubusercontent.com/1851296/32250641-c06c9fbe-be63-11e7-9d88-131878eb0e8b.png
Here is what my call looks like:
[image: screen shot 2017-10-31 at 5 44 02 pm]
https://user-images.githubusercontent.com/1851296/32250667-d759d70a-be63-11e7-8796-82461d92367a.png
I've verified all the params url, hash, mimetype, auth etc.
This is for a multipart file uploader (for my work) and there aren't
really a whole lot of other nice options to do this out there at the
moment, so would love to get this very elegant one to work.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/navjobs/upload/issues/23, or mute the thread
https://github.com/notifications/unsubscribe-auth/AAbacLCiCMZnrRuECf6BUuIOUTzRvDY2ks5sx5aPgaJpZM4QNebB
.

 Should work fine https://github.com/navjobs/upload/releases/tag/3.1.0

Sweet "progress" @zackify humming along smooth now thanks.


Make ModelBinderAttribute.BindingSource setter protected

#3428
the public setter was not useful when this class is used as an attribute
make property virtual to support other override patterns
update existing test to use both override patterns

/cc @rynowak

:shipit:

45ff0a2


Demo site

Detailed Description
Add a demo site that always loads a certain day of data.
Context
Good to have interactive app that has fairly static data, so we can show them a good forecast
Possible Implementation

Update dummy data to a particular day
use env variable to load this data, instead of dummy data. This might already be done in some of the cypress testing works
Setup new vercel env which load that dummy data.
Add to Auth0 the website, for example demo.nowcasting.io so that log in works

ive added your idea here @dantravers

Thanks @peterdudfield  This might also be useful for manual testing of UI changes, as will be easier to compare before & after on a fixed set of data.  I'm not sure I'd agree with low priority, but we can discuss in the wider context, and not immediately urgent for sure.


Resizing of Elements on website

When window is re-sized, logos do not behaved as expected

Yes!On 18. Sep 2023, at 09:41, Mihaela Curmei @.***> wrote:
@Indraos  is this done?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>


Add test IDs to components for integ tests

Description
Adds data-test-subj tags to a variety of elements used in the added cypress integration tests as part of this PR.
Also updates related test snapshots.
Check List

[x] Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Codecov Report

Merging #183 (c6b4a66) into main (20727b1) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##             main     #183   +/-   ##
=======================================
  Coverage   45.93%   45.93%
=======================================
  Files         150      150
  Lines        4944     4944
  Branches      951      951
=======================================
  Hits         2271     2271
  Misses       2455     2455
  Partials      218      218

Impacted Files
Coverage Δ

...components/FilterDisplayList/FilterDisplayList.tsx
64.00% <0.00%> (-1.39%)
:arrow_down:

...ugin/public/pages/DetectorDetail/utils/helpers.tsx
25.80% <0.00%> (ø)

...ublic/pages/DetectorConfig/containers/Features.tsx
81.63% <0.00%> (ø)

...ublic/pages/DetectorsList/containers/List/List.tsx
58.72% <0.00%> (ø)

...c/pages/DetectorConfig/containers/DetectorJobs.tsx
100.00% <0.00%> (ø)

.../pages/Dashboard/Components/AnomaliesLiveChart.tsx
3.07% <0.00%> (ø)

...pages/ConfigureModel/containers/ConfigureModel.tsx
57.50% <0.00%> (ø)

...pages/DetectorDetail/containers/DetectorDetail.tsx
16.05% <0.00%> (ø)

...ages/DetectorResults/containers/AnomalyHistory.tsx
12.54% <0.00%> (ø)

...ages/DetectorResults/containers/AnomalyResults.tsx
20.16% <0.00%> (ø)

... and 18 more

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 20727b1...c6b4a66. Read the comment docs.

The failing remote integ tests are due to test IDs changing in this repo, and can be ignored. I can kick off a new run after this PR and the integ test PR are merged.


Cannot use WiFi provisioning when using another nimble example. (IDFGH-6882)

Environment

Development Kit:      ESP32-DevKitC
Kit version (for WroverKit/PicoKit/DevKitC): N/A
Module or chip used:  ESP32-WROOM-32
IDF version (run git describe --tags to find it): v5.0-dev-1766-g84f9aa13c9
Build System: idf.py
Compiler version (run xtensa-esp32-elf-gcc --version to find it): 8.4.0
Operating System: Linux
(Windows only) environment type: [MSYS2 mingw32|ESP Command Prompt|Plain Command Prompt|PowerShell].
Using an IDE?: No
Power Supply: USB

Problem Description
Cannot provision wifi when another NimBLE application is running. I've the NimBLE SPP example running, if I get an input (say 'prov'), I'm de-initializing the nimble hci and controller host with the API esp_nimble_hci_and_controller_deinit() and then calling the wifi provisioning function. But once the provisioning completes successfully, my device reboots with guru meditation error. I'm guessing the it's something to do with incorrect initializing or de-initializing the NimBLE, since provisioning too uses NimBLE. It would be great if someone could help.
Expected Behavior
Run as usual without reboot
Actual Behavior
Device reboots
Steps to reproduce

Run the NimBLE example
call the wifi provisioning example from within SPP example, (after de-initializing).

Code to reproduce this issue
SPP Example:
if (strcmp((const char *)msg, "prov") == 0) {
	esp_nimble_hci_and_controller_deinit();

	// calling this function is causing reboot.
	if (init_provision() == ESP_OK)
		ESP_LOGI("main", "Provisioning successful");

	nimble_port_freertos_deinit();
}

Provisioning Example: init_provision()
esp_err_t init_provision(void)
	/* Initialize NVS partition */
	esp_err_t ret = nvs_flash_init();
	if (ret == ESP_ERR_NVS_NO_FREE_PAGES ||
	    ret == ESP_ERR_NVS_NEW_VERSION_FOUND) {
		ESP_ERROR_CHECK(nvs_flash_erase());
		ESP_ERROR_CHECK(nvs_flash_init());
	}

	ESP_ERROR_CHECK(esp_netif_init());

	ESP_ERROR_CHECK(esp_event_loop_create_default());
	wifi_event_group = xEventGroupCreate();

	ESP_ERROR_CHECK(esp_event_handler_register(
		WIFI_PROV_EVENT, ESP_EVENT_ANY_ID, &event_handler, NULL));
	ESP_ERROR_CHECK(esp_event_handler_register(WIFI_EVENT, ESP_EVENT_ANY_ID,
						   &event_handler, NULL));
	ESP_ERROR_CHECK(esp_event_handler_register(
		IP_EVENT, IP_EVENT_STA_GOT_IP, &event_handler, NULL));

	esp_netif_create_default_wifi_sta();

	wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
	ESP_ERROR_CHECK(esp_wifi_init(&cfg));

	wifi_prov_mgr_config_t config = {
		.scheme = wifi_prov_scheme_ble,
		.scheme_event_handler = WIFI_PROV_EVENT_HANDLER_NONE
	};

	ESP_ERROR_CHECK(wifi_prov_mgr_init(config));

	bool provisioned = false;
	wifi_prov_mgr_reset_provisioning();

	ESP_ERROR_CHECK(wifi_prov_mgr_is_provisioned(&provisioned));

	if (!provisioned) {
		ESP_LOGI(TAG, "Starting provisioning");

		char service_name[12];
		get_device_service_name(service_name, sizeof(service_name));
		wifi_prov_security_t security = WIFI_PROV_SECURITY_1;
		const char *pop = "abcd1234";
		const char *service_key = NULL;
		ESP_ERROR_CHECK(wifi_prov_mgr_start_provisioning(
			security, pop, service_name, service_key));
		wifi_prov_mgr_wait();
		wifi_prov_mgr_deinit();
	} else {
		ESP_LOGI(TAG, "Already provisioned, starting Wi-Fi STA");
	}

	/*
	 *[> Wait for Wi-Fi connection <]
	 *xEventGroupWaitBits(wifi_event_group, WIFI_CONNECTED_EVENT, false,
	 *true, portMAX_DELAY);
	 */
	return ESP_OK;
}

// If your code is longer than 30 lines, GIST is preferred.
Debug Logs
Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.

Core  0 register dump:
PC      : 0x400945db  PS      : 0x00060233  A0      : 0x80093c19  A1      : 0x3ffd1e10
0x400945db: uxListRemove at /home/gogo/esp/esp-idf/components/freertos/FreeRTOS-Kernel/list.c:206

A2      : 0x3ffdcb88  A3      : 0x3ffc35c0  A4      : 0x3ffbf1b0  A5      : 0x00060223
A6      : 0x00000000  A7      : 0x00000001  A8      : 0x00000000  A9      : 0x3ffc3644
A10     : 0x3ffc3644  A11     : 0x00000000  A12     : 0x00000001  A13     : 0x00060223
A14     : 0x00000003  A15     : 0x00060023  SAR     : 0x00000004  EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000004  LBEG    : 0x400014fd  LEND    : 0x4000150d  LCOUNT  : 0xfffffffa

Backtrace:0x400945d8:0x3ffd1e100x40093c16:0x3ffd1e30 0x400e592a:0x3ffd1e50 0x400d6fff:0x3ffd1e70 0x400e3245:0x3ffd1ea0 0x400e3286:0x3ffd1ed0 0x400e8fd2:0x3ffd1f10 0x400e9877:0x3ffd1f40 0x400ea129:0x3ffd1f60 0x400ddefd:0x3ffd1f90 0x400dddbe:0x3ffd1fc0 0x400dd4b5:0x3ffd1ff0 0x400dd4c7:0x3ffd2010 0x400e5ef2:0x3ffd2030 0x400d6f2f:0x3ffd2050 0x40094639:0x3ffd2070
0x400945d8: uxListRemove at /home/gogo/esp/esp-idf/components/freertos/FreeRTOS-Kernel/list.c:200

0x40093c16: vTaskDelete at /home/gogo/esp/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:1349 (discriminator 4)

0x400e592a: nimble_port_freertos_deinit at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/src/nimble_port_freertos.c:57

0x400d6fff: ble_svc_gatt_handler at /home/gogo/Documents/work/idf_projects/walk/main/ble_spp_server.c:299

0x400e3245: ble_gatts_val_access at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:395

0x400e3286: ble_gatts_chr_val_access at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_gatts.c:421

0x400e8fd2: ble_att_svr_write at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:524

0x400e9877: ble_att_svr_write_handle at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:555

0x400ea129: ble_att_svr_rx_write at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att_svr.c:2001

0x400ddefd: ble_att_rx at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_att.c:503

0x400dddbe: ble_hs_hci_evt_acl_process at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs_hci_evt.c:927

0x400dd4b5: ble_hs_process_rx_data_queue at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:238

0x400dd4c7: ble_hs_event_rx_data at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/nimble/host/src/ble_hs.c:532

0x400e5ef2: ble_npl_event_run at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/porting/npl/freertos/include/nimble/nimble_npl_os.h:125
 (inlined by) nimble_port_run at /home/gogo/esp/esp-idf/components/bt/host/nimble/nimble/porting/nimble/src/nimble_port.c:78

0x400d6f2f: ble_spp_server_host_task at /home/gogo/Documents/work/idf_projects/walk/main/ble_spp_server.c:236

0x40094639: vPortTaskWrapper at /home/gogo/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:141

Hi,
You are attempting to use the sample application code as it is, but it seems certain points are not considered while calling the relevant APIs . The crash appears to be due to half-way deinitialization of host when 2 standalone applications are combined.
The thing happening here while combining two standalone applications is:

There are 2 host tasks which are getting created and started in the code you shared (One one SPP server and another of wifi_prov_mgr).
2 host tasks attempting to read the same queue may lead to unknown behavior, crash being one of it .
Server is starting the SPP_server host task and after receiving input ('prov'), init_provision() is starting the provisioning host task. In this, all initialization happens again.
In your code, esp_nimble_hci_and_controller_deinit() is only deinitializing controller and the transport link between host and controller.
There is no handling for stack deinitialization considered. As mentioned above, calling init_provision() will also attempt to reinitialize an already initialized stack/ queue/ task etc.

The provided sample applications in IDF are reference applications showcasing scenario for standalone use cases. If your use case needs merging the two applications, then please make sure you are taking care of correctly deinitalizing the stack before you initialize again.  Your application needs to ensure all stack cleanup happens correctly before an attempt of initializing it is done again. Since IDF code is open source, you can refer to code / documentation to get more information about how stack initialization happens.
Thanks,
Isha

@IshaESP thank you. Unfortunately I'm new to IDF. Any resources (which part of the official doc should I check) where I could read how to deinitalize the stack.

Hi @brahmajit ,
ESP-IDF has nimble stack which is from upstream mynewt-nimble code -  https://mynewt.apache.org/latest/network/ .The major changes done in IDF is for the porting layer ,rest of the code is picked from open source as it is.
The API documentation you can start referring to understand is  - https://github.com/espressif/esp-idf/blob/a8ba5a0264d50f9aadd79838e2672a2828704770/components/bt/host/nimble/esp-hci/include/esp_nimble_hci.h#L117

@IshaESP 2nd link is invalid at this moment.

Hi @KaeLL ,
Copy pasting it in the new tab works for me, can you try it once?
Thank You.

Hi @KaeLL,
I have updated the link, please check it now.

Thank you @IshaESP
On Fri, Mar 11, 2022 at 5:53 PM IshaESP @.***> wrote:

Hi @brahmajit https://github.com/brahmajit ,
ESP-IDF has nimble stack which is from upstream mynewt-nimble code -
https://mynewt.apache.org/latest/network/ http://url .The major changes
done in IDF is for the porting layer ,rest of the code is picked from open
source as it is.
The API documentation you can start referring to understand is -
https://github.com/espressif/esp-idf/blob/a8ba5a0264d50f9aadd79838e2672a2828704770/components/bt/host/nimble/esp-hci/include/esp_nimble_hci.h#L117
http://url
—
Reply to this email directly, view it on GitHub
https://github.com/espressif/esp-idf/issues/8502#issuecomment-1065065826,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AVQVTSN2M6XP2LKUYA7A54DU7M3LTANCNFSM5P7HD5DQ
.
Triage notifications on the go with GitHub Mobile for iOS
https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675
or Android
https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you were mentioned.Message ID:
@.***>

--
Regards
Brahmajit

Hi @IshaESP,
I too am facing a similar kind of issue. I took a look at the links you posted and using sample code from there as well as the code I found on the espressif doc. Basically I'm first deinitializing the NimBLE stack using the following code snippet and I've also tried nimble_port_freertos_deinit(); and then I'm calling the provisioning function.
int ret = nimble_port_stop();
if (ret == 0) {
     nimble_port_deinit();

     ret = esp_nimble_hci_and_controller_deinit();
     if (ret != ESP_OK) {
         ESP_LOGE(TAG, "esp_nimble_hci_and_controller_deinit() failed with error: %d", ret);
     }
}

And then starting the provisioning function and it results with the following error code
I (8159) wifi_init: rx ba win: 6
I (8159) wifi_init: tcpip mbox: 32
I (8159) wifi_init: udp mbox: 6
I (8169) wifi_init: tcp mbox: 6
I (8169) wifi_init: tcp tx win: 5744
I (8179) wifi_init: tcp rx win: 5744
I (8179) wifi_init: tcp mss: 1440
I (8179) wifi_init: WiFi IRAM OP enabled
I (8189) wifi_init: WiFi RX IRAM OP enabled
I (8229) ble prov: Starting provisioning
I (8239) wifi:mode : sta (24:62:ab:c3:ad:d0)
I (8239) wifi:enable tsf
ESP_ERROR_CHECK failed: esp_err_t 0x103 (ESP_ERR_INVALID_STATE) at 0x40090774
0x40090774: _esp_error_check_failed at /home/listout/esp/esp-idf/components/esp_system/esp_err.c:42

file: "/IDF/components/protocomm/src/transports/protocomm_nimble.c" line 482
func: simple_ble_start
expression: esp_nimble_hci_and_controller_init()

abort() was called at PC 0x40090777 on core 1
0x40090777: _esp_error_check_failed at /home/listout/esp/esp-idf/components/esp_system/esp_err.c:43

I was able get the code to not panic reboot. Before starting the provisioning process I called these functions
nimble_port_deinit();
esp_nimble_hci_and_controller_deinit();
nimble_port_freertos_deinit();

But now the device cannot be connected by the provisioning and disappears after first scan.

Is there an update on proper deinitialization of the nimble stack. Can someone provide an example for this?


styled-components fails in Facebook and TikTok browser

What version of Remix are you using?
1.11.0
Steps to Reproduce

run npx create-remix@latest project-name
select: basic, typescript, netlify and n so we can run yarn
run yarn add styled-components
run yarn add -D @types/styled-components
create a basic styled component

import styled from 'styled-components'

const H1 = styled.h1`
  border: 1px solid red;
`

export default function Index() {
  return (

test

  )
}

update entry.server.tsx with:
import { renderToString } from "react-dom/server";
import { RemixServer } from "@remix-run/react";
import type { EntryContext } from "@remix-run/node"; // or cloudflare/deno
import { ServerStyleSheet } from "styled-components";

export default function handleRequest(
  request: Request,
  responseStatusCode: number,
  responseHeaders: Headers,
  remixContext: EntryContext
) {
  const sheet = new ServerStyleSheet();

  let markup = renderToString(
    sheet.collectStyles(
      <RemixServer
        context={remixContext}
        url={request.url}
      />
    )
  );
  const styles = sheet.getStyleTags();
  markup = markup.replace("__STYLES__", styles);

  responseHeaders.set("Content-Type", "text/html");

  return new Response("<!DOCTYPE html>" + markup, {
    status: responseStatusCode,
    headers: responseHeaders,
  });
}

inside root.tsx file update the head tag to include styles:

        <Meta />
        <Links />
        {typeof document === "undefined"
          ? "__STYLES__"
          : null}

and deploy to netlify.
Here is an example project that replicates the issue:
https://github.com/marianzburlea/test-sc
and here is an example of the styled component receiving a red border.
https://steady-pixie-99fc00.netlify.app/
Expected Behavior
actual styles to be displayed

Actual Behavior
hydration fails and no styles are applied, when I click on a link from Facebook and Tiktok.
The BIG problem is not facebook messenger, it's how people that click paid ads see the website.
This is the same way users that click on an ad, end up on the website, with no styles.

Im experiencing similar issues outside of the context you describe.
Basically any hydration error where react is forced to rebuild the  will cause the styles of styled-components to be removed. While react itself recovers from this state, styled-components fails to do so.
As mentioned in #5159 I'd say this is not per se a remix bug but an architectural incompatibility as the issue can be reproduced with any react app failing to hydrate the whole document and might also happen to other libraries that inject things into the DOM.

related issue in react: https://github.com/facebook/react/issues/24430

I was able to work around the problem by adding by:

downgrading to react@17
ensuring that {typeof document === "undefined" ? "__STYLES__" : null} is rendered at the very end of the

Would still love to use latest react features within my app.

+1 to this issue - Kent has responded to this issue here, stating that it is a React issue, which I think is fair enough.
There's a potential workaround, but it's not great - you can render Remix not at the document level, but within a  in the body.
By wrapping  in an HTML container you can solve this issue, however it comes at the cost of not being able to use  or .

Thanks for sharing. I was also tinkering around with rendering the remix app into a sub-element of the page but gave up because it caused too many things I love about remix to stop working.
As with the "who's problem is this": Yeah the issue lays between React and Styled Components. But Remix one the one hand made the architectural decision to work on the whole document which surfaces the problem and on the other hand advertises styled-components to work in remix apps (which it does but at the cost of react@18).

I have created a proposal / discussion for this issue https://github.com/remix-run/remix/discussions/5244

@kiliman figured out how to do this with the current tools and for me it solves the styled-components issues: https://github.com/remix-run/remix/discussions/5244#discussioncomment-4832036

@Xiphe awesome... glad it resolved the styled-components issue for you.


empty image on mobile devices

I must be doing something wrong as I can't find anyone else with this problem.
I made a custom content type in D7 and added the sigpad field. This works perfectly with chrome and IE/edge on Win7 and Win10. When using my smartphone (android 5) or iPad it stores an empty image instead of the signature.
I do get a notice and warning:
Notice: Undefined index: uri in sigpad_field_widget_form() (line 59 of /var/www/sites/mydomain/sites/all/modules/sigpad/sigpad.module).
Warning: file_get_contents(): Filename cannot be empty in sigpad_field_widget_form() (line 59 of /var/www/sites/mydomain/sites/all/modules/sigpad/sigpad.module).
Thanks for any advise or help.

I'm observing a similar problem. Works fine in Chrome on the desktop. On an Android tablet and on my iPhone, I'm having issues with the content of the pad disappearing spontaneously. The disappearance usually occurs some time after I have drawn in the box and have shifted the focus elsewhere on the page. On the Android device, I can consistently lose my signature by trying to scroll past the bottom of the page.
The best theory that I have at this point involves a "Clear" control that we have just above the signature box. This control has a click event that calls SignaturePad.clear(). The theory is that somehow the control is registering a click event. We are going to try removing the Clear control and see if we can still reproduce the problem in that situation.
(An observation on @riskid's post: The error messages you have posted appear to be from your server-side code, not from JavaScript.)


World of Warcraft 1.12 Missing ground specular

Here on ground, some effects (speculars ? ) seems to be missing. I say ground here but it could be elsewhere than ground.
wined3d / windows

d9vk

System information

GPU: gtx1070
Driver: nv 430.40
Wine version: ge protonified 4.10
DXVK version: 1.3.1

Apitrace file(s)

https://mega.nz/#!P7h2lYzZ

Log files

WoW_d3d9.log

sorry I put the link with the key, should be ok now

Should be fixed now, can you verify?

I can confirm it's fixed ! thank you