Hard-coded color codes - needed?

Looking through the css code of the compiled userChrome and userContent files I noticed the nice way to switch colors around using the variables provided in :root.  However, in some places hard-coded colors are used, like "color: white" or "color: #ccc".  An example: in userContent.css, in @-moz-document url-prefix(about:newtab), url(about:home) the element .search-wrapper input has it's color set to var(--primary-light-color), but it's background to #4a4a4f.  I suppose that #4a4a4f could also be modified to var(--grey-60) (which has the same value) to get the same default effect but with better customizability?  Or one step more meta: wherever variables like --grey-xx are used in the actual content, they could also be replaced with the e.g. --primary-dark-color variables?
Is there a reason for this?  Or is it a left-over from still-not-variablized 1st try code or such?  Or maybe a conscious decision not to explode the number of variables needed like --primary-dark-color?
The reason I ask is because I find the default grey still a bit too light, and wanted to modify the theme by altering these variables (to get a more black/white look).  Finding these hard-coded values later on in the files I started updating those as well, but it soon dawned on me these hard-coded values might be there for a reason.

Hi @CarlColijn, thanks for bringing this to my attention. More than anything this was an “artifact” of my first versions of the code (before I was really considering making the project a public repo/making it customizable for others).
You can change them without worry, but this is something that should be fixed on my end as well (both removing hard coded hex colors and the use of things like var(—grey-40) after the initial setting of variables).
I should be able to get that taken care of tonight.

Great!  But don't take off leave days to work on this on my account - I've temporarily fixed it on my side by changing the relevant colors, and I don't see myself grabbing an updated version in the short term, so no need to hurry from me.  IMO it would add value to the project, though, so a nice improvement!

Definitely an improvement! I'm getting close to having them all removed :)
I'm not sure what OS you are on, but you may be interested in making use of the new updater scripts.  Part of the goal of these were to make an easy way for users to update, but not have to manually change any color variables or internal UUIDs redefined each time.  See #62 for more info

Thanks for that.  I'm on Windows 10 and didn't want to introduce extra tool chains I don't already have on this machine (like Gulp, if it's available for Windows at all), so I opted for the pre-built css files.
I see your update script was meant for this use case, but is only for *nix versions; maybe I can be of help writing a Windows version?  Pre-installed tools like curl etc. are not an option for regular Windows users (needs to be downloaded first), but there's other mechanisms to use that come out-of-the-box on Windows platforms.  The script will thus not be a 1-to-1 port I think, but a separately developed one.

Definitely can understand not wanting to add gulp and all it’s dependencies..I know that’s not an ideal solution for everyone.
Absolutely no pressure, but I would definitely appreciate any help with a Windows versions!
I unfortunately don’t currently have access to a Windows computer, so I’m somewhat limited in my ability to write/test things for it (I also didn’t realize some tools like curl aren’t available by default).

Will do :)  I think I'll have something before the end of the weekend.
In your bash script I saw you find/replace the --blue-xx parts of the definitions of the --primary-accent-color: var(--blue-xx) with a hard coded color value the user can alter in the upgrade script.  Wouldn't it be better to just re-use the two :root definition blocks at the top of the css files?  If so, it would be easier if they were delimited with a unique string to do easy find/replace on, like e.g. / begin user customizable section / and / end user customizable section */*.  The update scripts could then just copy out any existing definitions from the old files, and if found, replace the definitions in the downloaded files with these old ones.
And extra benefit is that users could then also add extra css directives and styles in there that they want to use; I e.g. also have an extra "#fullscr-toggler { display:none!important; }" I want to insert.

As an extra question: what is the use of the section
`  ## change any webextension Internal UUIDs here.
one example is provided
Define Internal UUID's for extensions here
uMATRIX_INTERNAL_UUID="32818407-cb70-5d40-9f8d-81ed9f2012a6"
Replace Ineternal UUID placeholders with variables defined above
sed -i '' "s/9eba7fab-892c-7b42-a57e-b876d4196d70/$uMATRIX_INTERNAL_UUID/" "userContent.css"`
?  Is it meant to add user-definable UUID replacements for extensions, or is it more for you to specify new UUIDs to use not yet used in the css files?

Awesome, thank you!! And no rush if you don’t have time this weekend :)
I had considered something like replacing the root sections, but I was worried it might cause problems in future versions. Things like var(—primary-accent-color) should stay pretty stable throughout the lifetime of the project, but I think a good way to improve the project would be to increase the customizability of it. To do that, I would need to increase the number of variables used in the root sections. For example, right now anywhere I had to change any code editors/viewers (such as view-source pages), I used the hex colors used by FFs developer toolbox. It would be nice to create variables like —code-blue or —code-attribute-color.  If the script just used the old version of the roots and a new variable were added, it wouldn’t get picked up and would cause problems anywhere it was used. You might have a better idea of how to get around this problem though.
I definitely like the idea of having a user custumoziation section though. Ideally it should be places at the end of the file, however. That way a user can not just add to ShadowFirefox, but also override anything in it (as an example, one user wanted more compact context menus than are what are set by ShadowFox. To do so their changes had to go at the end as to not get overridden by what I set).
As for the UUIDs, they were meant to be a way for people to replace the Internal UUID of extensions I made tweaks for. Since the id is different on every install, each user has to get their own and use it in userContent.css, otherwise the changes won’t go into effect. So similar to the color variables, I wanted a way to automatically replace those instead of having to manually do so at every update.
For a little more info, see here:
https://github.com/overdodactyl/ShadowFox/wiki/Altering-webextensions
On that note, I should probably change the UUIDs in ShadowFox from the random id used when I tested it to a variable (like uBlock_uuid or something).
(Sorry for any and all typos - currently on mobile)

To address the customization section there are two routes we could take I think (might be something better than what I’m thinking though):
The first would be to have a sections with a specific header like you mentioned, then just transfer it on an update.
Another route I think might be worth considering is just to recommend users create two files with any of their own tweaks (something like SF_userContent_customization.css...probably need a better name though), then the updated script would simply append those files to the end of userChrome and userContent, respectively.

About the user customizations: a css @import with a fixed file name at the end of the ShadowFox css files could also work.  That removes the need for the update script to pull in any content.  If the user doesn't provide that file it will get skipped by default, and if it is provided it gets picked up and can override anything in the ShadowFox files.
The same can be done for the :root color definitions; specify another @import file the user can create that is @import-ed at the top but below the default :root definitions, which could then be used by the user to override any default color definitions.  But only if --var settings in css can be overriden; I have no experience with them.

Ah, update: I quickly tested this, and FireFox on Windows respects @imports when they're the first thing encountered in the userChrome.css file, but anywhere else and they seem to get ignored...    Could you test on Linux or Mac for confirmation?

@imports are unfortunately only respected if they’re at the very top of the file.
Doubly unfortunate, there’s a Linux bug that prevents the usage of import statements (this bug is actually what spurred the usage of gulp as opposed to just having the userChrome/Content files filled with imports users could remove, add to etc - essentially what is now userChrome_imports.css and userContent_imports.css in the repo).

Shame indeed...  I've taken the route of updating delimited sections.  A simple multi-line regex find/replace for hard coded section headers should do the trick, each file having two sections: a color overrides section right after the :root color sections, and a customization overrides section at the end of the file.  The ShadowFox css files should thus incorporate these (empty) sections so the update scripts know where to add the content.  I suggest section delimiters like \* ShadowFox start color overrides *\ and \* ShadowFox end color overrides *\, with an analogous for the customizations.
Both approaches you suggest have their own benefits and drawbacks;
Picking up customizations from external files

+: has the opportunity to only use one color overrides file for both userContent & userChrome
0: these override files need to be stored next to the update script, directly in the profile folder (messy?), for new users to be able to make a flying start (define customizations, run update script for the 1st time, chrome folder gets created with correct files in them)
0: or put these files in the chrome folder itself, but that necessitates a 2-stage initial install (but won't most users install the vanilla version first, then later start modifying anyway?)

Transferring customized sections from the old css files to the new one

+: there's no need for extra customization files lying around (clean)
0: new users can immediately start modifying after installation; no need for running the updater again to integrate their changes
-: there's no (clear) way to sync any customizations between userChrome and userContent

Which way do you prefer?

I do have a suggestion for the UUID replacements.  In the current set-up, you have in the css files e.g.
@-moz-document url-prefix("moz-extension://9eba7fab-892c-7b42-a57e-b876d4196d70/")  {

In the update script there's this section:
uMATRIX_INTERNAL_UUID="32818407-cb70-5d40-9f8d-81ed9f2012a6"
sed -i '' "s/9eba7fab-892c-7b42-a57e-b876d4196d70/$uMATRIX_INTERNAL_UUID/" "userContent.css"

A more direct approach might be to specify in the css files:
@-moz-document url-prefix("moz-extension://SF_uMATRIX_UUID/")  {

and then in the update script do a
uMATRIX_UUID="32818407-cb70-5d40-9f8d-81ed9f2012a6"
sed -i '' "s/SF_uMATRIX_UUID/$uMATRIX_UUID/" "userContent.css"

This opens the way for the user to be able to specify an external UUID overrides file filled with e.g.
uMATRIX_UUID=32818407-cb70-5d40-9f8d-81ed9f2012a6
other_UUID=...

This in turn makes the update script totally self-contained without needing to be updated by the user; the user only needs to specify the UUIDs of the extensions he uses, and it would be easier for non-technical users to do this (we could add a sample UUID replacement file to get started).
For me under Windows this is easy to add to the installer script (using VBScript), but I have no experience with writing Bash scripts :)  Can you grep (or such) the content of a file, split it on newlines and '=' characters, loop on these and in that loop use those to drive a regex replace on the css content?

I'm open to the other way, but I'm kinda leaning towards the option of using separate files for the following reasons:

I really like your idea regarding the internal UUIDs.  Going this route, however, already kind of accepts that we are adding extra customization files - a little less clean, but worth the trade off I think.  I like the consistency of "if you want to make customization, use the extra files provided," as opposed to, "if you want customization, make x changes in the extra files and make y changes in userChrome/Content."

I think it's a huge advantage for users not to have to set the same variables in two locations.  For some, I don't think it would be super intuitive to have to make the same changes twice.

I think it might be easier for new users to make edits in a "clean" file as opposed to opening up and messing with userChrome/Content, which already contains hundreds of lines of code.

We could place these three files in their own "ShadowFox_Customization" folder inside of the chrome directory.  This would keep them out of the "messy" profile directory, and it makes it clear what their purposes are (also easier to keep track of, copy and paste to a new profile etc.).  It is slightly unfortunate this would necessitate a 2-step initial install for customization to go into effect, but that's not a huge concern to me because, as you mentioned, I'm guessing most people will want download SF as is, then see what changes they want to make on top of that as opposed to writing overrides prior to install.

^^ If we go this route, we would still need to add something like /*! [Users Ignore] color_Overrides.css placed below */ or something of the sort in both userChrome and userContent for the script could pickup were to place the color overrides

For the internal UUIDs, I think we should just keep the same variable name in userContent.css as what a user would define in their file instead of using, for example, SF_uMATRIX_UUID and uMATRIX_UUID.  That way, the script would just need to read the lines of the file and replace what it finds.
This works in a shell script:
while IFS='' read -r line || [[ -n "$line" ]]; do
    IFS='=' read -r -a array <<< "$line"
    sed -i '' "s/${array[0]}/${array[1]}/" "userContent.css"
done < "internal_UUIDs.txt"

So nothing's set in stone (we can still use the other approach), but here's kinda what I was thinking:
#!/bin/bash

### ShadowFox updater for Mac
## author: @overdodactyl
## version: 1.1

userChrome="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/userChrome.css"
userContent="https://raw.githubusercontent.com/overdodactyl/ShadowFox/master/userContent.css"

echo "\nThis script should be run from inside your Firefox profile.\n"

currdir=$(pwd)

## get the full path of this script (readlink for Linux, greadlink for Mac with coreutils installed)
sfp=$(readlink -f "${BASH_SOURCE[0]}" 2>/dev/null || greadlink -f "${BASH_SOURCE[0]}" 2>/dev/null)

## fallback for Macs without coreutils - may cause problems if symbolic links are encountered
if [ -z "$sfp" ]; then sfp=${BASH_SOURCE[0]}; fi

## change directory to the Firefox profile directory
cd "$(dirname "${sfp}")"

## Make chrome directory if it doesn't exist
mkdir -p chrome;

## Move to chrome directory
cd chrome;

## Make ShadowFox_customization directory if it doesn't exist
mkdir -p ShadowFox_customization;

## Create all customization files if they don't exist
touch ./ShadowFox_customization/colorOverrides.css
touch ./ShadowFox_customization/internal_UUIDs.txt
touch ./ShadowFox_customization/userContent_customization.css
touch ./ShadowFox_customization/userChrome_customization.css

echo "Updating userContent.css and userChrome.css for Firefox profile:\n$(pwd)\n"

if [ -e userContent.css ]; then
  echo "Your current userContent.css file for this profile will be backed up and the latest ShadowFox version from github will take its place."
else
  echo "A userContent.css file does not exist in this profile. If you continue, the latest ShadowFox version from github will be downloaded."
fi

if [ -e userChrome.css ]; then
  echo "Your current userChrome.css file for this profile will be backed up and the latest ShadowFox version from github will take its place.\n"
else
  echo "A userChrome.css file does not exist in this profile. If you continue, the latest ShadowFox version from github will be downloaded.\n"
fi

read -p "Continue Y/N? " -n 1 -r
echo "\n\n"

if [[ $REPLY =~ ^[Yy]$ ]]; then
  if [ -e userChrome.css ]; then
    # backup current userChrome.css file
    bakfile="userChrome.backup.$(date +"%Y-%m-%d_%H%M")"
    mv userChrome.css "${bakfile}" && echo "Your previous userChrome.css file was backed up: ${bakfile}"
  fi
  if [ -e userContent.css ]; then
    # backup current userChrome.css file
    bakfile="userContent.backup.$(date +"%Y-%m-%d_%H%M")"
    mv userContent.css "${bakfile}" && echo "Your previous userContent.css file was backed up: ${bakfile}"
  fi

  # download latest ShadowFox userChrome.css
  echo "downloading latest ShadowFox userChrome.css file"
  curl -O ${userChrome} && echo "\nShadowFox userChrome.css has been downloaded"

  # download latest ShadowFox userContent.css
  echo "downloading latest ShadowFox userContent.css file"
  curl -O ${userContent} && echo "\nShadowFox userContent.css has been downloaded\n"

  if [ -s ./ShadowFox_customization/internal_UUIDs.txt ]; then
    ## Insert any UUIDs defined in internal_UUIDs.txt into userContent.css
    while IFS='' read -r line || [[ -n "$line" ]]; do
        IFS='=' read -r -a array <<< "$line"
        sed -i '' "s/${array[0]}/${array[1]}/" "userContent.css"
    done < "./ShadowFox_customization/internal_UUIDs.txt"
    echo "Your internal UUIDs have been inserted.\n"
  else
    echo "You have not defined any internal UUIDs for webextensions."
    echo "If you choose not to do so, webextensions will not be styled with a dark theme and may have compatibility issues in about:addons."
    echo "For more information, see here:"
    echo "https://github.com/overdodactyl/ShadowFox/wiki/Altering-webextensions\n"
  fi

  if [ -s ./ShadowFox_customization/colorOverrides.css ]; then
    ## Delete everything inbetween override markers
    sed -i '' '/\/\*! Begin color overrides \*\//,/\/\*! End color overrides \*\//{//!d;}' userContent.css
    sed -i '' '/\/\*! Begin color overrides \*\//,/\/\*! End color overrides \*\//{//!d;}' userChrome.css

    ## Insert everything from colorOverrides.css
    sed -i '' '/\/\*! Begin color overrides \*\// r ./ShadowFox_customization/colorOverrides.css' userContent.css
    sed -i '' '/\/\*! Begin color overrides \*\// r ./ShadowFox_customization/colorOverrides.css' userChrome.css

    echo "Your custom colors have been set.\n"
  else
    echo "You are using the default colors set by ShadowFox"
    echo "You can customize the colors used by editing colorOverrides.css\n"
  fi

  if [ -s ./ShadowFox_customization/userContent_customization.css ]; then
    ## Append tweaks to the end of userContent.css
    cat ./ShadowFox_customization/userContent_customization.css >> userContent.css
    echo "Your custom userContent.css tweaks have been applied.\n"
  else
    echo "You do not have any custom userContent.css tweaks."
    echo "You can customize userContent.css using userContent_customization.css.\n"
  fi

  if [ -s ./ShadowFox_customization/userChrome_customization.css ]; then
    ## Append tweaks to the end of userContent.css
    cat ./ShadowFox_customization/userChrome_customization.css >> userChrome.css
    echo "Your custom userChrome.css tweaks have been applied.\n"
  else
    echo "You do not have any custom userChrome.css tweaks."
    echo "You can customize userChrome.css using userChrome_customization.css.\n"
  fi

else
  echo "Process aborted"
fi

## change directory back to the original working directory
cd "${currdir}"

any thoughts?

Looks good!  I'd say go ahead and publish your version without waiting for me; it's a good improvement anyway.  I can adapt perfectly fine to your modifications.
I've already updated my script with your changes.  I don't have the time now to properly test it as well since we've got family over today who are getting impatient :), but you can expect my (initial) version this evening or tomorrow.
The only thing I'm still doubting a bit on is the way to give user feedback from my script.  I've decided to utilize VBScript (.vbs files), since regular Windows users are somewhat uncomfortable with a command line, and VBScript enables you to show proper message boxes (plus that VBScript offers a true programming environment).  Then again there's a lot of text to communicate; a simple message box might not be sufficient to comfortably show it all as-is.  I'll ponder some more on this.

Sounds good! And truly, no rush! Don't miss out on family time on my account :)
I'm not too familiar with VBS, so I unfortunately don't have any great insights there haha.  Feel free to change what you need though, I'm not necesarilly sure what I have is the best route anyways, just kinda the first thing that came to mind.
If you don't have a lot of space, one possibility is just to link to a wiki page on here with any necessary instructions or what not.

A little detail I've changed that you might want to add to the other install scripts as well: when testing, I got an error on creating the backup files.  The original code used a yyyy-mm-dd_hh-mm timestamp, so I just added -ss to the end.  I don't expect users to be that impatient when trying a new install, but you never know :)

That's a good idea :)
On the backups note, I was pondering whether or not they should be put in a backups folder instead of just the chrome folder.  After enough updates, that could create a pretty messy folder filled with files not likely to be accessed very often.

So getting back to the original issue here of hard coded variables, here's a quick update:
I've been working on a different branch of the repo, which can be found here:
https://github.com/overdodactyl/ShadowFox/tree/variable_replacement
I've made some changes that should help quite a bit.  To start, I've made much better use of FF's built in variables (mostly those redefined in color_variables.css).  In doing so, I was able to cut a significant amount of code in the repo.  Additionally, this will make the visual appearance across pages a lot more consistent (previously, there were some variations from page to page in things like button colors, borders etc.).
I ended up changing the variable names from:
--primary-light-color: var(--grey-40);
 --light-accent-color: var(--grey-50);
 --mid-way-color: var(--grey-60);
--primary-dark-color: var(--grey-70);
--dark-accent: var(--grey-80);
 --darksest: var(--grey-90);
--primary-accent-color: var(--blue-40);
--primary-accent-color-dark: var(--blue-50);
--primary-accent-color-darkest: var(--blue-60);

to
  --tone-1: var(--grey-10);
  --tone-2: var(--grey-20);
  --tone-3: var(--grey-30);
  --tone-4: var(--grey-40);
  --tone-5: var(--grey-50);
  --tone-6: var(--grey-60);
  --tone-7: var(--grey-70);
  --tone-8: var(--grey-80);
  --tone-9: var(--grey-90);
  --accent-1: var(--blue-40);
  --accent-2: var(--blue-50);
  --accent-3: var(--blue-60);

I know this will annoy some people initially, but I think it was well worth the change.  The previous names I was using were a bit confusing, and they prevented me from using more variables (i.e. grey-10 --> 90).
For another layer of customization, all code in the repo now uses the second set of variables after these are defined (lines 66 ->  106).  This way, users can have more granular control.  For example, if someone wanted their main buttons to be a different color than their accent color, they would simply have to change the value of --in-content-primary-button-background.
I've also made better use of some code that was duplicated in bother userChrome and userContent (new common-files directory).  This also lead to an easy fix for some un-styled/ugly appearances in the about:preferences dialogue boxes (such the cookies menu, where things previously had an inverted color).
Lastly, I started using clean-css to help "beautify" the code.
All together, these changes reduced the code base by over 2,000 lines (!!).
There are a few exceptions to what's outlined above (I haven't yet gotten to replacing all --tone-x variables with other variables in the webextensions yet, for example).
I'll open a new issue when these changes go "live" in the master branch to make everyone aware of the variable changes, but just wanted to give a quick update.  And if anyone wants to give the variable_replacement branch a test and let me know if everything looks good, that would be great :+1:.

Oh, and @CarlColijn, due to a weird quirk in clean-css, I had to change the indicators that the scripts utilize from
/*! Begin color overrides */
/*! End color overrides */

to
--start-indicator-for-updater-scripts: black;
--end-indicator-for-updater-scripts: black;

All good things!  I think the benefits outweigh the inconveniences for users.  I assume clean-css strips /* */ comments?

It does strip /* */ comments, but it keeps them if you use the format /*! */.
Using the formatting option, you can specify whether or not there should be line breaks after a comment, but those settings aren't respected if you're in a root qualifier for some (undocumented) reason - probably worth opening a new issue, but didn't want to wait on that. So
/*! Begin color overrides */
/*! End color overrides */
--in-content-page-color: var(--tone-4)!important;
--in-content-page-background: var(--tone-7)!important;

would become
/*! Begin color overrides *//*! End color overrides */--in-content-page-color: var(--tone-4)!important;
--in-content-page-background: var(--tone-7)!important;

no matter the settings.

I think the hard coded values have all been removed - feel free to let me know if you run across any others


Compilation cache doc

More details on persistent compilation caching. Still a WIP.

I will review this PR because I am recently working on this topic.

Besides, I am recently working on adding LRU cache eviction support for the JAX persistent compilation cache, and here is the design doc: https://docs.google.com/document/d/111YibwGXOFb_hMm-lua1u63QooAzIBEH-xfRPGmibis/edit?usp=sharing. Linked here because I think it might be useful.

@keshavb96 Can you confirm that this is ready to merge? I will review it if so.

@nouiz @jaro-sevcik It looks ready to me, what do you think?

You should split long lines of sentences in to multiple lines, similar to other docs.

ping @keshavb96

@ayaka14732 sorry! I got busy working on something else and some medical emergencies, I will push the changes by tomorrow!

ping @ayaka14732

I am going to review this now


[20.03] Pantheon updates 2020-07-07

Motivation for this change
backports https://github.com/NixOS/nixpkgs/pull/92587 and some depending commits
Things done

[ ] Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
Built on platform(s)

[ ] NixOS
[ ] macOS
[ ] other Linux distributions

[ ] Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
[ ] Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
[ ] Tested execution of all binary files (usually in ./result/bin/)
[ ] Determined the impact on package closure size (by running nix path-info -S before and after)
[ ] Ensured that relevant documentation is up to date
[x] Fits CONTRIBUTING.md.

@ofborg test pantheon


Update Chinese translations for NPC Map Locations

Is this translationg OK?

Yep. Merged into develop for the upcoming NPC Map Locations 2.11.2. Thanks for the help!


game freeze during cutscenes

both of my Monitor lost the connection and the game freeze only duringg Cutscenes is it bc of the mod or the Game?

If your display is dropping, that sounds like a GPU driver crash. That sounds like a stability issue with your PC. You might want to pare back any overclocks you have (especially on the GPU) and run some stability tests.

I had the same question. Is it really stability issue? I didn't have this problem in other games.

I had the same question. Is it really stability issue? I didn't have this problem in other games.

If you're having the same symptoms then I would think it is a stability issue. This game is very demanding and I wouldn't be surprised if it's rooting out some unstable systems.

Btw did you have HDR on like me? Maybe the game just crashed and the HDR just turned off 🤔

im using HDR but i think the issue is maybe fullscreen that was the problem in the demo but not sure im playing on borderless window now and ill see

and i did 2 60 seconds furmark benchmark test and everything was alright no connection lost or anything i think its a bug from the game i just hope borderless window fixed this issue

After changing to borderless I didn't have the problem again

oh fr that sounds, but is the HDR Quality on the same level as Fullscreen?

Hm, I think it's the same.

Hello, I have the same problem in fullscreen. I don't have any overclocking.
The game freezes and the monitor loses connection.
I have to use ALT TAB to get back to the game window and reboot the PC (I can't access the Windows Task Manager).
I'll try borderless window to see if that solves the issue, but I hope borderless window doesn't have any impact on G-Sync/Freesync...

borderless window should solve the problem but im not sure about the impact on freesync and gsync

I'm experiencing the same type of issue. Game consistently crashes during specific cutscenes, in a way where I need to reboot my computer as I permanently lose all monitor connections. Happening in both borderless and fullscreen resoultions. Tried troubleshooting by adjusting various graphical and display settings, but the only thing that seems to fix it is to set [Remove 30FPS Cap] to false and leaving the cutscene Framerate set to 30.
On a Ryzen 3800X and 6900XT


"Generating Reference Documentation" contains outdated go commands

This is a Bug Report

Problem:
The page Generating Reference Documentation for the Kubernetes API
 mentions the following commands
go get -u github.com/kubernetes-sigs/reference-docs
go get -u github.com/go-openapi/loads
go get -u github.com/go-openapi/spec

Similarly in Generating Reference Documentation for kubectl Commands
go get -u github.com/spf13/pflag
go get -u github.com/spf13/cobra
go get -u gopkg.in/yaml.v2
go get -u github.com/kubernetes-sigs/reference-docs

These commands do not work with newer Golang versions (>1.17)
https://go.dev/doc/go-get-install-deprecation
go get -u github.com/kubernetes-sigs/reference-docs
go: go.mod file not found in current directory or any parent directory.
        'go get' is no longer supported outside a module.
        To build and install a command, use 'go install' with a version,
        like 'go install example.com/cmd@latest'
        For more information, see https://golang.org/doc/go-get-install-deprecation
        or run 'go help get' or 'go help install'.

Proposed Solution:
The documentation should be updated to be compatible with the new Golang versions (> 1.17).
The commands should be fixed.
Page to Update:
https://kubernetes.io/docs/contribute/generate-ref-docs/kubernetes-api/
https://kubernetes.io/docs/contribute/generate-ref-docs/kubectl/

/language en
/sig docs

I think this is a duplicate of https://github.com/kubernetes/website/issues/39638

I think this is a duplicate of #39638

There are few issues raised, so I will try to make some order.
#39638 talks about only one page - Contributing to the Upstream Kubernetes Code
This issue is a continuation of #39638, not a duplicate.
This issue is for the following pages

Generating Reference Documentation for the Kubernetes API
Generating Reference Documentation for kubectl Commands - which is also raised in #44633

Thanks @adityasamant25
/triage accepted


Remove duplicate License

This is a duplicate file

Hi @kristakhare thanks for your PR.  Our legal team requires that we have the LICENSE file as part of the produced artifacts.
There are also dependencies in the pom.xml referring to LICENSE.txt and LICENSE_TEMPLATE.txt as part of the build process that would need to be addressed.


Implement a Server-Database

Hey,
As I opened rooms.json I already thought my browser crashed :stuck_out_tongue_winking_eye:
It needs some kind of Database, I would probably go for Redis since it has a fast access time and would fit into the project. (Although it's not good to use if the host-systems RAM is not high enough, alternative for Redis would be MongoDB)
If you accept PRs, maybe I can look into it and implement some stuff.
Greetings!

Hi there,
Thanks for your feedback, and yes that JSON file is not for browsing of course :)  The server loads it on first launch, and keeps all data in memory, writing a history file to disk every 10 minutes and saving state when it's closed or crashes.
This was a deliberate choice to keep things simple during development (I'm new to Linux, Node, Express, React, libspotify, Github etc, so didn't want to be fighting DB performance / write / sync issues on top of an unfamiliar stack).
I agree it seems "obvious" we'd need a database - but to be honest I'm not sure we do, for now.  Happy to be convinced otherwise, but if we continue to grow in next few months I don't want more technology just for the sake of it - what would the advantages be for a system as dynamic as Soundbounce (I'm talking specifically about the data currently in rooms.json)?
Any database will be slower, and use more RAM than keeping all data in-process (unless the db has to go to disk to get the data, in which case the speed penalty will be very high, especially on our EBS-backed AWS instance), so I've not looked at this yet since what we've got is incredibly fast, and won't run out of the paltry 1GB RAM even with 10k users and 1k rooms (which is a pipe dream).
FYI we currently have almost 100 rooms, with around 7000 tracks in them, nearly 300 users and total data size is under 10MB.
However, having said all that, 2 aspects that I think where we could use redis in near future are:  user sessions (since there's already a redis adapter for express), and logging actions (logins, track plays, chats etc) so we can do things like #61
I'll definitely accept PRs (the Android version was my first ever PR!), let's discuss this further and make Soundbounce as great as we can, all input is appreciated since I'm new to most of this tech anyway ;)
Looking forward to discussing further.
Thanks,
Paul

Hi there,
Thanks for your feedback, and yes that JSON file is not for browsing of course :)  The server loads it on first launch, and keeps all data in memory, writing a history file to disk every 10 minutes and saving state when it's closed or crashes.
This was a deliberate choice to keep things simple during development (I'm new to Linux, Node, Express, React, libspotify, Github etc, so didn't want to be fighting DB performance / write / sync issues on top of an unfamiliar stack).
I agree it seems "obvious" we'd need a database - but to be honest I'm not sure we do, for now.  Happy to be convinced otherwise, but if we continue to grow in next few months I don't want more technology just for the sake of it - what would the advantages be for a system as dynamic as Soundbounce (I'm talking specifically about the data currently in rooms.json)?
Any database will be slower, and use more RAM than keeping all data in-process (unless the db has to go to disk to get the data, in which case the speed penalty will be very high, especially on our EBS-backed AWS instance), so I've not looked at this yet since what we've got is incredibly fast, and won't run out of the paltry 1GB RAM even with 10k users and 1k rooms (which is a pipe dream).
FYI we currently have almost 100 rooms, with around 7000 tracks in them, nearly 300 users and total data size is under 10MB.
However, having said all that, 2 aspects that I think where we could use redis in near future are:  user sessions (since there's already a redis adapter for express), and logging actions (logins, track plays, chats etc) so we can do things like #61
I'll definitely accept PRs (the Android version was my first ever PR!), let's discuss this further and make Soundbounce as great as we can, all input is appreciated since I'm new to most of this tech anyway ;)
Looking forward to discussing further.
Thanks,
Paul

While I totaly aggree with you about the current setup, I would see a huge potential in the future.

I agree it seems "obvious" we'd need a database - but to be honest I'm not sure we do, for now. Happy to be convinced otherwise, but if we continue to grow in next few months I don't want more technology just for the sake of it - what would the advantages be for a system as dynamic as Soundbounce (I'm talking specifically about the data currently in rooms.json)?

For now, yes of course, it's reliable and fast. I don't know what your plans are, but maybe at sometime there will be a website(with login etc.) and then we would need to implement some kind of database-storage. But I guess you're right, it will take some time until we get to this point.

While I totaly aggree with you about the current setup, I would see a huge potential in the future.

I agree it seems "obvious" we'd need a database - but to be honest I'm not sure we do, for now. Happy to be convinced otherwise, but if we continue to grow in next few months I don't want more technology just for the sake of it - what would the advantages be for a system as dynamic as Soundbounce (I'm talking specifically about the data currently in rooms.json)?

For now, yes of course, it's reliable and fast. I don't know what your plans are, but maybe at sometime there will be a website(with login etc.) and then we would need to implement some kind of database-storage. But I guess you're right, it will take some time until we get to this point.

You always need a database. Never, ever use plain old flat files. Not because it's "not modern enough" but, just urgh.

You always need a database. Never, ever use plain old flat files. Not because it's "not modern enough" but, just urgh.

Don't worry @Westie, @pdaddyo knows what he is doing, it's actually his years of experience that has lead him to avoid the database for as long as possible, and to keep things simple.
10 years ago you would probably be forgiven for such a statement, as there was only one or two choices. There are so many databases, and types of databases, to choose from these days you are better off delaying that sort of decision until you know as much as possible. Especially when iterating early on in a project, of which this project is only about a month and a half old.
I'm sure pull requests would be welcomed for a database implementation should you wish to fill the void.
Keep up the great work @pdaddyo !

Thanks @Jmaharman
I'm still not hearing a single answer for why we need a database now apart from "urgh" and "you always need a database".  This is the first system I've ever built without a database from the get-go, and it's surprised me how effective it's been.  You guys haven't stated an actual advantage to moving away from this setup yet - as I said I'm still happy to be convinced otherwise, but through technical merit, not dogma.
@JohnnyCrazy the system effectively is a website as it stands, and supports logging in, social features, realtime chat and of course synchronising music across the connected clients.  This has been stable across thousands of sessions since we launched a few weeks ago.
As stated we will accept pull requests, so please get involved!

I was having a discussion with Paul in Indie ETC. and uh, he actually convinced me.
I still thinking that having a proper DB in there, either NoSQL or SQL based, would be good for stuff like API access (which, would be cool) but, after him showing me some stats, I'm quite amazed.
There, I said it. I've done a kind of u-turn.

Think we can all agree onto the following: Soundbounce currently doesn't need a Database, but 'maybe' sometimes in the future (for APIs etc.)?

Thanks David, your bribe is in the post!  Definitely agree about a DB for
some future features, we'll look to community for input here (I'm thinking
redis for user sessions, and to log every play, chat, vote, add, etc so we
can do some processing "offline" like Top lists, stats page and so on)
On Fri Jan 02 2015 at 14:44:58 David Weston<EMAIL_ADDRESS>wrote:

I was having a discussion with Paul in Indie ETC. and uh, he actually
convinced me.
I still thinking that having a proper DB in there, either NoSQL or SQL
based, would be good for stuff like API access (which, would be cool) but,
after him showing me some stats, I'm quite amazed.
There, I said it. I've done a kind of u-turn.
—
Reply to this email directly or view it on GitHub
https://github.com/pdaddyo/soundbounce/issues/137#issuecomment-68530907.

You don't need a database, that would introduce too much latency without any real benefits. I would suggest splitting out the rooms state into separate files, basically 1 file per room, you load the file in memory when the room is accessed and you flush the state to disk every n minutes.
The Soundrop servers were implemented in Erlang, I would recommend looking at it. You could then model a room as a process and a user session as a process as well and keep things smooth, fast and very simple.
Hope this helps.

Thanks for your input @asabil. When the homepage is loaded, all rooms need to be in memory in order to have the correct "now playing" track artwork show up, so lazy-loading rooms isn't an option for us I don't think.
Interesting to hear Soundrop backend was developed using Erlang - is there any chance that code could be open-sourced now that the service has closed?
I'm closing this issue for now, will re-open if we look at DBs again in future.


can't type letter l (as in word - help)

We have written the needed data into your clipboard because it was
Issue Type: Bug
letter l (small letter L) is not typed, for example, a word help, would be hep. When i press l key on my keyboard nothing happens. When I press Shift+l i can type capital L, but i can't type normal l.
When I run Jupyter notebook in VSC I can type small l without any issues.
I tried all kinds of keyboards in Windows (French, German, English) nothing helps, i can't type l anywhere in vsc. Not for the file name nor somewhere inside the code. Only in Jupyter notebooks
I can also type l properly in Terminal
I tried to uninstall and reinstall VSC, the problem still persists.
 Please paste.

Please see https://github.com/microsoft/vscode/wiki/Keybinding-Issues to investigate whether your 'l' key is bound to a command.

Thanks! indeed it was bounded to a command.


cmd completion improvement

hi, i use mycli before, the code completion seems to be quick, can usql make the improvement of code completion?
great thanks for this amazing tool

Completion in usql works differently than in mycli. What specific improvements do you have in mind?

thanks for your quick response.
1, wish to complete without tab pressed
2, drop down list seems to be much clear than flattern list. please theck the images
3, completion seems not working for some words. for example: use mysql, i input us, press tab, nothing happened. and i input use m, press tab, no completion. wish it can tell me the db started with m, such as mysql, etc.
images here
drop_down_list completion from mycli

flatten_list completion from usql

1 and 2 depend on the particular readline library we're using and we cannot change this without replacing this whole library.
Right now we have a single completer that's enabled for all databases, so it doesn't recognize keywords that are only used by some of them. USE is a good example here. There is a possibility to configure a custom completer for each driver, so it can be extended to support some special keywords. Getting a list of databases in MySQL would be trivial, given there's already a metadata reader available that can list schemas.
If you don't mind, I'll edit the title of this issue to better reflect that this is mostly about MySQL.

thank you very much


Getting two errors upon startup

Assets\Editor\OpenAIUtil.cs(28,28): error CS1503: Argument 2: cannot convert from 'string' to 'System.Collections.Generic.List<UnityEngine.Networking.IMultipartFormSection>'
Assets\Editor\OpenAIUtil.cs(28,59): error CS1503: Argument 3: cannot convert from 'string' to 'byte[]'

Please check the system requirements on README.

I close this issue now. Please reopen it for further issues.

alr thanks

So to use older version of unity, you could use this code
byte[] databyte = Encoding.ASCII.GetBytes(CreateChatRequestBody(prompt));

// POST
var post = new UnityWebRequest(OpenAI.Api.Url, UnityWebRequest.kHttpVerbPOST);

post.uploadHandler = new UploadHandlerRaw(databyte);
post.downloadHandler = new DownloadHandlerBuffer();
post.SetRequestHeader("Content-Type", "application/json");

to replace
this part
https://github.com/keijiro/AICommand/blob/main/Assets/Editor/OpenAIUtil.cs#L27-L28


Opening uplink changes the game window title to Uplink

Thanks to @netwy on Discord for finding this.
Description

Opening uplink changes the game window title to Uplink
Reproduction

Spawn uplink
Open it
Now your game window title is Uplink until you relaunch the client

Screenshots

Additional context

OH SO THAT'S WHAT THAT WAS

Incredible.


Webpack Causing Uncaught ReferenceError: rangePlugin is not defined

https://jsfiddle.net/9ez4h3nk/1/

flatpickr version used: 4.6.3
Browser name and version: Chrome 80.0.3987.149
OS and version: Windows 10

All code works when using direct imports as shown in the jsfiddle.
When using Webpack as shown below, I'm receiving an Uncaught ReferenceError: rangePlugin is not defined. It could be my webpack setup, but from what I've seen, it looks correct.
app.js
import "flatpickr/dist/flatpickr.min.css";
import flatpickr from "flatpickr";
import rangePlugin from 'flatpickr/dist/plugins/rangePlugin'

Looks like the same issue as: https://github.com/flatpickr/flatpickr/issues/2144 but a different plugin.

This works but kicking the plugin up to a global seems like a hack.
import "flatpickr"; global.rangePlugin = require("flatpickr/dist/plugins/rangePlugin"); import "flatpickr/dist/flatpickr.min.css";

Hi! I know your query is from a long time ago, but I was wondering if you managed to fix it? Right now I'm in your same situatio

In my case I used the monthSelect plugin and wrote this to the Webpack entry point.


How to get Started?

Hi!
I'm a Nix and NixOS novice but I'm very intrigued by devos and the idea of "standard issue" operating systems and dev environments (especially if they could be automated as WSL VM's). But I'm having a bit of trouble getting started on my (bare metal) NixOS 20.09 installation.
I assumed that if I follow the instructions at https://devos.divnix.com/start/index.html that... well, I'm not sure what will happen actually, but I was hoping it would be obvious when I got there :sweat_smile:
But instead I get the following:
$ nix-shell https://github.com/divnix/devos/archive/core.tar.gz -A shell --run "flk get core"
unpacking 'https://github.com/divnix/devos/archive/core.tar.gz'...
error: opening file '/nix/store/0b66qq08r921pbr40qrajidqqsknh3gs-xscreensaver.pam.lock': Permission denied
(use '--show-trace' to show detailed location information)

When I run the same command with sudo I apparently run out of memory
sudo nix-shell https://github.com/divnix/devos/archive/core.tar.gz -A shell --run "flk get core"
[sudo] password for d4hines:
warning: dumping very large path (> 256 MiB); this may run out of memory
error: out of memory

(this machine has 64GB of memory :thinking:)
Then I had a big-brain moment: this is Nix, and there's a default.nix file in the root, so I should be able to just clone it and build it, ya? But alas, I get different errors depending on what I try. From my default nix-shell, I cloned the repo, and ran nix-shell and I was greeted with 🔨 Welcome to devshell, which was a good sign!
flk up worked. However, flk nixos switch gave the the following error output:
[sudo] password for d4hines:
error: unrecognised flag '--experimental-features'
Try 'nix --help' for more information.

That's very discouraging, as the whole point of trying out Nix was to avoid issues like this. Nonetheless, I will keep trying! On a hunch, I tried removing all references to experimental-features in the repo, but this had no effect.
Any help would be greatly appreciated!

flk get core doesn't work for me either - I've never actually used it before:
error (ignored): error: creating file '/nix/store/add-171757-0/x/.links/0zbhlnbw9j58ixrv90cnifdd2nk2ivcjkf8a288icdxi25kvj5hj': No such file or directory
error: getting status of '/nix/store/.links/1b939lzbwi61w706imgfj20i8r7yp23xfrxdds2ghk8fw2jv5a4f': No such file or directory
(use '--show-trace' to show detailed location information)

Definitely a bug that we should figure out, or recommend a better method to get started with devos.
I'm not sure whats up with the other issue, if your in the devshell you should be using the same version of nixFlakes as I am and my nix version definitely has that flag. I tried flk NixOS switch and that evaluated ok. Make sure you spell the host right, the first argument to flk is supposed to be the name of the host file without the .nix suffix.
Can you also post the output of nix --version your in the devshell.

Ohh first issue is both of us misunderstanding the flk get command: it goes flk get core [DEST], so without the destination I guess the script tries to write to a random folder.
But either way that command is almost the same as cloning the repo, so we need to resolve your second issue, to get you started with flakes.

$ nix --version
nix (Nix) 2.3.10

$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.3.10, channels(d4hines): "home-manager-20.09", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Here's my /etc/nixos/configuration.nix (it's almost completely vanilla) https://gist.github.com/d4hines/3c9591ab5007bccc1bed69128b62f610
The only thing that stands out to me is the home-manager channel. Still, I thought Nix could pave over all such issues.

You ran nix --version while in the devshell right?
Because thats odd then the devshell didn't override the nix command properly and I'm guessing --experimental-features was added in in nix 2.4.

No! I didn't think to do that, woops.
Here's the same from inside devshell:
[devshell]$ nix --version
nix (Nix) 2.4pre20210308_1c0e3e4

[devshell]$ nix-info
system: "x86_64-linux", multi-user?: yes, version: nix-env (Nix) 2.3.10, channels(root): "nixos-20.09.4038.d90df566caf", channels(d4hines): "", nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

[devshell]$ which nix
/nix/store/2iikmq5ng672s2g938yw0v2zasq2z4z3-devshell-dir/bin/nix

And, just to confirm, I'm running flk NixOS switch because of  the ./hosts/NixOS.nix file. I tried flk up-nixos switch to see and that didn't work either.
Here's the exact outputs
[d4hines@nixos:~/repos]$ git clone https://github.com/d4hines/devos.git
...

[d4hines@nixos:~/repos]$ cd devos/

[d4hines@nixos:~/repos/devos]$ nix-shell
<big welcome message>

[devshell]$ flk up
writing /home/d4hines/repos/devos/up/nixos/hardware-configuration.nix...
writing /home/d4hines/repos/devos/up/nixos/configuration.nix...
For more hardware-specific settings, see https://github.com/NixOS/nixos-hardware.

[devshell]$ flk NixOS switch
error: unrecognised flag '--experimental-features'
Try 'nix --help' for more information.

So I think I figured it out, it looks like nixos-rebuild by default gets hardcoded to a nix path. This gets fixed once you build a system with nix.package = pkgs.nixFlakes. But obviously thats not a valid assumption for someone getting started with flakes.
I pushed a possible fix to the fix-rebuild branch on this repo. Can you try using that branch and see if your able to rebuild.

Yes that seems like the right thing to do. up-nixos should include the proper configuration for your filesystems and hardware. It should also include core profile which has a good baseline and shell to start from.
Just for organizational purposes, I personally prefer combining all the configs into one file in the hosts directory. If you notice you now also have two files in the ./up directory. And also you could rename hosts/up-nixos.nix to hosts/<your hostname>.nix. Just things to consider in the future when your organizing the repository.

Hey! I think it's working! i encountered a lot of weird issues along the way because hardware-configuration.nix was pulling in random docker stuff that was causing boot to fail. But, I have to admit, it's really nice to just switch to a previous generation that works and try to fix it.
My current hurdle is that when I try enabling KDE Plasma as I did before, I just boot into a black screen. How do I enable a desktop with this set up?

You should be able to enable it like normal: services.xserver.desktopManager.plasma5.enable, but I assume thats what you tried.
Did you enable a display manager too? services.xserver.displayManager.sddm.enable = true.

This is exactly what I tried (uncommented of course): https://github.com/d4hines/devos/blob/hope/up/nixos/configuration.nix#L49-L50
Also, @Pacman99, you're my hero for walking me through this the last two weeks!

This is exactly what I tried (uncommented of course): https://github.com/d4hines/devos/blob/hope/up/nixos/configuration.nix#L49-L50

Just to be clear, services.xserver.enable = true was un-commented too right?
Also you might need to set hardware.opengl.enable = true.
If that doesn't work, it could be a nixos error, you can try posting an issue upstream. Those are my best guesses for a black screen appearing.

This is exactly what I tried (uncommented of course): https://github.com/d4hines/devos/blob/hope/up/nixos/configuration.nix#L49-L50

Just to be clear, services.xserver.enable = true was un-commented too right?
Also you might need to set hardware.opengl.enable = true.
If that doesn't work, it could be a nixos error, you can try posting an issue upstream. Those are my best guesses for a black screen appearing.

Typically when I get a black screen the fix is to add the nvidia driver (if you have an nvidia card).

Hmm. That's good to know, but I have an AMD card. Do I need special drivers for that? I haven't retested this config yet with Pacman's suggestion of opengl.enable = true - instead of been using my hobby time to try to get DevOS working with WSL2.

Gonna close this issue now. Thanks for the help all.


Chromecast feature

It would be great to have Chromecast feature.

Chromecast would be cool but will require some backend work as well. With AirPlay, the device streams the video content to your Apple TV. With Chromecast you queue up a stream on the Chromecast device and the Chromecast device streams it from your backend site. So definitely possible, but making it work with the protected streams will require some work

I have a feeling that it already works via the Android app.
We don't actually have protected streams available (from Vimeo). We limit access to the URL—which although far from ideal, is deemed as acceptable risk for now.

I have neither an Android device nor Apple TV.
Well, about 2 years ago I developed a custom Chromecast receiver web client for a protected (DRM) stream, as well Android client. On both side communication wasn't big deal, the challenging part was managing the Chromecast states on mobile side.
I don't think the development is the issue for you guys, however if you don't have time is also understandable, and since it's open source application; I might contribute for the both side if I have enough time. But, I guess the really issue is that your content provider doesn't support DRM so you don't want to risk it to open it.

With the current installation steps and lack of SwiftPM support I'd be against adding this as it will add a lot of complexity to the build setup and potential confusion for readers when looking at the app

I agree with Tim. Feel free to close this, or just put it on ice until the set up is a lot cleaner.

Closing for now.


importing manifest, does not show up

after importing manifest, extension does not show up. server is restarted, and still does not show up
however importing nostrclient extension is working, as are others. I am using latest commit from lnbits main branch commit f2849a6e68f229bc95cbc038ec0e89ab5aad3cca, March 8, 2023
link used:
https://raw.githubusercontent.com/lnbits/nostr-relay-extension/main/manifest.json

I had the same issue. Looking at the logs it looked like lnbits was hitting a 403 limit reached from github. The solution for me was to simply authenticate by providing an ssh key of lnbits to my github account.

I've just re-tested, works fine:
https://raw.githubusercontent.com/lnbits/nostr-relay-extension/main/manifest.json


Disable identity validity check

Switch skipIdentity flags to true

hey @michalisFr, can you clarify with a link (or two) why this is needed ? i.e. identity being frozen on Kusama

hey @michalisFr, can you clarify with a link (or two) why this is needed ? i.e. identity being frozen on Kusama

@ironoa As part of the identity migration to the People system parachain, as described here, the identity pallet is frozen on Kusama, that happened in runtime 1.2.0. As a result, no new identities can be created for the time being.
Following that, once the process is complete, identities will be issued on the People chain (next step probably in 1.2.4), which means a refactoring of the backend will be needed for the identity check.
Until all of this is done, it's best to disable this check to allow people to join the program and avoid breaking changes.


Discussion: Best API for stubbing methods?

Currently, to stub methods on a component you need to do this:
const wrapper = mount(TestComponent)
wrapper.vm.clickHandler = sinon.stub() // Stub the method
wrapper.update() // Force the vm to update
wrapper.find('button').trigger('click')
expect(wrapper.vm.clickHandler.called).to.equal(true)

I think we should either add a method, or an option that stubs component methods:
// Method
const wrapper = mount(TestComponent)
wrapper.stubMethod(clickHandler, sinon.stub()) // Stubs the method and forces update
wrapper.find('button').trigger('click')
expect(wrapper.vm.clickHandler.called).to.equal(true)

It could also be called setMethods, like the setData and setProps methods, and take an object.
// Option
const wrapper = mount(TestComponent, {
    stubMethods: { // stubs methods before mount
        clickHandler: clickHandlerStub
    }
})
wrapper.find('button').trigger('click')
expect(wrapper.vm.clickHandler.called).to.equal(true)

Personally I prefer the stubMethod/ setMethods approach, but I'd like to hear peoples thoughts 🙂

I previously had a hook that was called before the component was mounted, which exposed a deep copy of the component so you could manually stub it's methods (without affecting the original component). But i actually really like your approach, I think it's really simple.
A couple of thoughts:

would you want the option to restore a stubbed method at a later point?
could you stub a method without having to provide an alternate function {clickHandler:true}
what about computed properties? There have been times when a method relies on a computed property that is so complicated it's taken me far outside the purpose of my unit test just to get the right computed value!

I prefer setMethods as it is consistent with setData and setProps. However, I think there should also be a method to retrieve them as it could be confusing that you then have to use the vm to check if it has been called.
wrapper.stubMethod(clickHandler, sinon.stub())
...
expect(wrapper.vm.clickHandler.called).to.equal(true)

With the current way, at least the way you set and get is consistent.
wrapper.vm.clickHandler = sinon.stub()
...
expect(wrapper.vm.clickHandler.called).to.equal(true)

@philefstat
We could recommend this pattern:
const clickHandlerStub = sinon.stub()

wrapper.stubMethod('clickHandler', clickHandlerStub)
...
expect(clickHandlerStub.called).to.equal(true)

Or this:
const clickHandlerStub = sinon.stub()

wrapper.stubMethods({
  clickHandler: clickHandlerStub
})

@jackmellis

would you want the option to restore a stubbed method at a later point?
I don't think so, with stubMethod you could save the original before stubbing and then restore it later with the same method.

could you stub a method without having to provide an alternate function {clickHandler:true}
Yeah I think that's a good idea

what about computed properties?

Yes I think that a setComputed method would be a good idea if setData does not work for a use case. Would you be able to provide example where setData doesn't work, so I can use it as a test case?

@eddyerburgh those both look great 👍
That pattern also allows some of the useful sinon methods to be called on the stub without reaching directly into the vm.
i.e.
clickhandlerStub.resetHistory()
stubMethods could be quite useful for larger components with multiple methods that need to be stubbed.
const methods = {
  foo: sinon.stub(),
  bar: sinon.stub(),
  baz: sinon.stub()
}

wrapper.stubMethods(methods)

...

expect(methods.foo).to.be.calledOnce
expect(methods.bar).to.be.calledTwice

There's now a setMethods method.
We should have a setComputed method too. I've created a new issue for that:
https://github.com/vuejs/vue-test-utils/issues/55

Hi All,
  const spy = sinon.stub()
  wrapper.setMethods({ onClickCreate: spy })
  wrapper.find('#btn-create-proposal').trigger('click')
  expect(spy.called).toBe(true)

this is not working.
In Actual the method defined in component being mounted is being called.
Thanks for help in advance

Hey guys,
Hey guys, I have this file picker component that I am trying to test. The component receives the file through the takeFile method.
<script lang="ts">
import { defineComponent, ref } from '@nuxtjs/composition-api'
import AppButtonCard from '~/components/Button/AppButtonCard.vue'
export default defineComponent({
  components: {
    AppButtonCard
  },
  setup (_props, { emit }) {
    const isDraging = ref(false)
    const openFilePicker = () => {
      (document.querySelector('#file-upload') as any).click()
    }
    const handleSelectedFiles = (e: any) => {
      const file = takeFile(e)
      if (isValidFile(file)) {
        emit('getFile', file)
      } else {
        emit('invalidFile')
      }
    }
    const takeFile = (e: any) => {
      return e.dataTransfer ? [...e.dataTransfer.files][0] : e.target.files[0]
    }
    const isValidFile = (file: File) => {
      try {
        const acceptedSuffixTypes = ['pdf', 'epub', 'txt', 'docx', 'rtf']
        const fileName = file.name
        const dot = fileName.lastIndexOf('.')
        const suffix = fileName.substr(dot + 1)
        if (acceptedSuffixTypes.includes(suffix)) {
          return true
        } else {
          return false
        }
      } catch (_) {
        return false
      }
    }
    return {
      openFilePicker,
      handleSelectedFiles,
      isDraging
    }
  }
})
</script>

I am trying to mock the takeFile method so that when it is called, it uses the mocked file. I am making use of sinon. But it seems the fileis not getting into the component.
import { mount } from '@vue/test-utils'
import sinon from 'sinon'
import FileUpload from './FileUpload.vue'
describe('~/components/Files/FileUpload.vue', () => {
  it('it emits an error when an invalid file is picked.', () => {
    const invalidFile = {
      name: 'image.png',
      size: 2887225,
      type: 'image/jpeg',
      lastModified:<PHONE_NUMBER>625,
      lastModifiedDate: 'Thu Dec 16 2021 17:18:30 GMT+0100 (West Africa Standard Time)'
    }
    const takeFile = sinon.fake.returns(invalidFile)
    const wrapper = mount(FileUpload, {
      mocks: {
        takeFile
      }
    })

    const fileInput = wrapper.find('input[type="file"]')
    fileInput.trigger('change')

    expect(wrapper.emitted().invalidFile).toBeDefined()
  })
  it('it emits the file when the file is valid and has been processed.', () => {
    const validFile = {
      name: 'document.pdf',
      size: 2887225,
      type: 'application/pdf',
      lastModified:<PHONE_NUMBER>625,
      lastModifiedDate: 'Thu Dec 16 2021 17:18:30 GMT+0100 (West Africa Standard Time)'
    }
    const takeFile = sinon.fake.returns(validFile)
    const wrapper = mount(FileUpload, {
      mocks: {
        takeFile
      }
    })
    const fileInput = wrapper.find('input[type="file"]')
    fileInput.trigger('change')

    expect(wrapper.emitted().getFile).toBe([[validFile]])
  })
})

Please, I urgently need help with this.
I have tried this and it's not working.
I think it's because I am using the composition API and I think this should work in the options API
I have also tried accessing the takeFile method directly like this
wrapper.vm.takeFile = sinon.fake.returns(validFile)


How to add a timeout to requests?

I'm trying to deal with links of closed sites like this one: bac.onec.dz.
If you try it here you will not gonna get a response form the server, because the site is closed, so it should be a timeout there.
That's my code (USING EXPRESS.JS):
app.get("/api", async function(request, response) {
  var url = request.query.url;
  if (url) {
    url = decodeURIComponent(url);
    if (!url.match(/^[a-zA-Z]+:\/\//)) url = "http://" + url;
    console.log(url);
    const data = await getLinkPreview(url).catch(err => response.send('URL Error'));
    if (data) response.send(data);
  } else {
    response.send("Query Error");
  }
});

And that's the project link: https://glitch.com/edit/#!/embed-js .
So how? and thanks :)

The library already parses urls for you with a more advanced regex
Right now there is no way to specify a timeout, but you can implement something on your own, https://stackoverflow.com/questions/46946380/fetch-api-request-timeout#46946573

Thx, but about the first point, It didn't really accept links without prefix protocol.
Should I to use fetch first to check if the server works? Isn't that make it slower?

ah, you are right, I might check if I can also include domains without protocol... chrome does it but I'm not sure about the edge cases
no, don't re implement the fetch call, but  getLinkPreview returns  a promise, you just have to check what returns first, the timeout or the getLinkPreview promise, so you can implement the same logic as in the snippets, but just replace the fetch call with the promise returned by getLinkPreview

By adding a setTimeout there then doing a check for the returned value?

The snippets are quite clear IMO, just pick w/e works for you

It works! Thx :)
By the way you can [remix](https://glitch.com/edit/#!/remix/embed-js the

Mistake*
It works! thanks :)
By the way you can remix the project and add it as a live demo if you want. :+1:


Transform Confusion

So can JEXL be used as a tranform language or just an expression evaluator only?
For example, if I wanted to use JEXL against the following:
{
"name": {
"first": "Sterling",
"last": "Archer"
},
"assoc": [
{
"first": "Lana",
"last": "Kane"
},
{
"first": "Cyril",
"last": "Figgis"
},
{
"first": "Pam",
"last": "Poovey"
}
],
"age": 36
}
and simply return the array contents of "assoc" but with last names upper-cased, is that possible with JEXL? (i.e i would like to output something like this:
[
{  "first": "Lana",  "last": "KANE"    },
{  "first": "Cyril",  "last": "FIGGIS"    },
{  "first": "Pam",      "last": "POOVEY"    }
]

JexlPlayground
You can add the following transform (for example)
mapToUpper: (arr) => arr.map(o => ({first: o.first, last: o.last.toUpperCase()}))
And you can call it like this
assoc|mapToUpper


Python exception when trying to login : "(insecure_transport) OAuth 2 MUST utilize https"

This fault started to occur recently without any clear cause.
The car is an VW ID.4 from 2023
The VW connect app still works as before.
Libraries installed
certifi            2024.8.30
charset-normalizer 3.4.0
idna               3.10
oauthlib           3.2.2
pip                24.3.1
requests           2.32.3
RPi.GPIO           0.7.1
setuptools         66.1.1
urllib3            2.2.3
weconnect          0.60.5
Any ideas on how to troubleshoot or solve?

Is this still the case after a restart?

Same behavior after restart for me. Tried manually running all vehicles example or even through home assistant.

Hi
I noticed that we don't get a full URL here anymore but an absolute path /signin-service/v1/...
https://github.com/tillsteinbach/WeConnect-python/blob/main/weconnect/auth/we_connect_session.py#L247
This will fail the 'is_secure_transport' check here
https://github.com/oauthlib/oauthlib/blob/master/oauthlib/oauth2/rfc6749/utils.py#L79-L83
Anyways, the 'terms-and-conditions' segment in the path made me wonder if there is some new agreement.
I logged in to https://myvolkswagen.net/ via browser and there I had to accept some agreement.
Now the error is gone.
This is the full path the request returned
/signin-service/v1/{...}@apps_vw-dilab_com/terms-and-conditions?relayState={...}&canChangeCountryOfResidence=false&userId={...}&updated=dataprivacy
(I replaced sensitive data with {...}
Maybe we can adapt the error message to give a hint that a new agreement must be accepted? 🤷

When did you login to https://myvolkswagen.net/ ?
I cannot access this page, I get error 404.
Seems like VW is stirring some things up.

I can confirm that the same solution worked for me.
https://myvolkswagen.net redirected me to the Finnish page and once I logged in and accepted the terms restarting the container was enough and everything seems to be working once again.
It's quite weird that the mobile software once again kept working without accepting new terms :S

It's quite weird that the mobile software once again kept working without accepting new terms :S

@kipe I agree. There must be some way to skip the agreements, since the mobile app still can connect.
Unfortunately, I have no clue how to debug this. 😄

You will probably also see this when logging out and in again in the app.


Evaluate ZFS

Just here as a reminder. Won't involve any code in this project since I'll only be creating it once.
Currently leaning toward ZFS over MergerFS+SnapRaid for the data volumes.

Built a pool out of 4 * 3-wide RAIDz1 VDEVs and throwing some test data on it. Will see how it goes.
With that decision tentatively made, issues #13 and #12 are now more urgent.


Is this project actively maintained?

There are many pull request not reviewed and merged

rip

Doesn't appear to be and the documentation is lacking so it's difficult to even perform basic customizations like changing column headers or modifying the context menu :(

someone needs to fork it

这个插件从整体上来看  更适合二次开发

@x68507 the column labels ("A", "B", "C", ...) appear to be hardcoded https://github.com/myliang/x-spreadsheet/blob/master/src/component/table.js#L236


Make fly available for download without authentication to concourse

Enhancement: Make fly download URI available without authentication or ship as separate binary.

Is there any reason that fly  shouldn't be available to download without authentication?

It already is downloadable if your CI is publicly reachable, so not sure what this means.

I was unable to reach the the download fly using the URL http://<IP_ADDRESS>:8080/api/v1/cli?arch=amd64&platform=linux, it was not reachable.  After logging into concourse I can resolve the URL and download the package.  I am scripting the fly download and install in chef but cannot download the package on the server running concourseci using wget or remotefile resource.

@vito I was actually wondering the opposite. If it isn't public accessible, why can't I still do a sync? Shouldn't sync be one of the few things that doesn't require you to login?
I could imagine a scenario where we make a backwards incompatible change to concourse login and then all of a sudden you can no longer login to get a fly that can actually login. Obviously they would just go to the UI at this point and download it but still

done here: https://github.com/concourse/atc/pull/76
cc @vito

Not sure if this is the same issue: https://github.com/concourse/fly/issues/82

@dvanbuskirk As mentioned in https://github.com/concourse/atc/pull/76 I'm a little wary of opening any endpoints up except for those that are absolutely necessary for logging in.
If it's acceptable to give creds to your script, you could use basic auth and fetch the CLI like so:
token="$(curl -u user:pass http://your.concourse.ci/api/v1/auth/token | jq -r '.type + " " + .value')"
curl -H "Authorization: $token" 'http://your.concourse.ci/api/v1/cli?arch=amd64&platform=linux'

@vito thanks for the workaround, security is always good.


Losing text with A tag

More lost text, this time the text in the A tag, if it has no href.
test.zip

fixed, thanks again


Add a data scraper for Etrade

Probably a chromium extension or something like that.

Writing the extension itself might be more work that it is worth.
An alternative was proposed to me, which was to just download all of the PDFs for the year, and auto-parse them once they're in a directory.
Some proposed parsing script, which might be useful with some modifications: https://0bin.net/paste/aQ-9H-t6#TNmQhS76T04HJnIYfb+Wt+6patkTaa9ZFVT6dBfwvc8

Fixed in 049d72b727633f9c798c58bb8ffef7b06ed014f4


As an Applicant, I want to be able to confirm that I submitted my application using the web form via a confirmation email

Use Double Opt In example from
https://community.sugarcrm.com/community/developer/blog/2018/04/23/explicit-consent-and-implementing-double-opt-in-doi-in-sugar


TelemetryConfiguration during ConfigureServices

OriginalPosted by Nisheet Jain
I believe this is a bad pattern to follow?
IServiceProvider serviceProvider = serviceCollection.BuildServiceProvider();
https://github.com/Microsoft/ApplicationInsights-Kubernetes/blob/578f20e824e6248029554a1f8990b29c4a7c6d11/src/ApplicationInsights.Kubernetes/TelemetryInitializers/KubernetesModule.cs
my issue is that I don’t have the TelemetryConfiguration available initially (during ConfigureServices) and I am looking for a lazy pattern to enable this.  Is there a workaround you can propose?

@cijothomas , @SergeyKanzhelev any updates on this?
IMO we shouldn't try to create a partial ServiceProvider by calling serviceCollection.BuildServiceProvider();

@nisheetjain Please give me some info about what you are trying to achieve.
Are you trying to add a new TelemetryModule in ConfigureServices, and cannot do it since TelemetryConfiguration is not available?

You can add new TelemtryModule to the service collection like already done by SDK. https://github.com/Microsoft/ApplicationInsights-aspnetcore/blob/develop/src/Microsoft.ApplicationInsights.AspNetCore/Extensions/ApplicationInsightsExtensions.cs#L168
Before Configure() method is called, application insights sdk configuresTelemetryConfiguration and calls Initialize(telemetryConfiguration) on all registered TelemetryModules.

@cijothomas I get the correct instrumentation key in a lazy pattern.
this means that when I call

services.EnableKubernetes

I don't have the instrumentation key
Will EnableKubernetes work with out that?

Sorry I am not sure what is your specific question here. I am not so familiar with Kubernetes. :(
Can you rephrase your question to help me understand the issue you are trying to solve.

@cijothomas they are evil - using .Active config. You may want to talk to them.
https://github.com/Microsoft/ApplicationInsights-Kubernetes/blob/578f20e824e6248029554a1f8990b29c4a7c6d11/src/ApplicationInsights.Kubernetes/Extensions/ApplicationInsightsExtensions.cs#L14-L26
@nisheetjain if you follow instructions and set env variable APPINSIGHTS_INSTRUMENTATIONKEY on container - this variable should be used as a key. So you do not need to specify it explicitly in code.
@cijothomas, btw, will this env variable logic work in case of multiple apps in the same process? Just curious.

@SergeyKanzhelev I can't use the env variable since I don't have the key available at the deployment time unless you are saying I can set it at any point during application runtime and it will get picked
my scenario is something like
services.EnableKubernetes((serviceProvider) => TelemetryConfiguration.Active.InstrumentationKey = {serviceProvider.GetService<IFoo>().GetInstrumentationKey});

Sure. So what's the question than?

@karolz-ms and @xiaomi7732 from ai-kubernetes repo

@nisheetjain If I understand right, you are trying to use application insights for Kubernetes and you are saying you won't have application insights key at the deployment time but you will have it in the runtime. That means, you can use it with in your code, is that correct?

EnableKubernetes() follows whatever the iKey the application insights SDK uses. That means, you can use whatever way is provided by the standard Application Insights SDK provide in this document.
If there is any further question specific to Application Insights for Kubernetes, feel free to open issue here.

Thanks,
Saar

Thanks @xiaomi7732 that should work for me!!!

Closing as no further action on AI SDK side. Please reopen if there is something still unanswered


Upload failed with status 404

Steps to reproduce
example of code
`import { readFileSync, writeFileSync, existsSync } from 'fs';
import { Innertube, UniversalCache } from 'youtubei.js';
import { DeleteLink } from './db/WaitList';

const creds_path = './client_secret.json';
const creds = existsSync(creds_path) ? JSON.parse(readFileSync(creds_path).toString()) : undefined;

export async function UploadShorts (filename:string,ShortTitle:string,desc:string | undefined,LinkID:string) {
  const yt = await Innertube.create({ cache: new UniversalCache(false) });

  yt.session.on('auth-pending', (data) => {
    console.info(`Hello!\nOn your phone or computer, go to ${data.verification_url} and enter the code ${data.user_code}`);
  });

  yt.session.on('auth', (data) => {
    writeFileSync(creds_path, JSON.stringify(data.credentials));
    console.info('Successfully signed in!');
  });

  yt.session.on('update-credentials', (data) => {
    writeFileSync(creds_path, JSON.stringify(data.credentials));
    console.info('Credentials updated!', data);
  });

  await yt.session.signIn(creds);

  const file = readFileSync('./ffmpeg-auto/'+filename+'.mp4');

  console.log(`UPLOADING ...`);
  try{
    const upload = await yt.studio.upload(file.buffer, {
      title: ShortTitle,
      description: desc || hashtags,
      privacy: 'PUBLIC'
    });

    console.info('Done!', upload);
    if(upload.success){
      console.log('Uploaded Succesfully')
      await DeleteLink(LinkID);
      return true

    }else{
      console.log('eerror while uploading')
      return false
    }
  }catch(error){
      console.log('Error While Uploading , '+error)
      UploadShorts(filename,ShortTitle,desc,LinkID)
  }

  //delete file
}

Failure Logs
Successfully signed in!
UPLOADING ...
Error While Uploading , Error: Request to https://www.youtube.com/youtubei/vtrue/upload/createvideo?prettyPrint=false&alt=json failed with status 400

Expected behavior
Uploaded Succesfully + some metadata about the video
i've been testing this library for so long , everyday , this morning is the first time i see this issue
Current behavior
failed to fetch
Version
Default
Anything else?
.
Checklist

[X] I am running the latest version.
[X] I checked the documentation and found no answer.
[X] I have searched the existing issues and made sure this is not a duplicate.
[X] I have provided sufficient information.

Fixed in https://github.com/LuanRT/YouTube.js/commit/2068dfb73eefc0e40157421d4e5b4096c0c8429c.


Operator "+" not supported for URLPattern

Environment data

Language Server version: 2021.4.1-pre.1
OS and version: Windows 10 Build 19042.867 (version 20H2)
Python version (& distribution if applicable, e.g. Anaconda): 3.9.2

Expected behaviour
It is completely valid to use "+" operator with URLPattern.
https://docs.djangoproject.com/en/3.2/howto/static-files/#serving-static-files-during-development
Actual behaviour
Pylance shows error in the following piece of Django code:
urlpatterns = [
    path('admin/', admin.site.urls),
    path('', include('homepage.urls', namespace='homepage')),
    path('blog/', include('blog.urls', namespace='blog')),
    path('tinymce/', include('tinymce.urls')),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

The error message is:
Operator "+" not supported for types "list[URLResolver]" and "List[URLPattern]"

According to Django's official document, "+" is fully supported.
Logs

XXX

Code Snippet / Additional information

XXX

FWIW, the error message above isn't complaining about URLPattern, it's complaining that that these are two lists being added together that contain different types.
Unfortunately the stubs for list don't really capture the behavior that List[X] + List[Y] = List[Union[X, Y]]:
https://github.com/python/typeshed/blob/901b8cb92d7dff50705c39d43522e7c3ee40fd70/stdlib/builtins.pyi#L744
mypy complains about this too: https://mypy-play.net/?mypy=latest&python=3.9&gist=2e97af622ba78cb942bc032a7ebee66e

I installed Pylance to help me catch real errors not to confuse me with false alarms and waste my time trying to figure out what is the problem with my code — where there's no problem.
I uninstalled it until you release a useful version.


Update fetch_projects.py

More user-friendly logging

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

 All committers have signed the CLA.


aluVM Assembly beginner has a problem with two lds with different contents. Don't know what's wrong.

I encountered an issue while trying to transfer an RGB21 asset. The problem arose because the token index for the RGB21 asset was 2（I am setting the token index to 2 based on the example provided in the schema.). As a result, I set the amount in the invoice to 2, otherwise, I would receive an error message stating 'the allocated token has an invalid index'. However, even after making this change, the error persisted. So, I carefully inspected the situation and discovered the following details. I think if the 'lds' instruction could load the same data, it might possibly pass the validation
@000000: ldg     0x0836,0,s16[1]         ; -> s16[1]=02000000010455444154010755444174657374000104746578740105706c61696e0013006269746c6967687420726762323120746573740105696d6167650103706e6700b9bf23a30bedcc4c7e5b7e83412f8962ed33012dbb822a15fb536e5f2fbf9d280000
@000005: put     a16[0],0                ; -> a16[0]=0
@000009: extr    s16[1],r128[1],a16[0]   ; s16[1]=02000000010455444154010755444174657374000104746578740105706c61696e0013006269746c6967687420726762323120746573740105696d6167650103706e6700b9bf23a30bedcc4c7e5b7e83412f8962ed33012dbb822a15fb536e5f2fbf9d280000 a16[0]=0 -> r128[1]=0x74414455070154414455040100000002
@000012: spy     a32[0],r128[1]          ; r128[1]=0x74414455070154414455040100000002 a32[0]=~ -> r128[1]=~ a32[0]=2  st0=false
@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<020000000100000000000000>"//there
@000021: extr    s16[1],r128[1],a16[0]   ; a16[0]=0 s16[1]="<020000000100000000000000>" -> r128[1]=0x100000002
@000024: spy     a32[1],r128[1]          ; r128[1]=0x100000002 a32[1]=~ -> r128[1]=~ a32[1]=2
@000027: eq.n    a32[0],a32[1]           ; a32[1]=2 a32[0]=2 ->  st0=true
@000030: jif     0x0028                  ; -> 40
@000040: put     a16[0],4                ; -> a16[0]=4
@000044: extr    s16[1],r128[1],a16[0]   ; a16[0]=4 s16[1]="<020000000100000000000000>" -> r128[1]=1  st0=false
@000047: spy     a64[1],r128[1]          ; a64[1]=~ r128[1]=1 -> r128[1]=~ a64[1]=1  st0=true
@000050: put     a64[0],1                ; -> a64[0]=1
@000054: eq.n    a64[0],a64[1]           ; a64[1]=1 a64[0]=1 ->
@000057: put     s16[0],"owned<20>fraction<20>is<20>not<20>1"; -> s16[0]="owned<20>fraction<20>is<20>not<20>1"
@000063: ret                             ; -> execution stopped; st0=true
@000064: ldp     0x0FA0,0,s16[1]         ; -> s16[1]="<020000000100000000000000>"
@000070: jmp     0x0005                  ; -> 5
@000005: put     a16[0],0                ; -> a16[0]=0
@000009: extr    s16[1],r128[1],a16[0]   ; s16[1]="<020000000100000000000000>" a16[0]=0 -> r128[1]=0x100000002  st0=false
@000012: spy     a32[0],r128[1]          ; a32[0]=~ r128[1]=0x100000002 -> r128[1]=~ a32[0]=2
@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<0200000000000000>" //there
@000021: extr    s16[1],r128[1],a16[0]   ; a16[0]=0 s16[1]="<0200000000000000>" -> r128[1]=2
@000024: spy     a32[1],r128[1]          ; r128[1]=2 a32[1]=~ -> a32[1]=2 r128[1]=~  st0=true
@000027: eq.n    a32[0],a32[1]           ; a32[0]=2 a32[1]=2 ->
@000030: jif     0x0028                  ; -> 40
@000040: put     a16[0],4                ; -> a16[0]=4
@000044: extr    s16[1],r128[1],a16[0]   ; s16[1]="<0200000000000000>" a16[0]=4 -> r128[1]=0  st0=false
@000047: spy     a64[1],r128[1]          ; a64[1]=~ r128[1]=0 -> r128[1]=~ a64[1]=0  st0=true
@000050: put     a64[0],1                ; -> a64[0]=1
@000054: eq.n    a64[0],a64[1]           ; a64[1]=0 a64[0]=1 ->  st0=false
@000057: put     s16[0],"owned<20>fraction<20>is<20>not<20>1"; -> s16[0]="owned<20>fraction<20>is<20>not<20>1"
@000063: ret                             ; -> execution stopped; st0=false
Validation failures:
- invalid owned state value in operation 30a7a90aed8375ad44771c4af3708088f3e06a735ee79d58a925d52754aab8ce, state type #0x0FA0 which does not match semantic type id urn:ubideco:semid:2eQfG13SrdSq4UVbEUCA3V5Sybt72FJBBFYBs6ZU63ZS#igor-baboon-leonid.
- operation 30a7a90aed8375ad44771c4af3708088f3e06a735ee79d58a925d52754aab8ce is invalid: owned fraction is not 1

The previous are"@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<020000000100000000000000>"'.
However the last one was"@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<0200000000000000>"'.

@crisdut is right here: https://github.com/AluVM/aluvm-spec/discussions/6#discussioncomment-8408105
Token issue index - and index used in invoice - must match

@crisdut is right here: AluVM/aluvm-spec#6 (reply in thread)
Token issue index - and index used in invoice - must match

I have now set the amout in the invoice and the token index in the issue contract to 1. But I'm experiencing
@000000: ldg     0x0836,0,s16[1]         ; -> s16[1]=01000000010455444154010755444174657374000104746578740105706c61696e0013006269746c6967687420726762323120746573740105696d6167650103706e6700b9bf23a30bedcc4c7e5b7e83412f8962ed33012dbb822a15fb536e5f2fbf9d280000
@000005: put     a16[0],0                ; -> a16[0]=0
@000009: extr    s16[1],r128[1],a16[0]   ; a16[0]=0 s16[1]=01000000010455444154010755444174657374000104746578740105706c61696e0013006269746c6967687420726762323120746573740105696d6167650103706e6700b9bf23a30bedcc4c7e5b7e83412f8962ed33012dbb822a15fb536e5f2fbf9d280000 -> r128[1]=0x74414455070154414455040100000001
@000012: spy     a32[0],r128[1]          ; a32[0]=~ r128[1]=0x74414455070154414455040100000001 -> a32[0]=1 r128[1]=~  st0=false
@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<010000000100000000000000>"      **//here**
@000021: extr    s16[1],r128[1],a16[0]   ; s16[1]="<010000000100000000000000>" a16[0]=0 -> r128[1]=0x100000001
@000024: spy     a32[1],r128[1]          ; a32[1]=~ r128[1]=0x100000001 -> r128[1]=~ a32[1]=1
@000027: eq.n    a32[0],a32[1]           ; a32[0]=1 a32[1]=1 ->  st0=true
@000030: jif     0x0028                  ; -> 40
@000040: put     a16[0],4                ; -> a16[0]=4
@000044: extr    s16[1],r128[1],a16[0]   ; s16[1]="<010000000100000000000000>" a16[0]=4 -> r128[1]=1  st0=false
@000047: spy     a64[1],r128[1]          ; r128[1]=1 a64[1]=~ -> r128[1]=~ a64[1]=1  st0=true
@000050: put     a64[0],1                ; -> a64[0]=1
@000054: eq.n    a64[0],a64[1]           ; a64[0]=1 a64[1]=1 ->
@000057: put     s16[0],"owned<20>fraction<20>is<20>not<20>1"; -> s16[0]="owned<20>fraction<20>is<20>not<20>1"
@000063: ret                             ; -> execution stopped; st0=true
@000064: ldp     0x0FA0,0,s16[1]         ; -> s16[1]="<010000000100000000000000>"
@000070: jmp     0x0005                  ; -> 5
@000005: put     a16[0],0                ; -> a16[0]=0
@000009: extr    s16[1],r128[1],a16[0]   ; a16[0]=0 s16[1]="<010000000100000000000000>" -> r128[1]=0x100000001  st0=false
@000012: spy     a32[0],r128[1]          ; r128[1]=0x100000001 a32[0]=~ -> r128[1]=~ a32[0]=1
@000015: lds     0x0FA0,0,s16[1]         ; -> s16[1]="<0100000000000000>"          **//here**
@000021: extr    s16[1],r128[1],a16[0]   ; a16[0]=0 s16[1]="<0100000000000000>" -> r128[1]=1
@000024: spy     a32[1],r128[1]          ; r128[1]=1 a32[1]=~ -> a32[1]=1 r128[1]=~  st0=true
@000027: eq.n    a32[0],a32[1]           ; a32[0]=1 a32[1]=1 ->
@000030: jif     0x0028                  ; -> 40
@000040: put     a16[0],4                ; -> a16[0]=4
@000044: extr    s16[1],r128[1],a16[0]   ; s16[1]="<0100000000000000>" a16[0]=4 -> r128[1]=0  st0=false
@000047: spy     a64[1],r128[1]          ; r128[1]=0 a64[1]=~ -> r128[1]=~ a64[1]=0  st0=true
@000050: put     a64[0],1                ; -> a64[0]=1
@000054: eq.n    a64[0],a64[1]           ; a64[0]=1 a64[1]=0 ->  st0=false
@000057: put     s16[0],"owned<20>fraction<20>is<20>not<20>1"; -> s16[0]="owned<20>fraction<20>is<20>not<20>1"
@000063: ret                             ; -> execution stopped; st0=false
Validation failures:
- invalid owned state value in operation 5738f68ede172d6f8a279c9f05485258de56f660857961bb457b2eb7c7c8c465, state type #0x0FA0 which does not match semantic type id urn:ubideco:semid:2eQfG13SrdSq4UVbEUCA3V5Sybt72FJBBFYBs6ZU63ZS#igor-baboon-leonid.
- operation 5738f68ede172d6f8a279c9f05485258de56f660857961bb457b2eb7c7c8c465 is invalid: owned fraction is not 1

Here, the lds is also unable to load the "correct" data. If it could load the same data as the former, I believe that a64[1] could be set to 1, and the validation  script would pass.
According to the error message, I used the UTXO "fdcb58bb1c1a05311423959520735e755307ad1e260e5e83c8b723fcace22da5:1" as the seal during issuance. I confirmed in the state that this is indeed the seal used. When constructing the PSBT, I manually selected this UTXO as one of the inputs. Additionally, I modified the stock.compose function to accept RGB21 invoices, and I achieved this by adding the following method.
main_builder.add_data_default(beneficiary, Amount::from(1_u64))?
            .complete_transition(contract_id)?,

batch:
batch: Batch {
    main: TransitionInfo {
        id: OpId(
            Array<32>(1401602e490a7c71dadb5fd72efd9c5c9083ee9caf23c7ee6ed2d0d3f2750d6a),
        ),
        inputs: Confined(
            [
                Bitcoin(
                    Outpoint {
                        txid: Array<32>(fdcb58bb1c1a05311423959520735e755307ad1e260e5e83c8b723fcace22da5),
                        vout: Vout(
                            1,
                        ),
                    },
                ),
            ],
        ),
        transition: Transition {
            ffv: Ffv(
                0,
            ),
            contract_id: ContractId(
                Array<32>(bb07d247b19adb7b88256c8f368fd6d3fc593261085f9ab8b575a6f3e3cc2414),
            ),
            transition_type: TransitionType(
                10000,
            ),
            metadata: Confined(
                [],
            ),
            globals: GlobalState(
                Confined(
                    {},
                ),
            ),
            inputs: Inputs(
                Confined(
                    {
                        Input {
                            prev_out: Opout {
                                op: OpId(
                                    Array<32>(bb07d247b19adb7b88256c8f368fd6d3fc593261085f9ab8b575a6f3e3cc2414),
                                ),
                                ty: AssignmentType(
                                    4000,
                                ),
                                no: 0,
                            },
                            reserved: ReservedByte(
                                0,
                            ),
                        },
                    },
                ),
            ),
            assignments: Assignments(
                Confined(
                    {
                        AssignmentType(
                            4000,
                        ): Structured(
                            Confined(
                                [
                                    Revealed {
                                        seal: Bitcoin(
                                            BlindSeal {
                                                method: TapretFirst,
                                                txid: WitnessTx,
                                                vout: Vout(
                                                    1,
                                                ),
                                                blinding:<PHONE_NUMBER>4987402121,
                                            },
                                        ),
                                        state: RevealedData(
                                            "\u{1}\0\0\0\0\0\0\0",
                                        ),
                                    },
                                ],
                            ),
                        ),
                    },
                ),
            ),
            valencies: Valencies(
                Confined(
                    {},
                ),
            ),
        },
        methods: TapretFirst,
    },
    blanks: Confined(
        [],
    ),
}

I'm not quite sure what I'm supposed to do about this.

state: RevealedData(
"\u{1}\0\0\0\0\0\0\0",
),

See here, your RevelaledData does not fraction, only token index.

@dr-orlovsky  Can i close this issue?

@crisdut thank's for helping here, since I was lost and unable to see what's wrong is going on here...


docs(.github): add proposals area to PR template

Signed-off-by: Leonardo Di Donato<EMAIL_ADDRESS>What type of PR is this?
/kind documentation
Any specific area of the project related to this PR?
NONE
What this PR does / why we need it:
Which issue(s) this PR fixes:
Missing proposals area in the PR template.
Special notes for your reviewer:
Does this PR introduce a user-facing change?:
NONE

[APPROVALNOTIFIER] This PR is NOT APPROVED
This pull-request has been approved by:
To complete the pull request process, please ask for approval from leodido after the PR has been reviewed.
The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

OWNERS

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

LGTM label has been added.  Git tree hash: 3df1d17435352b4e29c6d3a84f9ca6808a6c1d8c

[APPROVALNOTIFIER] This PR is APPROVED
This pull-request has been approved by: leogr
The full list of commands accepted by this bot can be found here.
The pull request process is described here

Needs approval from an approver in each of these files:

OWNERS [leogr]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment


Make failed on macOS 10.9.x

I first ran in trouble while install uws from npm on macOS 10.9.x, then I cloned the bindings repo and compiled uWebSockets, got these errors:
2 errors generated.
In file included from src/addon.cpp:1:
In file included from ../uWebSockets/src/../src/uWS.h:4:
../uWebSockets/src/Hub.h:43:92: error: chosen constructor is explicit in
      copy-initialization
  ...= nullptr, std::map<std::string, std::string> extraHeaders = {}, int tim...

Then I searched for this error message, and found this similar issue https://github.com/USCiLab/cereal/issues/339, I'm not experienced with clang, could you look into it?
Here's the node error while running with require('uws').
Error: Compilation of µWebSockets has failed and there is no pre-compiled binary available for your system. Please install a supported C++11 compiler and reinstall the module 'uws'.

Environments:

macOS: 10.9.5
Node: v8.1.3
uws: 8.14.0

On the other mac(macOS 10.13 High Sierra), everything works as expected.

It is a little bit hard for me to check this out as I don't have that OS X version and since it works with recent versions it makes the issue low priority. Primary platform is Linux and as long as it is possible to develop on Windows and OS X (using latest versions of those platforms and tools) issues like these are low priority and will probably never be fixed.

Yeah...I am on MacOS Sierra and the simplest smoke test fails
Not working on OSX #646

My solution was a little tricky, just copied the uws_darwin_57.node from macOS high sierra to OSX 10.9, and I couldn't believe that it worked.

I ran into the same issue on 10.9. It's related to the version of clang and libc++ that comes with Xcode 6.2 (the last available on this OS). The fix is a little ugly:
Hub.h:
using Headers = std::map<std::string, std::string>; void connect(std::string uri, void *user = nullptr, Headers extraHeaders = Headers{}, int timeoutMs = 5000, Group<CLIENT> *eh = nullptr);
addon.h:
hub.connect(std::string(uri.getData(), uri.getLength()), new Persistent<Value>(args.GetIsolate(), args[2]), uWS::Hub::Headers{}, 5000, clientGroup);
That'll get it compiling but the system version of OpenSSL is also too old so you'll need to install that with Homebrew and modify the binding.gyp to direct the compiler to the updated headers and such.
All this is a long winded way to say that @alexhultman is absolutely right and this isn't worth fixing for older versions of OS X. Too many quirks to deal with.