text:
[Snyk] Security upgrade setuptools from 40.5.0 to 70.0.0

This PR was automatically created by Snyk using the credentials of a real user.![snyk-top-banner](https://github.com/andygongea/OWASP-Benchmark/assets/818805/c518c423-16fe-447e-b67f-ad5a49b5d123)
Snyk has created this PR to fix 1 vulnerabilities in the pip dependencies of this project.
Snyk changed the following file(s):

requirements.txt

[!IMPORTANT]

Check the changes in this PR to ensure they won't cause issues with your project.
Max score is 1000. Note that the real score may have changed since the PR was raised.
This PR was automatically created by Snyk using the credentials of a real user.
Some vulnerabilities couldn't be fully fixed and so Snyk will still find them when the project is tested again. This may be because the vulnerability existed within more than one direct dependency, but not all of the affected dependencies could be upgraded.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open fix PRs.
For more information:
🧐 View latest project report
📜 Customise PR templates
🛠 Adjust project settings
📚 Read about Snyk's upgrade logic

Learn how to fix vulnerabilities with free interactive lessons:
🦉 Improper Control of Generation of Code ('Code Injection')
[//]: # 'snyk:metadata:{"customTemplate":{"variablesUsed":[],"fieldsUsed":[]},"dependencies":[{"name":"setuptools","from":"40.5.0","to":"70.0.0"}],"env":"prod","issuesToFix":[{"exploit_maturity":"Proof of Concept","id":"SNYK-PYTHON-SETUPTOOLS-7448482","priority_score":768,"priority_score_factors":[{"type":"exploit","label":"Proof of Concept","score":107},{"type":"freshness","label":true,"score":71},{"type":"fixability","label":true,"score":214},{"type":"cvssScore","label":"7.5","score":375},{"type":"scoreVersion","label":"v1","score":1}],"severity":"high","title":"Improper Control of Generation of Code ('Code Injection')"}],"prId":"c4f83569-d49c-49c4-80c3-636488137695","prPublicId":"c4f83569-d49c-49c4-80c3-636488137695","packageManager":"pip","priorityScoreList":[768],"projectPublicId":"b8613aea-12b7-4286-a253-36b0f6e66089","projectUrl":"https://app.snyk.io/org/rphilogene/project/b8613aea-12b7-4286-a253-36b0f6e66089?utm_source=github&utm_medium=referral&page=fix-pr","prType":"fix","templateFieldSources":{"branchName":"default","commitMessage":"default","description":"default","title":"default"},"templateVariants":["updated-fix-title","priorityScore"],"type":"auto","upgrade":[],"vulns":["SNYK-PYTHON-SETUPTOOLS-7448482"],"patch":[],"isBreakingChange":false,"remediationStrategy":"vuln"}'

Qovery can create a Preview Environment for this PR.
To trigger its creation, please post a comment with one of the following command.

Command
Blueprint environment

/qovery  preview 86d23237-413e-4d36-8107-dd4eefb5c091
blueprint

/qovery  preview {all|UUID1,UUID2,...}
To preview multiple environments

This comment has been generated from Qovery AI :robot:.
Below, a word from its wisdom :

The backlog never ends, be at peace with it

repo: evoxmusic/ShortMe-URL-Shortener


text:
Rename the default branch to main

This is now the default for new projects on Github. Thus, we use main for snek5000-cbox. It would be nice to have the same name for the default branch for all snek repositories.
I don't know how it should be done, but I guess it's easy since so many projects on Github did it already.

I can do that... GitHub has an easy way to set it in the web interface:
https://github.com/exabl/snek5000/settings/branches
I guess you are using hg-git and hope it would handle the change. Comment below if there is some difficulty switching the branch from master locally. If you are using git, these options are useful
git switch --create main
git push --set-upstream origin/main

cc: @akhoubani

The default branch is now main. Github gave some other instructions (of course!).Copying it here.

The default branch has been renamed! master is now named main. If you have a local clone, you can update it by running the following commands.

git branch -m master main
git fetch origin
git branch -u origin/main main
git remote set-head origin -a

source: gharchive/issue

authors: ashwinvis paugier

license_type: permissive

license_source: github-api


text:
Added docker-compose.yml and env variable OCTANE_OPTIONS

The docker-compose.yml file provides services for octane, horizon, and scheduler. It also provides a Redis and a MySQL container.
When running for local development, add COMPOSE_PROFILES=dev to your local .env file. This will use the php-dev service instead of the php service (to enable --watch in octane). It will also disable horizon and the scheduler.
When running in production, you can leave leave COMPOSE_PROFILES out of your .env file, or you can use COMPOSE_PROFILES=with_redis, COMPOSE_PROFILES=with_mysql, or COMPOSE_PROFILES=with_redis,with_mysql to enable Redis and/or MySQL.
If you prefer to not add the environment variable to .env, you can bring the services up with a profile by using docker compose --profile dev up

Today I've learnt something new about docker-compose that I see nowhere haha
I've planned to send a PR with the docker-compose for production, but I guess you'rs is better (has more cases)

source: gharchive/pull-request

authors: ProtocolNebula travisaustin

repo: exaco/laravel-octane-dockerfile

license: MIT


text:
[🐛 in esl-utils]: debounce method is incompatible with async void functions typescript 5

Input Code
  class Test {
    @decorate(debounce, 100) // TS: type are incompatible
    protected async update(): Promise<void> {
       // ... await
    }
  }

Expected behavior/code
Should wrap async method fine
Environment

Webpack 5.88.2 + ts-lader 9.4.4
Node 18; npm 8
Typescript: 5.2.2
Target: ES6

Additional context
Q: is it a valid situation ootb?

After discussion with @exadel-inc/esl-core-team, it was decided to postpone the issue.
No simple solution was found, since altering types only would introduce additional issue.
Proposed solutions were considered too heavy and would probably require introduction of another parameter in debounced signature, or altering debouncedSubject

authors: ala-n fshovchko

repo: exadel-inc/esl


text:
🛑 Portfolio is down

In d3c78ad, Portfolio ($SECRET_P_SITE) was down:

HTTP code: 404
Response time: 849 ms

Resolved: Portfolio is back up in 12da883.

repo: exand/upptime


text:
Update ExaError

Situation
error-reporting-lua recently got a breaking overhaul to improve the object orientation it uses. The driver still uses the old exaerror instead of the new ExaError
Acceptance Criteria

Error reporting ported to ExaError.

Duplicate of #77.

repo: exasol/exasol-driver-lua


text:
AttributeError: 'module' object has no attribute 'run'

Trying to set this up to use with a video I have. Every time I run it I get an error.
I'm using this command:
python video-remove-silence test.mp4
and I get this error:
Extracting audio...
Traceback (most recent call last):
  File "video-remove-silence", line 131, in <module>
    extract_audio(args.path, audio_file.name)
  File "video-remove-silence", line 125, in extract_audio
    subprocess.run(command, stderr=subprocess.PIPE).check_returncode()
AttributeError: 'module' object has no attribute 'run'

Using ubuntu on windows 10 with python 3.5.6

I changed something and now I am getting this error:
Extracting audio...
Traceback (most recent call last):
  File "./video-remove-silence", line 131, in <module>
    extract_audio(args.path, audio_file.name)
  File "./video-remove-silence", line 125, in extract_audio
    subprocess.run(command, stderr=subprocess.PIPE).check_returncode()
  File "/usr/lib/python3.6/subprocess.py", line 389, in check_returncode
    self.stderr)
subprocess.CalledProcessError: Command '['ffmpeg', '-i', 'test.mp4', '-acodec', 'pcm_s16le', '-f', 'wav', '-y', '/tmp/tmpglclh5ns']' returned non-zero exit status 1.

subprocess.run shall work on Python 3.5 :man_shrugging:
About second thing, I don't know if it is still worth answering but just in case, looks like ffmpeg can not read audio stream from that file. I would run that command and checked the output of ffmpeg.

repo: excitoon/video-remove-silence


text:
making-the-grades: what does task 3 teach over task 1?

To me it looks like task 3 is just a variation of task 1 (as in: the student doesn't really learn anything new. If this is true, consider removing one of the two tasks.

The same goes for task 5 BTW.

I think you are right. Let's scrap those and hope the lessons stick with only one iteration of "how to access elements". That will slim down the whole thing and make it more digestible.

authors: ErikSchierboom vaeng

repo: exercism/cpp


text:
Adds secret-handshake generator and exercise

Hi, this PR is to add a new exercise for secret-handshake, here is a link to the problem-specifications
I'm still learning Crystal, so feel free to point out anything that needs to be change or improved.
Thanks!

Rebased master, fixed conflict with config.json, regenerated readme to get updates.

repo: exercism/crystal


text:
Implementing the All Your Base exercise

Calling dibs on this one!

Ready for review!

repo: exercism/php


text:
Add Scale Generator exercise

Add Scale Generator exercise in Swift

@masters3d I'm tempted to leave this as is if we're dropping Swift 3 soon.

Lets do it. We will need to update the package format at some point but we can start tracking 4.1x changes now. https://github.com/exercism/swift/pull/326

Merge when you are ready

repo: exercism/swift


text:
hello-world: (please comment) example proposal to add Gradle build(s)

When going through the exercises, I noticed there was no mechanism for pulling in (JUnit) dependencies or fixating Groovy versions.  This is in stark contrast to the xjava Exercism exercise set.
Since Gradle is the de-facto build tool in the Groovyverse, I thought I'd give a go at contributing a Gradle build to the project.
I'll file an experimental Pull request for comment (with apologies, since I don't know the proper way to test contributions).
I'd also like to translate the JUnit tests to the Spock framework, the output of which might be much easier on newcomers to Groovy (plus, the tests will be in a Groovy DSL!), which I could easily add as commits to this (or another) request.
Please comment, and let me know if I'm making mistakes in the Pull to exercises!

For the contribution, I'd love to see just the gradle stuff in a separate PR, with hello-world submitted in a separate PR. Check out this stuff in the contributing guide: https://github.com/exercism/x-common/blob/master/CONTRIBUTING.md#git-basics it describes how we typically work using branches to be able to submit isolated pull requests, etc.
It shouldn't take a lot of work to check your master into a branch, rebase -i to remove hello world commits, and squash the gradle-stuff into a single commit, but if you're not familiar with git it can be pretty intimidating, so (a) create a new branch called backup with what is on your current master so you don't risk losing any work through git confusion, and (b) holler and we'll walk you through it.
@jtigger or @matthewmorgan would you have time to check the gradle-specific stuff here?

@jtigger is probably better qualified at this point for the gradle piece.  John?

@kytrinyx Thanks much for the correction on pulling from a remote branch— also, I can completely get behind separating a Gradliziation Pull from a Spock-test pull.  Thanks so much!
I appreciate @matthewmorgan 's call-out for another opinion on the Gradle build (I have heavy concerns about the size added by including a Wrapper).  So, if no one minds, I'd like to keep this not-intended-for-merge Pull open for some feedback before creating any real suggested Pull.

I've had some time to re-think this one— and I believe there's enough to change and isolate here which can be discussed in a narrower scope.
Thank you!  (And hopefully see you with a new Pull later.)

Thanks @Dispader!

authors: Dispader kytrinyx matthewmorgan

repo: exercism/xgroovy


text:
Base patched Trackler gem off actual version tag.

was: hand-rolling a version of Trackler based of master and then
applying changes from the PR/commit/local change to that trackler gem.
now: using the exact tagged version of Trackler as the basis for the
hand-rolled gem.

This fixes the issue where a change make to Trackler's master is
incompatible with the current version of x-api.  In short, we were
building the Trackler gem wrong.

This come up by inadvertently breaking PR #430.
Our journey test puts a complete install of Exercism through its paces, ensuring that each and every exercise in the Java track can be fetched and solved.
In preparation for that journey, we stand-up two key components of Exercism: x-api (the endpoint which clients obtain exercises) and trackler (the versioned library of those exercises).
In order to test the patch of Java exercise code, we need to hand-roll a version of the trackler gem to a) be compatible with the latest version of x-api and b) include the changes we're currently testing.
To date, we were grabbing the master branch of trackler and applying the Java track changes.  At the time, I didn't appreciate that this ran the risk that if there were changes to Trackler code itself they may be incompatible with the latest x-api.  Today, they did.
The right way to do this is to first check-out the local check-out of Trackler to the tagged version.  That's what this patch does.

@exercism/java could I get a second pair of eyes on this?
Two reasons:

I'd rather we be right than fast.
I'd rather we have some insight into how our CI works, generally.  Here's a good/meaningful peek into the journey test.

Thank you!

Thank you, @FridaTveit!

repo: exercism/xjava


text:
Inconsistencies on the «Series» exercise

The README for this exercise does not reflect that all the generated slices should be returned if no series is found among them.
The tests https://github.com/exercism/xruby/blob/master/exercises/series/series_test.rb#L24 and https://github.com/exercism/xruby/blob/master/exercises/series/series_test.rb#L49 include one series among them, yet the expected outcome is as if no series were found.

I'm not sure what the right move is here. The READMEs are generally pretty vague on purpose, and the tests are considered the source of truth, but if the README could be improved without making it wrong for other languages, that's generally a plus.

I think the confusion here is simply that the series need not be consecutive.

Ahh, yes. Thank you--that's definitely the way to go.

@kytrinyx, @petertseng Nice! But what about the mentioned tests? Is that the expected behaviour?

I'm backtracking on what I said earlier. Look at http://x.exercism.io/problems/series - it wants the consecutive series. So most of the tests in ruby track are inconsistent with this description, and probably many other tracks as well -- would have to survey all the tracks appearing in the above list to see the extent of the "damage". I suggest that now would be a great time to add shared test data to https://github.com/exercism/x-common in the form of series.json and get that sorted out in the various tracks.

I'm backtracking on what I said earlier. Look at http://x.exercism.io/problems/series - it wants the consecutive series. Does that just mean the positions have to be consecutive, or do the numbers have to be consecutive too (in addition to the positions)?
Most of the tests in ruby track are  consistent with only the positions being consecutive. Probably many other tracks as well -- would have to survey all the tracks appearing in the above list to see the extent of the "damage".
I am guessing the creator of the problem just wanted positions, since it's claimed to be a subset of Project Euler problem 8, which doesn't care about digits being consecutive.
I suggest that now would be a great time to add shared test data to https://github.com/exercism/x-common in the form of series.json and get that sorted out in the various tracks. Should also edit the https://github.com/exercism/x-common/blob/master/series.md and https://github.com/exercism/x-common/blob/master/series.yml in whatever manner is necessary to correct any misconceptions.

Agreed, a survey + shared test data would be a good next move here.

I'm closing this in favor of https://github.com/exercism/x-common/issues/197

authors: Rojo kytrinyx petertseng

repo: exercism/xruby

license: mit

license_source: bigquery


text:
Module Namespacing Support for Packages

Summary
When installing a package that uses module namespacing (export * as {moduleName} from './{moduleName}), Expo's default configuration throws an error when compiling for web and iOS. This is an important tool for structuring TypeScript code, so I'd expect it to work out of the box.
Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!
bare
What platform(s) does this occur on?
iOS, Web
SDK Version (managed workflow only)
4.5.2
Environment
MacOS, Node v14.15.5.
Reproducible demo or steps to reproduce from a blank project
https://snack.expo.io/kSlfJiSnR
Steps to reproduce:

npm install @dfinity/agent
Somewhere in the code - import { HttpAgent } from "@dfinity/agent";

Thanks for the thorough investigation! You're totally correct on 1 and 3 - I stopped adding to the example once I could reproduce the error I was aware of.
4 is another known issue, but we'll avoid shipping a TextEncoder polyfill due to its wide browser support and that there are good options available on npm that a RN dev could include.
As for 2, I think that's the heart of the issue, and I don't think it's a Snack bug. I first reproduced the issue on my dev environment using the Expo CLI. Here's a more complete example to test locally: https://github.com/krpeacock/dfinity-expo-proof-of-concept

Thanks for that! I can't seem to get the repo working, it's missing this file:

./.dfx/local/canisters/counter/counter.js

Is that correct?

Ah right, that's the domain-specific stuff. I'll unignore that folder and push it up for reproduction to spare you from needing to install our SDK. You won't end up with a fully working example, but the frontend should compile

Should be good to go!
If you wanted to test the full stack example, the commands to set up would be
sh -ci "$(curl -fsSL https://sdk.dfinity.org/install.sh)"
dfx start --background
dfx deploy
npm start

Awesome, thanks! When I add the following libraries:
$ npm install --save buffer text-encoding-polyfill

And add this to the top of the App.tsx file:
// Add TextEncoder polyfill
import 'text-encoding-polyfill';
// Add Buffer polyfill
import { Buffer } from 'buffer';
global.Buffer = Buffer;

It seems to work, without compiler issues. Only the warning that it can't connect to the network, which makes sense since I don't have that. 😄

That's super interesting! I'm still getting the export error on my machine when I try to run the web build. Were you compiling to iOS or Android?

Ah, you are compiling to web! For me, it works on both Android and iOS. Haven't tested web, but I know what the problem could be. On web, we are using a plain webpack configuration to build the app. It does not transpile node_modules, because we expect modules for the browser to be pre-compiled for the browser. I don't think the majority of web browsers support the new module syntax, which means you have to manually add the module to be transpiled.
To do this, you have to run $ expo customize:web and change the webpack config to this:
const createExpoWebpackConfigAsync = require('@expo/webpack-config');

module.exports = async function (env, argv) {
  const config = await createExpoWebpackConfigAsync(
    {
      ...env,
      babel: {
        dangerouslyAddModulePathsToTranspile: [
          // Ensure that all packages starting with @dfinity are transpiled.
          '@dfinity',
        ],
      },
    },
    argv
  );
  return config;
};

You might be better of including a pre-transpiled copy of the code, or have users add this configuration.

Great, this sounds viable then with some documentation updates!
As an ideal solution, Is there a way we could build a pre-transpiled version in addition to the harmony exports and signal that to Expo via the package.json? Or would you recommend we create an additional pre-transpiled package to publish to npm?

Yes, that's also possible! I'm not sure how Snack would react, but we can always find a solution for that later.

With normal npm modules, you should be able to define main file as entrypoint (defaults to index.js).
With tools like Rollup and webpack, you can define a module entrypoint. (although this isn't an "official" spec, it's still in proposal state)
With React Native, you can define a react-native entrypoint, e.g. including the polyfills. (couldn't find the docs for this, but you can see it there in action)

All of these can be defined in the package.json. Again, I'm not sure how Snack would react to these entry points but we can find something for that later on.

authors: byCedric krpeacock

repo: expo/snack


text:
🙏 Puzzled with ExpressiveCodeEngine

I'm using rehype-expressive-code as mdx plugins to highlight Code Blocks in *.mdx, it works better, like this:
// vite.config.ts
import type { UserConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import mdx from "@mdx-js/rollup";
import rehypeExpressiveCode, {
  RehypeExpressiveCodeOptions,
} from "rehype-expressive-code";

const rehypeExpressiveCodeOptions: RehypeExpressiveCodeOptions = {
  frames: {
    showCopyToClipboardButton: false,
  },
};

export default (): UserConfig => {
  plugins: [
    {
      ...mdx({
        remarkPlugins: [],
        rehypePlugins: [[rehypeExpressiveCode, rehypeExpressiveCodeOptions]],
      }),
    },
    react(),
  ]
}

you provide astro-expressive-code, so is easy to hightlight filePath?raw in Astro, like this:
import { Code } from 'astro-expressive-code/components';
import importedCode from '/src/env.d.ts?raw';

but I'm not use expressive-code in Astro, I just use it in Vite + React, so I want to implement a React component like astro-expressive-code/components/Code.
I find an example in @expressive-code/core
.
and try it in my component, such like:
import { useEffect, useState } from "react";
import { ExpressiveCodeEngine } from "@expressive-code/core";
import { toHtml } from "@expressive-code/core/hast";

const Code = () => {
  const [code, setCode] = useState("");

  useEffect(() => {
    renderRaw();
  }, []);

  const renderRaw = async () => {
    const ec = new ExpressiveCodeEngine({
      plugins: [
      ],
    });

    const baseStyles = await ec.getBaseStyles();
    const themeStyles = await ec.getThemeStyles();

    const renderResult = await ec.render({
      code: 'console.log("Hello world!")',
      language: "tsx",
    });

    console.dir({
      baseStyles,
      themeStyles,
      blockStyles: renderResult.styles,
      blockHtml: toHtml(renderResult.renderedGroupAst),
    });

    setCode(toHtml(renderResult.renderedGroupAst));
  };

  return
;
};

export default Code;

and use it in my .mdx：

the  component render success, but highlight missing:

Code Blocks in *.mdx highlight success, and auto add style & script & css vars, render diffrent DOM structure：

read your documents, It means I need to add baseStyles themeStyles jsModules to DOM?
I have used Prism or Shiki, these packages will provide highlight function, it's easy to use like:
Prism.highlight(props.code, prismGrammar, props.language)

I read expressive-code source code and all the documents, no highlight function provide, the only function I found is toHtml().
and there's no example to show how to add baseStyles themeStyles jsModules to DOM,
🙏 Can you give some React example like astro-expressive-code/components/Code,
I'm writing a React Component Library Documents, so I need to render *.tsx?raw and highlight fileRawData

I have also tried to add baseStyles themeStyles jsModules, highlight doesn't work too:
import { useEffect, useState } from "react";
import { ExpressiveCodeEngine } from "@expressive-code/core";
import { toHtml } from "@expressive-code/core/hast";

const Code = () => {
  const [code, setCode] = useState("");

  useEffect(() => {
    renderRaw();
  }, []);

  const renderRaw = async () => {
    const ec = new ExpressiveCodeEngine({
      plugins: [
      ],
    });

    const baseStyles = await ec.getBaseStyles();
    const themeStyles = await ec.getThemeStyles();

    const renderResult = await ec.render({
      code: 'console.log("Hello world!")',
      language: "tsx",
    });

    console.dir({
      baseStyles,
      themeStyles,
      blockStyles: renderResult.styles,
      blockHtml: toHtml(renderResult.renderedGroupAst),
    });

-    setCode(toHtml(renderResult.renderedGroupAst));

+    setCode(
+      `
+
+	${toHtml(renderResult.renderedGroupAst)}
+      `
+    )
+  };

  return
;
};

export default Code;

Hello! Wow, you did a lot of experimentation there already! Thank you for reading the docs and testing various approaches already.
The likely reason your styles don't work is that it's too late when React is hydrating to insert links to CSS or JS modules into the HTML source code. The browser will not load them anymore at this point, as these links need to be a part of the server-side output to be picked up.
I'm not using React like this myself, so I can't really provide a working solution unfortunately. I'd also like to mention that Expressive Code is not designed to be used on the client, but only on the server. Using it from React frontend code will result in a huge client-side bundle.
The Code component I provide for Astro is different - even though it might look similar to the React version you're trying to achieve, it is fully server-rendered and therefore does not have any of the issues like bundle size or CSS/JS module linking problems.
In summary, I think that Expressive Code is probably the wrong tool for this kind of job right now, and if you want client-side highlighting with React, you'd be better off using any of the excellent alternatives that are designed for this use case. You already mentioned Prism and Shiki, and I'd suggest using these.
Sorry not to be able to offer more help here!

Thks your great explains!

I'd also like to mention that Expressive Code is not designed to be used on the client, but only on the server.

so I known why code highlihgt work in *.mdx but not work in Component:

*.mdx is parsed by @mdx-js/rollup, server-side render;
Component is client-side render;

In summary, I think that Expressive Code is probably the wrong tool for this kind of job right now, and if you want client-side highlighting with React, you'd be better off using any of the excellent alternatives that are designed for this use case. You already mentioned Prism and Shiki, and I'd suggest using these.

I had used react-syntax-highlighter to review  and it works now:

expressive-code is a great repo 👍
I use it and Starlight create the Company Documentation Center, my colleagues think it's great.

authors: PassionZale hippotastic

repo: expressive-code/expressive-code


text:
chore: bump 0.8.1

Problem Statement
What is the problem you're trying to solve?
Related Issue
Fixes #...
Proposed Changes
How do you like to solve the issue and why?
Checklist

[ ] I have read the contribution guidelines
[ ] All commits are signed with git commit --signoff
[ ] My changes have reasonable test coverage
[ ] All tests pass with make test
[ ] I ensured my PR is ready for review with make reviewable

/approve

repo: external-secrets/external-secrets


text:
请问局域网内使用，预览引擎怎么配置才能预览文档

请问局域网内使用，预览引擎怎么配置才能预览文档

请参考这里文档： https://tank-doc.eyeblue.cn/advance/preview.html

authors: sunozil zicla

repo: eyebluecn/tank


text:
Example script returns threading issue

When trying to run the LSLInletExample.py I get the following error, independent of python version.

Exception has occurred: TypeError
cannot pickle '_thread.lock' object
File "C:\workspace\closed-loop-speech-playground\LSLInputExample.py", line 45, in main
system = LSLDemoSystem()
File "C:\workspace\closed-loop-speech-playground\LSLInputExample.py", line 53, in
typer.run(main)
TypeError: cannot pickle '_thread.lock' object

Thanks for the report. I was able to reproduce. I'm not sure when that changed but I'll look into it.
Also check out tests/test_inlet.py which is still running and passing.

I refactored the example script and now it runs. See the latest in the dev branch.
I just ran into a race condition in the outlet example script and test so I will fix those before creating a new release.

That was amazingly fast. Thank you!

ezmsg-lsl v1.2.1 now released on pypi.
The example script doesn't live in the package so the release doesn't really matter for your original issue, but this is just an FYI that the outlet-clock sync race condition is now fixed.
Cheers.

Just as an FYI:
If I use ez.run(components=comps, connections=conns), everything works fine, but with
def network(self) -> ez.NetworkDefinition:         return ((self.SRC, self.PRINTER.INPUT),)
I get the thread.lock error again.

OK thanks. I'll create an minimum example and raise the issue in the core ezmsg repo. I'm not yet sure if it's LSL-specific. I'm not sure why it would be.

@c-herff , please let me know if you are able to test the branch in https://github.com/ezmsg-org/ezmsg-lsl/pull/24 to see if the root problem is now fixed for you and you are able to pull data properly. If yes then I'll merge and make a new release.

I get a new error stating

Exception has occurred: AttributeError
'LSLInletUnit' object has no attribute 'encode'

Unfortunately I can't reproduce that. Nor does the word encode appear anywhere in ezmsg-lsl or ezmsg core as an attribute.
I added a new test, which should cover what you're describing: https://github.com/ezmsg-org/ezmsg-lsl/blob/23-cannot-deepcopy-lslinletunit-or-lsloutletunit/tests/test_inlet.py#L63
And it seems to pass: https://github.com/ezmsg-org/ezmsg-lsl/actions/runs/11929358616
The test does not connect to an outlet, so it's not a perfect reproduction, but I don't see how encode would be requested of the unit.

Weird, I think the problem might arise from the actual outlet, but I can't quite trace where the encode comes from, either. Will have a look at this later. Thanks for all your help.

Next time I'm connecting LSL streams to ezmsg I will look for this explicitly. Thanks for your patience.

authors: c-herff cboulay

repo: ezmsg-org/ezmsg-lsl


text:
Named capture groups not yet supported in Firefox

I ran into trouble updating my build of this extension. It looks like Firefox doesn't support named capture groups and so throws a syntax error for an invalid regexp group. The tracking bugzilla is here: https://bugzilla.mozilla.org/show_bug.cgi?id=1362154
From the blocking issue, it looks like this won't land until after Firefox 70.
For now, this reverts commit 2f353807fa424903407242009ae28570f02db92b and it builds, (lints,) and runs fine in Firefox 68.0.2.
If this is ok, I'll rebase #26 with the style changes on top.

Oh, I'm sorry, I use Chromium for testing the extension, so I somehow missed that fact. Thanks!

license: Unlicense


text:
Coordinator accepts duplicate events

We should keep some state on previously received events using a HashSet of Event IDs? I noticed sometimes events seem to get received twice, if this happens here we could for example interpret the same event twice as a full contract (e.g. interpreting duplicate seller event twice once as seller, once as buyer) which would interrupt the trade. Maybe a malicious relay could return the same event multiple times as DoS? Alternatively we could also keep state of which npub submitted the contract so we can differentiate between seller and buyer submissions, but just checking event ids seems easier to implement and works too.
As event ids have only 32 byte there shouldn't be any problem, even on long running coordinators, with storing them in memory (HashSet) 1mb = ~30k event ids (without container overhead).

This is already fixed trough recent changes
pub struct EscrowCoordinator {
    nostr_client: NostrClient,
    pending_contracts: HashMap<[u8; 32], TradeContract>, // k: hash of contract json
    active_contracts: HashMap<[u8; 32], ActiveTade>,
}

Fixed


text:
Brainstorm libf3d API

libf3d was introduced in !259 (closed), let's brainstorm a stable API for it.
Tasklist:

[x] Introduce f3d::options: #191
[ ] Refactor F3DLoader and F3D to use f3d::options cleanly
[ ] Introduce f3d::loader and use it
[ ] Introduce f3d::window and use it
[ ] fix #32
[ ] In header doc

Ignoring completelly how libf3d and f3d are currently implemented, let's consider the fonctionnality we want to provide as a lib.
Features:

Set a list of options
Read a file
Display resuting scene using file and options in a OpenGL context, potentially provided by user

Restrictions:

User must not need to find_package VTK to use libf3d or use any vtk* class
User does not need to know much about rendering to use libf3d

inputs @Meakk ?

I agree, VTK should be a private dependency of libf3d.
Ideally, f3d executable should only provide the command-line parsing, and config file management.

So trying to link it with current implementation, we could have the following rough public API
F3DOptions
  SetFoo
  SetBar

F3DFileLoader(F3DOptions)
  AddFile

F3DViewer(F3DOptions, F3DFileLoader)
  Show

Here are my inputs.
libf3d usage should allow the user to call something like that:
f3d::window w = // create window
w.addFile("/path/file.vtp"); // add a file
w.addFolder("/path"); // add all the files in folder
w.setActiveFile(int index); // set the active file
w.setOption("key", "value"); // configure all options using this function (parse the value string inside the function)
w.clear(); // remove all files
w.render(); // render the scene
w.saveTofile("/path/image.png"); // save the rendered image
w.setKeyCallBack([](int keyCode, int modifier) {
  // do something
  });
w.setMouseCallBack([](float dx, float dy, int button) {
  // do something
  });
w.setMotionCallBack([](float whatever) {
  // do something on Android
  });

It also means that the interactor should be moved to the executable, but it makes sense to me.
The API is clear, simple, and it's easy to remove/add options without breaking the compilation on the user side. Maybe providing an equivalent API in C would be useful too.
The list I provided is most likely incomplete.

I think it would be better to separate loading data and rendering data. here is a proposition:
f3d::options opt;
opt.setOption("key", "value"); // configure all options using this function (parse the value string inside the function)

f3d::loader load();
load.setOptions(opt);
load.addFile("/path/file.vtp"); // add a file
load.addFolder("/path"); // add all the files in folder
load.setActiveFile(int index); // set the active file

f3d::interactor interact
interact.setKeyCallBack([](int keyCode, int modifier) {
  // do something
  });
interact.setMouseCallBack([](float dx, float dy, int button) {
  // do something
  });
interact.setMotionCallBack([](float whatever) {
  // do something on Android
  });

f3d::window win = f3d::createWindow(f3d::context ctx); // create window (external, native, android ...)
win.setOptions(opt)
win.setLoader(load);
win.setInteractor(interact);
win.render(); // render the scene
win.saveTofile("/path/image.png"); // save the rendered image

I dont really care about C bindings, python bindings would be much more important imo.

@mwestphal I like it! Regarding bindings, we will need Java bindings too for Android. I will take care of it, don't worry 😛

Great ! Lets focus on this one when we find the time. We may want to merge into a dedicated branch until it stabilize.

I still think providing C functions can be useful, for C programmers of course, but it will make other bindings easier, like Rust for instance: https://stackoverflow.com/questions/52923460/how-to-call-a-c-dynamic-library-from-rust

Interesting.

Hi, I'm also interested by C functions 😃 Given I write my SketchUp plugins in Ruby, I could use Fiddle to call libf3d from Ruby.

To ease language interoperability and type mapping, I suggest to use JSON as string when value passed or returned is structured.

Haha, nice screenshot :+1:

Discussed API moving forward
f3d::options opt;
opt.setOption("key", "value"); // configure all options using this function (parse the value string inside the function)

f3d::window win (f3d::context ctx); // create window (external, native, android ...)

f3d::loader load;
load.setOptions(opt);
load.setWindow(win);
load.addFile("/path/file.vtp"); // add a file
load.addFolder("/path"); // add all the files in folder
load.setActiveFile(int index); // set the active file

f3d::interactor interact
interact.setMouseCallBack([](float dx, float dy, int button) {
  // do something
  });
interact.setMotionCallBack([](float whatever) {
  // do something on Android
  });

win.setInteractor(interact);
win.render(); // render the scene
win.saveTofile("/path/image.png"); // save the rendered image

@mwestphal Once model is loaded and rendered, could we access renderer then change things without reload? For instance:
win.render(); // render the scene
ren = win.getRenderer();
cam = ren.getActiveCamera();
cam.setPosition(float x, float y, float z);

Yes, any options will be changeable dynamically when all is implemented.

So a very early version of the API is now in master, I'll try to update the issue to identify the remaining work.

@Meakk updated with your suggestions

Here is how it looks now:
  f3d::engine eng(f3d::engine::WindowTypeEnum::WINDOW_STANDARD);
  f3d::loader& load = eng.getLoader();
  load.addFile(std::string(argv[1]) + "/data/cow.vtp");
  load.loadFile(f3d::loader::LoadFileEnum::LOAD_CURRENT);
  f3d::window& win = eng.getWindow();
  f3d::interactor& inter = eng.getInteractor();
  inter.start();

For anyone following this. We are close to completion of the first version of the API. stay tuned.

(Optional) introduce f3d::config in libf3d ?

not needed

(optional) expand f3d_interactor to support user set behavior for many more context

Not needed, for now

Doc item in their own issue: https://github.com/f3d-app/f3d/issues/48

All items have been adressed, closing.

authors: Meakk SamuelTallet mwestphal


text:
Add Schema Reflection API

This PR is a proposal implementation for a schema reflection API submitted for consideration and refinement.
Adding a reflection API would enable development of third-party utility libraries for Valibot such as a mock generation library similar to @anatine/zod-mock, which is what initially inspired this effort.
At present, given Valibot's architecture utilizing anonymous arrow functions as the return values of Validation functions and the lack of access to the given Pipe in the Schema object, it would be difficult if not entirely impossible to gather the required metadata about a Valibot schema definition in order to generate mock data that would pass schema validation. This is because many of the required values, such as function arguments and internal variables, cannot be accessed at all once defined.
In this PR I've added what I believe to be a minimal API which would expose this Schema and Pipe metadata. Let's consider some examples.
First, let's take a look at the Email validation function, which doesn't accept a user-defined requirement:
export function email<TInput extends string>(error?: ErrorMessage) {
  const kind = 'email' as const;
  const requirement =
    /^[\w+-]+(?:\.[\w+-]+)*@[\da-z]+(?:[.-][\da-z]+)*\.[a-z]{2,}$/i;
  const message = error ?? ('Invalid email' as const);
  return Object.assign(
    (input: TInput): PipeResult<TInput> =>
      !requirement.test(input)
        ? getPipeIssues(kind, message, input)
        : getOutput(input),
    {
      kind,
      requirement,
      message,
    }
  );
}

Note that kind, requirement, and message were all extracted to variables to keep the internals DRY, and that Object.assign() is being used to assign each of these values as static properties of the returned validator function.
This exposes two of the most critical pieces of information about a validation check: what kind of check is being performed and what condition needs to be met for success.
Since the function being returned here is anonymous, even if we had access to the Pipe array in a Schema, each Pipe Item wouldn't have a name property to identify what validation was used. Additionally, because of the security limitations of strict mode, this function's arguments property also cannot be accessed.
With this setup, we're safely exposing all of this information in a manner which these values can be accessed without risk of modifying the runtime behavior of the validation itself.

[!NOTE]
Originally I had considered wrapping this "metadata" object in Object.freeze() to ensure that it was read-only at runtime, but I don't think it provides much benefit for the performance tradeoff.

Let's take a look at one more Validation example:
export function minLength<
  TInput extends string | any[],
  const TRequirement extends number
>(requirement: TRequirement, error?: ErrorMessage) {
  const kind = 'min_length' as const;
  const message = error ?? ('Invalid length' as const);
  return Object.assign(
    (input: TInput): PipeResult<TInput> =>
      input.length < requirement
        ? getPipeIssues(kind, message, input)
        : getOutput(input),
    {
      kind,
      requirement,
      message,
    }
  );
}

User-defined requirements are roughly the same except for one important detail: const TRequirement extends number, where the use of the const modifier on this generic will instruct Typescript to treat the user-supplied value as narrowly as possible. This means that the return type of minLength() will show the user-defined values it was supplied rather than a wider requirement: number type.

[!NOTE]
For this initial implementation I wanted to introduce as few changes to the existing types as possible, so there's room for improvement still.

Next let's take a look at a Schema function:
export type StringSchema<TOutput = string> = BaseSchema<string, TOutput> & {
  schema: 'string';
  checks: PipeMeta[];
};

// ...

export function string(
  arg1?: ErrorMessage | Pipe<string>,
  arg2?: Pipe<string>
): StringSchema {
  const [error, pipe] = getDefaultArgs(arg1, arg2);

  return {
    schema: 'string',

    async: false,

    checks: getChecks(pipe),

    _parse(input, info) {
      // ...
    },
  };
}

New things here are the addition of the checks property, which always returns an array of PipeMeta objects, which are the values we added to each of the Validation functions. For every Schema that accepts a Pipe argument, a checks property was added in the return value to expose metadata about the Pipe array.
Notably every Transformation was untouched, so they don't provide any metadata. checks only contains metadata from Validation functions.
Last, here's another Schema example:
export type ObjectSchema<
  TObjectShape extends ObjectShape,
  TOutput = ObjectOutput<TObjectShape>
> = BaseSchema<ObjectInput<TObjectShape>, TOutput> & {
  schema: 'object';
  object: TObjectShape;
  /* entries: [key: PropertyKey, value: SchemaMeta][]; // Removed */
  checks: PipeMeta[];
};

// ...

export function object<TObjectShape extends ObjectShape>(
  object: TObjectShape,
  arg2?: Pipe<ObjectOutput<TObjectShape>> | ErrorMessage,
  arg3?: Pipe<ObjectOutput<TObjectShape>>
): ObjectSchema<TObjectShape> {
  const [error, pipe] = getDefaultArgs(arg2, arg3);

  let cachedEntries: [string, BaseSchema<any>][];

  return {
    schema: 'object',

    object,

    async: false,

    /* entries: getEntries(object), // Removed */

    checks: getChecks(pipe),

    _parse(input, info) {
        // ...
    },
  };
}

[!NOTE]
After further exploration writing a mocking library based on this PR, I no longer think the entries  prop / SchemaMeta type are necessary, so I've removed them.

For iterable schemas (intersection, object, tuple, and union), there's also a new entries property, which either returns an array of key/value pairs, or simply a SchemaMeta[] array. This property helps with introspection on nested schema types.
SchemaMeta varies by schema, but it breaks down like this: This is what the PipeMeta object looks like:
export type PipeMeta<
  TKind extends string = string,
  TRequirement = unknown
> = Readonly<{
  kind: TKind;
  message: ErrorMessage;
  requirement?: TRequirement;
}>;

/* Removed
export type SchemaMeta =
  | {
      schema: string;
    }
  | {
      schema: 'literal';
      literal: string | number | bigint | boolean | symbol;
    }
  | {
      schema: 'any' | 'array' | 'map' | 'record' | 'set' | 'special';
      checks: PipeMeta[];
    }
  | {
      schema: 'intersection' | 'union';
      entries: SchemaMeta[];
    }
  | {
      schema: 'tuple';
      entries: SchemaMeta[];
      checks: PipeMeta[];
    }
  | {
      schema: 'object';
      entries: [key: PropertyKey, value: SchemaMeta][];
      checks: PipeMeta[];
    };
   */

These are all the fields which comprise the reflection API. I think there's room for some further simplification and improvements to the type definitions. Names for properties/types aren't set in stone, so feedback on those is welcomed and expected.
In this first pass I went and added a bunch of new tests to most of the affected schemas to validate the property additions and the a utility function getChecks() and getEntries().
There may be a few things I missed our haven't considered too. My goal here was adding just enough information about schemas to feed into a library such as Faker to generate mock data for tests, which is what I'm currently doing for my zod based schemas in @discordkit/client. I can see this also being useful for other use cases as well, such as JSON Schema or OpenAPI spec code generation tools.
Finally I want to acknowledge that I understand that this project is part of your Bachelor's thesis and that there wasn't a contributing guide that I could find, so I understand if you don't have much time for reviewing PRs or would prefer to pursue your own implementation. This was a fun weekend project for me and at the end of the day I'm just hoping this is more inspiring than just opening another feature request issue.

Thanks a lot for this PR. Unfortunately, I don't have time to read everything right now. However, this comment I wrote this morning seems to be related. As soon as I find the time, I will read everything carefully and answer you in detail.

Just wanted to pop in with an update:
Since opening this I started working on a refactor of @anatine/zod-mock to work with this new API and I have some great coverage of most types already!
In working on this I realized that the entries property isn't necessary and so after a little more testing with this mocking library implementation, I'll probably simplify this PR a bit to remove the unnecessary bits.

Thanks a lot for your contribution! I will answer you by the weekend at the latest.

No rush!

Can you comment on my thoughts in this comment? Instead of a function with properties, what do you think about choosing a structure similar to the schemas using an object with a ._parse method?

This is my answer on https://github.com/fabian-hiller/valibot/issues/191#issuecomment-1758859954
If a validation function returns an object with ._parse, this has the advantage that the implementation and structure is uniform with our schemas. The other advantage I see is that .checks is not needed this way and therefore we can speed up the initialization of a schema. Instead of .check I would add the property .pipe, which is 1 to 1 the same as the pipeline passed as an argument. This way no additional calculations are needed. .pipe has almost the same content as .checks. Basically, we have the same idea, just with two different implementations.
According to my idea, minLength would then be implemented as follows:
export function minLength<TInput extends string | any[]>(
  requirement: number,
  message: ErrorMessage = 'Invalid length'
): MinLengthPipe<TInput> {
  return {
    kind: 'validation',
    name: 'min_length',
    requirement,
    message,
    _parse(input) {
      return input.length < requirement
        ? getPipeIssues('min_length', message, input)
        : getOutput(input);
    },
  };
}

Calling string([minLength(10)]) would then return the following data structure:
const schema = {
  kind: 'schema',
  name: 'string',
  async: false,
  pipe: [{
    kind: 'validation',
    name: 'min_length',
    requirement: 10,
    message: 'Invalid length',
    _parse(input) {
      // ...
    },
  }],
  _parse(input, info) {
    // ...
  },
};

This is just a first idea. I have not made a decision yet and am open to any ideas.

I think I'd rather go the opposite direction, get rid of _parse() entirely and adopt the Object.assign() format across the library.
One thing I'm concerned about is that _parse doesn't compress well because it's a property name. If the default behavior of each the Schemas, Transforms, Validations, etc was to be invoked as a function, that would shave additional bytes off a compiled app using valibot. Additional space savings could be had by aliasing Object.assign() behind a utility function, let's call it assign(). However, I'm not an expert on this subject, I just know that mangling property names is considered dangerous.
There's also to consider how much refactoring would be required by either approach. It would seem to me like with your proposal it would necessitate additional refactors to every Transform to have a consistent Pipe API. In setting out with this PR, I aimed to be purely additive and not introduce breaking changes to the existing API. So if possible, I'd like to keep the scope of changes here to a minimum.

I did some reading on JSON schema to get a better sense of how this might relate to #23, and I don't think that it's a good idea to tightly tie the metadata properties of Schemas, Validations, Transforms, etc to the JSON schema format, but rather pursue writing a schema serializer. You can read up on the JSON schema spec here
What is important to keep in mind, I think, is to avoid the use of type, title, and description in the metadata for these functions, as they are keywords with specific meaning inside of JSON schema definitions. This also relates to the naming of various validation functions, as they could have 1:1 matches with the validation keywords that JSON schema uses.
One such example is maxLength, which in Valibot applies to both strings and arrays, but in JSON schema these are divided into maxLength and maxItems. Additional thought on how to align those sorts of differences might be better explored in a different PR, but in theory a serializer can take the existing validations and translate them to the appropriate JSON schema validation constraints. In either case, a serializer would need to work on a Schema and translate it's pipe into the appropriate validation keywords. I would not attempt to set those properties on schemas themselves, as I think it would just make them heavier.

I think I could get behind exposing the entire pipe instead of checks, but my concern is that because Pipe can be either a Validation or a Transform, the user will then have to filter pipe on their end. That wouldn't be that difficult to do, just something worth considering.
However, I don't think repurposing kind here to distinguish between schema, validation, transform etc is necessary, because that can be inferred via the shape of the return type. TypeScript on its own can already tell us what we're working with because for example, all schema generators return a type that extends BaseSchema. To me this doesn't seem important at runtime, when really this is metadata that is mainly useful at authoring time.

For now, this is where my thoughts are on where to go from here.
tl;dr is that I'd prefer to keep this PR narrowly scoped and save larger refactors for another PR, and that we should be mindful of the tradeoffs at hand

One thing I'm concerned about is that _parse doesn't compress well...

I think ._parse can be compressed very well, because the word "parse" also appears in the parse and safeParse methods, and these are needed to use a schema. Also, I suspect it takes less bytes than Object.assign(). In practice, however, the difference will be so small that it will not matter in the end, and it is not a deciding point for me.

There's also to consider how much refactoring would be required by either approach...

We won't be able to prevent breaking changes while we're still in v0 and working on major features. I don't care about the effort either, because the best end product is what matters to me.

What is important to keep in mind, I think, is to avoid the use of type, title, and description in the metadata for these functions, as they are keywords with specific meaning inside of JSON schema definitions...

Why would you consider the JSON schema definition? It doesn't matter for Valibot and doesn't play a role, or am I misunderstanding something here?

One such example is maxLength, which in Valibot applies to both strings and arrays, but in JSON schema...

I would develop Valibot completely independent of the JSON Schema definition, since serialization is not a relevant feature of Valibot, as it negates Valibot's advantages in terms of bundle size. If serialization and JSON Schema are important, I recommend using TypeBox instead of Valibot.

I think I could get behind exposing the entire pipe instead of checks, but my concern is that because Pipe can be either a Validation or a Transform, the user will then have to filter pipe on their end. That wouldn't be that difficult to do, just something worth considering.

Yes, I agree, we should take that into account. However, since transformations are part of the Valibot pipeline, developers working with Valibot should be aware of this anyway. Exposing the pipeline as .pipe has the additional advantage that the pipeline can be modified afterwards, for example with methods like removePipe or overwritePipe.

However, I don't think repurposing kind here to distinguish between schema, validation, transform etc...

Yes, with a schema it is not necessarily required. But for the pipeline I think it is, since transformations do not have .requirement and .message. Or do you have an alternative idea for this?

For now, the disadvantages of Object.assign() outweigh an object with ._parse in my opinion:

The code is harder for beginners to understand in usage and implementation
If you can call a schema directly, we can't indicate that it's an internal API like we can with the underscore in `._parse'
Also, the difference between schema(input) and safeParse(schema, input) is unclear, which makes the API more complicated for users
Object.assign()` takes more CPU time than creating a simple JavaScript object
Can TypeScript correctly type Object.assign()? If not, this is another drawback

Please take a look over the latest commit. I went and refactored everything to use a uniform return shape with a _parse() method.
I was going to continue advocating for Object.assign() but I spent some time this morning researching the performance impact it could possibly have, and while there might be when assigning a lot of properties or frequent execution, I figured it wasn't worth the risk. I did however do a refactor last night with this implementation if you want to compare to this branch: https://github.com/Saeris/valibot/tree/feat/return-parse-function-from-schemas (there were some test errors with comparable() that I punted on resolving, code works fine otherwise)

As far as my JSON schema comments go, you can ignore those. I assumed because of #23 that there was desire to support it somehow with this PR.

For reference, Object.assign() does work just fine with TypeScript. Under the hood it takes the types of each arg and returns an intersection of all of them. You can see for yourself in your IDE that the types come through exactly as expected.

Yes, with a schema it is not necessarily required. But for the pipeline I think it is, since transformations do not have .requirement and .message. Or do you have an alternative idea for this?

I think it's rather simple to pattern match on unique properties to Schema, Validation, or Transform to determine what type they are. getChecks() has a utility function that does exactly this for Validations. async is unique to Schema, message is unique to Validation, etc.
Calling a night on contributions for now. Will catch up on any feedback tomorrow.

Thank you for your contribution. I'll try to look at it tomorrow and think about it. I expect to give you feedback next week, with the goal of merging the improvements in the following days.

Here's the mocking library I'm working on to go with this PR, in case you'd like to try it out locally. https://github.com/Saeris/valimock
FYI I will be on vacation from the end of this week until the beginning of November, so if I'm slow to respond that is why.

Can you try to sync the repo and merge the current main branch into your feature branch? I made a few structural changes to the object schema.

I´m really excited for this! I´m working on a form validation library that is able to parse FormData objects using the provided valibot schema. With this feature it will also be able to generate html validation rules like
<script>
  const schema = v.object({
    age: v.number([ v.minValue(5), v.maxValue(12) ])
  })
</script>

<!-- all properties can be generated by providing just the name -->
<input type="number" name="age" min="5" max="12"/>

What is the name of your library? I am interested in having a look at it.

I was going to name it valiform but the name is taken on npm. So i´m open to some suggestions!
The idea came up when i started using sveltekit-superforms in a project but wasn´t really satisfied with the dx and some decisions they made. That lib uses zod for validation and therefore teach you to only validate on the server.
With valibot that isnt really an issue due to its small bundle size. The idea is to use the same schema for both, server and client. My library will only bring a small abstraction with a few helpers to basicly reduce it to like 5 lines of code + configuration. This PR would make it possible to even generate native html form validation in cases where js doesnt work.
I will post the link to the repo when i´m done refactoring. The hardest part was to figure out how to efficiently extract the schema types and map them to the html input types eg transform FormDataEntryValue to the correct type (text and number is easy, but what about enums and other more complicated types?).
For now it will only work one layer deep, so no nested objects yet. I have some ideas to work around that limitation but we will see.
Another possible thing to add is the ability to get a json representation to build your html as your schema defines it.

@david-plugge have you taken a look at my form library Modular Forms? I plan something similar for all signal based form libraries and that includes Svelte 5. I am interested in an exchange on this.

@david-plugge have you taken a look at my form library Modular Forms? I plan something similar for all signal based frameworks and that includes Svelte 5. I am interested in an exchange on this.

While it looks quite nice for spa's i can't find info about server side validation. My main focus is to unify the client and server side validation and typesafety in meta frameworks (focusing on sveltekit for the moment).

If you are interested, you can find more information about server-side validation here and in the Qwik docs. I plan to rework Modular Forms in early 2024 to make this even easier.

v0.20.0 brought a lot of structural changes. For example, I changed the schema property of a schema to type and nested properties like map: { key, value } in map to a flat hierarchy with just key and value. A merge is likely to introduce various conflicts. It may be faster to make the changes independently on the branch before merging. Here are the release notes: https://github.com/fabian-hiller/valibot/releases/tag/v0.20.0

I plan to publish the improvements of this PR with the next version.

v0.20.0 should be all merged up! Tests are passing, so looks good to me.
I made all of the pipes optional except for any, which defaults to an empty array for its single argument.
Went and renamed kind to type everywhere, so should be good to go on that front.
Please give it a review for any cleanup that is missing so we can get this shipped!

Thanks @Saeris, I appreciate the work you put into this PR! I will try to review your code in the next few days.

Short update: I try to review everything tomorrow or on the weekend. The goal is to release a new minor version next week.

I have started to investigate and improve the code. I'll let you know as soon as I'm further along.

I expect to share my changes here in the middle or end of this week so we can discuss the final details.

@Saeris and @lo1tuma can review my changes?

I took a look over your latest commits (da3ca63, 775d539 and 5838643) and everything looks good to me.
A concern I have with _parse always taking the returned values for options like pipe and others is that they are no longer statically analyzable, because runtime logic could change their values. But that would be an exception rather than the norm, so I suppose it's okay because it's really a "don't change this unless you know what you are doing" kind of feature. Generally, I don't like this kind of unpredictability in something like a data validation schema, but then it's also not a feature I see myself using.
But otherwise, I like the addition of exposing error messages as well as the validation pipelines. That should help in form input validation.
I'm good to ship this if you are! Thanks for all the effort in reviewing @fabian-hiller!

Thanks a lot for the work you put into this PR! I will wait 1 to 3 days and then do the final review to merge the changes.

I had a brief look at the changes. I still think that requirement itself is not typed is a bummer. If this is only a first iteration and there are plans to improve the precision of its type I’m fine. But as it is right now I would probably not use it.

@lo1tuma can you describe in detail what you mean and how you would improve it?

What I mean is the problem that  on the Issue type requirement is defined as an optional of unknown`. So when I want to analyze an issue like this:
if (issue.type === 'stars_with') {
    someStringOperation(issue.requirement); // requirement is unknown but I would expect type string
}

I would need to do further runtime checks to verify what type requirement has. So ideally Issue could be a discriminated union. But right now I think it is hard to implement because we also have custom validations and therefore arbitrary values of issue.type. One idea would be not allow custom validations to overwrite type and make issue.type a known value in this case, for example custom.
I think this is a bit tricky to solve and there might be other solution, so maybe it is better to do it as a follow-up.

Yes, I agree that we should address this in a follow-up. I plan to integrate Valibot more into Modular Forms and will probably find a lot of necessary improvements to Valibot along the way.

I will think about your feedback and probably create an issue after this one is merged so that we do not forget about this in the long run.

Thank you again for contributing to this PR!

This looks very promising, especially with my idea that Superforms v2 should be able to use most validation libraries through typeschema, in more or less complete versions of the validation format, where Zod is the benchmark, being fully introspectable.
I would be happy to use Valibot as the test library for experimentation, so is there an example how to use the Reflection API? This is how I do it with Zod: https://github.com/ciscoheat/sveltekit-superforms/blob/main/src/lib/schemaEntity.ts#L293-L358
It's not difficult, once the metadata is easily accessible. So an example of that, together with how to be able to access some other properties like nullable, optional, default value, would get me very far.

I think the code for Valibot is very similar to the code for Zod. The biggest difference will be that you extract all the details of a data type from the pipeline. I have created an issue so that we add a guide on this to the documentation in the long run.

authors: Saeris ciscoheat david-plugge fabian-hiller lo1tuma

repo: fabian-hiller/valibot


text:
Resetting range via double click alters st.session_state parameters temporarily

Hi! First of all, thank you a lot for the contribution to the streamlit components, it has come very handy for the project I'm currently working on.
I was unsure of how to name the issue, as I do not really understand what could be behind it.
In short, when double clicking on the plot, somehow the application looses temporarily the context of the session_state, and some AttributeErrors are raised. In this case, the attribute it looks for is called "current_page". The error logs as follows:
2023-06-27 11:34:35.602 Uncaught app exception
Traceback (most recent call last):
  File "C:\Users\mart\AppData\Local\pypoetry\Cache\virtualenvs\sbp_sonne_-_fft_analysis-IYx0_w8E-py3.11\Lib\site-packages\streamlit\runtime\state\session_state_proxy.py", line 119, in __getattr__
    return self[key]
           ~~~~^^^^^
  File "C:\Users\mart\AppData\Local\pypoetry\Cache\virtualenvs\sbp_sonne_-_fft_analysis-IYx0_w8E-py3.11\Lib\site-packages\streamlit\runtime\state\session_state_proxy.py", line 90, in __getitem__
    return get_session_state()[key]
           ~~~~~~~~~~~~~~~~~~~^^^^^
  File "C:\Users\mart\AppData\Local\pypoetry\Cache\virtualenvs\sbp_sonne_-_fft_analysis-IYx0_w8E-py3.11\Lib\site-packages\streamlit\runtime\state\safe_session_state.py", line 111, in __getitem__
    raise KeyError(key)
KeyError: 'current_page'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\Users\mart\AppData\Local\pypoetry\Cache\virtualenvs\sbp_sonne_-_fft_analysis-IYx0_w8E-py3.11\Lib\site-packages\streamlit\runtime\scriptrunner\script_runner.py", line 552, in _run_script
    exec(code, module.__dict__)
  File "C:\Users\mart\Workspace\sbp_sonne-fft_analysis\app.py", line 24, in <module>
    main()
  File "C:\Users\mart\Workspace\sbp_sonne-fft_analysis\app.py", line 20, in main
    PAGES[st.session_state.current_page]()
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "C:\Users\mart\AppData\Local\pypoetry\Cache\virtualenvs\sbp_sonne_-_fft_analysis-IYx0_w8E-py3.11\Lib\site-packages\streamlit\runtime\state\session_state_proxy.py", line 121, in __getattr__
    raise AttributeError(_missing_attr_error_message(key))
AttributeError: st.session_state has no attribute "current_page". Did you forget to initialize it? More info: https://docs.streamlit.io/library/advanced-features/session-state#initialization

I should say that this error is raised although the attribute was initialized.
This does not makes the app to crash though, because afterwards everything works as it should.
As extra information, resetting the plot range via the "autoscale" button on the widget, do not raises any error whatsoever.
Therefore I guess this could be an issue on how the component deals with the double clicking.
Although this uncaught exception does not cause the app to be unusable, I still wanted to create the issue to provide this short feedback!
Let me know if I can be of further help for debugging this.

Hi @ERafaelMartinez!
Thank you so much for your feedback and interest in my tiny, little component! :)
So far from your error messages, it seems like this isn't a problem of the component itself. The component never accesses the pages or any other elements in a streamlit app, it's pretty much pure React code combined with the streamlit wrapper.
If you don't mind, could you share some of your code in your app.py file? I can have a closer look :)
Maybe it's just a problem of streamlit itself; streamlit reloads the whole app as soon as the session state changes. Therefore, as soon as you zoom out, the whole app is reloaded which may causes the errors you are describing.
Anyways, feel free to share some code and I'll have a closer look. :)

Closing due to inactivity

authors: ERafaelMartinez fabianandresgrob


text:
Encoding fixes.

Thanks so much @adam-fowler.
This shall fix #21 and #19.

Codecov Report

Merging #25 into master will decrease coverage by 0.14%.
The diff coverage is 78.26%.

@@            Coverage Diff             @@
##           master      #25      +/-   ##
==========================================
- Coverage   87.97%   87.82%   -0.15%
==========================================
  Files          32       33       +1
  Lines        2918     2999      +81
==========================================
+ Hits         2567     2634      +67
- Misses        351      365      +14

Impacted Files
Coverage Δ

...Coding/Encoding/JSONUnkeyedEncodingContainer.swift
19.23% <0%> (-1.61%)
:arrow_down:

...ONCoding/Encoding/JSONKeyedEncodingContainer.swift
46.77% <64.28%> (+10.77%)
:arrow_up:

...ces/PureSwiftJSONCoding/Encoding/JSONEncoder.swift
80.26% <72.72%> (-4.36%)
:arrow_down:

...sts/Encoding/JSONKeyedEncodingContainerTests.swift
95.12% <95.12%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9071a99...7167b2f. Read the comment docs.

authors: codecov-io fabianfett

repo: fabianfett/pure-swift-json


text:
Projects and Research page

None of the external links are working

@rebeccaottinger can you show me which is a link that doesn't work.. hard to find

This is for the Global Initiatives page (which in github is called projects-initiatives). None of the url's are working, except the fab research one because it links to an internal page. Not sure why!

authors: fibasile rebeccaottinger

repo: fablabbcn/fabfoundation


text:
Race condition between server watch processes

Description
I've been encountering IOExceptions pretty often while trying out the scaffold, and I think I've narrowed it down to the changes introduced in #129: there are two dotnet watch processes running, and when I change a file in the server code, they both try to generate the src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json file at the same time, resulting in one of them throwing an IOException and shutting down.
Repro steps

Clone the https://github.com/fable-compiler/fable-suave-scaffold repo.
Run ./build.sh run in the freshly-cloned repo.
Wait for it to build and start the two dotnet watch processes.
Edit the src/Server/WebServer.fs file and save it.
One of the two dotnet watch processes is very likely to throw an IOException.

Expected behavior
The watch processes should not interfere with each other, or there should be just a single watch process.
Actual behavior
One of the two watch processes throws an IOException with the error message:

System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

Full exception stack trace:
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
/home/rmunn/.local/share/dotnetcore/sdk/1.0.4/Sdks/Microsoft.NET.Sdk/build/Microsoft.NET.Sdk.targets(129,5): error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

That same stack trace, with the Microsoft.NET.Sdk.targets path trimmed so it's easier to read:
error MSB4018: The "GenerateRuntimeConfigurationFiles" task failed unexpectedly. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018: System.IO.IOException: The process cannot access the file '/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/bin/Debug/netcoreapp1.1/Server.runtimeconfig.json' because it is being used by another process. [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.UnixFileSystem.Open(String fullPath, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, FileStream parent) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteToJsonFile(String fileName, Object value) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.WriteRuntimeConfig(ProjectContext projectContext) [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.GenerateRuntimeConfigurationFiles.ExecuteCore() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.NET.Build.Tasks.TaskBase.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]
error MSB4018:    at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__25.MoveNext() [/home/rmunn/code/fsharp/fable/test-scaffold/src/Server/Server.fsproj]

The build failed. Please fix the build errors and run again.
watch : Exited with error code 1

Known workarounds
If I remove unitTestsWatch from the Run target in build.fsx so that there's only a single dotnet watch process running, everything goes smoothly.
Related information

Operating system: Linux Mint 18.1 (based on Ubuntu Xenial 16.04)
Branch: master
.NET Runtime, CoreCLR or Mono Version: 1.0.4

Thanks for tracking this down @rmunn! Could you please have a look @aprooks?

@alfonsogarciacaro @rmunn #134 fixes this. We need @forki comment there and I will fix conflicts

@aprooks Thanks for the quick reply! Sorry, I forgot about that PR 😅 I'll merge it right away!

...well, after the conflicts are fixed ;)

I have pushed merge. @rmunn  could you please check if these changes are working under Linux?

I think it works, but now I'm getting a different error, so I can't confirm this bugfix yet as I can't yet run the scaffold. I'm on a different computer with a different .Net Core installation, and now I get the following error:
  The specified framework 'Microsoft.NETCore.App', version '1.1.2' was not found.
    - Check application dependencies and target a framework version installed at:
        /opt/dotnet/shared/Microsoft.NETCore.App
    - The following versions are installed:
        1.0.4
        1.1.1
    - Alternatively, install the framework version '1.1.2'.

The 1.1.2 requirement for Microsoft.NETCore.App is coming from https://github.com/fable-compiler/fable-suave-scaffold/commit/a9b873bf98824d8e5d7ee80f49d0b0ccaadf5ad4, which was merged 13 days ago so I'm a little puzzled why I didn't encounter problems with it earlier. I'll put this in a different issue report -- but because of this new problem, I may not be able to test #134 until tomorrow when I'm back at the computer where I first reported this issue.
I'll leave this open until I can confirm the bugfix.

/cc @enricosada

Is this happening because of the server side? In Fable we solved a similar problem (also thanks to Enrico's guidance) using the prefercliruntime file. See https://github.com/fable-compiler/Fable/issues/961

I deleted paket.lock and re-ran paket install and got the same crash, for the same reason: Microsoft.NETCore.App version 1.1.2 had shown up again in my paket.lock file. So I reran paket install, giving it the -v flag this time so I could try to figure out where version 1.1.2 was coming from. The only two actual requirements for Microsoft.NETCore.App listed in my paket install -v log were:
     - Microsoft.NETCore.App, >= 1.0.4 (from dotnet-fable 1.1.14)
     - Microsoft.NETCore.App, >= 1.0.5 (from Microsoft.DotNet.Watcher.Tools 1.0.1)

However, when I grepped for where that 1.1.2 version was coming from, I found the following:

Request 'https://api.nuget.org/v3-flatcontainer/microsoft.netcore.app/index.json?semVerLevel=2.0.0' finished with: [2.0.0-preview2-25407-01 ; 2.0.0-preview1-002111-00 ; 1.1.2 ; 1.1.1 ; 1.1.0 ; 1.1.0-preview1-001100-00 ; 1.0.5 ; 1.0.5-servicing-004880-00 ; 1.0.4 ; 1.0.3 ; 1.0.1 ; 1.0.0 ; 1.0.0-rc2-3002702]

Paket has made the natural assumption that a package that bumps just minor dependencies will not cause problems, and has therefore specified a dependency of 1.1.2. But because I don't have 1.1.2 globally installed on my system, just 1.1.1, .Net Core complains. (1.1.2 has been quite successfully installed in my packages folder just like any other NuGet dependency, but apparently that location isn't being searched by something in the .Net Core process, and I don't yet know enough to know what is failing to search the packages folder).
So I explicitly added Microsoft.NETCore.App = 1.1.1 to my paket.dependencies file and re-ran paket install, then ./build.sh run (in a brand-new clone to make sure I didn't have any old object references hanging around). Paket obligingly grabbed Microsoft.NETCore.App 1.1.1 for me this time instead of 1.1.2, but I still got the same error, because version 1.1.2 was still being referenced in project.assets.json. Specifically, in src/Server/obj/project.assets.json and test/ServerTests/obj/project.assets.json.
At this point, I'm running too far past my knowledge base to dredge up any more useful information. I don't know how .Net Core generates its project.assets.json files. I'll post my log file from paket install -v, and those two project.assets.json files, as attachments to this issue and maybe someone else with more .Net Core experience will be able to glean useful information from them. (I'll post them as attachments because the log file, for one, is too large to post as a gist).

Here's the log from my run of paket install -v after deleting the paket lock file. WARNING! The uncompressed file is 48.8 MiB! Compressing it with xz got it down to a mere 72 KiB (!!!). GitHub then refused the attachment because they don't allow .xz files (don't ask me why they don't handle a standard Unix filetype, but they don't), so I had to put the .xz file into a .zip, gaining nothing (and padding the file by about 2 KiB) in order for GitHub to accept it.
log-from-paket-install-no-lockfile.txt.xz.zip
Again, WARNING: this file is 48.8 MiB when uncompressed.

Microsoft.NETCore.App comes from the sdk as well and AFAIK there is no way for paket to influence that. It's a serious flawed in the design. I already reported that to vf# but at this point I doubt anyone except us cares.

And here are the two project.assets.json files I got after explicitly specifying version 1.1.1 of NETCore.App: one from src/Server/obj/ and one from test/ServerTests/obj/.
both-assets-files.zip

@forki - Where is the report? I'll chime in with another report of how this is screwing things up for me. The squeaky wheel gets the grease, after all, and I think they need to know about how this design is causing problems. If they don't get complaints (VERY polite complaints) they might think that everything's fine.

I think we need to raise it with dotnet itself and only using nuget

If you could create a minimal repro showing that issue then we have better chances. Nobody is understanding  paket.exe over there.

I don't understand NuGet, so I'm going to run into a few practical difficulties creating that repro. Any tips?

Probably relevant: https://www.hanselman.com/blog/TheMysteryOfDotnetWatchAndMicrosoftNETCoreAppVersion110preview100110000WasNotFound.aspx

Ok try the following;

create a new c# netcore app
look which packages it draws into assets file
find one that has a closed version range and where you can find something incompatible on nuget org
add that package to the csproj with normal PackageReference xml tag and add pin it to the version that doesn't match the one that comes with the Microsoft.NETCore.App

Now run dotnet restore again and investigate the assets file.
Personally I think it should have told you about the error.
But IIRC it will just ignore your settings from the csproj and use what the sdk wants

@rmunn please let me know if you want to help me on this front

Power outage at the office today (transformer blew) so couldn't do anything about this. I'll ping you if I do need help.

Working on verifying this issue since that's what I first started with, and there's yet another weird exception this time. Running ./build.sh run in a freshly-cloned copy of the scaffold repo, I get the error "The "ResolvePackageDependencies" task failed unexpectedly", with the exception:

System.MissingMethodException: Method not found: 'System.Collections.Generic.IList`1<NuGet.Packaging.Core.PackageDependency> NuGet.ProjectModel.LockFileTargetLibrary.get_Dependencies()'

I never got this error before either. I have to go work on something else just now, but I'll try to post a new issue about this one, since it's probably unrelated. But this does mean that I still can't confirm that merging https://github.com/fable-compiler/fable-suave-scaffold/pull/134 fixed this for me on Linux. I think it did, but I haven't yet been able to get a clean run to confirm for sure.

That MissingMethodException I'm getting looks like the one over at https://github.com/OmniSharp/omnisharp-vscode/issues/1495#issuecomment-302751595. He's using .NET Core SDK 2.0.0-preview2 and so am I, so maybe I should try to remove that and install .NET Core SDK 2.0.0-preview1 or something in the .NET Core SDK 1.x series instead.
I really have not had a good experience with .NET Core so far. I'd expect moving from preview1 to preview2 not to break MAJOR things like the package manager (NuGet is the apparent source of the MissingMethodExceptions here) in any sensible project -- but by that definition, it appears that .NET Core is not sensible. Oh well, this is not the right place to rant about .NET Core. I'll try to downgrade my .NET Core installation on this machine to a .NET Core 1.x SDK version, and see if I can finally confirm this bug as fixed with that approach.

Okay, removing the dotnet-sdk-2.0.0-preview2-006497 package from my Linux box and installing the dotnet-dev-1.0.4 package finally made everything work for me. So I can finally confirm that this bug is fixed.
The other errors I had are apparently caused by trying to run two different versions of .NET Core on my system: one installed globally, and the other one downloaded by the build.fsx script in this scaffold. Apparently that's a recipe for pain and should be avoided. Now I know.
I'll close this issue since it is actually fixed. The other problems I encountered, I'll report in the appropriate repos once I can get a good repro for them.

authors: alfonsogarciacaro aprooks forki rmunn

repo: fable-compiler/fable-suave-scaffold

license: unlicense


text:
Error when setting monolog.level

Can't find why this falls with error ( Fatal error: Class 'Logger' not found in 'blabla' ):
$app->register(new MonologExtension(), array(
    'monolog.class_path'    => __DIR__.'/vendor/monolog/src',
    'monolog.logfile'       => __DIR__.'/development.log',
    'monolog.name'          => 'cars',
    'monolog.level'         => Logger::INFO
));

Without monolog.level it works pretty good.

This is the sort of issue that should be reflected in the docs.

Composer is the long term solution to this, see http://nelm.io/blog/2011/12/composer-part-1-what-why/

authors: DarrenN VitaliyPushkar igorw

repo: fabpot/Silex


text:
Add the http properties to our log errors when possible

Add as additional properties to our error logs the request details such as headers, params and payload. This was discussed in https://github.com/fabric8-services/fabric8-wit/pull/1533#discussion_r128931570

@aslakknutsen In relation to our discusion in https://github.com/fabric8-services/fabric8-wit/pull/1536, I created this PR. WDYT ?

@hectorj2f snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1536-1

@hectorj2f snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1536-2

Codecov Report

Merging #1536 into master will decrease coverage by 0.01%.
The diff coverage is 83.33%.

@@            Coverage Diff             @@
##           master    #1536      +/-   ##
==========================================
- Coverage   58.75%   58.74%   -0.02%
==========================================
  Files         121      121
  Lines       14754    14778      +24
==========================================
+ Hits         8669     8681      +12
- Misses       5426     5435       +9
- Partials      659      662       +3

Impacted Files
Coverage Δ

log/log.go
59.51% <83.33%> (+0.39%)
:arrow_up:

controller/workitem.go
80.21% <0%> (-0.48%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6fb85fd...b19cdba. Read the comment docs.

[test]

@hectorj2f snapshot fabric8-wit image is available for testing.  docker pull docker.io/fabric8/fabric8-wit:SNAPSHOT-PR-1536-4

[test]

[test]

[test]

[test]

[test]

I am going to merge this PR :)


text:
fix(iteration): iteration start date cannot be later than end date

Fix: https://openshift.io/openshiftio/openshiftio/plan/detail/1611

Waiting for the snapshot to be available.

@vikram-raj fabric8/fabric8-ui:SNAPSHOT-PR-2325-4 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2325-fabric8-planner.badger.fabric8.io

authors: fabric8cd jarifibrahim vikram-raj


text:
fix(dataTable) : filter by label now working(WIP)

Now Clicking on a Lable in the Tabel View filters the WorkItem List by Label.
Please Refer: https://github.com/openshiftio/openshift.io/issues/2447
Test: WIP

Can one of the admins verify this patch?

[test]

Codecov Report

Merging #2516 into master will decrease coverage by 0.01%.
The diff coverage is 0%.

@@            Coverage Diff            @@
##           master   #2516      +/-   ##
=========================================
- Coverage    9.95%   9.93%   -0.02%
=========================================
  Files         193     193
  Lines       12522   12542      +20
  Branches     1761    1764       +3
=========================================
  Hits         1246    1246
- Misses      11207   11227      +20
  Partials       69      69

Impacted Files
Coverage Δ

src/app/components_ngrx/labels/labels.component.ts
3.57% <0%> (-1.99%)
:arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4c7e829...965d81d. Read the comment docs.

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-2 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-3 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

Somehow the code that I pushed is not available in the generated snapshots. I have pushed a new commit to rebuild the snapshot.

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-5 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

Ike Plugins (test-keeper)
Thank you @divyanshiGupta for this contribution!

It appears that no tests have been added or updated in this PR.
Automated tests give us confidence in shipping reliable software. Please add some as part of this change.
If you are an admin and you are sure that no test is needed then you can use the command /ok-without-tests as a comment to make the status green.
For more information please head over to official documentation. You can find there how to configure the plugin - for example exclude certain file types so if PR contains only them it won't be checked.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@Raunak1203 I have made the changes according to the review

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@Raunak1203 it is supposed to be like that. The list is supposed to get filtered by label when we click a label from quick preview as well

@divyanshiGupta i am clicking on cross to remove label

@Raunak1203 fixed

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta please check the assigned label in the detail page , it shows 2 cross

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-17 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-18 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta fabric8/fabric8-ui:SNAPSHOT-PR-2516-19 is deployed and available for testing at https://fabric8-ui-fabric8-ui-pr-2516-fabric8-planner.badger.fabric8.io

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

@divyanshiGupta Your image is available in the registry. Run docker pull registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 && docker run -it -p 5000:8080 registry.devshift.net/fabric8-ui/fabric8-planner:SNAPSHOT-PR-2516 and visit http://localhost:5000 to access it.

authors: Raunak1203 alien-ike centos-ci codecov-io divyanshiGupta fabric8cd


text:
test - closing soon

@here
deez nuts

test 2,
@noobie0120

<#907306705090646066> is dead :skull:

test 3,
<@949531382412087307>

Hello <#1087355053867798640> and hello <@778518819055861761>

<@862644161156218891> :skull::skull::skull:

@everyone :skull:

repo: face-hh/fextify


text:
Use Luau instead of Lua

Is your feature request related to a problem? Please describe.
Use Luau instead of Lua.
It's essentially typed Lua.
The "we need TypeScript plugin support in GriddyCode" people will shut up because Luau has types, or just use Roblox-TS.
It's compatible with Lua 5.1 code so most code should work.
Describe the solution you'd like
Use Luau instead of Lua. You can probably use godot-luau-script in this case.

For now we're not gonna switch from LuaAPI as it provides too little benefit. Neovim doesn't use it either, and it seems to work just fine for developers :^)

The plugins api has like 6 functions, and if you're using luals (formerly known as sumneko_lua) the meta file at the project root should provide you with the necessary type definitions you need.

For now we're not gonna switch from LuaAPI as it provides too little benefit. Neovim doesn't use Luau either, and it seems to work just fine for developers :^)

Did you read the website?
Luau has continue, types, and more (it does remove goto, but honestly,
you shouldn't need it other than for continuing in a for loop).
Why would Roblox create Luau in the first place if there was no reason to?

The plugins api has like 6 functions, and if you're using luals (formerly known as sumneko_lua) the meta file at the project root should provide you with the necessary type definitions you need.

Yes. However, it's not natively supported by Lua.

For now we're not gonna switch from LuaAPI as it provides too little benefit. Neovim doesn't use Luau either, and it seems to work just fine for developers :^)

Did you read the website? Luau has continue, types, and more (it does remove goto, but honestly, you shouldn't need it other than for continuing in a for loop). Why would Roblox create Luau in the first place if there was no reason to?

The plugins api has like 6 functions, and if you're using luals (formerly known as sumneko_lua) the meta file at the project root should provide you with the necessary type definitions you need.

Yes. However, it's not natively supported by Lua.

I think the benefit of implementing Luau is minimal.
GriddyCode should stick to Lua unless the need for Luau arises.

Ok. I'll close the issue for now.

authors: ItsTato RealPacket face-hh zSnails

repo: face-hh/griddycode