Deployment To Heroku Files

I had to delete some webpack loader stuff because the initial npm eject ended up causing unforseen difficulties for deploying to heroku.
Right now we have 2 Procfiles. Front end and Back end folders are now their own heroku git repos and are deployed on their own Dyno (instance)
Moved requirements.txt back to backend because Heroku uses BackEnd Folder as their root.

add deployment script


DSA-3217-1 dpkg -- security update

https://www.debian.org/security/2015/dsa-3217
Please correct me if I'm wrong, but build logs (and build date) indicate that dpkg should be upgraded.

Seems to be fixed as of https://github.com/tianon/docker-brew-debian/commit/b637abe5e26f8b283a28d63cdc0413926ed54596.


Excluding a field from being maintained by immer

I found no way of excluding a field of a class from being maintained by immer. Particularly, we have getters and setters in a class which perform some actions on a class field (See the following code). It seems that immer considers two fields: the original one and the the field it generates based on the getter and the setter. However, this may result in inconsistencies and cause bugs. I want to be able to say immer to ignore the getters and setters and just take care of the original fields of the class.
class MyClass {
	public _atts: Array<number>;

	public get atts() {
		return _atts.filter(n => n > 1000);
	}

	public set atts(atts: Array<number>) {
		_atts = atts.map(n => n + 1000);
	}
}

However, this may result in inconsistencies and cause bugs

Please open a fresh issue and follow the issue template. Your sample doesn't demonstrate a bug.

But, this isn't a bug report! It's a feature request.

In that case you should still explain how you think such a feature would be different from what is Immer doing currently (getters / setters are already supported in general) and give some concrete examples on how the behavior should change. You're currently state that getters don't behave like you want them to behave, but don't give any concrete examples of what would go wrong / undesirable. Making it impossible to evaluate the proposal, give counter examples, etc.


compilers: add -fno-strict-aliasing for GNU

I play around with structural optimization, and that involves repeatedly solving finite element problems. Once, I noticed that my program was leaking memory quite a bit and traced the problem to MUMPS (that is, other solvers didn't have that). However, the MUMPS binaries that Fedora distributes don't leak memory. Playing around with compiler options, I took the compiler's suggestion of adding -fno-strict-aliasing and that solved it.
It shouldn't be too hard to reproduce if you want to try it out. I just used a symmetric matrix in serial and maintained the structure while repeatedly changing the values, decomposing, then solving. Matrix size doesn't seem to matter, but larger matrices seem to leak a bit more.

@TarcisioLOliveira , just curious, will it leak on Windows? Have you filed this issue to the MUMPS team, they could add this compiler option to their makefiles.

@adam-sim-dev I haven't tested it on Windows, so I'm not sure. I haven't submitted it to the MUMPS team yet, but I'll try to. I found the bug after compiling it from this repo, so I figured I'd first submit it downstream.

Thanks for the info. @TarcisioLOliveira

No problem! Thanks for maintaining this repo, it helps a lot!


ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Hello, I've just recently tried to setup this on a friend's machine, and ran into some issues that didn't happen on my machine..
This is the error:
[2020-12-22 09:08:25.356 -0300] ERROR (33 on a55c3e77bec5): Error sending email. Please check your configuration

emailConfig: {

"smtpHost": "smtp.gmail.com",

"smtpPort": 587,

"emailSenderAddress": "mymail",

"emailSenderName": "Epic Games Captchas",

"emailRecipientAddress": "hismail",

"secure": false,

"auth": {

"user": "mymail",

"pass": "mypass"

}

}

[2020-12-22 09:08:25.357 -0300] ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Error: self signed certificate in certificate chain

at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)

at TLSSocket.emit (events.js:314:20)

at TLSSocket._finishInit (_tls_wrap.js:937:8)

at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)

[2020-12-22 09:08:25.358 -0300] ERROR (33 on a55c3e77bec5): self signed certificate in certificate chain

Error: self signed certificate in certificate chain

at TLSSocket.onConnectSecure (_tls_wrap.js:1502:34)

at TLSSocket.emit (events.js:314:20)

at TLSSocket._finishInit (_tls_wrap.js:937:8)

at TLSWrap.ssl.onhandshakedone (_tls_wrap.js:711:12)

I had him setup the config with his email, but since it failed I sent him my email config since I know it works on my machine, but it still threw an error.
Only difference is he has multiple Epic accounts setup on the json, but all seem to be detected correctly as the log mentions it's checking them and created cookie files for them.
What am I doing wrong?
Thanks in advance and sorry if this has been answered before but I wasn't able to find it.

Nothing looks wrong in the config, but the error self signed certificate in certificate chain makes it look like it's a network issue. Usually that means your network has some kind of man-in-the-middle certificate.
The correct solution in that case would be to add the trusted certs to the container, which would take some dev work. (See: https://stackoverflow.com/questions/54402673/how-to-fix-ssl-certificate-problem-self-signed-certificate-in-certificate-chai)
The hacky solution is to just disable TLS rejection by setting an environment variable: -e NODE_TLS_REJECT_UNAUTHORIZED=0.

Sorry for the delayed response, I wasn't able to get back to this until now,
Tried setting the enviroment variable and although it didn't throw the same error, it now gives this error which somehow seems a more cryptic...
RUN_ON_STARTUP:

CRON_SCHEDULE:

RUN_ONCE:

No JSON file found

Setting config variables

Run on startup: true

Run once: false

<EMAIL_ADDRESS>start /usr/app

node dist/src/index.js

CONFIGURATION ERROR: Account 1 is missing email

Error: Account 1 is missing email

at /usr/app/src/common/config.ts:74:15

at Array.forEach (<anonymous>)

at validateConfig (/usr/app/src/common/config.ts:72:21)

at Object.<anonymous> (/usr/app/src/common/config.ts:158:23)

at Module._compile (internal/modules/cjs/loader.js:999:30)

at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)

at Module.load (internal/modules/cjs/loader.js:863:32)

at Function.Module._load (internal/modules/cjs/loader.js:708:14)

at Module.require (internal/modules/cjs/loader.js:887:19)

at require (internal/modules/cjs/helpers.js:74:18)

npm ERR! code ELIFECYCLE

npm ERR! errno 1

npm ERR<EMAIL_ADDRESS>start: node dist/src/index.js

npm ERR! Exit status 1

npm ERR!

npm ERR! Failed at the<EMAIL_ADDRESS>start script.

npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:

npm ERR! /root/.npm/_logs/2020-12-23T15_33_42_746Z-debug.log

Setting timezone: America/Sao_Paulo

Setting cron schedule as 0 12 * * *

This is the config.json, I tried setting up only 1 account but it threw the same error, so I don't think its a bad json config file, also sorry for the blur, was easier to do it like that and still show how the json file was set up...
I'm not sure if I should've opened a new issue but I felt like since it was a follow up error it was probably better here.
Thanks


Doc Preflight "Manager driving property" validation.

Noting this so I don't forget.
tl:dr: Is the host putting something in preflight traitsdata a hard assertion that it intends not to allow the manager to drive those values ... answer : probably yes, and we need to doc it.
With preflight, there's this idea that you provide the traits that you don't expect the manager to drive, (this relates to us needing to implement the awfully named 'kDerived' access, so hosts can know which specific traits these are when using management policy.)
The idea occurs that a host could provide a trait that the manager itself expects to be driving, and dosen't want to allow the host to move forward under the expectation that the host gets to decide this. Imagine a render node, and the location property is provided by the host in preflight, despite the fact that the manager knows that the render nodes must stream their data to specific locations on the cluster.
Now, the manager can currently use the error callback to convey this, but it strikes me that we've never thought about this, and it isn't docced anywhere, whether this pattern is a recommendation or just a emergent effect of the ecosystem. We should think about it then doc something.
AC

Doc that kManagerDriven isn't a hard and fast requirement for the host to follow, as managers may tolerate overriding this choice. Managers remain free to error in preflight

This is a doc issue, does kManagerDriven mean that the trait must be manager driven. The answer is no, it can't.

I'm starting to think the old idea of a "dry run" access mode for preflight (perhaps other methods too) would help simplify a lot of introspection method design, or nasty "you just have to try and see" workflows.


No longer working?

Should this still be functional? I just tried to use it but saw nothing appear in Logtail, I'm pretty sure it was configured correctly
// Program.cs
builder.Host.UseSerilog((ctx, lc) =>
{
  lc.WriteTo.Console();
  lc.WriteTo.LogtailSink(sourceToken);
});

Hi, the problem with this implementation is in the LogtailSink extension method where important properties are initialized outside the constructor but the Logtail classes are all initialized inside the constructor, so is not Logtail is missing a lot of parameters.
I have changed the method to this
public static LoggerConfiguration LogtailSink(         this LoggerSinkConfiguration loggerConfiguration,         string sourceToken,         IFormatProvider? formatProvider = null,         string endpoint = "https://in.logtail.com",         int retries = 10,         int flushPeriodMilliseconds = 250,         int maxBatchSize = 1000)     {         return loggerConfiguration.Sink(new LogtailSink(formatProvider, sourceToken, endpoint, retries, flushPeriodMilliseconds, maxBatchSize));     }
and now is working.


Should link to Github repo from lgtm.co

I was showing a coworker lgtm.co when he pointed out he couldn't find the source, which oddly hadn't occured to me. I was able to find it after going a quick Github search, but we realized there was no obvious link from the website. For those of us curious to understand the code behind the system, providing a more obvious link (assuming there's not one we just missed) would be great.

I've just been hit by the same problem. Had to guess where the source was...


Cannot delete translation

@Lorenz1983 said:
I have already started to delete the Danish translations. Unfortunately, this does not work for three vocabularies, as the editor always switches to other versions and therefore no longer displays the Danish tab.
For example, in the vocabulary "Analysis Unit": In the first screenshot you can see version 2.0.1 of the Danish translation in the centre. If I then click on Editor, it switches to version 2.1.3. This no longer contains the Danish tab, see screenshot 2, and there is also no option to delete the TL in the left-hand field.
Do you know the reason for this and is there another way to delete the last three translations?

TLs can be deleted up to the currently published bundle. Delete does not iterate over the previously published versions.
If there's a need to delete every published version of some specific TL, we can do it programmicaly in the database. However, this operation, just like the Delete button, is irreversible.

@Stifo Thanks for the info. For the remaining vocabularies, however, I was also able to delete the older published versions using the Delete button. Only with the remaining three vocabularies does the version always change - as a result, the old version and the delete TL button do not appear as with the other vocabularies, but the latest version and the delete SL button. Therefore, please delete the remaining Danish translations via the programme.

Hello @Lorenz1983,
you were able to delete older published version because they were published before the new versioning system was set. Once you get back to such old versions with deleting, the behaviour of the delete changes to what it was at the time they were published. So the delete is backward compatible.
Below is an SQL script for deleteing ALL THE DANISH TLs AND SLs (!!!use with caution, make a DB backup first!!!). This script was tested on the dev instance. Lorenz, please check the results in the dev instance and confirm before asking @matthew-morris-cessda to run in in the production. Thanks.
LOCK TABLES version concept WRITE;
START TRANSACTION;

-- specify the language to delete SLs and TLs for.
SET @lang_to_delete='DA';

SET @old_sql_safe_updates=@@sql_safe_updates;
SET sql_safe_updates=0;

-- delete concepts (1) and versions (2) with the specified language
-- 1) concepts
WITH selected_versions AS
  (SELECT id FROM version b WHERE b.language=@lang_to_delete)
DELETE FROM concept a WHERE
  a.version_id IN (SELECT * FROM selected_versions)
  OR
  a.introduced_in_version_id IN (SELECT * FROM selected_versions);
-- 2) versions
DELETE FROM version b WHERE b.language=@lang_to_delete;

-- delete vocabularies (3) where SL is the specified language together with related versions (2) and concepts (1)
-- 1) concepts
DELETE FROM concept a WHERE a.version_id IN (
  SELECT id FROM version b WHERE b.vocabulary_id IN (
    SELECT id FROM vocabulary c WHERE c.source_language=@lang_to_delete
  )
);
-- 2) versions
DELETE FROM version b WHERE b.vocabulary_id IN (
  SELECT id FROM vocabulary c WHERE c.source_language=@lang_to_delete
);
-- 3) vocabularies
DELETE FROM vocabulary c WHERE c.source_language=@lang_to_delete;

SET @lang_to_delete=NULL;
SET sql_safe_updates=@old_sql_safe_updates;

COMMIT;
UNLOCK TABLES;

P.S.: The script can be used in the future for any other language. Just edit the @lang_to_delete variable;

Hello,
everything looks fine on the dev instance. @matthew-morris-cessda please run the script in the production instance. Thank you very much.

@matthew-morris-cessda Can you please let me know as soon as you have run the script on the production instance? Thank you very much.

This seems like it should be run by the CVS application itself - so it can be done by an adminstrator, rather than an arbitary SQL script

@matthew-morris-cessda Thanks for the info. What should then be done to delete the remaining three Danish translations?

It depends on how urgently the translations need to be deleted. I can run the script if it is urgent, but otherwise I would advise making a feature that allows the translations to be deleted from the UI. I don't think we should get into the habit of running manual scripts to work around application deficits.

@matthew-morris-cessda  I would say that we run the script for the last three translations. For the future, however, it would certainly be advisable to set up a function so that these issues no longer occur.
Please also let me know when the translations were deleted and the studies were removed from the CDC.

@matthew-morris-cessda and also please provide information or feedback regarding the mail about the problem with the CV Pipeline tool.

An error was reported when attempting to run the SQL statement:
Error 1267: Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='

That is not good. Stefan did not get an error message on the dev instance. @Stifo Can you please take a look at this.

I think this is a non-standard situation to delete everything for one specific language. It isn't on a 'daily' basis routine either. If implemented as a feature, it would be very dangerous as there is no undo mechanism in CVS. If a concept, version or vocabulary is deleted, it is gone and cannot be undo. As far as I know, this is how it's been ever since in CVS. I would rather not implement such feature.
Instead, the deletition could be reviewed as it's been changed due to the implementation of the new versioning system and the new workflow, which is bundle-based. Before, it was possible to delete any TL version as each TL had it's own versioning track. Now, everything is done within bundles and the versioning track is common for all TLs. Any modifications to the deletition process should be carefully considered.

Error 1267: Illegal mix of collations (utf8mb4_0900_ai_ci,IMPLICIT) and (utf8mb4_general_ci,IMPLICIT) for operation '='
I think this is a problem of the client connecting to the DB as the script does nothing with collation settings.

@Stifo Thank you again for your assessment of the translation and your reply. I agree that any change, i.e. the deletion of a translation, needs to be carefully considered. However, the question is why it worked in the development instance and what other options we have. Leaving the remaining three translations in CVS for a longer period of time (e.g. for consistency) is not an option.
However, if the problem cannot be solved in the short term, I am in favour of discussing other options at the next sprint meeting.
What I definitely don't want to do is hastily delete something and cause any damage to the other versions or vocabularies. @Stifo @matthew-morris-cessda What is your opinion on how to proceed? Should we discuss it at the next meeting at the beginning of September?


Renderless Component in Typescript

Version
2.6.10
Reproduction link
https://codepen.io/ruth-izang/pen/GRKPKGp
Steps to reproduce
just create a new vue project with typescript support, create a renderless component as a typescript file so eg. ProcessUser.ts using the Vue.extend style and just put the render function inside
What is expected?
I should be able to return anything via scopedSlots to a random parent and not show errors in vscode or during build
What is actually happening?
shows red squiggles in vscode and shows errors during build of project

encountered this when migrating a js based renderless component to typescript at work and the typescript version of the component just spits these errors:
(method) ComponentOptions<Vue, unknown, unknown, unknown, never[], Record<never,
any>>.render?
(createElement: CreateElement, hack: RenderContext<Record<never, any>>): VNode
No overload matches this call.
The last overload gave the following error.
Argument of type '{ render(): void; }' is not assignable to parameter of type
'ComponentOptions<Vue, DefaultData, DefaultMethods, DefaultComputed,
PropsDefinition<Record<string, any>>, Record<string, any>>'.
Types of property 'render' are incompatible.
Type '() => void' is not assignable to type '(createElement: CreateElement, hack:
RenderContext<Record<string, any>>) => VNode'.
Type 'void' is not assignable to type 'VNode'.ts(2769)
vue.d.ts(90, 3): The last overload is declared here.

both doing return this.$scopedSlots.default({}) or return h('div') work. Don't add the explicit return type, that way TS will pick up the right overload.
Please, next time consider using the forum, the Discord server or StackOverflow for questions first. But feel free to come back and open an issue if it turns out to be a bug 🙂

didn't specify a return type and I actually asked the question on stackoverflow https://stackoverflow.com/questions/58002254/renderless-vue-component-in-typescript but didn't seem to be getting anywhere. I don't know much but this seems strange as even without returning anything from the method it errors out and returning this.$scopedSlots.default({}) still gives errors. Ok can clear instructions be given about this for typescript? cos everywhere I have checked its been js tutorials or guidelines. Thank you for your help

got a solution to the problem, https://stackoverflow.com/questions/58002254/renderless-vue-component-in-typescript/58047657#58047657


MDX on React Native: 0,s.jsx is not a function (it is an Object)

I'm compiling my MDX to code without any problem, but when I'm trying to display it in React Native (Expo) I get following error, what should I do?
Code:
export default function Blog() {
  const page = getPage("test", "hello-world");

  return <MDXContent components={components} code={page?.body} />;
}

Error:

I'm sorry, but I don't have much experience with React Native, and I don't even know that MDX on React Native is a thing. I'm not sure if this can work. It would be nice if someone out there could help with this ticket.

Sure! I'm looking for some implementation of MDX in React Native and didn't find anything that works 😕


MINOR: [C++][Docs] Enhance document for RecordBatchReader::ReadNext

Rationale for this change

Enhance the document for RecordBatchReader::ReadNext
What changes are included in this PR?

Add an example for RecordBatchReader::ReadNext.
Are these changes tested?

No
Are there any user-facing changes?
No

@github-actions crossbow submit preview-docs

http://crossbow.voltrondata.com/pr_docs/42239/cpp/api/table.html#_CPPv4N5arrow17RecordBatchReader8ReadNextEPNSt10shared_ptrI11RecordBatchEE

Hmmm at least this looks better than before

@github-actions crossbow submit preview-docs


Re-connect nodes?

Greetings,
Exploring your program and noticed a couple things, probably related to my ignorance. I have high hopes your systems capability grows.

You can remove edges on either side of a node, which then floats away. I was expecting it to delete itself.
One cannot reconnect nodes, ergo, move connections or trim excessive nodes.
The taxa I am working with exhibit IBD / IBT and the number of nodes needed to connect clades is on the order of 50-100.  This looks like a horrible mess of spaghetti on screen.  The interface lags noticeably.
Support collapsing edges/nodes ala hash marks, or numeric?
The detangling process doesn't go to completion; it reaches a stable state where charges balance out in loops.  What I did figure out is decreasing charge to ~ -350, decreasing edge length, decreasing elasticity to ~80, and increasing gravity to 1.4.  Then it detangled pretty well. It worked so well it might become a singularity if I increased gravity any further.
Can you add gis support? :)

Warm Regards,
Nick

Hi Nick
tcsBU was side project when one of my MSc students needed to produce TCS networks as fast as possible, given the rate at which new (and highly dissimilar) sequences were being obtained for what we thought was a single species! At the time it fulfilled its job! I decided to open-source the code precisely because it may be useful to others. People can use it as it is or pick the code and modify it to fit their own needs. All this to say that currently I only have time to fix minor bugs or to do relevant changes (like the last one I did, suggested by EriFa a few days ago, changing the way how hapolotypes are scaled). Regarding your questions:

You can remove edges on either side of a node, which then floats away. I was expecting it to delete itself.
Removal of nodes and edges is working as intended. It's something to "fix" rapidly the network when you have double pathways towards an haplotype. But you are on your own. It should be used with caution. Double or multiple pathways are produced by TCS itself, meaning that it had no way to find out which was more parsimonious. I remember reading a discussion about this issue somewhere, but I cannot locate the references right now...

One cannot reconnect nodes, ergo, move connections or trim excessive nodes.
Reconnecting loose nodes can be implemented. However it's not easy for me to implement this at the time as it involves using the d3.js library which has a rather non-intuitive API (at least for me). Remember that many of these problems can be corrected later on using a vector drawing program (such as inkscape) editing the final SVG graph.

The taxa I am working with exhibit IBD / IBT and the number of nodes needed to connect clades is on the order of 50-100. This looks like a horrible mess of spaghetti on screen. The interface lags noticeably.
This may be a problem, and I would appreciate if you could provide more details. A lagging interface may be a consequence of many things... What do you mean by "lagging"? Is it the overall UI that does not respond? Does it take a while to arrange the haplotypes in a 2D space? What browser are you using? How many different haplotypes? In our case, with 250 different haplotypes, the overall response was quite good. Note that the forced graph is computed by d3.js, a third party library which I cannot modify or change (of course, if we spot a bug there, we should contact the developers).

Support collapsing edges/nodes ala hash marks, or numeric?
Ah, this would be a nice improvement, I agree. However, it is not trivial to implement, as it would need to change the internal structure of the graph and eventually store the remaining hidden parts elsewhere to be used (reopened) later on. It's something to be implemented if I find the time to do it. If anyone knows javascript and wants to code this, please do so! Everybody will appreciate the help.

The detangling process doesn't go to completion; it reaches a stable state where charges balance out in loops. What I did figure out is decreasing charge to ~ -350, decreasing edge length, decreasing elasticity to ~80, and increasing gravity to 1.4. Then it detangled pretty well. It worked so well it might become a singularity if I increased gravity any further.
I suppose that this is very case-specific. As far as I remember there is no one-algorithm-fits-all-cases in network layout optimizations. I opted for the force-directed graphs implemented in d3.js against other solutions offered by the same library, and explicitly exposed the "parameters" (gravity, charge, etc) of the algorithm because I knew that in some cases people would need to tweak them for their very specific scenarios! Apparently I made the right choice. For many of the networks we produce here the "default" parameters work quite well.

Can you add gis support? :)
Please enlighten me! What do you mean by GIS (Geographic Information Systems) support?

Best regards
Antonio


shadedrelief() fails because of changes in numpy.concatenate

In basemap/__init__.py in Line 4151 the array self._bm_lons is created with one dimension. In line 4169 it is concatenated to itself, but not with dimension 0 but with dimension 1.
Since numpy version 1.10 this is an error.

Thank you for the bug report. If you'd like, could you make a PR with this
fix and I'll merge it in?
On Mon, Oct 12, 2015 at 8:32 AM, Robert Redl<EMAIL_ADDRESS>wrote:

In basemap/init.py in Line 4151 the array self._bm_lons is created
with one dimension. In line 4169 it is concatenated to itself, but not with
dimension 0 but with dimension 1.
Since numpy version 1.10 this is an error.
—
Reply to this email directly or view it on GitHub
https://github.com/matplotlib/basemap/issues/211.

Uhm, I think you made a merge request against your own fork rather than against this one?


Let there be clouds, community function

123 cloudy nodes, with golden ratio

This is nice, I merged it with some changes to keep your variables local but nothing to worry about! I don't know if we can use it for name tags because there's not really a clean area in the centre, but I can just take the produces outline for those purposes, perhaps


AES ECB should be only used on real random AES size blocks.

No padding, no not stretched messages. Only derived messages or randoms at the exact block size.

Why? 😱 I need my padding back!! How I'm suppose to use ECB without padding? I don't care about security, I need it just for educational purposes.

I'm working on an API rewrite, there are several issues with the current one :/
The update comes in the next few weeks :)


[ PATCH ] 0.12.x with PR 3081 terse webhooks

Cherry picks https://github.com/hyperledger/aries-cloudagent-python/pull/3081 commits for the 0.12.x patch release.
Need to run integration tests locally. There was no merge conflicts.

I don't understand why snyk is complaining about some sort of merge conflict?

Passed all the GHA integration tests locally.

Any ideas on the the Snyk failure?
Do we need an 0.12.2rc2 or just include this and declare it final?

I think the snyk scan just has issues with dockerfiles scanned for main and then re-scanned on a lts branch and says there's a merge conflict because the bas image is different. I marked it as passed.


remove duplicates and sort abc timezones.py

Hi m0rp43us, I remove duplicates from the timezones file, then sorted entries alphabetically. Please consider PR if you find it useful.

Sure thing.
Looks good to me.


persona "Pc operator" dbug error.

Hi there, I really like the idea of the pc operator persona. However I am stuck while trying to make it ruin my pc ;-)
Here is the error msg:
--> Step started:Planning operation
Traceback (most recent call last):
File "E:\lol9\lollms-webui\zoos\personalities_zoo\control\pc_operator\scripts\processon
plan = self.plan_with_images(prompt, [sc_path],
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\lol9\lollms-webui\lollms_core\lollms\personality.py", line 2385, in plan_withs
gen = self.generate_with_images(prompt, images, max_answer_length).strip().replace(")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "e:\lol9\lollms-webui\lollms_core\lollms\personality.py", line 1846, in generate_s
return self.personality.generate_with_images(prompt, images, max_size, temperature, )
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: AIPersonality.generate_with_images() got multiple values for argument 'debug'
--> Step ended:Planning operation
Finished executing the workflow
I hope you can help. I really want pc operator to take over my PC ;-)

Thanks for pointing out this problem.
The pc operator persona requires using GPT4-vision model. It is the only model capable of doing this (for now). Other models like llava or backllava are not yet up to the task :)
They will probably become better over time.


Update popper first item autofocus to only happen in keyboard mode

For accessibility, we want the poppers to autofocus on the first item when they are opened. This makes most sense for when you are using the keyboard to get around. However after starting to replace dropdowns in the app, it looks super confusing to autofocus the first item when you click to open it. So I updated the autofocus to only happen when you trigger open with Enter/Space, instead of any time its opened.
@Addepar/ice @billylittlefield

Should we write a test to cover this?

@pzuraq added tests!

Alright, looks good!


[FEATURE REQUEST] Test Epiphany installation on top of AzBI module

Is your feature request related to a problem? Please describe.
We need to test that installation of Epiphany with "any" provider on top of Azure Basic Infrastructure module.
Describe the solution you'd like
Option basic:

run AzBI module to create machines
manually create cluster.yml configuration file for epicli
run epicli in several configurations

Describe alternatives you've considered
Option which would make me happy:

run AzBI module to create machines
prepare basic epicli module
prepare "init" command to generate config using state file
prepare "apply" command to generate cluster.yml file using config and to run epicli command using this

Additional context
No additional context

@mkyc this config example may help a lot :+1:
kind: epiphany-cluster
title: "Epiphany cluster Config"
name: aks-test
specification:
  name: aks-test
  admin_user:
    name: ubuntu
    key_path: <your-key-path-here>
  components:
    kubernetes_master:
      count: 0
    kubernetes_node:
      count: 0
    logging:
      count: 0
    monitoring:
      count: 0
    kafka:
      count: 0
    postgresql:
      count: 1
      machines:
        - default-pg1
    load_balancer:
      count: 0
    standalone_repository:
      count: 1
      configuration: default
      machines:
        - default-repo1
    rabbitmq:
      count: 0
provider: any
---
kind: configuration/feature-mapping
title: Feature mapping to roles
name: aks-test
specification:
  roles_mapping:
    standalone_repository:
      - repository
      - image-registry
      #- helm
      - firewall
      - applications
provider: any
---
kind: infrastructure/machine
name: default-repo1
specification:
  hostname: <your-hostname-here>
  ip: <your-public-ip-here>
provider: any
---
kind: infrastructure/machine
name: default-pg1
specification:
  hostname: <your-hostname-here>
  ip: <your-public-ip-here>
provider: any
---
kind: configuration/applications
title: "Kubernetes Applications Config"
name: default
specification:
  applications:

## --- ignite ---

  - name: ignite-stateless
    enabled: true
    image_path: "apacheignite/ignite:2.5.0" # it will be part of the image path: {{local_repository}}/{{image_path}}
    use_local_image_registry: false
    namespace: ignite
    service:
      rest_nodeport: 32300
      sql_nodeport: 32301
      thinclients_nodeport: 32302
    replicas: 1
    enabled_plugins:
    - ignite-kubernetes # required to work on K8s
    - ignite-rest-http

# Abstract these configs to seperate default files and add
# the ability to add custom application roles.

## --- rabbitmq ---

  - name: rabbitmq
    enabled: true
    image_path: rabbitmq:3.8.3
    use_local_image_registry: false
    #image_pull_secret_name: regcred # optional
    service:
      name: rabbitmq-cluster
      port: 30672
      management_port: 31672
      replicas: 2
      namespace: queue
    rabbitmq:
      #amqp_port: 5672 #optional - default 5672
      plugins: # optional list of RabbitMQ plugins
        - rabbitmq_management
        - rabbitmq_management_agent
      policies: # optional list of RabbitMQ policies
        - name: ha-policy2
          pattern: ".*"
          definitions:
            ha-mode: all
      custom_configurations: #optional list of RabbitMQ configurations (new format -> https://www.rabbitmq.com/configure.html)
        - name: vm_memory_high_watermark.relative
          value: 0.5
      cluster:
        #is_clustered: true #redundant in in-Kubernetes installation, it will always be clustered
        #cookie: "cookieSetFromDataYaml" #optional - default value will be random generated string

## --- auth-service ---

  - name: auth-service # requires PostgreSQL to be installed in cluster
    enabled: true
    image_path: jboss/keycloak:9.0.0
    use_local_image_registry: false
    #image_pull_secret_name: regcred
    service:
      name: as-testauthdb
      port: 30104
      replicas: 2
      namespace: namespace-for-auth
      admin_user: auth-service-username
      admin_password: PASSWORD_TO_CHANGE
    database:
      name: auth-database-name
      #port: "5432" # leave it when default
      user: auth-db-user
      password: PASSWORD_TO_CHANGE

## --- pgpool ---

  - name: pgpool # this service requires PostgreSQL to be installed in cluster
    enabled: true
    image:
      path: bitnami/pgpool:4.1.1-debian-10-r29
      debug: false # ref: https://github.com/bitnami/minideb-extras/#turn-on-bash-debugging
    use_local_image_registry: false
    namespace: postgres-pool
    service:
      name: pgpool
      port: 5432
    replicas: 3
    pod_spec:
      affinity:
        podAntiAffinity: # prefer to schedule replicas on different nodes
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 100
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: app
                      operator: In
                      values:
                        - pgpool
                topologyKey: kubernetes.io/hostname
      nodeSelector: {}
      tolerations: {}
    resources: # Adjust to your configuration, see https://www.pgpool.net/docs/41/en/html/resource-requiremente.html
      limits:
        # cpu: 900m # Set according to your env
        memory: 176Mi
      requests:
        cpu: 250m # Adjust to your env, increase if possible
        memory: 176Mi
    pgpool:
      # https://github.com/bitnami/bitnami-docker-pgpool#configuration + https://github.com/bitnami/bitnami-docker-pgpool#environment-variables
      env:
        PGPOOL_BACKEND_NODES: autoconfigured # you can use custom value like '0:pg-node-1:5432,1:pg-node-2:5432'
        # Postgres users
        PGPOOL_POSTGRES_USERNAME: epi_pgpool_postgres_admin # with SUPERUSER role to use connection slots reserved for superusers for K8s liveness probes, also for user synchronization
        PGPOOL_SR_CHECK_USER: epi_pgpool_sr_check # with pg_monitor role, for streaming replication checks and health checks
        # ---
        PGPOOL_ADMIN_USERNAME: epi_pgpool_admin # Pgpool administrator (local pcp user)
        PGPOOL_ENABLE_LOAD_BALANCING: true # set to 'false' if there is no replication
        PGPOOL_MAX_POOL: 4
        PGPOOL_POSTGRES_PASSWORD_FILE: /opt/bitnami/pgpool/secrets/pgpool_postgres_password
        PGPOOL_SR_CHECK_PASSWORD_FILE: /opt/bitnami/pgpool/secrets/pgpool_sr_check_password
        PGPOOL_ADMIN_PASSWORD_FILE: /opt/bitnami/pgpool/secrets/pgpool_admin_password
      secrets:
        pgpool_postgres_password: PASSWORD_TO_CHANGE
        pgpool_sr_check_password: PASSWORD_TO_CHANGE
        pgpool_admin_password: PASSWORD_TO_CHANGE
      # https://www.pgpool.net/docs/41/en/html/runtime-config.html
      pgpool_conf_content_to_append: |
        #------------------------------------------------------------------------------
        # CUSTOM SETTINGS (appended by Epiphany to override defaults)
        #------------------------------------------------------------------------------
        # num_init_children = 32
        connection_life_time = 900
        reserved_connections = 1
      # https://www.pgpool.net/docs/41/en/html/auth-pool-hba-conf.html
      pool_hba_conf: autoconfigured

## --- pgbouncer ---

  - name: pgbouncer
    enabled: true
    #https://github.com/brainsam/pgbouncer/tree/release/1.12
    image_path: brainsam/pgbouncer:1.12
    init_image_path: bitnami/pgpool:4.1.1-debian-10-r29 #TODO: make reference to pgpool section
    use_local_image_registry: false
    namespace: postgres-pool
    service:
      name: pgbouncer
      port: 5432
    replicas: 2
    resources:
      requests:
        cpu: 250m
        memory: 128Mi
      limits:
        cpu: 500m
        memory: 128Mi
    pgbouncer:
      env:
        DB_HOST: pgpool.postgres-pool.svc.cluster.local #pgpool service name
        DB_LISTEN_PORT: 5432
        LISTEN_ADDR: "*"
        LISTEN_PORT: 5432
        AUTH_FILE: "/etc/pgbouncer/auth/users.txt"
        AUTH_TYPE: md5
        MAX_CLIENT_CONN: 150
        DEFAULT_POOL_SIZE: 25
        RESERVE_POOL_SIZE: 25
        POOL_MODE: transaction
provider: any

Also copying kubeconfig to build/aks-test/ location is required. :+1:

I'd suggest deploying basic-infra with public ips enabled for the purpose of this test. :+1:

Test results:

:+1:😍

Is it tested with latest develop commits in epiphany repo?

Is it tested with latest develop commits in epiphany repo?

66a450fb6effa223b855a2864b9fbbb6735c5ee0 this one was used, the latest one was failing.

...the latest one at the time 0632f7f was failing :(

It was failing because in my IDE I used older devcontainer image. After rebuild it seems to be working fine. :+1:


Fix some warnings from clang 10 in params.c

clang 10 was emitting warnings similar to the following from params.c:
crypto/params.c:411:40: error: implicit conversion from 'long' to 'double' changes value from<PHONE_NUMBER>854775807 to<PHONE_NUMBER>854775808 [-Werror,-Wimplicit-int-float-conversion]
            if (d >= INT64_MIN && d <= INT64_MAX && d == (int64_t)d) {

The comparison against INT64_MAX is unnecessary. Instead we can simply check that
the value round trips successfully.
Fixes #13365

I have some doubts that the round trip check is sufficient. I suspect that there could be edge cases where the conversion from double to int isn't exact but gets rounded back to the correct value.

And why does a range check improve that situation?

For values inside the range, conversion will be exact.  The source double carries 53 bits of mantissa.  These fit into a 64 bit integer just fine.
My concerns about about values outside the range check.  With a fresher mind, I'm unable to come up with an obvious failure case.  I still think we're best avoiding this situation: it's undefined behaviour in C.  It's also a fairly expensive operation whereas a pair of double compares is cheap.

Some platforms like arm only have a 32 bit double, so a 24 bit
mantissa.
Using INT64 is clearly wrong, it's being converted from a long.
A problem like this was previously fixed in
082c041b4233b17b80129d4ac6b33a28014442b0

Thanks @kroeckx, that's the one.  Int64 is correct I think.  The int/long/size_t/time_t differences have been resolved by the time this stuff runs.  Everything should either be 32 or 64 bit and signed or unsigned.

I'm wondering why we need the OSSL_PARAM_REAL support in these functions anyway? Do we ever actually use this anywhere?
Anyway, @paulidale since you seem to have a pretty clear idea about what needs to be done - do you want to take this PR over?

Okay, I'll take this one on.


Helm charts for deploying identity on K8s cluster

Child of #605
Depends on #630

PR for this also has changes for #721


Adjust x-forwarded-for

There are still a few issues with the header:

Sometimes <IP_ADDRESS> is passed
sometimes the cloudflare IP is passed
the lbrytv server ip is always passed along with the original IP

this causes issues in the approval process and in the duplicates matching, they should be addressed.

These mess with our stats and I have to delete them every few hours. Please fix if it's not too hard.

I started logging what IPs I'm sending with the auth requests and <IP_ADDRESS> is not among them. The problem seems to be on the internal-apis side.


New Maven RemoveDuplicateDependencies recipe

For now the recipe can only remove duplicates, but in the future it could maybe also sort dependencies (only by scope since sorting dependencies within a scope may have undesired effects due to Maven's dependency resolution).
Fixes #2381

This is still work in progress. Not sure if it really makes sense to call this thing OrganizeDependencies. Also for sure more tests are required.

Great to see you got started on this one. Some general comments to give you some immediate feedback, before those with more experience can chime in from their timezones.
Naming wise I'd got with something like RemoveDuplicateDependencies; typically recipes are fairly specific to a single use case, which makes it easy to combine them in yaml files or through doAfterVisit/doNext. Specifically in this case we'd like to remove duplicate dependencies after swapping another dependency, but perhaps not sort dependencies at the same time, for a minimal changeset that's easier to review. Sorting can then become a separate recipe, with both perhaps combined in a third best practices (yaml) recipe.
I don't have any experience with Maven recipes yet, but if they are like the visitors we have for Java, you might be able to only implement visitTag; alternating between returning any dependency tags you've not seen, and returning null when seen before. That would also ensure there's not any inadvertent changes to the order of the tags, as you only drop affected tags. Again, not entirely sure returning null would work for Maven recipes, but perhaps it should. :)
Testing wise it might be good to have some isolated tests where there's differences in terms of <scope> or <classifier>, as those could give false positives in terms of duplicates. I'm not saying there's an issue in the current implementation, but it might be good to cover that with tests.
Typically we override the estimated effort on recipes as well; that helps to give a total on the amount of time saved through automation, which is a nice metric to have.
I'm doubting if there's any applicability tests we could add to the recipe; I imagine they could duplicate some of the logic to find duplicated dependencies. Perhaps a very minimal applicability test can check for the presence of dependencies at all, so we can exclude some parent pom.xmls for instance.
Hope this helps & thanks again for picking this up!

Thanks for your elaborate feedback. I will try to take a look at this early next week again.

A few more remarks / questions:

My thinking was to use options like removeDuplicates, sortDependencies, etc. to control the behavior of the recipe. But since you are saying that this would inconsistent with how other recipes are divided up, I will go with RemoveDuplicateDependencies as you propose (and remove the removeDuplicates option)
To me it looks like there should basically for the same reason also be a separate recipe to do the same for managed dependencies, although there I think the pattern is a bit less clear and I also can't really think of a reason when you would only remove duplicates from either the managed or the actual dependencies
Regarding scope and classifier. AFAIK there should only be one dependency per type and classifier. So if there is a second dependency with the same type and classifier (even though scope or version may be different), it should be considered a duplicate
I will take a look at if I see examples of visitTag I can study
Sure, I can add a simple applicability test

@timtebeek Sorry about the many small amendments. From my point of view I am now done with the PR. Please let me know if there is something more that I should change.

No worries at all, glad to see you're working on this. I'm tagging @tkvangorder for review, as he chimed in on slack for this one as well.

I definitely think having a separate recipe to sort dependencies makes sense. We could use this recipe when adding/changing dependencies (in addition to removing them)
And you are correct, we don't have a solid pattern for combining/separating operations on dependencies and managed dependencies. I think it is ok to combine these two concepts for your current recipe.

@tkvangorder Is there anything that still needs changing?
I ran the tests locally and couldn't get them to fail, so I now rebased the commit and pushed it again. If the build fails again in CI, I will take a closer look.


[5.6] Add builder/grammar support for row values in where condition

Support for "row values" is mostly useful when implementing pagination with keysets aka seek method.
Well known pagination with offset/limit has almost linearly bad performance characteristics with every "page" turned. They can't make use of an index to efficiently jump to the result page and thus have to always read from the beginning.
An alternative way is to define predicates to jump to the desired page which can make use of indices. Characteristics of such paginations are:

no indicator how many pages; best used with "endless scrolling/loading" approaches
usually stable pages (depending on predicates). Insertion of data on previous pages will not alter the result of the current page

This PR implements the low-level building block. Example:

instead of ->where(…)->orderBy(…)->offset(100)->limit(10)
you could use ->where(…)->whereRowValues(['last_update', 'ticket_numbner'], '<', ['2017-12-15 23:00:00', 123])->orderBy(…)->limit(10)
(iff the business logic of your application allows it)

The benefits/performance characteristics as well as in-depth examples how and why this works are well described at:

http://use-the-index-luke.com/sql/partial-results/fetch-next-page
http://use-the-index-luke.com/blog/2013-07/pagination-done-the-postgresql-way
https://blog.jooq.org/2013/11/18/faster-sql-pagination-with-keysets-continued/

Note

It currently is already possible to achieve this with ->whereRaw() but after reading http://use-the-index-luke.com/no-offset I figured a direct support for this could be welcome

$builder->whereRaw('(last_update, ticket_number) < (?, ?)', […, …]);

The naming RowValues may not be obvious to related to this "keyset pagination" or "seek method". But OTOH this seems to be the term describing this particular syntax (I'm not an expert on this topic), that's why I choose it instead of ->whereSeek or ->whereKeysetPagination…
This may be left open for the future to directly support this via something like ->paginateKeyset() (just thinking out loud)
Not every database out there supports this syntax. PostgresSQL supports it since a long time; MySQL does but with caveats, etc. There's some information at http://use-the-index-luke.com/sql/partial-results/fetch-next-page about it (not sure if it is accurate/up2date).
There are ways to emulate this behaviour for databases not supporting this syntax (again, see http://use-the-index-luke.com/sql/partial-results/fetch-next-page), but this is out of the scope of this PR:

SELECT *
  FROM ( SELECT *
           FROM tickets
          WHERE last_update <= ?
            AND NOT (last_update = ? AND number >= ?)
          ORDER BY last_update DESC, number DESC
       )
 WHERE rownum <= 10

So this implements a partially supported syntax for something that is already fully supported in the "full" syntax?

Thanks for the feedback!
Guess it the depends on POV and expectations. Basically, using DB::raw() you can write almost any SQL statement without the need for any of the existing where…-shortcuts 🤷♀ ?
OTOH (although I'm not trying to convince/evangelize anyone here), when I implemented this recently I wished I had a ready-made approach for, because why not; makes code more readable etc.
I think it may help raise awareness also a bit for developers who may not know there are alternative ways to offset/limit which have better performance characteristics (iff the business logic supports it).
But maybe you're right because not every database out there might support that syntax? Not sure how this is properly dealt with in the Builder though. Feedback for that welcome!

I could also imagining this as a building block for a future paginator extension which makes use of this technique instead of offset/limit

According to SQL Feature Comparison, SQLServer does not support Tuple Comparison syntax. So
(a, b, c) > (1, 2, 3)

should be rewritten to
a=1 and b=2 and c>3
or
a=1 and b>2
or
a>1

If you use SQLServer, still lampager/lampager-laravel: Rapid pagination for Laravel may help implementing cursor pagination.

@mpyw probably best to attempt PR's. Merged PR's are never revisited here.

@driesvints Yes I know, I actually agree with the PR method. Just writing reference information for minor users.


Getting the correct answer via recursion, but the system won't accept

Challenge Bonfire: Roman Numeral Converter has an issue.
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.106 Safari/537.36.
Please describe how to reproduce this issue, and include links to screenshots if possible.
I run it and get the solution (at the very least, convert(5) results in 'V'). I've tried returning both a string and an array, and it accepts neither. Is there a rule against using recursion that I don't know of?
Thanks!
My code:
 var arr = [];

function convert(num) {

  if(num > 1000){
    arr.push('M');
    num -= 1000;
    return convert(num);
  }

  if(num >= 500){
    arr.push('D');
    num -=500;
    return convert(num);
  }

  if(num >= 100){
    arr.push('C');
    num -=100;
    return convert(num);
  }

  if(num >= 50){
    arr.push('L');
    num -=50;
    return convert(num);
  }

  if(num >= 10){
    arr.push('X');
    num -=10;
    return convert(num);
  }

  if(num >= 5){
    arr.push('V');
    num -=5;
    return convert(num);
  }

  if(num >= 1){
    arr.push('I');
    num -=1;
    return convert(num);
  }

  var total = arr.join('');

 return arr;
}

convert(5);

You are initializing arr globally, which means you will not start with an empty array the second time the function is run and will return a wrong result. In the future please visit the Help Chat to confirm your issue is a bug.
Thanks and happy coding!

Even with the variable initialized within the loop it wasn't working - I had moved it outside as a test to see if the system would accept it that way (I was trying anything I could think of). I forgot to change that back before posting here.
Eventually I tried through a different browser with the same code and it worked, so it must have just been a weird cache issue. In any case, I got past the module.
Thanks for your input! Much appreciated :)


Sorin theme causes shell to hang.

My shell gets into a state where I can't do anything, I have to close the window and open a new shell.
Any help debugging/fixing would be much appreciated.

OSX 10.10.3
github.com/breerly/dotfiles
prezto - https://github.com/sorin-ionescu/prezto/tree/a275db55d6fdc8bf92a4722e95196bbfbf44cfae

Some other notes:

able to recreate by sending a bunch of ENTER keys, after like 4 seconds it hangs
switching to bash, I'm unable to reproduce in any way
disabling prezto by removing the initialization from zshrc, I'm unable to reproduce in any way

Looks like it might be plugin related? If I narrow the plugins down to just these, I can still reproduce:
zstyle ':prezto:load' pmodule \
   'environment' \
   'terminal' \
   'editor' \
   'prompt'`

I think I found it, it's the sorin theme. I can reproduce with this config:
zstyle ':prezto:load' pmodule \
   'environment' \
   'terminal' \
   'editor' \
   'prompt'`

zstyle ':prezto:module:prompt' theme 'sorin'

But if I change the theme to minimal, it's fixed.

I cannot reproduce this.

I have the same problem, no idea if I can provide anything to help debug it though.

same thing as @breerly

Same problem, can reproduce by keeping "enter" pressed

With a fresh install and an empty .zshrc, zsh 5.0.7, linux 4.0.4 on Arch Linux

I encountered this issue a lot while working on improving the async functionality of prompt pure. There is definitely a problem with ZSH and sending kill-signals. For example, USR1, INT, etc, all can result in a deadlock of ZSH. I've tried debugging the issue with different debugging tools but to no avail.
The only safe kill-signal to send, I have found, is WINCH (window resize).

Again, I cannot reproduce this.

Just to report, I can't reproduce this either.
I tried keeping enter pressed for a few seconds (probably about 100 returns) it did slow down and took a few second to catch up after I released enter but it didn't hang.

https://github.com/mafredri/zsh-async, used by https://github.com/sindresorhus/pure, uses WINCH as well. Does it not get notified by terminal resizes?

@stefanosc I recommend you try it inside a git repository. And I know it can be a bit tedious, but keep enter pressed for minimum of 1 minute. This happens very sporadically. Sometimes it can happen on the first try, sometimes it can take 5 minutes of pressing enter.
@sorin-ionescu it does get notified by window resizes, but it's not really an issue, since no async task has completed, no callback function will be called.

@mafredri I did try it inside a git repo.
I just tried again and held enter for about 1 minute. No hanging. It did take longer to become responsive again though (probably about 1 minute or longer)

@stefanosc You can also try holding Ctrl+C instead of return. This is interesting, because I can reproduce it with a clean prezto configuration instantly (both with OS X 10.10.3 ZSH and Homebrew ZSH):

I tried again with Ctrl+C no delay, no hanging of any kind. the terminal
is immediately responsive as soon as I release the keys.
I am on OSX10.10.3
brew zsh 5.0.7

Do you have any custom hooks? chpwd, precmd etc that might prevent the hang? I'm pretty sure it's some kind of race condition which happens when Zsh receives a kill signal while executing other commands. Do you use the OSX Terminal app or a custom one? I use Terminal (also TotalTerminal, which I've tried disabling and can still reproduce).

@mafredri no custom hooks. I use iTerm2 I don't want to test Terminal because I had set it up specifically not to use zsh / prezto (I needed to work with a team and have certain bash config...)

@stefanosc roger that, then this might be a Terminal + zsh specific issue.

yes it must be something spefic to some environments, it would be good
to spot that as it seems somewhat common. If I notice anything else I
will post again.

I am also using iTerm2. I will try Terminal.

I have not been able to replicate it in Terminal.

I am running arch on latest prezto pulled from git today and am able to consistently replicate this issue, running termite and zsh-5.0.7-2 from extra

@sorin-ionescu @stefanosc might it be that you have enabled some options / settings that prevents this issue from surfacing? I have tested with completely clean setups (e.g. only prezto default modifications) and it happens in both iTerm2 and Terminal, I can't really think of any other environment settings that could affect this. Just out of curiosity, is your $TERM set to xterm-256color (mine is, per default)?

zpreztorc
--- /Users/sorin/.zprezto/runcoms/zprofile	2015-02-23 12:12:37.000000000 -0500
+++ /Users/sorin/.zprofile	2015-05-24 14:17:59.000000000 -0400
@@ -37,12 +37,15 @@
 typeset -gU cdpath fpath mailpath path

 # Set the the list of directories that cd searches.
-# cdpath=(
-#   $cdpath
-# )
+cdpath=(
+  $HOME/Developer
+  $cdpath
+)

 # Set the list of directories that Zsh searches for programs.
 path=(
+  $HOME/.tilde/{bin,sbin}
+  /opt/homebrew/{bin,sbin}
   /usr/local/{bin,sbin}
   $path
 )
@@ -60,8 +63,19 @@
 # Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
 if (( $#commands[(i)lesspipe(|.sh)] )); then
   export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
+  # export LESSOPEN="| /Users/sorin/Downloads/less-458/debian/lesspipe %s";
+  # export LESSCLOSE="/Users/sorin/Downloads/less-458/debian/lesspipe %s %s";
+
+  # if (( $+commands[pygmentize] )); then
+    export LESSCOLORIZER='pygmentize -f terminal256 -O bg=dark,style=native -g'
+    export LESSCOLORIZER='source-highlight --outlang-def=esc256.outlang --style-file=esc256.style -i'
+  # fi
 fi

+# if (( $+commands[source-highlight-esc.sh] )); then
+#   export LESSOPEN="| /usr/bin/env source-highlight-esc.sh --infer-lang %s 2>&-"
+# fi
+
 #
 # Temporary Files
 #
@@ -72,3 +86,28 @@
 fi

 TMPPREFIX="${TMPDIR%/}/zsh"
+
+#
+# Go
+#
+
+godir="$HOME/Developer/go"
+if [[ -d "$godir" ]]; then
+  typeset -gxUT GOPATH gopath
+  gopath=($godir $gopath)
+  path=("$godir/bin" $path)
+fi
+unset godir
+
+#
+# Git
+#
+
+export GIT_EDITOR="$commands[$EDITOR]"
+
+#
+# Homebrew
+#
+export HOMEBREW_PREFIX="$HOME/.homebrew"
+export HOMEBREW_CACHE="$HOME/.cache/Homebrew"
+export REPOSITORY="https://github.com/Homebrew/homebrew"

zprofile
--- /Users/sorin/.zprezto/runcoms/zprofile	2015-02-23 12:12:37.000000000 -0500
+++ /Users/sorin/.zprofile	2015-05-24 14:17:59.000000000 -0400
@@ -37,12 +37,15 @@
 typeset -gU cdpath fpath mailpath path

 # Set the the list of directories that cd searches.
-# cdpath=(
-#   $cdpath
-# )
+cdpath=(
+  $HOME/Developer
+  $cdpath
+)

 # Set the list of directories that Zsh searches for programs.
 path=(
+  $HOME/.tilde/{bin,sbin}
+  /opt/homebrew/{bin,sbin}
   /usr/local/{bin,sbin}
   $path
 )
@@ -60,8 +63,19 @@
 # Try both `lesspipe` and `lesspipe.sh` as either might exist on a system.
 if (( $#commands[(i)lesspipe(|.sh)] )); then
   export LESSOPEN="| /usr/bin/env $commands[(i)lesspipe(|.sh)] %s 2>&-"
+  # export LESSOPEN="| /Users/sorin/Downloads/less-458/debian/lesspipe %s";
+  # export LESSCLOSE="/Users/sorin/Downloads/less-458/debian/lesspipe %s %s";
+
+  # if (( $+commands[pygmentize] )); then
+    export LESSCOLORIZER='pygmentize -f terminal256 -O bg=dark,style=native -g'
+    export LESSCOLORIZER='source-highlight --outlang-def=esc256.outlang --style-file=esc256.style -i'
+  # fi
 fi

+# if (( $+commands[source-highlight-esc.sh] )); then
+#   export LESSOPEN="| /usr/bin/env source-highlight-esc.sh --infer-lang %s 2>&-"
+# fi
+
 #
 # Temporary Files
 #
@@ -72,3 +86,28 @@
 fi

 TMPPREFIX="${TMPDIR%/}/zsh"
+
+#
+# Go
+#
+
+godir="$HOME/Developer/go"
+if [[ -d "$godir" ]]; then
+  typeset -gxUT GOPATH gopath
+  gopath=($godir $gopath)
+  path=("$godir/bin" $path)
+fi
+unset godir
+
+#
+# Git
+#
+
+export GIT_EDITOR="$commands[$EDITOR]"
+
+#
+# Homebrew
+#
+export HOMEBREW_PREFIX="$HOME/.homebrew"
+export HOMEBREW_CACHE="$HOME/.cache/Homebrew"
+export REPOSITORY="https://github.com/Homebrew/homebrew"

I have not upgraded to the latest Mac OS X. Maybe this is a 10.10 problem.

@sorin-ionescu This is also occuring in arch linux, i don't think it would be a problem specific to OSX. Which version of zsh are you running ?

I confirm this issue.
OS X 10.10.4
iTerm2 - Build 2.9.20150530-nightly
Prezto up to date
zsh 5.0.7 (x86_64-apple-darwin14.0.0)

The duplicated prompt seems to be an iTerm2 v2.9 rendering problem. It happens to me as well.

Same issue here after updating to the latest version of zprezto

Don't know if it will help to reproduce but I noticed doing a fresh install after I did chsh zsh, I closed terminal completely and on re-opening I was getting the hanging prompt. I did a fresh install again and instead of closing the Terminal app after the chsh command I just opened a new window. I did not experience any hanging.

I have seen the double prompt in Terminal also. All these issues started after I pulled the latest prezto code down today

Can you use the theme pure for a while and see if you get double prompt as well?

@sorin-ionescu
changed to 'pure' in my zpreztorc:
+zstyle ':prezto:module:prompt' theme 'pure'
now getting:
~ ❯ cd dotfiles                                                                              19:14:39
prompt_pure_async_tasks:14: command not found: async_flush_jobs
prompt_pure_async_tasks:28: command not found: async_job
prompt_pure_async_tasks:38: command not found: async_job

You need to pull latest master of prezto
On May 31, 2015 3:15 AM, "Greg Sierλnski"<EMAIL_ADDRESS>wrote:

@sorin-ionescu https://github.com/sorin-ionescu
changed to 'pure' in my zpreztorc:
+zstyle ':prezto:module:prompt' theme 'pure'
now getting:
~ ❯ cd dotfiles 19:14:39
prompt_pure_async_tasks:14: command not found: async_flush_jobs
prompt_pure_async_tasks:28: command not found: async_job
prompt_pure_async_tasks:38: command not found: async_job
—
Reply to this email directly or view it on GitHub
https://github.com/sorin-ionescu/prezto/issues/888#issuecomment-107102931
.

Oddly using 'sorin' theme if I kill the terminal and start it up fresh, I get the double prompt on initial startup. Any new terminal windows I open after work just fine.

@sorin-ionescu Switching to pure does seem to stop the double prompt from occurring on opening of Terminal

For me, it occurs randomly, not when opening the Terminal.

@sorin-ionescu It is totally random for me, but pretty frequent, changed themes for now, also, If i do '$ prompt -p sorin' it closes termite.

just wanted to confirm I do get the double prompt too randomly, but not very frequently. if I hit enter the 'double' disappears and everything is back to normal.

 Could be two redraws happening at pretty much the same time.

I will try it. There is no risk in data loss using KILL in this case.

Yes, either way KILL will just kill the child-process, not the commands currently running within it (although subsequent commands will not run).

@jediofthecode I confirm that prompt -p sorin causes it to exist with [1]    28181 user-defined signal 1  zsh, exit code is 158. It's caused by https://github.com/sorin-ionescu/prezto/blob/fe64f91f52bbadc3e627fe7910b28a6d5df064e8/modules/prompt/functions/prompt_sorin_setup#L70.

If I change the signal from USR1 to WINCH, it does not terminate anymore. WINCH is being trapped somewhere. The sorin theme doesn't have a preview function; so, previewing it does not work anyway.

@sorin-ionescu That's because WINCH is not signal that terminates the process man sigaction, it's a signal that gets discarded (one of the reasons for choosing it for zsh-async).

@mafredri prompt_theme_preview does not call prompt_sorin_precmd where I define the trap. It only calls prompt_sorin_setup. The theme is not being previewed properly since it relies on function calls to populate certain variables, which run during precmd/preexec. I'll have to fake it.

I can confirm the shell hanging with Enter; thanks for the help with reproducing, it was happening to me sporadically and I was unable to reproduce consistently, and it was driving me nuts. Looking forward to hearing about a resolution. I'm not an expert in zsh by any means, but  I will do my best to bisect the code and provide more information when I have a moment.

@quicknir You could pepper my theme with print statements to figure out where it hangs. I cannot reproduce it.

@quicknir try changing USR1 to WINCH on https://github.com/sorin-ionescu/prezto/blob/fe64f91f52bbadc3e627fe7910b28a6d5df064e8/modules/prompt/functions/prompt_sorin_setup#L70 and https://github.com/sorin-ionescu/prezto/blob/fe64f91f52bbadc3e627fe7910b28a6d5df064e8/modules/prompt/functions/prompt_sorin_setup#L89. Pretty sure that will fix your hanging issues. If I'm right, then unfortunately, print statements will not help debug the issue, and I believe this is a pretty serious zsh bug for which I have been unable to find a solution/cause.

@mafredri USR1 causes the shell to exit, in my case, not freeze, and only when I prompt -p sorin.

@sorin-ionescu that's unrelated to what I'm referring to. What I believe most people on this issue are experiencing is a zsh deadlock, possible some malloc problem. Why this deadlock is happening is uncertain, but it's not because the signals aren't trapped, the traps are working fine.

@mafredri, your hunch may be correct. I have found Red Hat Customer Portal #409763, patched in RHBA-2014:1806-2, discussed in zsh-workers #33608.
There are a few discarded signals. SIGINFO seems harmless.
     SIGURG          discard signal          urgent condition present on socket
     SIGCONT         discard signal          continue after stop
     SIGCHLD         discard signal          child status has changed
     SIGIO           discard signal          I/O is possible on a descriptor (see fcntl(2))
     SIGWINCH        discard signal          Window size change
     SIGINFO         discard signal          status request from keyboard

A few thoughts. First, I see this on a machine running ubuntu, but not on my fedora machine. Would be nice to figure out the reasons. As I said, I'm far from an expert, but I'm happy to run some code on both machines and compare output (since I have machines in both camps).
Second, are there any obvious consequences of this work around?
Third, I'd be curious how large the benefit of getting git info asynchronously is. I'd be tempted to fork the theme and see, if you're pretty confident that your git will run quickly, and the rest of your theme isn't complicated, maybe it's better just to run sequentially.

For usability, unless you have small repositories, running git asynchronously is a must.

There are a few discarded signals. SIGINFO seems harmless.

One would think, but I've tested that also. WINCH is the only safe one I could find. It probably does some extra magic due to the window resize trigger that prevents the deadlock from happening.

@quicknir not sure. The sorin theme makes the assumption that only the child will trigger the kill-signal, so with WINCH it will re-render the prompt every time you resize the window and reset the pid-variable.

@sorin-ionescu looks like those redhat patches weren't part of zsh 5.0.7 yet, they came after. https://github.com/zsh-users/zsh/commit/7abd611a2396bad9d93d18681a2c59cb1ea0e158

Unfortunately, it seems like those RH patches will not fix the issue. I tried building zsh 5.0.8 from http://www.zsh.org/pub/ but the issue is still present :(.

Maybe winch is better then, currently sometimes when I resize the window or do a split in terminator, the resulting text is strangely aligned.

I have pushed changes to https://github.com/sorin-ionescu/prezto/tree/theme/sorin. Let me know if the freezing and the duplicate prompt bugs have been fixed.

I have not been able to reproduce any of the bugs since pulling the new changes. Thanks very much to @mafredri and @sorin-ionescu , very much appreciate it.

just did a fresh prezto install and shell hung up. I'll keep monitoring it to see if there is any way to reproduce.

Did you use the branch mentioned above?

@sorin-ionescu  I missed that. I'll check out the branch after work and give it a shot. I'll let you know. Thanks for all your help so far

@sorin-ionescu Switched to the theme/sorin branch and had it hang up on my when I did an 'la'. I'll keeping using the branch and report back.

@sorin-ionescu I'm wondering if it was something in my custom .zshrc so I'm using your defaults for now. Did you remove the RPROMPT git info from the sorin theme? I don't see it anymore.

No. Make sure it has merged properly. See #895.

Very odd as I've done a fresh check out and install. Not using any custom files just all your default ones per the installation instructions. I'll take a look at them tonight

@sorin-ionescu I don't see the 'git' module being loaded in your default zpreztorc which is probably why it's not appearing for me. I did a clean checkout and am just using your default configs. Nothing custom yet.
https://github.com/sorin-ionescu/prezto/blob/master/runcoms/zpreztorc#L26

@sorin-ionescu doesn't seem like the git module is loaded in the default zpreztorc runcom. https://github.com/sorin-ionescu/prezto/blob/theme/sorin/runcoms/zpreztorc#L26
I'm thinking that's why it's not showing on a clean prezto install.

@wonbyte: Indeed, the git module needs to be active in order to show git-info in the prompt.

I did not enable Git by default because a) revision control systems are a religion, b) they significantly slow the prompt (before async), c) the user may want to use a vcs_info prompt theme.

@nasenatmer that's what I thought. I could have sworn why I did fresh prezto installs in the past the git module was loaded by default but I must he mistaken

@sorin-ionescu have you merged the theme/sorin branch into the master?

No. I am waiting for your report.

the commit at which I get this behavior is a1dea6a "Get Git status asynchronously." The git module was not being loaded in zpreztorc. After loading the git module, the issue no longer occurred. I did not have to be inside a git repo for the prompt to hang

@sorin-ionescu I have not had any hiccups or double prompts while using the theme/sorin branch. Seems like you can merge it into master.

Also having this issue on 14.04 xubuntu just FYI.

@B0073D @ejstrates Can you checkout the theme/sorin branch and seem if you get the double prompt or hanging issues while using?

That seems to fix the issue. I cannot get it to hang now.

Sorry, scratch that, it just hung after running htop.

@B0073D just out of curiosity, if you start the Terminal anew with the theme/sorin branched checked out and run htop does it hang?

@wonbyte After I get it to hang initially. Ie, it hangs in a terminal after doing a few things. I close the terminal and reopen it and then it hangs.

No unusually high CPU load, nothing taking up a huge amount of RAM... Anything else I can be looking for?

@B0073D what linux are you running?

Xubuntu 14.04 x64
$ cat /proc/version
Linux version 3.16.0-38-generic (buildd@allspice) (gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1) ) #52~14.04.1-Ubuntu SMP Fri May 8 09:43:57 UTC 2015

I'm having some issues with merging theme/sorin in; not sure how many out of tree files there are, but a clean checkout of theme/sorin worked much better. Also, I was initializing the submodules, so they shouldn't have caused any problems
With the merge, the following behaviors occurred:
First run, three terminals opened at approximately the same time, I didn't get a prompt for several tens of seconds on any of them; after I got the prompt, closed the terminals. immediate prompt on all subsequent terminals
I did not have the git module loaded in zpreztorc, but I was getting git branch names on the right
I was not in a git repo but the branch name on the right was reporting the branch of a subdirectory that was a git repo
when resizing the terminal, the right aligned git branch text does not move to the new right position (on previous lines); new lines are in the correct position. not sure if this is expected behavior
I was not hanging and I was not seeing the double prompt anymore
After a clean checkout of theme/sorin, the git branch name issues cleared up
The only things merged in were changes to the loaded modules and path; I was able to repeat the git branch name (without being in a git repo) behavior after a couple more tests

Ditto here, running arch linux + dwm + urxvt + prezto (latest). Zsh seems to be completing the command that was run: e.g. It finished an install through pacman even though it appeared that the process was frozen, when it was really just zsh/prezto on the sorin theme that hung. I also have a vanilla zpreztorc, so that shouldn't be the problem.

@m4nukum4r can you load the git module in your zpreztorc to see if zprezto still hangs?

@ejstrates unfortunately, that didn't seem to work, prezto still hangs after loading the git module. I assume by "loading", you mean comment out the git zstyle stuff, right?

@m4nukum4r add git to the zstyle ':prezto:load' lines
zstyle ':prezto:load' pmodule
'git'
'environment'
'terminal'
'editor'
'history'
'directory'
'spectrum'
'utility'
'completion'
'syntax-highlighting'
'history-substring-search'
'prompt'

@ejstrates that seemed to fix the problem. I've been doing random stuff between two terminals after adding the git module, and haven't had prezto hang yet(~15 minutes)! Thanks!

Does it hang or does it exit and your terminal is set to not close the window?

my shell was hanging; it closes automatically on exit

The hanging, not exiting, occurs with the theme/sorin branch?

with the sorin branch seems to work fine

theme/sorin branch did not hang, though I had some weird git related behavior before I had loaded the git module; all worked very well after I loaded the git module

On Jun 10, 2015, at 7:58 PM, Sorin Ionescu<EMAIL_ADDRESS>wrote:
The hanging, not exiting, occurs with the theme/sorin https://github.com/sorin-ionescu/prezto/tree/theme/sorin branch?
—
Reply to this email directly or view it on GitHub https://github.com/sorin-ionescu/prezto/issues/888#issuecomment-110949875.

What was the weird behaviour?

Without the git module added, theme/sorin and master are both showing a git branch name (right aligned on the prompt line) of a git repo that is a subdirectory (I was not in a git repo). I have the modules environment, terminal, editor, history, directory, spectrum, utility, completion, syntax-highlighting, history-substring-search, and prompt loaded. Loading the git module fixes this behavior.
Sent from my iPhone

On Jun 11, 2015, at 10:33 AM, Sorin Ionescu<EMAIL_ADDRESS>wrote:
What was the weird behaviour?
—
Reply to this email directly or view it on GitHub.

How can it show you a branch name if the Git module is not loaded? I cannot replicate it. I'll need to see a screencast.

on further investigation, it seems to be a problem caused by testing hanging with/without the git module. With a clean checkout of master (f2a826e), I can reproduce the issue with the following steps:
Add the git module to runcoms/zpreztorc
reopen the terminal
navigate to a git repo, so that the git branch text is displaying on the right of the prompt
edit the zpreztorc file and remove the git module from the load list
exit/quit zsh while branch text is displayed on the right
reopen zsh; the last displayed branch text is displayed on the right (at least in my shell)
I was a little paranoid about ignored files affecting it, so I checked the following:
git status showed no changed files (other than the git module being added in runcoms/zpreztorc) and no submodules diffs
git status --ignored showed no files
git ls-files -v showed no assume-unchanged files
I can reproduce this with different branch text by quitting zsh while in different repos (with different branch text)
so zsh is retaining one of the prompt args between sessions and whatever was in it last is displayed, whether the git module is loaded or not?

I confirm. It happens. It's reading stale data.

I can reproduce this on Terminal in Ubuntu 14.04. FYI, I don't have git module loaded. I might (not sure though) have had similar issue with Terminator as well.

@sorin-ionescu any updates on this. I've been using the theme/sorin branch for over a week now and don't seem to have any issues.

I've been having issues with this since I started using prezto a couple weeks ago. Happens many times a day for me. I close the terminal and open a new one.

Use another theme until I figure it out. Since it's not happening on my system, unfortunately, I can only speculate what is happening. I would appreciate if you could debug it.

Can reproduce. Also using iterm2 latest and sorin theme. Changed to minimal fixed it.

I can reproduce this (zsh prompt hang) easily in a fresh install of ubuntu 14.04 server with zsh & git being the only additional packages installed. No modifications to .zpreztorc either...
All I need to do is hit enter a few times and inevitably the prompt will hang with no possible way to exit other than to kill the corresponding zsh process.
Indeed, this seems to be specific to the 'sorin' theme - just tried 'cloud' and the problem is not seen there.
Would be happy to help to debug this if I can - love the 'sorin' prompt !

I've been debugging this issue with the help of Bart Schaefer on the zsh-workers mailing list, for anyone interested, this is the first post. Also, this post confirms my suspicions that WINCH is treated specially from the other kill signals.
Anyway, problem is still not solved, but it's being investigated.

Same issue here. I have a fresh install of Ubuntu 14.04-LTS. I installed prezto with default configuration and it hangs after a couple of cd commands when I use the sorin theme. Switching to a different theme solves the problem.

Thank you, @mafredri.

@sorin-ionescu no problem, someone had to investigate this :).
This issue should now be fixed with the latest commits to the zsh git repo (36079 and 36084). At least I have not been able to reproduce any more deadlocks in my tests.
It would be helpful if people are able to try it out and see if they can reproduce the issue mentioned here (just to make sure we get all edge-cases ironed out).

If any OSX users are eager to test it out, you can apply this patch and install it through Homebrew: brew reinstall zsh --HEAD. Unfortunately, documentation cannot be installed (requires yodl to build).

Thank you @mafredri. Unfortunately, we can't depend on users installing HEAD Zsh or even the latest Zsh. So, we'll have to use the workaround for a long time.

Yes, I agree. I have a branch of zsh-async that essentially tries to use zle instead of kill-signals to communicate with the parent (this is something that's available in zsh 5.0.9 / 5.1, once released). It falls back to using WINCH though. I still have some tweaks left there but essentially it works :).

@mafredri Could you verify that zsh-async does not interfere with the editor module or wacky themes that use ZLE to display status bars and other contextual data?

It should not, it's not Zle in the traditional sense. Zle can be used to
watch file descriptors and attach handlers to them when there is output,
and that's what I'm doing in zsh-async.
On Aug 25, 2015 3:37 AM, "Sorin Ionescu"<EMAIL_ADDRESS>wrote:

@mafredri https://github.com/mafredri Could you verify that zsh-async
does not interfere with the editor module or wacky themes that use ZLE to
display status bars and other contextual data?
—
Reply to this email directly or view it on GitHub
https://github.com/sorin-ionescu/prezto/issues/888#issuecomment-134426219
.

This bug is still in master. I can easily hit it after a few commands with prezto enabled.

@cmcginty Possibly you are using long-term-bug version. I'm on Arch Linux with zsh 5.1.1 and no problem exists.

@ishitatsuyuki Some people can't update Zsh.

https://github.com/sorin-ionescu/prezto/issues/888#issuecomment-128355989
Same issue on my vagrant box with trusty. Another prompts (e. g. powerline) seem too work properly.

Prezto works fine on local shells, but locks up, when I ssh into a Centos 7 server, with Prezto there.
I've had to resort to running screen; tmux works no better. Does not seem limited to Sorin theme.
Sporadic problems happen, regardless of Terminal, iTerm, iTerm2 (beta), XQuartz terminal. Switching to oh-my-zsh stopped issue, but I still run Prezto locally. All new software, as of Nov, 2015 (El Capitan, etc)
Problem pops up, when exiting vi, running ls. Note that C-\, C-z also fail, like C-c. Not sure, what other signals to try killing with (other than SIGKILL)
HTH.

@bingalls My theme is not the only async theme. Which themes have you used?

nicoulaj. I seem to recall kylewest & minimal, too.

@bingalls Those don't use async.

FWIW, I've seen long delays on Mac OS X running Prezto when the user's home directory is a git repository. The delay I have observed is definitely caused by a long-running git status command scanning all the files and folders in $HOME/Library/ etc, which may cause similar problems regardless of platform, depending on the contents of $HOME. Removing the repository from $HOME or setting .gitignore to */ corrects this. Please excuse me if this information is irrelevant.
@bingalls @cmcginty @breerly Do any of you have $HOME initialized as a git repo?

David-
Unfortunately, I no longer have access to the problem environment. I
don't recall ~/.git/ however.
-Bruce
On 1/8/16 2:05 PM, David Rogers wrote:

FWIW, I've seen long delays on Mac OS X running Prezto when the user's
home directory is a git repository. The delay I have observed is
definitely caused by a long-running |git status| command scanning all
the files and folders in |$HOME/Library/| etc, which may cause similar
problems regardless of platform, depending on the contents of |$HOME|.
Removing the repository from |$HOME| or setting |.gitignore| to |*/|
corrects this. Please excuse me if this information is irrelevant.
@bingalls https://github.com/bingalls @cmcginty
https://github.com/cmcginty @breerly https://github.com/breerly Do
any of you have |$HOME| initialized as a git repo?
—
Reply to this email directly or view it on GitHub
https://github.com/sorin-ionescu/prezto/issues/888#issuecomment-170094388.

@al-the-x nope:
~ » git st
fatal: Not a git repository (or any of the parent directories): .git

@al-the-x Execute git-info off in your home directory.

As @mafredri suggests, this seems fixed in Zsh 5.1+. Perhaps this bug should be marked 'wontfix' or 'fixed upstream' or something.
On Linux Mint 7.1 with zsh 5.0.2-3ubuntu6 and out-the-box zprezto, I could reliably trigger a hang just by holding down Enter for 20+ seconds in a Git-managed project. After manually installing zsh-5.2 from source I can no longer trigger a hang. For posterity here is a gdb backtrace showing a malloc hang in zsh 5.0.2 (also note that switching to WINCH / signal 28 didn't help):
(gdb) bt
#0  __lll_lock_wait_private () at ../nptl/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S:95
#1  0x00007fcdf2f4bdca in _L_lock_12779 () at malloc.c:5206
#2  0x00007fcdf2f497a5 in __GI___libc_malloc (bytes=264) at malloc.c:2887
#3  0x000000000044776b in lexsave () at ../../Src/lex.c:252
#4  0x0000000000471a89 in dotrapargs (sig=28, sigtr=0x6bbdf0 <sigtrapped+112>, sigfn=0x1ba82a0)
    at ../../Src/signals.c:1192
#5  0x0000000000472918 in dotrap (sig=<optimised out>) at ../../Src/signals.c:1312
#6  0x000000000047299d in handletrap (sig=28) at ../../Src/signals.c:1060
#7  0x0000000000472d34 in zhandler (sig=28) at ../../Src/signals.c:619
#8  <signal handler called>
#9  _int_free (av=0x7fcdf3285760 <main_arena>, p=0x1cbf9e0, have_lock=0) at malloc.c:3958
#10 0x0000000000447c67 in lexrestore () at ../../Src/lex.c:384
#11 0x0000000000449841 in parsestrnoerr (
    s=s@entry=0x7fcdf3f73288 "\212\215editor_info[overwrite]\216%(?:: %F{1}⃯\203\256%f)\212\215VIM:+\232 %B%F{6}V%f%b\232\216") at ../../Src/lex.c:1650
#12 0x000000000044985e in parsestr (
    s=0x7fcdf3f73288 "\212\215editor_info[overwrite]\216%(?:: %F{1}⃯\203\256%f)\212\215VIM:+\232 %B%F{6}V%f%b\232\216") at ../../Src/lex.c:1622
#13 0x000000000047125b in promptexpand (
    s=0x7fcdf3f73288 "\212\215editor_info[overwrite]\216%(?:: %F{1}⃯\203\256%f)\212\215VIM:+\232 %B%F{6}V%f%b\232\216", ns=ns@entry=1, rs=rs@entry=0x0, Rs=Rs@entry=0x0, txtchangep=0x7fcdf21be918 <rpmpt_attr>)
    at ../../Src/prompt.c:186
#14 0x00007fcdf1f950fc in zleread (lp=<optimised out>, rp=0x6b75c0 <rprompt>, flags=3, context=0)
    at ../../../Src/Zle/zle_main.c:1167
#15 0x000000000043f75f in zleentry (cmd=1) at ../../Src/init.c:1462
#16 0x0000000000440336 in inputline () at ../../Src/input.c:281
#17 ingetc () at ../../Src/input.c:217
#18 0x0000000000439bb6 in ihgetc () at ../../Src/hist.c:279
#19 0x000000000044a08c in gettok () at ../../Src/lex.c:714
#20 zshlex () at ../../Src/lex.c:395
#21 0x0000000000466a67 in parse_event () at ../../Src/parse.c:451
#22 0x000000000043cb69 in loop (toplevel=toplevel@entry=1, justonce=justonce@entry=0) at ../../Src/init.c:132
#23 0x000000000043fd66 in zsh_main (argc=<optimised out>, argv=<optimised out>) at ../../Src/init.c:1617
#24 0x00007fcdf2ee8ec5 in __libc_start_main (main=0x40ebf0 <main>, argc=1, argv=0x7fff4b358fa8,
    init=<optimised out>, fini=<optimised out>, rtld_fini=<optimised out>, stack_end=0x7fff4b358f98)
    at libc-start.c:287
#25 0x000000000040ec1e in _start ()

I had the same issue.  It seemed the culprit for me was an old version of zsh.  I installed zsh 5.2 and it now works fine.

Is this still an issue with the changes in master? We've changed how the sorin prompt handles async tasks.

Again, my environment changed. I recall a remote ssh terminal issue. That said, I no longer see the problem.

I'm closing this because it's a very old issue and the prompt was partially rewritten to add async support which may have fixed this issue.


add AsRef<str> to auth string wrappers

These structs are String wrappers, but the only way to view the content of the string is to use the Display or String From implementation to make a new copy of the contained string. We should also be able to obtain a &str.
This has the potentially undesirable side effect that now you can write AuthorizationCode::new(RefreshToken::new(AccessToken::new(IdToken::new(authorization_code)))) because each of these structs has an fn new(string: impl AsRef<str>) -> Self. I considered having a .as_str() instead to be more explicit, but then I saw the consumer code uses .into() to convert these to Strings, so I switched back to AsRef<str>.

I added as_str again because the ergonomics were bad trying to make a match guard for a RefreshToken that is not empty.


npm run compile fails in editors/vscode

Describe the bug
Howdy!
npm run  fails with
src/features/symbol-view.detypify.ts:1:26 - error TS2307: Cannot find module '../../assets/detypify/infer.json' or its corresponding type declarations.

1 import inferSymbols from "../../assets/detypify/infer.json";
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Package/Software version:
tinymist extension version: v0.11.0#398f2afb043f523ec5b8de84bda0735e3370177b.
tinymist
Build Timestamp:     2024-03-22T02:18:18.207134800Z
Build Git Describe:  v0.11.1-rc2-5-gf0a96cb-dirty
Commit SHA:          398f2afb043f523ec5b8de84bda0735e3370177b
Typst Version:       0.11.0

The current CONTRIBUTING guide only includes instructions about developing the binary and the that relates to running editor/vsocde extension locally is missing. I'll add it later.
You can refer the steps in release.yaml before I adding it:
https://github.com/Myriad-Dreamin/tinymist/blob/398f2afb043f523ec5b8de84bda0735e3370177b/.github/workflows/release.yml#L209-L224


Metric counts are based on arbitrary, discrete limits

I apologize if this is kinda out of scope -issue. I know definitely Rubocop itself is not to blame. But author being a smart guy I know there's a way to circumvent the madness described below.
If anyone has listened to Sandi Metz's speak about programming, she must have heard of complexity metrics. While useful, they often suffer from this -- how should I put it politely -- arbitrary, binary rule; a given piece code is good fi it contains less than k lines, and bad afterwards. Be it a method, class of file.
We all know such metrics are arbitrary. Even if you find a nice ballpark figure that is suitable for your project.. well, seriously: say you have defined 100 lines to be maximum for a class. That is, code with 100 lines is good, and suddenly at 101 it gets so bad you are notified of the fact. Adjusting the limit doesn't help, obviously. Make the number large enough, and you no longer have any use for that metric.
My suggestion: instead of binary good/bad score, have a metric that goes exponentially worse with number of lines. That way you are never 'green', but you'd have a useful figure. A simple metric could raise 1.05 to the number of lines, and something similar for class/file. That way you'd keep continuously minimizing the number for top n offenders without arbitrary limits. How would that sound?

I like how this idea would allow you to keep on improving your code even if you technically pass all of the rubocop checks. So if you wanted to continue cleaning up and refactoring, you would know some good places to start. Could be a command line option? But also broadens the scope of rubocop, so that's an potential concern.

Thanks, Matt. Yup, it would broaken scope of Rubocop :( and I dislike incoherence in code. But current metrics are next to useless, to put it bluntly. In an ideal situation I'd have that metric as with the rest, but report is as extra info (ie. not en error). Maybe even have the exponent/base configurable. I guess I need to take a look at the code.

Here's how I use the current solution to work with refactoring the RuboCop source code.
I start by taking a look at .rubocop_todo.yml. The Max numbers and the comments there help me select a suitable place to tackle. For example, right now I can see that the offense count for Metrics/ClassLength is low, so trying to lower that Max number seems like a good idea. The goal of removing that cop from the todo list might be attainable.
I then lower Metrics/ClassLength: Max by hand, perhaps only by 1, and run rubocop to see which classes are now above the threshold. If I can find a refactoring to make those classes smaller, I do the implementation, run rubocop --auto-gen-config and commit all the changes, including the generated ones in .rubocop_todo.yml.
So you see I can

work with continuously lowering the different metrics for the top offenders
lower them under the default values if I want to

It follows that I need to know in more detail (let's say from the point of view of working with refactorings within the RuboCop source code)

What's wrong with the current way of working?
What's better with @EdvardM's suggestion? What does the exponential score bring to the table?

Jonas -- my main point is not that much of exponentiation, but analogue nature of code quality compared to discrete (binary actually) rating. To be fair, I like your solution. It's an excellent solution to my problem in a sense that it requires no changes to code. I just find it awkward to need to modify a file repeatedly. We are dealing with computers, man :) That's just awkward (but like I said, good enough that I might end up using just that).
My main gripe is still with the actual metric. A code that is without fault at n lines, n being sufficiently greater than one, cannot become bad at n+1. And that's exactly what those metrics imply.

It's the same in traffic. Drive 90 km/h and everything is fine. 91 and you're breaking the law. I don't have a problem with that -- in traffic or in RuboCop -- but just in case you want to explore the possibility of listing metrics offenses in numeric order, a (custom) formatter is the way to go.
Here is a pretty crude example of how that might look.
Put it in your home directory for example, and run with
rubocop --require ~/top_offenders_formatter.rb --format TopOffendersFormatter

Good analogue, and I do find that a problem :) Even some police I've talked with acknowledge that there are many other things that would better indicate dangerous driving, but speed limits are what they are because they are easy to monitor. But now that you mentioned it, even with speed limits you get different "score" (say, sanctions) depending on by how much you exceed them. If you go 90mph in 60mph area, you are fined more than when you go 65mph. But I digress.
And thanks for the tip! I'll look at custom formatter. It does seem a more appropriate solution to my itch than the hack I rustled up.

I'll close the issue as @EdvardM found a custom formatter to be an acceptable solution.


Updated getStatus to run autorest with grouping swaggers based on config file

This checklist is used to make sure that common issues in a pull request are addressed. This will expedite the process of getting your pull request merged and avoid extra work on your part to fix issues discovered during the review process.
PR information

[ ] The title of the PR is clear and informative.
[ ] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For information on cleaning up the commits in your pull request, see this page.
[ ] Except for special cases involving multiple contributors, the PR is started from a fork of the main repository, not a branch.
[ ] If applicable, the PR references the bug/issue that it fixes.
[ ] Swagger files are correctly named (e.g. the api-version in the path should match the api-version in the spec).

Quality of Swagger

[ ] I have read the contribution guidelines.
[ ] My spec meets the review criteria:

[ ] The spec conforms to the Swagger 2.0 specification.
[ ] The spec follows the guidelines described in the Swagger checklist document.
[ ] Validation tools were run on swagger spec(s) and have all been fixed in this PR.

cc @olydis

No modification for AutorestCI/azure-sdk-for-ruby

No modification for AutorestCI/azure-sdk-for-node

No modification for AutorestCI/azure-sdk-for-python


Running tests on Linux

Linux support was introduced here #20 However, because there is no CI task that would sanitise every single PR it might get broken easily.
This PR adds a simple swift test job that runs on Linux.
Had to add Linux support in Mocker first.

Good stuff, thanks @vox-humana!


Prepend split ID with datetime

Description
Prepend split ID with UTC datetime. This is really nice when listing splits on a file system.
How was this PR tested?
Added unit test and printed new split ID: 20210910T225401-01FF8YNWXWZE7N2P2VAX4MC62N.

I agree that this nice to be human readable but that makes very long split ids.
The current split id are using ULID, so they already sort with date.
Also, while it is not human readable, someone who really wants the timestamp can extract them.
Note that both in your PR and in the ULID, it is a bit difficult to understand what this date is about.
This is the date of the creation of the split. For a merged split, it is not super useful information.

Prefixing files with a datetime has been super useful at my previous gig. I could just go to S3 and quickly identify issues just doing aws s3 ls <...>/20210911. For any given time window, I could right away see whether the size of the files was right, whether compaction was happening, whether the GC was running correctly... With ULIDs, this becomes tedious very quickly.
We can get away with it if we build good tooling in the CLI though. How much of a problem are long split IDs?

I'm going to close that PR. Let's build good tools instead! A measure of success will be having users not mentioning this PR or opening a similar issue in the future :)


New version: Dell.CommandUpdate version 5.2.0

Checklist for Pull Requests

[x] Have you signed the Contributor License Agreement?
[x] Is there a linked Issue?

Manifests

[x] Have you checked that there aren't other open pull requests for the same manifest update/change?
[x] This PR only modifies one (1) manifest
[x] Have you validated your manifest locally with winget validate --manifest <path>?
[ ] Have you tested your manifest locally with winget install --manifest <path>?
[x] Does your manifest conform to the 1.6 schema?

Note: <path> is the name of the directory containing the manifest you're submitting.

Resolves #115475

Microsoft Reviewers: Open in CodeFlow

Hi @SpecterShell,
This manifest adds Apps and Features entries that aren't present in previous PR versions. These entries should be added to the previous versions, or removed from this version.
(Automated response - build 876.)