[WINDOWS] Incompatible redefinition of 'Rectangle'

Hello,
I'm using the latest version of V V 0.2.4 ddc62ab and trying to run the example program in the README.
The full output I'm getting is
PS C:\Users\jc\Documents\git\vgame> v -cg run vgame.v
C:/Users/jc/AppData/Local/Temp/v/vgame.2868074894925457026.tmp.c:432: warning: WINVER redefined
In file included from C:/Users/jc/AppData/Local/Temp/v/vgame.2868074894925457026.tmp.c:682:
C:/Users/jc/.vmodules/irishgreencitrus/raylibv/include/raylib.h:226: error: incompatible redefinition of 'Rectangle'
builder error:
==================
C error. This should never happen.

This is a compiler bug, please report it using `v bug file.v`.

https://github.com/vlang/v/issues/new/choose

You can also use #help on Discord: https://discord.gg/vlang

yeah, i'm aware of this issue although i'm not sure what causes it just yet. thanks for the report, this is now top of my TODO list!

The error is caused by conflicts with the WINAPI. I'll see if i can fix it

AFAIK this is what's happening: raylib defines a class known as Rectangle, and so does the WINAPI. not sure how this will fix atm, although it's not a specific issue with raylib.v. Temporary fix could be prefixing all of raylib's c calls with raylib_ or something like that. this wouldn't change V's calls so let me know if I should do that

Seems like it's more than Rectangle; its also CloseWindow, ShowCursor, LoadImage, and DrawText to name a few. I agree, prefixing everything is the best fix for now. Thanks for looking into this :)

Somewhat related I think: https://github.com/raysan5/raylib/issues/857

Also https://github.com/raysan5/raylib/issues/1217

Fixed in latest commit! :confetti_ball:


Accessing other dictionary entries from within the messageFormatter

Is there a simple way to reuse other dictionary entries in a messageFormatter path. For example "Please click the {saveButtonText} button, to save your changes."
With this approach, Globalize will throw an error, as long as I don't pass the value of saveButtonText as a parameter:
Globalize.formatMessage('saveButtonDescription', {saveButtonText: Globalize.formatMessage('saveButtonText'});
Is there a way to simplify this call, so that the developer doesn't have to monitor which other pre-defined strings are used?

On a message, there's no way to reference another message. It's also not a common practice to concat messages inside another messages. Usually, you have complete messages. Note positioning, gender inflection, pluralization, and other stuff might change from languages to languages and the concat approach is error prone.

Thank you very much for the clarification!


Add Code Quality Github Actions script

This GitHub action enforces code quality by running the TypeScript compiler and Prettier. If either fail, they will show errors on the commit and in PRs. Developers should probably use the bun dev command to see TypeScript errors as they show up, and run bun x prettier --write <...changed_files> before their commits. IDEs can also be configured to display TypeScript errors inline and to run Prettier on-save so you don't have to do it manually.
An example run can be found here: https://github.com/robere2/lavacake/actions/runs/6278659499
(The TypeScript run is currently failing because there are TypeScript errors in the master branch)

As mentioned above there are TS errors. I'm not too experienced with builds & actions so I've got no idea how to pass it or disable this. Will look into it though.

The issue is that TypeScript is producing build errors. If you run bun x tsc on your local copy of this project, you should receive the same errors.
JavaScript doesn't have any type safety built in, which is the primary goal behind TypeScript. If TypeScript encounters a type error, it will throw an error when you run tsc. However, TypeScript errors don't stop the script from working. When you use bun index.ts, Bun essentially strips all the TypeScript types from your code and executes it as normal JavaScript.
GitHub actions allow you to run commands on different events within your repository. Usually this is used to run test suites, code quality checks, or automatic releases whenever a new commit is pushed to master, or whenever a new PR is opened. Otherwise, the commands they run are the same as any commands you would run on your own computer.
There are currently multiple TypeScript errors, however they all seem to be either a variable doesn't exist (perhaps was deleted in a previous merge) or the .json files are not included in the TypeScript project definition. I can take a closer look later and probably submit a PR if you want me to.

For example, this commit removed the lowerCaseName variable. This variable is used later in the code, which is why TypeScript is giving an error.
https://github.com/NoahTheNerd/lavacake/commit/68f9b12cfa8d21fca5c8d65306be98d8eb0604a1


Use go/packages instead of go/loader

It seems that go/loader(to be precise, dependent package go/buid) does not support go modules.
So we should rewrite atgen with go/packages instead of go/loader .

Fixed by #8


Login screen redesign

@prem1835 did you open this PR by accident?

@prem1835 did you open this PR by accident?

Yess, sorry!

Yess, sorry!


Question: Rate Limiting

Have you run into any ratelimits? I see in your description you mention "Headless item stock tracking (updates up to 100x a second)."
Wouldn't you get ratelimited pretty quick? I am curious. What is the actual number of times you can track stock per second.

No, I haven't. I also found it rather odd that I didn't experience any drops, but the connection is steady. I have had it running non-stop for over a week now and haven't had any drops in connection. If anyone does experience any rate-limiting I would be interested to hear about it though.


Add interface for additional Dim checks

Checks can be done by extra scripts. But they need to load all Dim files which can take time if there are 100k of requirements.
Hook the checks into "dim check" dynamically.
From @JTiefnig:
Define a Ruby interface for doing additional checks.
Maybe adding an array in the config file with Ruby files, which contain these checks.
In consistency-check, these files could be loaded and executed, e.g.: (pseudo code):
check_files.each do |c|
  result = load(c).call(“check”, requirements, original_data)
  if result.value != 0
     log…
     exit…
  end
end

This will safe a lot of time and enables the projects to add checks without the need to change the verifier and all requirement engineers have that automatically on their local machines.
Example checks:

ASIL_A is not used
developer is not empty

From @sudeeptarlekar:
I would be bit risky as user can write anything and using eval is security issue.
Add an option in the config file, something like scripts which will accept the list of Ruby files.
These scripts should be executed only when Dim file loading is (or when all the checks are) finished.
If checks fail, just exit with error, no rollback or cleanup.
Add a warning, that changes made to Dim file are not checked during script execution, user must re-load Dim file to validate.


Refactoring docs to be more easily navigable.

Hey y'all,
This PR is a work in progress where I'm refactoring Poly to make its docs more navigable. I've added package docs to every package and moved poly's core sequence struct to it's own dedicated package in the IO subpackage.
I'm going to write integrated tutorials for each subpackage as appropriate along with adding some doc.go and example_test files in top level packages.
If people could review this to help catch any mistakes that'd be great!
Thanks,
Tim

I still need to write doc.go files for each top level subpackage along with examples_test files to top level packages but this is a good start and worlds better than what was here before.


Can't send anything from wallet

What version of Wallet are you using?
Chrome extension
What is happening?
It says sending token or coin is not implement yet.

Wallet address is : fuel18d8euysnw0swl2zdgral6xq067h8vpf2vv5djnnrlt7rk6fnff0qfgpewm
steps to reproduce
I remove and unistall my extension and download it Again and try again but it will the same problem.

Wallet address is : fuel18d8euysnw0swl2zdgral6xq067h8vpf2vv5djnnrlt7rk6fnff0qfgpewm
How it should behave?
It should work smoothly and send what i want to send.
Wallet address is : fuel18d8euysnw0swl2zdgral6xq067h8vpf2vv5djnnrlt7rk6fnff0qfgpewm
What os are you seeing the problem on?
Android Mobile
What browser?
Chrome
What is your browser version?
No response

Currently, the send operation is not implemented this is going to be implemented soon: #39. You can also check our features roadmap on the readme, to track when is implemented: https://github.com/FuelLabs/fuels-wallet#features


Support for server hubs receiving results from clients

We don't have any support yet for servers receiving results when calling client methods. This issue is to track adding that functionality.

@muratg @davidfowl I believe this was post-preview, yes?

Yes

Hi! Is SignalR Core ready for production apps? Thanks

@chemitaxis - it has not even previewed yet...

Dupe of https://github.com/aspnet/SignalR/issues/903


Unable to install GmsCore properly with Magisk and A/B system

Device configuration
Device: Xiaomi Mi A1
ROM: AOSPExtended
Android version: 8.1.0
Magisk version: 20.4
Description
I installed microG Services Core as well as microG Services Proxy. microG is fully set up (all checkboxes checked).
However things do not work as expected, since even after signing in to a Google account an app requiring to verify a license fails, and Maps crash everytime.
Installation steps
My installation steps were rather unusual due to my device (equipped with A/B partitions) and Magisk's design.
Prerequisites

Enable Signature spoofing
It was supposed to work out of the box with my ROM, but installed the XPosed module for good measure, since I couldn't find where to enable the option with my version.
Get rid of some packages
This step took me way too much time. Removing the packages from /system/priv-app wasn't easy because of a lot of problems (unable to remount system to rw, thought dm-verity was interfering but it seems it didn't, successfully removing packages don't last after the reboot...). Had to install the Magisk module debloater to solve the issue.

Installing

Install GmsCore.apk
Same problem than previous step concerning /system/priv-app. I pushed it there as advised and the app didn't appear anywhere, and after a reboot it was removed. Solved the issue by installing GmsCore.apk as a user app then converting it to a "privileged app" then used the Magisk module systemizer to make it a "privileged system app".
Install GsfProxy.apk
This is the only thing that didn't bring any trouble.
Reboot device
I already rebooted my device an unholy amount of time because of the previous steps, did it after installing GmsCore (twice or thrice with different methods, only talked about the working one).
Disable battery optimization
Battery optimization was disabled only after the "systemization" automatically.

What could be wrong, and how should I fix this?

I have a Mi A1 and I use the Magisk module called microG Installer Revived to install microG. I have no idea how to mount /system rw but luckily Magisk is systemless....

Is there a /system/system/priv-app directory?  If yes, try to install it there.

on Wednesday, 2020-09-30 16:43 -0700, YigYag<EMAIL_ADDRESS>wrote:

I have a Mi A1 and I use the Magisk module called microG Installer Revived to install microG. I have no idea how to mount /system rw but luckily Magisk is systemless....
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/microg/android_packages_apps_GmsCore/issues/1201#issuecomment-701703432

Update: Maps now works and was able to authenticate to the account I provided in microG settings (which is not really what I want, but perhaps I'll talk about it in another issue).
The only problem that still remains is that licensing apps still doesn't work. But I have no way to prove whether it's a microG issue or the app's which I used to test it with.

@Minabsapi I believe licensing verification requires the app to be installed through Google Play Store which means you need to add a Google account. There is an app called Lucky Patcher that might work to remove license verification.

Lucky Patcher is/can be used for piracy, thus it's not recommendable, especially not recommending removing licese verification.
License verification can be achieved by using Google Play. If you want (in-app)-purchases aswell you need the patched Play Store included with NanoDroid ( or patch it yourself, though that's not straight-forward, see: https://gitlab.com/Nanolx/microg-phonesky-iap-support ).


Get Big O from benchmarks

Right now this is how a benchmark looks like:
const array = [...new Array(1_000)].map(() => Math.random());

export const $forEach = () => {
  array.forEach((v) => v + 1);
};

We could export an object instead of a function like this:
export const $forEach = {
  type: "many",
  data: [
    [...new Array(10)].map(() => Math.random()),
    [...new Array(100)].map(() => Math.random()),
    [...new Array(1_000)].map(() => Math.random()),
    [...new Array(10_000)].map(() => Math.random()),
    [...new Array(100_000)].map(() => Math.random()),
    [...new Array(1_000_000)].map(() => Math.random())
  ],
  benchmark: (data) => {
    data.forEach((v) => v + 1);
  }
};

There are 2 problems with this. First of all there is no type-safety although this might get fixed with global types but that's an ugly solution which I wouldn't want to use. Secondly what if benchmark data is not an array with .length property? Then we'd have to provide an object like this:
[
  { name: "10 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
  { name: "100 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
  { name: "1_000 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
  { name: "10_000 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
  { name: "100_000 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
  { name: "1_000_000 props", data: { a: 1, b: 2, c: 3, /* .. */ } },
]

It's not the nicest thing I've ever seen but I could live with this.
I didn't want to introduce imports but I guess it's ok for an advanced feature like Big O. That would fix the first issue like this:
import { benchmarkMany } from "isitfast/runtime";

export const $forEach = benchmarkMany([
    [...new Array(10)].map(() => Math.random()),
    [...new Array(100)].map(() => Math.random()),
    [...new Array(1_000)].map(() => Math.random()),
    [...new Array(10_000)].map(() => Math.random()),
    [...new Array(100_000)].map(() => Math.random()),
    [...new Array(1_000_000)].map(() => Math.random())
  ], (data) => {
    data.forEach((v) => v + 1);
  });

Also thanks to this we would be also able to define type-safe events like this:
import { benchmarkOne } from "isitfast/runtime";

export const $forEach = benchmarkOne(
  [...new Array(1_000)].map(() => Math.random())
  () => {
    array.forEach((v) => v + 1);
  }, {
    onIterationStart: () => { /* .. */ },
    onIterationEnd: () => { /* .. */ },
  }
);

What we'd do after that is pretty straightforward. We run each benchmark X times where X is the length of data and then report their results and their Big O. Also it'd be nice to report not only Big O but also other Big stats.
The benchmarkOne and benchmarkMany is just an example to differentiate the two types. It'll most likely be called differently in the future.

Also I guess it'd be better for the memory results to make data lazy like this:
import { benchmarkMany } from "isitfast/runtime";

export const $forEach = benchmarkMany([
    () => [...new Array(10)].map(() => Math.random()),
    () => [...new Array(100)].map(() => Math.random()),
    () => [...new Array(1_000)].map(() => Math.random()),
    () => [...new Array(10_000)].map(() => Math.random()),
    () => [...new Array(100_000)].map(() => Math.random()),
    () => [...new Array(1_000_000)].map(() => Math.random())
  ], (data) => {
    data.forEach((v) => v + 1);
  });

So instead of providing type: "one" | "many" this is how the objects will look like instead:
// one
const $forEach = {
  input: () => [...new Array(1_000)].map(() => Math.random()),
  benchmark: (data) => {
    data.forEach((v) => v + 1);
  }
};

// many
const $forEach = {
  inputs: [
    () => [...new Array(10)].map(() => Math.random()),
    () => [...new Array(100)].map(() => Math.random()),
    () => [...new Array(1_000)].map(() => Math.random()),
    () => [...new Array(10_000)].map(() => Math.random()),
    () => [...new Array(100_000)].map(() => Math.random()),
    () => [...new Array(1_000_000)].map(() => Math.random())
  ],
  benchmark: (data) => {
    data.forEach((v) => v + 1);
  }
};

Theoretically we could provide both. I don't know what the use-case for that would be but it's possible.
Also I'm gonna improve the compilation process in this task. I'm gonna tree-shake benchmark files so they include only the necessary variables and functions. It's not going to be the nicest and most performant solution but I'm gonna fix that in #56.
I've realized that there's a possibility that even when we try our best to make the benchmark results as consistent and statistically sound as possible they could still under/overshoot. So when it comes to the many benchmarks it might create graph that cannot be summed up as Big O. I'm not sure what to do in those cases.
Lastly I'm really curious what are gonna be the perf differences between benchmarks that use data defined outside of the benchmark declaration vs the ones that use input/inputs. I think the ones that use input/inputs will be better but I'm really not sure so I'm gonna wait until this is implemented and I can benchmark both cases and see which one is actually better. Ideally both of them should be the same.

Ok I take back what I said about adding tree-shaking in this task. It has proven much more difficult than what I thought.
Also I think, at least for now, inputs should be an array of objects with key and data. I don't want to support both array and object definition. At least not now.

After all I think I should actually enforce multiple inputs and focus more on time complexity.
Every benchmarking library focuses only on op/s. But op/s is a pretty meaningless information. It's like testing a complex function with just one type of input. Sure it's gonna work but you might be missing some very important information this way. The same applies to benchmarks.
If we focus only on op/s we neglect to see the true performance behavior of the function which naturally changes (if not constant) with input.
This is how the API should look like. The benchmark and input function just outputs a simple object. You can create this object manually.
// utils/benchmark.ts
import { input } from "isitfast";
import { CHARS } from "./constants";

export const randomChars = (length: number) => input(`${length} chars`, () => ({
  string: CHARS.slice(0, length),
  length
}));

// utils/hash.ts
import { benchmark, input } from "isitfast";
import { randomChars } from "../utils/benchmark";

export const hash = async (value: string) => {
  // ...
};

const $benchmark = benchmark("Hash", [
  randomChar(1),
  randomChar(2),
  randomChar(4),
  randomChar(8),
  randomChar(16),
  randomChar(32),
], ({ string }, set) => {
  set(hash(string));
});

// output from 'benchmark'
// {
//   name: "Hash",
//   data: [
//     { name: "1 chars", data: () => CHARS.slice(0, 1) },
//     // ...
//   ],
//   benchmark: ({ string }, set) => {
//     set(hash(string));
//   }
// }

Also I'm thinking more and more that I should completely decouple the capturing of the benchmarks and analyses made on top of them. So the goal of this task is a bit different now. I want to just capture the same benchmark with multiple inputs and save the raw data. Nothing else.


Port TestBasic & TestPrivate to Ginkgo

cc @satnam6502 @filbranden @rrati

PTAL. I fixed the switch and replied to the other two.

@filbranden How do you feel about squashing commits here?

PTAL. Re-pushed with the var block removed.

The commits are in the style of the other ports - the move is separate to force the rename detection. The utility functions could be squashed, but shrug.

LGTM. Re-assigning to @filbranden to merge after commenting about commits.

Looks OK overall.
Commits are OK as they are.
I'm not really a fan of Logf and Errorf since they seem to hide the fact that we're using Ginkgo... Is it really that terrible to type Fail(fmt.Sprintf(...)) and By(fmt.Sprintf(...)) all the time?
Alternatively, these should at least be called something like Byf and Failf, which look horrible! but at least have a similarity to By and Fail.
My suggestion right now is to drop those two commits from this PR and punt them to a separate PR where we could have this discussion with others. What do you say Zach, does that sound reasonable?

Not against that. Re-pushed minus the last two commits (glad I had them
separate).
On Tue, Feb 10, 2015 at 11:20 AM, Filipe Brandenburger <
<EMAIL_ADDRESS>wrote:

Looks OK overall.
Commits are OK as they are.
I'm not really a fan of Logf and Errorf since they seem to hide the fact
that we're using Ginkgo... Is it really that terrible to type
Fail(fmt.Sprintf(...)) and By(fmt.Sprintf(...)) all the time?
Alternatively, these should at least be called something like Byf and
Failf, which look horrible! but at least have a similarity to By and Fail.
My suggestion right now is to drop those two commits from this PR and punt
them to a separate PR where we could have this discussion with others. What
do you say Zach, does that sound reasonable?
—
Reply to this email directly or view it on GitHub
https://github.com/GoogleCloudPlatform/kubernetes/pull/4269#issuecomment-73764340
.

Ok looks great! Merging it now.


Updated validations.py python script.

Updated validations.py python script
Fixed the behavior of validate_user function in validations.py.
Fixes #<issue_number_goes_here>

It's a good idea to open an issue first for discussion.

[ ] Tests pass
[ ] Appropriate changes to README are included in PR

@googlebot I signed it!


Update whats-new-in-kerberos-authentication.md

Minor wording change and typo correction

@MikeBazMSFT,
Thanks for your contribution as a Microsoft full-time employee or intern. You do not need to sign a CLA.
Thanks,
Microsoft Pull Request Bot


property policies

Hey,
I've made a custom implementation for this, but I thought I'd run it by you guys to see if perhaps there's interest to implement it in sails.
The concept
The concept is pretty simple. Just as with regular policies, you have policies for properties. These policies are parsed in a rule-set to make sure there's no performance loss. The rules are defined in config/propertyPolicies.js.
Usage
In it's most basic form, the config could look something like this:
config/propertyPolicies.js:
module.exports.propertyPolicies = {
  user: ['email', 'mailable'] // Whitelist for model `user`
};

This specifies that the update blueprint is allowed to only update these two properties. Sending along id, password or any of the other properties will result in those values simply being ignored.
To achieve this, I've created a policy that does these checks for you, and populates a blacklist. Like so:
api/policies/filterProperties.js:
var config = sails.config.propertyPolicies;

/**
 * Apply policies to models as to manage access to properties.
 *
 * @todo Allow for property filtering in find
 * @todo Allow short-hand (model: ['whitelist'])
 * @todo Allow blacklisting ({blacklist: ['blacklist']}). Use Object.getOwnProperties(sails.models[model].definition); to extract properties.
 * @todo Allow Default (*) On global, and per-model basis like with regular policies
 * @todo Allow applying policies (or even specific dir with modelPolicies?)
 */
module.exports = function(req, res, next) {
  var model = [req.options.model],
      blacklist = [];

  if (!config[model]) {
    return next();
  }

  Object.getOwnPropertyNames(sails.models[model].definition).forEach(function (property) {
    if (config[model].indexOf(property) > -1) {
      return;
    }

    blacklist.push(property);
  });

  if (!req.options.values) {
    req.options.values = {};
  }

  req.options.values.blacklist = blacklist;

  next();
};

Then, in config/policies.js just add 'filterProperties'.
Filtering properties
Currently this concept only applies to update. However, in the same train of thought I figured that setting up policies like this for read should be possible to. This could be achieved by setting up the same config structure as policies.js currently allows, except one level deeper:
config/propertyPolicies.js:
module.exports.propertyPolicies = {
  // Default policy for all models and properties.
  '*': false,
  User: {
    create: {
      '*'  : true,
      roles: 'isAdmin'
    },
    update: {
      mailable: 'ownsRecord',
      email   : 'ownsRecord',
      roles   : 'isAdmin'
    },
    find  : {
      email   : ['isauthenticated', 'ownsRecord'],
      username: 'isAuthenticated',
      id      : 'isAuthenticated'
    }
  }
};

This allows for conditional properties based on rules. Obviously limiting properties is possible through toJSON already, but that's like specifying '*' for a specific model; it's applied to every scenario.
Finally, I'd like to point out this has nothing to do with limiting the number of properties returned through the blueprints. Obviously you could create such a propertyPolicy and do it yourself. But afaik waterline2 already allows you to specify which properties you want to fetch.
config/propertyPolicies.js:
module.exports.policies = {

  // Default policy for all models and properties.
  '*': false,

  User: {
    find  : {
      '*': 'limitProperties'
    }
};

api/propertyPolicies/limitProperties.js (untested):
module.exports = function (req, property, next) {
  if (!req.param('properties')) {
    return next(null, true); // True. You're allowed to use this property.
  }

  var properties = req.param('properties');

  return next(null, properties.indexOf(property) > -1);
};

Conclusion
In conclusion, this allows you to keep it as simple or complex as you like. I think this does give you a lot of control.
Thoughts? Feedback? Let me know.

:+1:
Will try it ;)

I like it. Would you mind writing a PR a get some community feedback about this improvement? I'll be glad to merge it. Thank you @RWOverdijk, you rock!


Unable to send email

Attempted Debugging

[X] I have read the debugging page

Searched GitHub Issues

[X] I have searched GitHub for the issue.

Describe the Scenario
I'm using the SMTP .env variables with my Mailgun host and credentials, but based on the laravel.log message, it looks like the mail host (smtp.mailgun.org) isn't being used. I'm using Traefik, not sure if that has something to do with it.
Exact BookStack Version
v23.12
Log Content
Error thrown when sending a test email: Connection could not be established with host "localhost:587": stream_socket_client): Unable to connect to localhost:587 (Address not available)
Hosting Environment
PHP 8.1.2, Ubuntu 22.04, Traefik 2.10.7, Docker 24.0.5

Hi @beddows,
What exactly is your process for setting these .env options for your environment? (What file are you editing, what are you doing after changing etc...).

Hey @ssddanbrown, I'm editing the .env file on my VPS. I've been using a slightly modified version of this docker-compose.yml to use Traefik, which has worked well (so far). No errors when running 'docker compose logs -f'.

And just to clarify a bit more, I added the SMTP .env variables after these from traefik-bookstack.

Okay, assuming you're editing the .env file that's in the same place as your docker-compose file, then that's not used by BookStack at all based upon that setup. That's passed to the traefik container.
You could instead define the SMTP options in the environment part of your bookstack_web: service in your docker-compose file though. You'll need to re-up your compose stack, since I don't think the variables would be taken into account on just a container restart (the container needs to be re-created I think).

@ssddanbrown  It worked! After adding the variables, a restart was all that was required. In hindsight, I don't know why I thought the .env variables would magically appear in the container... Wishful thinking, I guess. Thanks!
For those finding this thread needing a docker-compose.yml for traefik - I'll submit my updates to the traefik-bookstack repo.


repeat showing the default title when loading new pages

Version
v2.10.2
Reproduction link
https://steamstats.cn
Steps to reproduce
Click the nav bar except 'home', you will always see the default title showed before the new page title. It seems the logic is to 'load the default title first, then replace it to the new page title' not to 'figure the new page title by the title template then replace the old title to it'.
What is expected ?
The new page title should figured by the title template then replace the old title smoothly.
What is actually happening?
It will cause a blink of the default title.

Could you provide a minimal reproduction?

https://52bin.sse.codesandbox.io/fr/
@manniL I find out the reason.
head () {
    return {
      meta: [
        { hid: 'og:locale', property: 'og:locale', content: this.$i18n.locale === 'en' ? 'en' : 'fr' },
      ]
    }
  }

If i put the code in the layout.vue, when the value of  this.$i18n.locale changes, the new page will show the default title in the nuxt.config.js first, then it will change to the new page title.
You can click the 'Version Anglaise' button to test. But it's not easy to show the case. You should type the button quick and rhythmically cause the speed of page load is too fast.
If i put the other variables in the head of the layout.vues, it will cause the same results. I hope you can have a good solution to make it available to have dynamic head in the layouts.

I'll take a look. You could give nuxt-i18n a shot in the meantime.

@manniL
I will, i think it's not the problem of i18n, it's the variable in the head of layouts that matters.

Then this might be a vue-meta issue. :thinking:
cc @pimlie

This likely won't be fixed in Nuxt 2. You can track here just in case we decide to fix it: https://github.com/nuxt/nuxt/issues/10626


Add WebSocket support for pinging over wss:

Currentl the applications is using an Http Client for calling the services.
Comparing it to methods used by the Providers, many are using wss://  which is not supported by the current implementations.

#9


bug: Folding disabled for scratch buffers

Did you check docs and existing issues?

[x] I have read all the LazyVim docs
[x] I have updated the plugin to the latest version before submitting this issue
[x] I have searched the existing issues of LazyVim
[x] I have searched the existing issues of plugins related to this issue

Neovim version (nvim -v)
0.10.0
Operating system/version
Win 11
Describe the bug
As discussed in kulala#268 the folding is disabled in LazyVim
https://github.com/LazyVim/LazyVim/blob/13a4a84e3485a36e64055365665a45dc82b6bf71/lua/lazyvim/util/ui.lua#L200
for buftype = nofile
Filetype is set and treesitter runs.
I have other plugins with the same situation: A scratch buffer meant to work but not to save for a valid filetype.
What is the reason to exclude this case?
Steps To Reproduce
Create a new buffer
set buftype = nofile
set filetype to any type with folding expression
enter text which should be able to fold
Expected Behavior
Folding should be possible for buftype=nofile
Repro

X-Ref: https://github.com/mistweaverco/kulala.nvim/pull/279

Tracked down the change made in this commit. It was made to fix #1846, which had a problem with Treesitter foldexpr in terminal buffers with large scrollback history.
I believe the choice to ignore every non-file buffer was just a decision on the spot without thinking about potential repercussions (or at least it didn't seem like it would have at that time). Surely Folke will have a more appropriate answer when he gets back and maybe add an exception for nofile buffers as well (since the filetype check later on will take care of nofile buffers that don't have a valid filetype either way).


First stab at nongenabi

@vchuravy what are your thoughts on a design like this for supporting non-gen abi

In order for code to relocatable you may not observe world as a compile time constant. You may look at the tls_world_age, but you may not cache that or put it into a Val.

Codecov Report
Attention: Patch coverage is 83.09859% with 12 lines in your changes missing coverage. Please review.

Project coverage is 70.35%. Comparing base (d4f44d6) to head (afaacda).
Report is 6 commits behind head on main.

Files
Patch %
Lines

src/Enzyme.jl
78.78%
7 Missing :warning:

src/compiler.jl
77.27%
5 Missing :warning:

:exclamation: Your organization needs to install the Codecov GitHub app to enable full functionality.
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1575      +/-   ##
==========================================
- Coverage   70.42%   70.35%   -0.07%
==========================================
  Files          30       30
  Lines       12754    12788      +34
==========================================
+ Hits         8982     8997      +15
- Misses       3772     3791      +19

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.


utc

Describe the bug
Setup is;
      <Datepicker
        v-model="date"
        inline
        :transitions="false"
        :enable-time-picker="false"
        auto-apply
        range
        min-range="1"
        multi-calendars
        hide-offset-dates
        prevent-min-max-navigation
        :month-change-on-scroll="false"
        :utc="false"
      >

Still giving utc time. [v3.6.6] has no issue.

If you try to directly print the array to HTML, it will show as it is in the UTC, however, if you inspect each date or log the array, it is in the correct timezone.

unfortunately log also shows UTC

@qxygene Can you post a screenshot of how it looks like?

You can see that it is displaying correct dates here, also :utc="false" is redundant since it is disabled by default.

https://pasteboard.co/DYXOK4eaz0IZ.png current time here is 15:23

@qxygene That is ok because it is a string representation. If you do it in the code, like console.log() you can see that it has the timezone appended.

console shows same.

Issue is with range mode, default calendar works fine. Solved by using utc="preserve" with range mode.

This solved my problem. My calendar was starting one day short.


gym export_options per lane

I have these export_options in my gymfile
export_options(
    method: "ad-hoc",
    thinning: "<none>"
)

but I don't want them to apply to all of my lanes/schemes. How can use different export options for other lanes?
I understand that I need to do this from the command line, but I can't figure out what exactly that means. Thanks!
🚫 fastlane environment 🚫
Stack

Key
Value

OS
10.11.6

Ruby
2.0.0

Bundler?
false

Git
git version 2.9.3 (Apple Git-75)

Installation Source
/usr/local/bin/fastlane

Host
Mac OS X 10.11.6 (15G1108)

Ruby Lib Dir
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib

OpenSSL Version
OpenSSL 0.9.8zc 19 Mar 2015

Is contained
false

Xcode Path
~/Downloads/BIG/Xcode8.app/Contents/Developer/

Xcode Version
8.1

System Locale

Variable
Value

LANG
en_US.UTF-8
✅

LC_ALL
en_US.UTF-8
✅

LANGUAGE

fastlane files:
`./fastlane/Fastfile`
# Customise this file, documentation can be found here:
# https://github.com/fastlane/fastlane/tree/master/fastlane/docs
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md
# can also be listed using the `fastlane actions` command

# Change the syntax highlighting to Ruby
# All lines starting with a # are ignored when running `fastlane`

# If you want to automatically update fastlane if a new version is available:
# update_fastlane

# This is the minimum version number required.
# Update this, if you use features of a newer version
fastlane_version "1.102.0"

default_platform :ios

platform :ios do
  before_all do
#      increment_build_number({
          #build_number: '11000'
          #build_number: latest_testflight_build_number + 1
#          build_number: Time.now.strftime("%Y%m%d%H%M")
#       })
    # ENV["SLACK_URL"] = "https://hooks.slack.com/services/..."

    # carthage
    # you CANNOT put the increment build number stuff here, as it
    # will apply to a random target
  end

  lane :pro do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro'
      )
      gym(scheme: "Pro")
      deliver
  end

  desc "Deliver MIDI Designer Pro (Next), the Beta!"
  lane :next do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Next)'
      )
      gym(scheme: "Pro (Next)")
      deliver
  end

  lane :lite do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Lite'
      )
      gym(scheme: "Lite")
      deliver
  end

  desc "Build and deploy MD Limited"
  lane :limited do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Limited'
      )
      gym(scheme: "Limited")
      deliver
  end

#  desc "Deploy a new version to the App Store"
# try pilot
  lane :md77 do
      gym(scheme: "MD77")
      deliver
  end

  lane :clav do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'MDClav'
      )
      gym(scheme: "MDClav")
      deliver
  end

  lane :xg do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'MDXG'
      )
      gym(scheme: "MDXG")
      deliver
  end

  lane :xw do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'XW'
      )
      gym(scheme: "XW")
      deliver
  end

  lane :alpha do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Alpha)'
      )
      gym(
        scheme: "Pro (Alpha)"
      )
  end

  desc "Runs all the tests"
  lane :test do
    scan
  end

  desc "Submit a new Beta Build to Apple TestFlight"
  desc "This will also make sure the profile is up to date"
  lane :beta do
    # match(type: "appstore") # more information: https://codesigning.guide
    gym # Build your app - more options available
    pilot

    # sh "your_script.sh"
    # You can also use other beta testing services here (run `fastlane actions`)
  end

  after_all do |lane|
    # This block is called, only if the executed lane was successful

    # slack(
    #   message: "Successfully deployed new App Update."
    # )
  end

  error do |lane, exception|
    # slack(
    #   message: exception.message,
    #   success: false
    # )
  end
end

# More information about multiple platforms in fastlane: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
# All available actions: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Actions.md

# fastlane reports which actions are used
# No personal data is recorded. Learn more at https://github.com/fastlane/enhancer

`./fastlane/Appfile`
apple_id<EMAIL_ADDRESS># Your Apple email address
team_id "6FKVWU2G7X"  # Developer Portal Team ID

# you can even provide different app identifiers, Apple IDs and team names per lane:
# More information: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Appfile.md
for_platform :ios do
  for_lane :next do
    app_identifier "com.confusionstudios.MidiDesignerNext" # The bundle identifier of your app
  end
  for_lane :lite do
    app_identifier "com.confusionists.MidiDesignerFree" # The bundle identifier of your app
  end
  for_lane :limited do
    app_identifier "com.confusionists.MidiDesignerTwelve" # The bundle identifier of your app
  end
  for_lane :md77 do
    app_identifier "com.confusionstudios.mdtg" # The bundle identifier of your app
  end
  for_lane :pro do
    app_identifier "com.confusionists.MidiDesigner" # The bundle identifier of your app
  end
  for_lane :clav do
    app_identifier "com.confusionstudios.mdclav" # The bundle identifier of your app
  end
  for_lane :xg do
    app_identifier "com.confusionstudios.mdxg" # The bundle identifier of your app
  end
  for_lane :xw do
    target "xw"
    app_identifier "com.confusionists.MidiDesignerXW" # The bundle identifier of your app
  end
end

fastlane gems

Gem
Version
Update-Status

credentials_manager
0.16.2
✅ Up-To-Date

snapshot
1.16.4
🚫 Update availaible

frameit
3.0.0
✅ Up-To-Date

pem
1.4.0
🚫 Update availaible

cert
1.4.4
🚫 Update availaible

sigh
1.11.2
🚫 Update availaible

produce
1.3.1
🚫 Update availaible

pilot
1.12.1
🚫 Update availaible

scan
0.14.2
✅ Up-To-Date

supply
0.8.0
✅ Up-To-Date

match
0.11.0
🚫 Update availaible

fastlane
1.111.0
✅ Up-To-Date

fastlane_core
0.60.0
✅ Up-To-Date

spaceship
0.38.5
🚫 Update availaible

deliver
1.16.1
🚫 Update availaible

gym
1.13.0
✅ Up-To-Date

screengrab
0.5.5
🚫 Update availaible

Loaded fastlane plugins:

Plugin
Version
Update-Status

fastlane-plugin-versioning
0.2.5
✅ Up-To-Date

Loaded gems

Gem
Version

highline
1.7.8

commander
4.4.0

terminal-table
1.4.5

json
1.8.3

multipart-post
2.0.0

faraday
0.9.2

faraday_middleware
0.10.0

dotenv
2.1.1

net-ssh
3.2.0

net-sftp
2.1.2

rubyzip
1.1.7

security
0.1.3

krausefx-shenzhen
0.14.11

slack-notifier
1.5.1

rouge
1.11.1

xcpretty
0.2.4

word_wrap
1.0.0

colored
1.2

credentials_manager
0.16.2

fastimage
1.6.8

mini_magick
4.5.1

xcpretty-travis-formatter
0.0.4

i18n
0.7.0

thread_safe
0.3.5

tzinfo
1.2.2

activesupport
<IP_ADDRESS>

multi_json
1.12.1

gh_inspector
1.0.2

fastlane_core
0.60.0

excon
0.54.0

multi_xml
0.5.5

faraday-cookie_jar
0.0.6

babosa
1.0.2

plist
3.2.0

xcode-install
2.0.8

CFPropertyList
2.3.3

claide
1.0.1

nanaimo
0.2.2

xcodeproj
1.4.1

bundler
1.13.1

fastlane-plugin-versioning
0.2.5

generated on: 2016-12-13

@fastlane-bot not a code signing issue. Just trying to figure out how to do this. Thx.

You can use a Fastfile, and have multiple lanes there, where you call gym differently depending on the lane / environment 👍

Thanks @KrauseFx. I have lanes set up and use gym that way. The issue is how to get the export options into there.
This works (no export options at all)
  lane :alpha do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Alpha)'
      )
      gym(
        scheme: "Pro (Alpha)",
        output_directory: "/eraseme"
      )
  end

This Fails due to syntax issues
  lane :alpha do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Alpha)'
      )
      gym(
        scheme: "Pro (Alpha)",
        output_directory: "/eraseme",
        export_options.method: "ad-hoc",
        export_options.thinning: "<none>"
      )
  end

This Fails Also Due to Syntax Issues
  lane :alpha do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Alpha)'
      )
      gym(
        scheme: "Pro (Alpha)",
        output_directory: "/eraseme",
       export_options(method: "ad-hoc",thinning: "<none>")
      )
  end

I feel like I'm just a few characters away from the right syntax.
Thanks for helping!

Okay, I can't figure out thinning, but from the errors I got to this
      gym(
        scheme: "Pro (Alpha)",
        output_directory: "/eraseme",
        export_method: "ad-hoc",
        include_bitcode: "no"
      )

which might be enough. Still testing.

Okay, that worked for me. I still don't understand WHERE I could find all this syntax and how to translate it between the gymfile, fastfile and the command line. But I'm solved for now
  lane :alpha do
      increment_build_number_in_plist(
        build_number: Time.now.strftime("%Y%m%d%H%M"),
        target: 'Pro (Alpha)'
      )
      gym(
        scheme: "Pro (Alpha)",
        output_directory: "/whatever",
        export_method: "ad-hoc",
        include_bitcode: "no",
        output_name: "alpha.ipa"
      )
  end


Is there some easy/elegant way to change the footer

[x] This is a question about using the theme.

Hi Michael,
Thanks as always for providing this marvelous theme.
I was wondering if there was a way of editing the footer other than just editing the raw footer.html and associated css. I want to add an image to the center of the footer, and perhaps a button in the bottom right.
Thanks,
--Alex

Editing Jekyll templates in an elegant way is kind of an oxymoron :wink: You either edit the files directly or you don't. Well not completely true...
If you're using the gemified version of the theme (currently in beta) you can add your own files that will override the default _layouts, _includes, and _sass files provided with the theme.
You get the benefit of customizing the files how you want and not having to worry about upgrading as it's as simple as gem update minimal-mistakes-theme.
Unfortunately you have to be on Jekyll 3.3 and it doesn't currently work with GitHub Pages hosted sites since 3rd party gem themes (other than minima) aren't supported yet. So it's not a solution for everyone.
Also, if you want add content before the footer the theme ships with an include to do that. It's blank by default, but you can populate with whatever HTML you want.

_includes/footer/custom.html -- injects right before footer.html (good for adding banner ads and the like)
_includes/head/custom.html -- injects right after head.html (good for adding favicon images and the like)

Okay, assuming I'm using gh-pages, and I want to add an image in the middle of the footer, I should just edit the footer.html file in that case?

Yes
On Wednesday, October 26, 2016, Alexander Lenail<EMAIL_ADDRESS>wrote:

Okay, assuming I'm using gh-pages, and I want to add an image in the
middle of the footer, I should just edit the footer.html file in that case?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
https://github.com/mmistakes/minimal-mistakes/issues/615#issuecomment-256517690,
or mute the thread
https://github.com/notifications/unsubscribe-auth/ABUB7bdsgmkP_1HsaL-GWYbZMoXly8GHks5q3_UigaJpZM4Khi2M
.


Airplay to Sonos Move 2 not working

What version of Music Assistant has the issue?
2.3.2
What version of the Home Assistant Integration have you got installed?
2024.11.0
Have you tried everything in the Troubleshooting FAQ and reviewed the Open and Closed Issues and Discussions to resolve this yourself?

[X] Yes

The problem
Can't stream audio to Sonos Move 2 over airplay. It used to work, but suddently stopped working. I'm guessing Sonos updated the software because I didn't change my setup. However Airplay to the Sonos Move 2 via an iOS device works fine.
How to reproduce
select the Sonos Move 2 as the audio device in Music Assistant, play audio. No audio is playing (play button doesn't even change).
Music Providers
Spotify, Streaming Radio
Player Providers
Airplay doesn't work, not as a single device nor grouped. Speaker works fine with the Sonos player provider. I tried switching the setting for compression and encryption, nothing seems to work.
Full log output
music-assistant.log
Additional information
No response
What version of Home Assistant Core are your running
2024.10
What type of installation are you running?
Home Assistant Container
On what type of hardware are you running?
Generic x86-64 (e.g. Intel NUC)

Sonos broke this in a recent fw update. It stopped working on the latest gen speakers only, so ERA and Move 2.
Other speakers still seem to work fine.
For reference, what stopped working is Airplay 1 lossless RAOP streaming, which is what MA uses to stream audio to airplay targets. Now lets hope they bring it back but I'm afraid they simply dont care.

@marcelveldt Should we then add a note in the docs and close this?

@marcelveldt based on your comment I started looking on the sonos forum and found a topic where somebody had an issue with an Airplay password and combination with Homekit. I then realized I recently added the Sonos to Homekit (not sure why, because HA is so much better :). Removing the Sonos from Homekit solved the problem. Music Assistant and Airplay is now working again for the Sonos. Might be good to add to the docs that Apple Homekit might cause issues with Airplay streaming to Sonos devices.
on a slightly different topic. I'm not apple to control Music Assistant Airplay streams from iOS devices once they are innitiated through Music Assistant, is that a known issue?

Removing the Sonos from Homekit solved the problem. Music Assistant and Airplay is now working again for the Sonos.

Ha cool discovery! Maybe some other folks could try that out to see if it resolved the issue.

I'm not apple to control Music Assistant Airplay streams from iOS devices once they are initiated through Music Assistant, is that a known issue?

That is a known limitation - iOS devices can only control Airplay 2 streams - MA uses the legacy RAOP (airplay 1) lossless audio streaming only towards devices.

And it stopped working again, not sure why... It can't be HomeKit, as I suggested earlier 😟

Sonos killed lossless AirPlay 1/RAOP streaming on newer models (ERA 100, ERA 300, Move 2) in a recent firmware update.
There is nothing we can do about that, except maybe nagging Sonos.

@OzGav can we maybe add a note to the docs ?
I have already added a warning in the player settings and disable these airplay players by default nowadays.
Other Sonos models still work fine


did calculate_auto_lr affect a lot?

RT

Sorry, what do you mean? This function is for calculating the learning rate based on the batch size using square root rule, as mentioned in the README.

Sorry for not making it clear, I wonder if the square root rule has a big impact on the results, compared to other lr scheduler(cosine?)

It's using the cosine scheduler. The square root rule is used for calculating initial lr for the schedule, otherwise we need to manually tune it.

Thank you~


[BUG] posix_local KeyError loading distutils scheme, using setuptools over Debian 12 Bookworm

setuptools version
setuptools==69.0.3
Python version
Python 3.11.4
OS
Debian 12.4 Bookworm
Additional environment information
No response
Description
We have a simple package with custom setup.py for it.
Until now we've used Debian 11 Bullseye with Python 3.11.4 and setuptools==68.2.2 and had no issues.
Moving to Debian 12 Bookworm with mentioned setuptools version 69.0.3 -
We observed issues loading scheme (See log below).
Notes
I've checked WA Suggested in:
https://github.com/pypa/setuptools/issues/2936
Of:
SETUPTOOLS_USE_DISTUTILS=stdlib
When installing setuptools, but that didn't help.
Only thing worked was downgrading:
python3 -m pip install --force-reinstall --no-cache-dir 'setuptools<59.7.0' Collecting setuptools<59.7.0   Downloading setuptools-59.6.0-py3-none-any.whl (952 kB)

If any other env information required please let me know
The package we're trying to install is a custom package (not traditional pypi package), that has custom setup.py.
if needed i'll share the setup.py content.
Not issues were observed with same implementation over Debian 11 Bullseye

Expected behavior
No errors during load scheme
How to Reproduce
Not sure, that package is a custom package in our env, not traditional "pypi" package
( but actually one we built setup.py explicitly )
Output
Traceback (most recent call last):
  File "/usr/src/sx_sdk/BUILD/sys_sdk-4.6.2900-158/python_sdk_api/setup.py", line 456, in <module>
    setup(name=PACKAGE_NAME,
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
    return run_commands(dist)
           ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
    dist.run_commands()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
    self.run_command(cmd)
  File "/usr/lib/python3.11/site-packages/setuptools/dist.py", line 963, in run_command
    super().run_command(command)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
    cmd_obj.ensure_finalized()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
    self.finalize_options()
  File "/usr/src/sx_sdk/BUILD/sys_sdk-4.6.2900-158/python_sdk_api/setup.py", line 351, in finalize_options
    super(python_sdk_api_install, self).finalize_options()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 390, in finalize_options
    self.finalize_unix()
  File "/usr/lib/python3.11/_distutils_system_mod.py", line 60, in finalize_unix
    super().finalize_unix()
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 580, in finalize_unix
    self.select_scheme("posix_prefix")
  File "/usr/lib/python3.11/_distutils_system_mod.py", line 56, in select_scheme
    super().select_scheme(name)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 605, in select_scheme
    _select_scheme(self, name)
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 131, in _select_scheme
    scheme = _inject_headers(name, _load_scheme(_resolve_scheme(name)))
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py", line 152, in _load_scheme
    return _load_schemes()[name]
           ~~~~~~~~~~~~~~~^^^^^^
KeyError: 'posix_local'

Following more versions testing, i've found out the issue doesn't reproduce on setuptools==59.8.0, but starts reproducing on setuptools==60.0.0

Hi @adiel91 thank you very much for reporting this.
If I am not mistaken posix_local is a custom installation scheme introduced by Debian patches (possibly https://sources.debian.org/src/python3.11/3.11.2-6/Lib/_distutils_system_mod.py/#L152-L159).
This schema does not seem to be defined in the sysconfig for CPython 3.11[^1].
Probably the best people to advise on the way forward would be the Debian folks. Have you tried reporting it in the Debian relevant forums?

I've checked WA Suggested in:
#2936
Of:
SETUPTOOLS_USE_DISTUTILS=stdlib
When installing setuptools, but that didn't help.

Please note that the suggestions is to set SETUPTOOLS_USE_DISTUTILS whenever setuptools code is executed, not only while installing setuptools. Also note that this is valid only for Python < 3.12.
[^1]: So it can only come from Debian patches...

Hi @adiel91 thank you very much for reporting this.
If I am not mistaken posix_local is a custom installation scheme introduced by Debian patches (possibly https://sources.debian.org/src/python3.11/3.11.2-6/Lib/_distutils_system_mod.py/#L152-L159).
This schema does not seem to be defined in the sysconfig for CPython 3.111.
Probably the best people to advise on the way forward would be the Debian folks. Have you tried reporting it in the Debian relevant forums?

I've checked WA Suggested in:
#2936
Of:
SETUPTOOLS_USE_DISTUTILS=stdlib
When installing setuptools, but that didn't help.

Please note that the suggestions is to set SETUPTOOLS_USE_DISTUTILS whenever setuptools code is executed, not only while installing setuptools. Also note that this workaround is valid only for Python < 3.12.
Footnotes

So it can only come from Debian patches... ↩

Hi,
It might indeed be some Debian related issue, i'm not sure - The issue actually occurs,
If we replace the system interpreter from upstream (which is Python 3.11.2), with a compilation of Python3.11.4 from sources.
The reason we do that is that we need python compiled with full optimizations, thus we run:
./configure --enable-optimizations --disable-test-modules --enable-shared --with-lto=full --prefix=/usr
Followed by
make -j64 && make install
(and not altinstall - since we want the system one to be replaced).
Questions:

Do you know where should I report such issue to debian?
I don't understand about posix_local not defined in CPython 3.11 as you mentioned.
If that's true - why with upstream python3.11.2 over debian, no such issue observed?
The CPython for it is the same..

Do you know where should I report such issue to debian?

Hi @adiel91, unfortunately I am not familiar with the Debian development cycle and forums either, so I will not be able to advise on that. All links I listed here I found using my google-fu 😅.

2. I don't understand about posix_local not defined in CPython 3.11 as you mentioned.
If that's true - why with upstream python3.11.2 over debian, no such issue observed?
The CPython for it is the same. Or its maybe since upstream python doesn't try to use that posix_local scheme to begin with?

Debian also patches the sysconfig module and introduces their custom posix_local there. The copy of distutils distributed by setuptools only augments the already existing info in sysconfig. Therefore, if sysconfig contains the posix_local (as happens in the Debian patch), then no issue will be observed. In other words, Debian uses comprehensive patching of Python in multiple modules, in a way that they are interconnected. And they test these patches to make sure they work well together.

I have a question for you also:
Do the copy you use for compiling Python 3.11 contains the _distutils_system_mod.py file? (i.e. does this file get created once you install your Python version from scratch?)

Or is it a file that is already present in the file system due a pre-existing installation of Python? And then it gets picked up because its parent directory is listed under sys.path in the custom Python installation?

If the file is not present in your custom Python, it might be an interoperability/isolation issue between the version of Python you are using and the version of Python that comes pre-installed in the system... (i.e. an isolation leak between 2 conflicting Python installations).
So maybe it is not even the case of contacting Debian, but rather ensuring that the version you are installing of Python is properly isolated and does not accidentally loads directories provided by different installations (e.g. in sys.path or site.PREFIXES/USER_SITE/USER_BASE or sitecustomize.py)

I also found out some WA: If I edit the file /usr/lib/python3.11/site-packages/setuptools/_distutils/command/install.py, adding a simple patch to add posix_local to install schemes, same as posix_prefix, everything seems to work correctly
INSTALL_SCHEMES['posix_local'] = INSTALL_SCHEMES['posix_prefix']

Unfortunately I also don't know how posix_local is intended to work, so I cannot assess if this patch is sound.

Hi @abravalheri ,
Thanks for clarifying the patching behavior. I'll try to use my own google-fu to find out the proper place to report it to Debian.
Regarding your questions -

Do the copy you use for compiling Python 3.11 contains the _distutils_system_mod.py file? (i.e. does this file get created once you install your Python version from scratch?)

Or is it a file that is already present in the file system due a pre-existing installation of Python?

I've checked 2 systems - One with upstream python 3.11.2 (No changes), one with our "custom" 3.11.4 which we compiled from sources retrieved from Python.org.
On both systems, file exists:
root@localhost:~# find /usr -name '*system_mod.py*' /usr/lib/python3.11/_distutils_system_mod.py
And has exact same content as the other system.

And then it gets picked up because its parent directory is listed under sys.path or site.PREFIXES/USER_SITE/USER_BASE in the custom Python installation?

Not sure about "gets picked up", but sys.path in both cases is as follows:
`Python 3.11.4 (main, Jan  5 2024, 09:03:00) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

import sys; sys.path
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/lib/python3.11/site-packages']
 Python 3.11.2 (main, Mar 13 2023, 12:18:29) [GCC 12.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
import sys; sys.path
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', '/usr/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages']
`

Is that information helpful to you in order to help me? :D
Thanks

Hi @adiel91, you mentioned that in both cases /usr/lib/python3.11/_distutils_system_mod.py. But was it written there by your custom installation of Python, or is this an already existing file before you install Python from the source code?

Hi @adiel91, you mentioned that in both cases /usr/lib/python3.11/_distutils_system_mod.py is present. But was it written there by your custom installation of Python, or is this an already existing file before you install Python from the source code?
I am trying to determine if your installation is attempting to add _distutils_system_mod.py purposefully (as part of the source code you are compiling), or if it is only accidentally "inheriting" something that was already there, and that is not meant to be interoperable with the version of Python you are compiling from scratch.

Hi @abravalheri
I actually answered that :)
"
On both systems, file exists:
root@localhost:~# find /usr -name 'system_mod.py' /usr/lib/python3.11/_distutils_system_mod.py
And has exact same content as the other system.
"
both systems = 1 system with the upstream python, no custom python installation, 2nd system with the custom python installation.
Maybe the misunderstanding is with definition of 2nd system -
With custom python means - The system was identical to 1st one (had upstream python installed), and then we installed our custom python from sources.
So it seems the file was always there

So it seems the file was always there

If the file was already there before you installed Python from scratch and installing Python from the source code according to the method you are using does not create any _distutils_system_mod.py, then I think you are falling into the problem that I previously referred to as "it[^1] gets picked up" or "accidentally inheriting something that was already there". I.e. effectively there is an isolation problem between the 2 distinct Python installations, and they are accidentally sharing incompatible files.
In that scenario, your installation of Python uses pre-existing directories for sys.path (and/or sys.prefix and/or site.PREFIXES/USER_SITE/USER_BASE etc ...) that contain files designed by the Debian folks to interoperate with their customised/patched codebase, and therefore are incompatible with the Python source code distributed by python.org (or any vanilla Python distribution).
Solutions for that problem include:

Completely uninstalling the pre-installed Python and ensuring that all modules are removed from all the locations as found in sys.path, sys.prefix, site.PREFIXES/USER_SITE/USER_BASE, etc... before installing a new Python.
Modifying the compilation parameters, configuration files, etc... (maybe even patching the source code) when compiling Python to make sure the new installation uses a completely different set of directories for  sys.path, sys.prefix, site.PREFIXES/USER_SITE/USER_BASE.

Alternatively you also can use a different base image that does not use custom patching for the Python packages distributed by the OS (differently from Debian).
[^1]: The _distutils_system_mod.py module.

Thank you @adiel91


Add support for snapshotting gltf standard

To properly address https://github.com/KittyCAD/modeling-app/pull/1688#issuecomment-1991088562

youi added a test you are the best, need me to make a release? you can also bump the cargo.lock version, and run make tag then push the tag to trigger


Prevent pushing of NPC's?

hey,
is there any way to prevent that players can push the NPC without doing it with blocks?
Also does it require API 6 to set the skin? As it doesn't change from the Steve skin.

The skin should work on API5, is tour server in online mode? Also i dont really understand if you want them to be able to push them or not. By default they should be unpushable, maybe ill add an option for it.

Server is in offline mode because of bungeecord.
I want them unpushable. I'm able to push them.

I want them unpushable. I'm able to push them.

It seems like this is a bug with sponge API5 beause It works fine in API6.

I +1 this. I'd really like API5 to support non-moving of NPCs when a player walks into it. It's quite annoying because of the trolls pushing my npcs out of spawn.

Is there any fix for this coming for sponge API5?

It would be great if you could fix this :)


[otl] Update to version 4.0.451

The current version of otl is now also available with a filename including the version, e.g. otlv4_40451.zip [1, 2]

Use variable OTL_VERSION in portfile
Rename header file to otlv4.h
This is the current default name of the header file and typically included using:
#include "otlv4.h" or #include <otlv4.h>

[1] https://sourceforge.net/p/otl/discussion/208859/thread/fdb9d3bacc/#45bf
[2] http://otl.sourceforge.net/otl3_down.htm
Describe the pull request

What does your PR fix? Fixes issue #
Update otl to the current version 4.0.451
Simplify portfile by using a variable for the version
Which triplets are supported/not supported? Have you updated the CI baseline?
All triplets are supported. CI-baseline: NA
Does your PR follow the maintainer guide?
Yes

2020-01-04T12:18:04.9047756Z The following files are already installed in C:/vsts/_work/3/s/installed/x86-windows and are in conflict with stb:x86-windows
2020-01-04T12:18:04.9049652Z
2020-01-04T12:18:04.9051732Z Installed by nanovg:x86-windows
2020-01-04T12:18:04.9053626Z     include/stb_image.h

Could you add stb:x86-windows=skip to VCPKG_PATH/scripts/ci.baseline.txt ?
Thanks.

Could you please resolve theses conflicts?
Thanks,

OK, I have resolved the conflicts now.
Background info:
In the meantime, otl has been partly updated in master.
See: 9c860988ab67312761246b9d55242ee995596c1b and PR: #9107
The following changes of this PR are already in master now and have been removed from the commit message here:

Use variable OTL_VERSION in portfile
Rename header file to otlv4.h


Simplify main export?

Hi @radiovisual,
Thanks for the module! I'm just curious as to why you've wrapped the JSON file in a function when you can export it directly:
module.exports = require('./unicode-ranges.json');

This makes the consuming code simpler:
const ranges = require('unicode-range-json');

As opposed to:
const ranges = require('unicode-range-json')();

I can send a pull request if you would like.
Thanks!

I think I originally planned to attach helper functions to this module, but then moved those to unicode-range, so the unnessesary function wrap was probably an artifact left behind. Pull request is welcome if you want to clean it up. Thanks!


Type Alias Bug

The following code compiles just fine:
trait AAAA {
  type L[T] = T => T

  def foo(): Lambda[L[String]] = ???
  def bar(): Lambda[String => String][Int] = ???
  def fooType: String = foo()
  def barType: Int = bar()
}

In case of foo(), String is treated as java.lang.String and in case of bar() String is treated as an identifier.
I am curious what type does Kind Projector generate for foo(). Is it ({type Λ$ = String})#Λ$?
Is this intended behavior? This definitely doesn't look right.

Hi @ilinum,
I think this is a case where the documentation/errors are not as clear as they should be. The type argument to Lambda[...] is supposed to be a literal function type. Since the plugin runs before the typer, it has no idea that L[T] is really T => T. I think what should be happening is an error message.
I'll leave this bug open try to fix this issue.

I'm also impressed that Lambda[T => T][Int] works, and is equivalent to Int. Scala doesn't normally support curried type applications, but I guess it makes sense that the plugin rewrites the first application, so the type becomes ({type Λ$[T] = T})#Λ$[Int].

Finally, to answer your question, bar's behavior is correct -- any name (including String) that is in the function argument position of a type lambda is treated as an identifier.


Small fix in incorrect code example on up- and downcasting

The let keyword was missing in the example.
Also, **upcast** *expression* and **downcast** *expression* does not render correctly on the Microsoft website of this page (i.e., here: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/casting-and-conversions-[fsharp]) as can be seen in this screenshot, the space is missing:

@cartermp, @KevinRansom or anybody, is this an error with the renderer at Microsoft? Because in Markdown and on Github it looks just fine.

:white_check_mark: Validation status: passed

File
Status
Preview URL
Details

docs/conceptual/casting-and-conversions-[fsharp].md
:white_check_mark:Succeeded

For more details, please refer to the build report.
Note: If you changed an existing file name or deleted a file, broken links in other files to the deleted or renamed file are listed only in the full build report.

@abelbraaksma What you're fixing makes up the conceptual doc set for F#, which has been migrated to docs.microsoft.com/dotnet/fsharp.
I applied this fix to that doc here: https://github.com/dotnet/docs/pull/4838
The rendering works on docs, so I think we can close this PR. Since these map to the legacy docs set (which, unfortunately, is still live for the FSharp.Core API reference), any changes to conceptual F# content should go to the dotnet/docs repo.

@cartermp, I remembered something like that, but then I saw this "Contribute" button on each document and I decided to just go for it ;), assuming it still applied.
It's rather confusing to have two sets of docs that are nearly identical.

Yeah, it's quite confusing indeed. Once we work out the finnicky issues in representing F# syntax on the docs API infrastructure, we'll redirect all URLs from this doc set to that one. Unfortunate, and somewhat lengthy, point-in-time issue 😢


UTF-8 support after evaluating Python expressions

Support UTF-8 when converting native Python objects to SBValue after evaluating Python expressions and returning them to a string representation
Test Example：
?/py bytes([228, 189, 160, 229, 165, 189]).decode()

Fixed in 1.7.1


Suggestion: Move assets from apps folder to libs/shared

Awesome work!
I have a suggestion regarding the structure since you use Nx Workspace.
You could move the entire apps/angular-spotify/src/assets folder to  a more generic library (e.g. libs/shared/assets).
Thus, you can use pathing to any folder within the project (apps & libs) and will have nicely architectured new lib only for assets.
P.S. I can help on this issue if you want.

@nikosanif Cheers! I think having a shared lib asset is a truly a best practice. Feel free to refactor the code and create a new PR. I'll be happy to review it.
Notes: I am using lots of images for the repo README, please help to update there as well :)


[Feat]: Enhance Registration Form Design in Light Theme

Is there an existing issue for this?

[X] I have searched the existing issues

Feature Description
I would like to modify the registration form design in the light theme to match the design of the dark theme. In the dark theme, there is an appealing background animation that creates a smooth color transition effect. I propose implementing a similar effect in the light theme to ensure consistency across the website's themes. This enhancement will improve the overall user experience and aesthetic appeal of the registration process.

Use Case

Apply a background animation to the registration form in the light theme similar to that in the dark theme.
Ensure the color transitions are consistent with the overall theme of the website.

Benefits
No response
Priority
High
Record

[X] I agree to follow this project's Code of Conduct
[X] I'm a GSSOC contributor
[X] I want to work on this issue
[X] I'm willing to provide further clarification or assistance if needed.

okay only work on the /instantOPD form and please don't make any changes in the way data is sent to the backend

Sure @Luson045, I will only make changes on design.


[Bug]: Issue with using min_tokens from recent build

Your current environment
My current environment setup is :
Versions of relevant libraries:
[pip3] numpy==1.26.4
[pip3] torch==2.1.2
[pip3] triton==2.1.0
[conda] numpy                     1.26.4                   pypi_0    pypi
[conda] torch                     2.1.2                    pypi_0    pypi
[conda] triton                    2.1.0                    pypi_0    pypiROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: N/A
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0    CPU Affinity    NUMA Affinity   GPU NUMA ID
GPU0     X      0,2     0               N/A

Legend:

  X    = Self
  SYS  = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
  NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
  PHB  = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
  PXB  = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
  PIX  = Connection traversing at most a single PCIe bridge
  NV#  = Connection traversing a bonded set of # NVLinks

🐛 Describe the bug
Currently, I am trying to use vllm for the task of summarization and I was getting the error of min_tokens not being present in the SamplingParams API. Hence, I wanted to install from source. So I followed the source installation and I am facing this issue :
Obtaining file:///work/pi_dhruveshpate_umass_edu/compressed-llm/experiments/shatwar/vllm
  Installing build dependencies ... done
  Checking if build backend supports build_editable ... done
  Getting requirements to build editable ... error
  error: subprocess-exited-with-error

  × Getting requirements to build editable did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      /tmp/pip-build-env-9q0l22qz/overlay/lib/python3.9/site-packages/torch/nn/modules/transformer.py:20: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at ../torch/csrc/utils/tensor_numpy.cpp:84.)
        device: torch.device = torch.device(torch._C._get_default_device()),  # torch.device('cpu'),
      Traceback (most recent call last):
        File "/work/pi_dhruveshpate_umass_edu/compressed-llm/envs/vllm_cuda_12.2/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/work/pi_dhruveshpate_umass_edu/compressed-llm/envs/vllm_cuda_12.2/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/work/pi_dhruveshpate_umass_edu/compressed-llm/envs/vllm_cuda_12.2/lib/python3.9/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 132, in get_requires_for_build_editable
          return hook(config_settings)
        File "/tmp/pip-build-env-9q0l22qz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 448, in get_requires_for_build_editable
          return self.get_requires_for_build_wheel(config_settings)
        File "/tmp/pip-build-env-9q0l22qz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-9q0l22qz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-9q0l22qz/overlay/lib/python3.9/site-packages/setuptools/build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 351, in <module>
        File "<string>", line 283, in get_vllm_version
        File "<string>", line 254, in get_nvcc_cuda_version
      TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

I saw several issues in the issue tracker, but could not follow a particular fix for this. Could anyone please point to a fix or let me know from which build we can see the changed SamplingParam ?

@Sriharsha-hatwar please try with the latest 0.4.0 release.


How to deal with abusing users？

I am running a  pool with z-nomp, but i find some abusing user.
That person had a about 20% of pool hash but didn't find any block for several hours.
The same issue can find here: https://github.com/zone117x/node-stratum-pool/issues/41
Any body can help me?

@taylorshuang, I am already given answer on #339 about a vulnerable equihash verifier. How fix look on my answer.


Running TOGA with an assertless dataset

When running TOGA with the provided datasets, for example the evosuite_reaching_tests, TOGA generates two pairs of files:

except_model_inputs.csv and exception_preds.csv;
assert_model_inputs.csv and assertion_preds.csv;

For my project, I am trying to use TOGA on a dataset similar to ATLAS' dataset, where all of the assertions have been replaced by a placeholder, for example, something like this:
public void testIssue705() throws Exception {
    Issue705Bean input = new Issue705Bean(""key"", ""value"");
    String json = MAPPER.writeValueAsString(input);
    // TEST ORACLE
}

where // TEST ORACLE would be our placeholder (this can be replaced by something else too).

Problem is, when i run TOGA with a dataset like this, it fails to write something in the assert_model_inputs.csv (this file will only contain the header), which leads to not being able to generate the assertion_preds.csv and, consequently, fail because it can not find this same file.
This leads to the following stacktrace:
preparing assertion model inputs

// Defects4J: flaky method
// public void testBug2849731() {
// TestIntervalCategoryDataset d = new TestIntervalCategoryDataset();
// d.addItem(2.5, 2.0, 3.0, "R1", "C1");
// d.addItem(4.0, 0.0, 0.0, "R2", "C1");
// ,
// DatasetUtilities.iterateRangeBounds(d));
// }
/**
 * Another test for bug 2849731.
 */
public void testBug2849731_2() {
    XYIntervalSeriesCollection d = new XYIntervalSeriesCollection();
    XYIntervalSeries s = new XYIntervalSeries("S1");
    s.add(1.0, Double.NaN, Double.NaN, Double.NaN, 1.5, Double.NaN);
    d.addSeries(s);
    Range r = DatasetUtilities.iterateDomainBounds(d);
    // TEST ORACLE
}

[]
05/20/2022 21:39:40 - WARNING - __main__ -   Process rank: -1, device: cpu, n_gpu: 0, distributed training: False, 16-bits training: False
Some weights of the model checkpoint at microsoft/codebert-base were not used when initializing RobertaForSequenceClassification: ['pooler.dense.weight', 'pooler.dense.bias']
- This IS expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model trained on another task or with another architecture (e.g. initializing a BertForSequenceClassification model from a BertForPreTraining model).
- This IS NOT expected if you are initializing RobertaForSequenceClassification from the checkpoint of a model that you expect to be exactly identical (initializing a BertForSequenceClassification model from a BertForSequenceClassification model).
Some weights of RobertaForSequenceClassification were not initialized from the model checkpoint at microsoft/codebert-base and are newly initialized: ['classifier.out_proj.bias', 'classifier.out_proj.weight', 'classifier.dense.weight', 'classifier.dense.bias']
You should probably TRAIN this model on a down-stream task to be able to use it for predictions and inference.
05/20/2022 21:39:48 - INFO - __main__ -   Training/evaluation parameters Namespace(data_dir='./', model_type='roberta', model_name_or_path='microsoft/codebert-base', task_name='assertion_classifier', output_dir='./models/assertion_classifier', config_name='', tokenizer_name='', cache_dir='', max_seq_length=200, do_train=False, do_eval=False, do_predict=True, evaluate_during_training=False, do_lower_case=False, per_gpu_train_batch_size=32, per_gpu_eval_batch_size=256, gradient_accumulation_steps=1, learning_rate=1e-05, weight_decay=0.0, adam_epsilon=1e-08, max_grad_norm=1.0, num_train_epochs=8.0, max_steps=-1, warmup_steps=0, logging_steps=50, save_steps=50, eval_all_checkpoints=True, no_cuda=False, overwrite_output_dir=True, overwrite_cache=False, seed=42, fp16=False, fp16_opt_level='O1', local_rank=-1, server_ip='', server_port='', train_file='train.txt', dev_file='valid.txt', test_file='assert_model_inputs.csv', pred_model_dir='model/assertions/pretrained/', test_result_dir='test_results.tsv', n_gpu=0, device=device(type='cpu'), output_mode='classification', start_epoch=0, start_step=0)
testing

05/20/2022 21:39:49 - INFO - __main__ -   Creating features from dataset file at ./

05/20/2022 21:39:49 - INFO - utils -   LOOKING AT ./assert_model_inputs.csv

/home/daniel/work/oracles/toga/model/assertions/utils.py:364: RuntimeWarning: Mean of empty slice.
  print(f'total_samples {len(trunc_b)} total truncations {(trunc_both > 0).sum()}, mean_trunc {trunc_both.mean()}, median {np.median(trunc_both)}, max = {trunc_both.max()}')
/home/daniel/.local/lib/python3.9/site-packages/numpy/core/_methods.py:189: RuntimeWarning: invalid value encountered in double_scalars
  ret = ret.dtype.type(ret / rcount)
/home/daniel/.local/lib/python3.9/site-packages/numpy/core/fromnumeric.py:3440: RuntimeWarning: Mean of empty slice.
  return _methods._mean(a, axis=axis, dtype=dtype,
Traceback (most recent call last):
  File "/home/daniel/work/oracles/toga/model/assertions/run_classifier.py", line 720, in <module>
    main()
  File "/home/daniel/work/oracles/toga/model/assertions/run_classifier.py", line 715, in main
    evaluate(args, model, tokenizer, checkpoint=None, prefix='', mode='test')
  File "/home/daniel/work/oracles/toga/model/assertions/run_classifier.py", line 236, in evaluate
    eval_dataset, instances = load_and_cache_examples(args, eval_task, tokenizer, ttype='test')
  File "/home/daniel/work/oracles/toga/model/assertions/run_classifier.py", line 421, in load_and_cache_examples
    features = convert_examples_to_features(examples, label_list, args.max_seq_length, tokenizer, output_mode,
  File "/home/daniel/work/oracles/toga/model/assertions/utils.py", line 364, in convert_examples_to_features
    print(f'total_samples {len(trunc_b)} total truncations {(trunc_both > 0).sum()}, mean_trunc {trunc_both.mean()}, median {np.median(trunc_both)}, max = {trunc_both.max()}')
  File "/home/daniel/.local/lib/python3.9/site-packages/numpy/core/_methods.py", line 40, in _amax
    return umr_maximum(a, axis, None, out, keepdims, initial, where)
ValueError: zero-size array to reduction operation maximum which has no identity

Result of running bash ./model/assertions/run_eval.sh assert_model_inputs.csv
CompletedProcess(args=['bash', './model/assertions/run_eval.sh', 'assert_model_inputs.csv'], returncode=1)

Traceback (most recent call last):
  File "/home/daniel/work/oracles/toga/toga.py", line 218, in <module>
    main()
  File "/home/daniel/work/oracles/toga/toga.py", line 83, in main
    with open("assertion_preds.csv") as f:
FileNotFoundError: [Errno 2] No such file or directory: 'assertion_preds.csv'

I have also tried to first run one of the provided datasets (evosuite_reaching_tests) to have it generate this missing file.
With this, i can run TOGA, however, as expected, the assert_model_inputs.csv  is overwritten and left empty.
Also, as may be expected, as the assertion_preds.csv is not generated for the dataset being used, TOGA, despite running, can not infer any assert.
In summary:
I would like to use TOGA on a project that has absolutely no assert statements and have it generate all of the needed asserts, is this in any way possible?
Thank you,
Daniel Bento

Hi Daniel,
If you have a dataset similar to ATLAS with assertion placeholders, we recommend using the TOGA implementation under eval/rq2/assertion_inference/ and usingdata/atlas_star_datagen.py to generate model inputs from your tests and eval/rq2/assertion_inference/rq2.sh to run on your inputs. You can use the same placeholder strings used by ATLAS in your inputs. Note that your test inputs will need to be in the same format as ATLAS inputs for the script to work.
The interface for TOGA implemented in toga.py  is designed specifically to work with Evosuite generated tests, and replaces the Evosuite-generated assertions it sees in those tests with its own assertions. So to use it you would need to add 'dummy' assertions to your tests on variables you to wish to test so TOGA knows which variables to generate assertions on.
Best,
Gabe

Hello Gabriel,
Thank your for your response,
About using the same format as ATLAS' inputs, that means I would have to have two files, one with the test method + focal method and another with the assertions, and both files would have to be tokenized, right? As i have no assertions for my tests, this raises two questions:

What if I do not have any assertions for my tests? I imagine this would not work and would actually crash the data/atlas_star_datagen.py script;
Could I use dummy assertions like you mention for EvoSuite?
2.1. Also, when using dummy assertions, as you describe it, they must use the variables I want to test. This means I could not use assertions as simple as assertTrue(true), correct?

Thank you,
Daniel Bento

Hi Daniel,
For the ATLAS dataset an assert placeholder string is included with the
tests that we replace with an assertion. So you can use the same assert
placeholder in your tests and generate assertions without having to include
an assertion of your own.
If you wish to use our Evosuite oracle pipeline for assertion generation
(which would also exception oracles), you would need to include assertions
on specific variables as you describe. assertTrue(true) would not work.
Best,
Gabe
On Sun, May 22, 2022 at 6:11 AM Daniel Bento @.***>
wrote:

Hello Gabriel,
Thank your for your response,
About using the same format as ATLAS' inputs, that means I would have to
have two files, one with the test method + focal method and another with
the assertions, and both files would have to be tokenized, right? As i have
no assertions for my tests, this raises two questions:

What if I do not have any assertions for my tests? I imagine this
would not work and would actually crash the data/atlas_star_datagen.py
script;
Could I use dummy assertions like you mention for EvoSuite?
2.1. Also, when using dummy assertions, as you describe it, they must
use the variables I want to test. This means I could not use assertions as
simple as assertTrue(true), correct?

Thank you,
Daniel Bento
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/toga/issues/3#issuecomment-1133862583, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AADFQKD57EJSAGD7EDDZBDDVLIB35ANCNFSM5WRVLZAQ
.
You are receiving this because you commented.Message ID:
@.***>

Hello Gabriel,
I'm currently studying computer science at the chair of professor Gordon Fraser and am trying to execute toga as part of my master thesis.
I'm trying to have it generate an assertion for a test without an assertion. Following what you said here, I formatted the test case as in the atlas input files, and used a dummy value in assertLines.txt
My input is as follows:
testMethods.txt:
getUsersWaitingNotificationNoWatchExpectEmptyList ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 13 ) ; java . util . List < net . jforum . entities . User > users = dao . getUsersWaitingNotification ( topic ) ; "<AssertPlaceHolder>" ; } getUsersWaitingNotification ( net . jforum . entities . Topic ) { java . util . List < net . jforum . entities . User > users = session . createQuery ( ( "select<sp>u<sp>from<sp>TopicWatch<sp>tw<sp>" + ( "<sp>inner<sp>join<sp>tw.user<sp>u<sp>where<sp>tw.topic<sp>=<sp>:topic<sp>" + "<sp>and<sp>(tw.read<sp>=<sp>true<sp>or<sp>u.notifyAlways<sp>=<sp>true)" ) ) ) . setEntity ( "topic" , topic ) . setComment ( "topicWatchDAO.getUsersWaitingNotification" ) . list ( ) ; if ( ( users . size ( ) ) > 0 ) { this . markAllAsUnread ( topic ) ; } return users ; }"
assertLines.txt:
org . junit . Assert . assertTrue ( true )
After then running atlas_star_datagen, I'm left with the following testcsv:
idx,label,fm,test,assertion 0,1,"getUsersWaitingNotification ( net . jforum . entities . Topic ) { java . util . List < net . jforum . entities . User > users = session . createQuery ( ( ""select<sp>u<sp>from<sp>TopicWatch<sp>tw<sp>"" + ( ""<sp>inner<sp>join<sp>tw.user<sp>u<sp>where<sp>tw.topic<sp>=<sp>:topic<sp>"" + ""<sp>and<sp>(tw.read<sp>=<sp>true<sp>or<sp>u.notifyAlways<sp>=<sp>true)"" ) ) ) . setEntity ( ""topic"" , topic ) . setComment ( ""topicWatchDAO.getUsersWaitingNotification"" ) . list ( ) ; if ( ( users . size ( ) ) > 0 ) { this . markAllAsUnread ( topic ) ; } return users ; }""","getUsersWaitingNotificationNoWatchExpectEmptyList ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 13 ) ; java . util . List < net . jforum . entities . User > users = dao . getUsersWaitingNotification ( topic ) ; ""<AssertPlaceHolder>"" ; }",assertTrue ( true ) 1,0,"getUsersWaitingNotification ( net . jforum . entities . Topic ) { java . util . List < net . jforum . entities . User > users = session . createQuery ( ( ""select<sp>u<sp>from<sp>TopicWatch<sp>tw<sp>"" + ( ""<sp>inner<sp>join<sp>tw.user<sp>u<sp>where<sp>tw.topic<sp>=<sp>:topic<sp>"" + ""<sp>and<sp>(tw.read<sp>=<sp>true<sp>or<sp>u.notifyAlways<sp>=<sp>true)"" ) ) ) . setEntity ( ""topic"" , topic ) . setComment ( ""topicWatchDAO.getUsersWaitingNotification"" ) . list ( ) ; if ( ( users . size ( ) ) > 0 ) { this . markAllAsUnread ( topic ) ; } return users ; }""","getUsersWaitingNotificationNoWatchExpectEmptyList ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 13 ) ; java . util . List < net . jforum . entities . User > users = dao . getUsersWaitingNotification ( topic ) ; ""<AssertPlaceHolder>"" ; }",assertFalse ( true )
Here we get two data points, but it only uses the assertTrue I used as a dummy to generate them. How can I execute this step without limiting myself by what I use as a dummy value? I would expect an output to somehow check the size of the returned users list but so far it would only do this if I already give it an input assertion using users.size()
I continued from here by executing rq2.sh and ended up with this test_results.csv
test_num,true_lbl,pred_lbl,logit_0,logit_1,test_name,true_assertion,test,fms 1,1,1,-4.878190517425537,4.990329265594482,test-name-placeholder,assertTrue ( true ),"getUsersWaitingNotificationNoWatchExpectEmptyList ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 13 ) ; java . util . List < net . jforum . entities . User > users = dao . getUsersWaitingNotification ( topic ) ; ""<AssertPlaceHolder>"" ; }","getUsersWaitingNotification ( net . jforum . entities . Topic ) { java . util . List < net . jforum . entities . User > users = session . createQuery ( ( ""select<sp>u<sp>from<sp>TopicWatch<sp>tw<sp>"" + ( ""<sp>inner<sp>join<sp>tw.user<sp>u<sp>where<sp>tw.topic<sp>=<sp>:topic<sp>"" + ""<sp>and<sp>(tw.read<sp>=<sp>true<sp>or<sp>u.notifyAlways<sp>=<sp>true)"" ) ) ) . setEntity ( ""topic"" , topic ) . setComment ( ""topicWatchDAO.getUsersWaitingNotification"" ) . list ( ) ; if ( ( users . size ( ) ) > 0 ) { this . markAllAsUnread ( topic ) ; } return users ; }""" 1,0,0,4.397204875946045,-4.564648151397705,test-name-placeholder,assertFalse ( true ),"getUsersWaitingNotificationNoWatchExpectEmptyList ( ) { net . jforum . repository . TopicWatchRepository dao = this . newDao ( ) ; net . jforum . entities . Topic topic = new net . jforum . entities . Topic ( ) ; topic . setId ( 13 ) ; java . util . List < net . jforum . entities . User > users = dao . getUsersWaitingNotification ( topic ) ; ""<AssertPlaceHolder>"" ; }","getUsersWaitingNotification ( net . jforum . entities . Topic ) { java . util . List < net . jforum . entities . User > users = session . createQuery ( ( ""select<sp>u<sp>from<sp>TopicWatch<sp>tw<sp>"" + ( ""<sp>inner<sp>join<sp>tw.user<sp>u<sp>where<sp>tw.topic<sp>=<sp>:topic<sp>"" + ""<sp>and<sp>(tw.read<sp>=<sp>true<sp>or<sp>u.notifyAlways<sp>=<sp>true)"" ) ) ) . setEntity ( ""topic"" , topic ) . setComment ( ""topicWatchDAO.getUsersWaitingNotification"" ) . list ( ) ; if ( ( users . size ( ) ) > 0 ) { this . markAllAsUnread ( topic ) ; } return users ; }"""
Basically the only data I get from this is the columns "true_lbl", "pred_lbl", "logit_0", and "logit_1", all the other columns are copied straight from the input. How would I go from this output to a generated assertion I can insert into my testcase?

Hi Daniel,
To answer each of your questions:

How can I execute this step without limiting myself by what I use as a dummy value? I would expect an output to somehow check the size of the returned users list but so far it would only do this if I already give it an input assertion using users.size()

You'll need to add an assert for the specific method you want to assert on, like assertEquals ( 999, users.size() ) to the assertLines.txt. Toga will then replace 999  with it's own generated value.

Basically the only data I get from this is the columns "true_lbl", "pred_lbl", "logit_0", and "logit_1", all the other columns are copied straight from the input. How would I go from this output to a generated assertion I can insert into my testcase?

For a given test, you can pick the row with the highest logit_1 value where pred_lbl is 1 (or lowest logit_0 value, in the event all pred_lbls are 0), and then use the assertion from that row.
You can copy the assert into ""<AssertPlaceHolder>"" to get a complete generated unit test.

Hi Gabriel,
Thank you for the answers.
Just to clarify that I understood correctly:
There is no way to run TOGA on a testsuite that does not contain existing assertions? To use this tool I need to go through every test individually and manually create an (approximate) assertion, which can then be optimized by TOGA?

Hi Daniel,
That's correct. Typically the problem of selecting which variables on which
to generate assertions is handled by mutation testing. There are many
mature tools and methods for that such as PIT, and evosuite uses mutation
testing as part of its test generation. TOGA instead focuses specifically
on determining what those assertions should be.
For tests without assertions you may be able to generate input assertions
based on method return types.
Best,
Gabe
On Tue, Aug 30, 2022 at 4:49 PM Daniel Berreiter @.***>
wrote:

Hi Gabriel,
Thank you for the answers.
Just to clarify that I understood correctly:
There is no way to run TOGA on a testsuite that does not contain existing
assertions? To use this tool I need to go through every test individually
and manually create an (approximate) assertion, which can then be optimized
by TOGA?
—
Reply to this email directly, view it on GitHub
https://github.com/microsoft/toga/issues/3#issuecomment-1232152958, or
unsubscribe
https://github.com/notifications/unsubscribe-auth/AADFQKF2G4GUFMAIHULJQEDV3ZXWHANCNFSM5WRVLZAQ
.
You are receiving this because you commented.Message ID:
@.***>


Helm default schedule

Allow to specify a schedule for snapshots and backups in default storage class created by helm.
values.yaml example:
persistence:
  defaultRecurringJobs: '[{\"name\":\"snap\", \"task\":\"snapshot\", \"cron\":\"*/1 * * * *\", \"retain\":1}, {\"name\":\"backup\", \"task\":\"backup\", \"cron\":\"*/2 * * * *\", \"retain\":1}]'

+1

Since the last time we talked, we've implemented a way to upgrade the storage class in Longhorn. So recurring job field should be already covered by @PhanLe1010 on https://github.com/longhorn/longhorn/commit/9c3ae72954c02c8e9dc1396e1efb04d42ac1e346 , see https://github.com/longhorn/longhorn/blob/v1.1.0/chart/templates/storageclass.yaml.

Thanks for the good news. The implementation looks promising. I look forward to test when v1.1.0 is released.

Thanks @sauber . Close this PR, in favor of https://github.com/longhorn/longhorn/commit/9c3ae72954c02c8e9dc1396e1efb04d42ac1e346


Updating .net sdk from latest api version

Description

This checklist is used to make sure that common guidelines for a pull request are followed.

[ ] Please add REST spec PR link to the SDK PR
[x] I have read the contribution guidelines.
[x] The pull request does not introduce breaking changes.

General Guidelines

[x] Title of the pull request is clear and informative.
[x] There are a small number of commits, each of which have an informative message. This means that previously merged commits do not appear in the history of the PR. For more information on cleaning up the commits in your PR, see this page.

Testing Guidelines

[x] Pull request includes test coverage for the included changes.

SDK Generation Guidelines

[ ] If an SDK is being regenerated based on a new swagger spec, a link to the pull request containing these swagger spec changes has been included above.
[x] The generate.cmd file for the SDK has been updated with the version of AutoRest, as well as the commitid of your swagger spec or link to the swagger spec, used to generate the code.
[x] The *.csproj and AssemblyInfo.cs files have been updated with the new version of the SDK.

https://github.com/Azure/azure-rest-api-specs/blob/current/specification/redis/resource-manager/Microsoft.Cache/2017-10-01/redis.json

Pulled latest from upstream, it is already up to date. Regenerated code which generated 2 more files. Checking them in.