text:
Example of how to use SvelteKit + Electron-Vite

Clear and concise description of the problem
Currently electron-vite supports a list of frameworks, but SvelteKit is not in the list. Would be great if you can provide an example of how to use it with SvelteKit or NextJS.
Suggested solution
I tried following https://evite.netlify.app/guide/project-structure.html#customizing-project-structure , but without any luck.
As far as I understand, I need to point Electron-Vite to build directory of SvelteKit, but I don't really understand how to configure SvelteKit, since it's controlled by electron.vite.config.ts
Alternative
No response
Additional context
Sorry, if it's a dumb question. Still newbie here.
Validations

[X] Follow the Code of Conduct.
[X] Read the Contributing Guidelines.
[X] Read the docs.
[X] Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.

Learn more about https://evite.netlify.app/guide/#scaffolding-your-first-electron-vite-project
npm create @quick-start/electron

and select svelte template

Learn more about https://evite.netlify.app/guide/#scaffolding-your-first-electron-vite-project
npm create @quick-start/electron

and select svelte template

Yeah, that's what I did initially, and selected Svelte + TS. It works with regular Svelte, but I want to make it work with SvelteKit

@dj-nuo ，

Run  npm create svelte@latest my-app to create a SvelteKit project.
Replace the template's renderer directory
Update config:

modify electron.vite.config.ts to use sveltekit  vite plugin instead of @sveltejs/vite-plugin-svelte:
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import { sveltekit } from '@sveltejs/kit/vite'

export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin()]
  },
  preload: {
    plugins: [externalizeDepsPlugin()]
  },
  renderer: {
    plugins: [sveltekit()]
  }
})

modify svelte.config.mjs  to use vite preprocess instead of svelte preprocess:
import adapter from '@sveltejs/adapter-auto';
import { vitePreprocess } from '@sveltejs/kit/vite';

/** @type {import('@sveltejs/kit').Config} */
export default {
  // Consult https://kit.svelte.dev/docs/integrations#preprocessors
  // for more information about preprocessors
  preprocess: vitePreprocess(),

  kit: {
    // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list.
    // If your environment is not supported or you settled on a specific environment, switch out the adapter.
    // See https://kit.svelte.dev/docs/adapters for more information about adapters.
    adapter: adapter()
  }
};

export default config

Install related dependencies of sveltekit.

Tried to do as you wrote in 10 different ways, but still no luck :'-(
I think the issue is that SvelteKit doesn't provide index.html, and overall is not as simple as Svelte as it would probably require static adapter if used with Electron.
If you managed to make it work - please share the template repo.
In the meantime, I also tried to build SvelteKit with adapter-static, which generates a directory with index.html in it & copied it into renderer folder. Still no luck((

.
├──electron
│  ├──main
│  │  ├──index.ts
│  │  └──...
│  └──preload
│     ├──index.ts
│     └──...
├──src
├──static
├──electron.vite.config.ts
├──svelte.config.mjs
├──package.json
└──...

import { resolve } from 'path'
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
import { sveltekit } from '@sveltejs/kit/vite'

export default defineConfig({
  main: {
    plugins: [externalizeDepsPlugin()],
    build: {
      rollupOptions: {
        input: {
          index: resolve(__dirname, 'electron/main/index.ts')
        }
      }
    }
  },
  preload: {
    plugins: [externalizeDepsPlugin()],
    build: {
      rollupOptions: {
        input: {
          index: resolve(__dirname, 'electron/preload/index.ts')
        }
      }
    }
  },
  renderer: {
    plugins: [sveltekit()]
  }
})

import adapter from '@sveltejs/adapter-auto'
import { vitePreprocess } from '@sveltejs/kit/vite'

export default {
  preprocess: vitePreprocess(),
  kit: {
    adapter: adapter()
  }
}

It can work in development but not production.

SvelteKit requires type: "module", but Electron does not support this.
SvelteKit enforces vite build target to node, which does not match the Electorn renderer.

So，I don't think it's possible to make SvelteKit work in Electron.

Part 1
Is there a way to prevent renderer part of the electron.vite.config.ts from starting?
Meaning that electron part of things will continue to work as before, but:
In dev:

in my main index.ts I will point to URL of dev server of SvelteKit (which I can start e.g. with concurrently, not with electron-vite command).

In prod (built):

electron-vite will build only main and renderer, and then I will manually (through some script) copy result of my SvelteKit build into out/renderer directory.

Part 2
Another option that I experimented with today was using this structure:
├──electron
│  ├──main
│  │  ├──index.ts
│  │  └──...
│  └──preload
│     ├──index.ts
│     └──...
├──src
├──static
├──electron.vite.config.ts
├──svelte.config.mjs
├──package.json
└──...

svelte.config.mjs - added adapter-static for SvelteKit, which generates static html/css/js files, and doesn't require Node (!)
import adapter from '@sveltejs/adapter-static'
// import preprocess from 'svelte-preprocess'
import { vitePreprocess as preprocess } from '@sveltejs/kit/vite'

/** @type {import('@sveltejs/kit').Config} */
const config = {
	// Consult https://github.com/sveltejs/svelte-preprocess
	// for more information about preprocessors
	preprocess: [
		preprocess({
			postcss: true
		})
	],

	kit: {
		adapter: adapter({
			fallback: 'index.html',
			pages: 'build-sveltekit',
			assets: 'build-sveltekit'
		}),
		prerender: { entries: [] }
		// outDir: 'testDir'
	}
}

export default config

electron.vite.config.ts modified as following:
import { defineConfig, externalizeDepsPlugin } from 'electron-vite'
// import { svelte } from '@sveltejs/vite-plugin-svelte'
import { sveltekit } from '@sveltejs/kit/vite'
import { resolve } from 'path'

export default defineConfig({
	main: {
		plugins: [externalizeDepsPlugin()],
		build: {
			rollupOptions: {
				input: {
					index: resolve(__dirname, 'electron/main/index.ts')
				}
			}
		}
	},
	preload: {
		plugins: [externalizeDepsPlugin()],
		build: {
			rollupOptions: {
				input: {
					index: resolve(__dirname, 'electron/preload/index.ts')
				}
			}
		}
	},
	renderer: {
		plugins: [sveltekit()]
	}
})

Now comes the interesting part:
If my package.json had "type": "module"
{
	...
	"main": "./out/main/index.js",
	"type": "module",
	...
	"scripts": {
		...
	},
	"dependencies": {
		...
	},
	"devDependencies": {
                ...
		"@sveltejs/adapter-static": "^2.0.1",
                ...
	}
}

, then I could build my SvelteKit application into static files which will be saved in build-sveltekit folder as stated in svelte.config.mjs.
But, as you mentioned,

SvelteKit requires type: "module", but Electron does not support this.

... which raises the question:
Maybe it's possible to have separate package.json for renderer part of things? (especially since renderer files are not Bytecoded or anything, they are just built to minified/uglified HTML/CSS/JS ). And this question is kind of related to "Part 1"

n.b. I really want to make it work, since electron-vite looks like an amazing project (actually one of it's kind) that makes "Bytecode" for Electron setup-free ^_^

Update & possible resolution:
I managed to make it all work together by disabling renderer part of electron-vite.
Now the whole build configuration is handled by SvelteKit itself - it builds static files & places them into out/renderer directory.
Please, see this repo for better explanation of how it works - dj-nuo/electron-vite-sveltekit-template.
You can go through commits to see how I went step by step, starting from generating template with npm create @quick-start/electron

👍 You found a new way，good work!


text:
Issue with Calling Progressive Response API

I'm submitting a...

[ ] Regression (a behavior that used to work and stopped working in a new release)
[ x] Bug report
[ ] Performance issue
[ ] Feature request
[ ] Documentation issue or request
[ ] Other... Please describe:

Expected Behavior
After invoking an intent that uses a progressive response it should return the message ("Okay, please wait") and then finish the rest of the intent.
Current Behavior
Getting these errors and no progressive response:
“Couldn't parse response body: com.fasterxml.jackson.core.JsonParseException: Unrecognized token 'header': was expecting ('true', 'false' or 'null')”
and
"Directive not valid" even when the directive is valid according to the alexa developer docs for progressive responses. (https://developer.amazon.com/docs/custom-skills/send-the-user-a-progressive-response.html#send-directive)
Steps to Reproduce (for bugs)
Code snippet for progressive response:
from ask_sdk_model.services.directive import (
SendDirectiveRequest, Header, SpeakDirective)
def call_directive_service(handler_input):
request_id_holder = handler_input.request_envelope.request.request_id
directive_header = Header(request_id=request_id_holder)
speech = SpeakDirective(speech="Ok, please wait")

directive_request = SendDirectiveRequest(header=directive_header, directive=speech)
return handler_input.service_client_factory.get_directive_service().enqueue(directive_request)

How to call it in an intent handler:
try:
call_directive_service(handler_input)
except Exception as e:
print(e)
Python version info

Python version used for development: python 3.6

The issue has been fixed in release 0.1.2. Please update to the latest SDK and test it out.

source: gharchive/issue

authors: cruales nikhilym

license_type: permissive

license_source: github-api


text:
Question about CPU loading for Alexa

Hi AVS team,
Do you have any information about the CPU usage / loading for basic Alexa services ?
Which modules / libraries or process is the most critical for CPU loading ? Sensory speech recognition ?
Thanks,

We don't have any external numbers available, as it depends on the platform, external libraries and the other customizations that have been done.

Hi
My platform is ARM 4Core A9,
Following is my simple cpu loading test by TOP command
The cpu loading of SampleApp is very high usually.
top - 11:16:11 up  2:25,  4 users,  load average: 1.46, 1.06, 0.94
Tasks: 114 total,   2 running, 112 sleeping,   0 stopped,   0 zombie
%Cpu(s): 31.7 us,  5.5 sy,  0.0 ni, 62.5 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
KiB Mem:   2055156 total,   783580 used,  1271576 free,    22852 buffers
KiB Swap:   262140 total,        0 used,   262140 free.   599876 cached Mem
PID USER      PR  NI    VIRT    RES    SHR S  %CPU %MEM     TIME+ COMMAND
12094 root      20   0  372496  23384  16624 R 118.9  1.1   0:39.91 SampleApp
12099 root      20   0   76304  27320   6332 S   5.6  1.3   0:04.96 python
846 root      20   0  145488   1932    832 S   3.6  0.1   6:22.42 zwave_daemon
456 pulse      9 -11  109060   5504   3248 S   3.3  0.3   3:06.03 pulseaudio

Closing due to inactivity but please reopen if you still have questions.
The most likely candidate for highest CPU usage would most likely be wake word recognition.

authors: aki29 bandkenamazoncom sanjayrd zeusshuang

repo: alexa/avs-device-sdk


text:
ytview not working on Mac - error message

Issue Label:

[X ] Bug
[ ] New feature
[ ] Enhancement
[ ] New component

Description:
ytview does not work on Mac - below is the error message
/usr/local/bin/ytview: line 91: conditional binary operator expected
/usr/local/bin/ytview: line 91: syntax error near YTVIEWPLAYER' /usr/local/bin/ytview: line 91:   if [[ ! -v YTVIEWPLAYER ]]; then'
Thanks in advance,
Radesh
If its a bug make sure to include this section.
OS and OS version:

[ X] Mac
[ ] Linux 32 Bit
[ ] Linux 64 Bit
[ ] Windows 32 Bit
[ ] Windows 64 Bit

OS Version:

Thank you for letting me know about this! I think I have fixed it with 4c09b6ff09a193c31ba58aed37c97783a5d6e81b can you run the git install for just ytview from the instructions, however do not checkout to the latest stable release. This will give you the change I just made to ytview without me having to bump the version, If you can confirm that works now I will bump the version so everyone will be able to upgrade normally.

authors: RadeshNMP alexanderepstein

repo: alexanderepstein/Bash-Snippets

license: mit

license_source: bigquery


text:
Cant upload files more then 100MB using Nextcloud iOS

Hi ALl,
I don't know when this error came in. But I cant upload files from iOS bigger then 100MB.
Now I change the chunk size to 50MB so it will upload in parts... Takes more time and the app must be active.
I restarted nextcloud add-on already but that didn't solve the issue

Hi, probably an ios issue, you should raise it to the app dev. I've uploaded 3.7 go last week from desktop without issue in a single file so there is no issue with the addon, or accepts an upload up to 10go

I'll close the issue as not related to the addon itself

authors: alexbelgium poudenes

repo: alexbelgium/hassio-addons

license: MIT


text:
Build fails if zlib is not installed in default location, despite being available through pkg-config

As reported in rust-lang#69552, building this crate fails if zlib.h is not available on search path for the invoked compiler. This can obviously be worked around by setting DEP_Z_INCLUDE to the path containing said file, but (as the opener of that issue mentioned), the required include path would be available via pkg-config.
A few things:

It might be useful to check pkg-config in the case that DEP_Z_INCLUDE is unset, to avoid this issue in the future.
Better error reporting might be helpful, for when this crate is compiled as a dependency. I'm not overly familiar with how build.rs scripts work, but perhaps a test compile with an error message saying "Hey set DEP_Z_INCLUDE so libssh2-sys can find zlib.h" would be helpful.

This is the sort of thing that is easiest to fix by someone with a system that reproduces the issue so that there is no guesswork or back-and-forth.  I don't see any information about that environment either here or in the other issue and I don't have a ton of time to sink into this, so I'm looking to you (or really @MagicalTux) to help move things forward.  At a minimum I'd like to know if there is say a docker image that has this unusual configuration that we could put into our CI, but I'd also love to accept PR :)

@wez as suggested I made this available through docker. Note that this is extremely experimental.
In order to run a shell (the options are there in order to make access to fuse possible):
docker run --rm -it --privileged --cap-add SYS_ADMIN --cap-add MKNOD azusaos/azusa:latest /bin/bash -i

Might feel a bit slow as there are some optimizations pending, and this is still highly experimental.

Note that I never coded anything in rust in my life until today.
diff --git a/libssh2-sys/build.rs b/libssh2-sys/build.rs
index 1a406a3..4dcaec1 100644
--- a/libssh2-sys/build.rs
+++ b/libssh2-sys/build.rs
@@ -123,6 +123,11 @@ fn main() {
     if let Some(path) = env::var_os("DEP_Z_INCLUDE") {
         cfg.include(path);
     }
+    if let Ok(lib) = pkg_config::find_library("zlib") {
+        for path in &lib.include_paths {
+            cfg.include(path);
+        }
+    }

     if let Some(path) = env::var_os("DEP_OPENSSL_INCLUDE") {
         if let Some(path) = env::split_paths(&path).next() {

Result:
bash-5.0# cargo build
   Compiling libssh2-sys v0.2.15 (/root/ssh2-rs/libssh2-sys)
   Compiling ssh2 v0.8.0 (/root/ssh2-rs)
    Finished dev [unoptimized + debuginfo] target(s) in 20.35s

Published libssh2-sys v0.2.16 with this fix.  Thanks!

authors: MagicalTux Tyg13 wez


text:
Restore create_dir_all method for directory creation

https://github.com/alexcrichton/tar-rs/releases/tag/0.4.36 can be breaking for callers using unpack_in() to unpack to the same directory in parallel. If multiple threads race to create the same parent, the later ones will now error; #259 switches to create_dir(), which errors if a folder already exists.
With the new validation added in #259 , it seems reasonable to restore create_dir_all() for the actual creation. What do you think?

Thanks!

source: gharchive/pull-request

authors: CriesofCarrots alexcrichton

repo: alexcrichton/tar-rs


text:
Example Project does not compile / Cannot find PB symbols from ProtocolBuffers when compiling framework

Hi
I'm using Xcode 6.3.2
When cloning repository and trying to compile the Example project, I get this reference error in descriptor.pb.h

I've originally tried to include ProtocolBuffers in my own dynamic framework just by adding the ProtocolBuffers project file to my dynamic framework project and then linking the libProtocolBuffers in the link build phase.
Every time during compilation it references some PB symbols it cannot find them.
Using your ProtocolBuffers for swift works in terms of referencing but then the generated classes are unusable in objective-C because not visible to objective-C (see my other issue in protobuf-swift https://github.com/alexeyxo/protobuf-swift/issues/65)

Look this issue:
https://github.com/alexeyxo/protobuf-objc/issues/33#

authors: alexeyxo victorcotap

repo: alexeyxo/protobuf-objc


text:
[BUG] 求助，无法保存扩展的选项参数

CHROME 122版本。
第一次从chrome商店安装时，选项页是正常的，其中有默认的一些配置是打开的，配置了参数可以保存，比如右键导出下载默认就是选上的，试了下右键里也有导出到ariang。
当时我不太懂配置页最下方的“配置云端同步”，就点了一次下载，又点了一次上传，都没啥反应我就没管了。当我关了选项页去看别的，等一会儿我再次打开选项页时，就发现页面中所有参数都是无选择的状态，包括自动拦截文件大小那个文本模式都是空的，啥也没有。这时选择任何参数，点保存，都是会刷新下页面，又是空的，试了下这些配置也都没生效，比如右键导出下载，现在右键里没有这个菜单项了。
于是我删除扩展，再次从chrome商店安装，装好了扩展后会自动打开选项页，直接就是全部没选择的样子，所有框也是空的。
我删除重装3次都不行。也在chrome的User Data\Default\Extensions\mpkodccbngfoacfalldjimigbofkhgjn这个文件夹看了，删除扩展后，这个文件夹是没有了的。
不明白为啥了。
选项页现在截图如下：

发现在浏览器控制台有报错，截图如下：看不懂

代码确实有点问题，不过貌似是触发了Chrome的bug。重启系统后还有这个问题吗？

重启系统还是一样，又重装了扩展也是
Alex Hua @.***> 于 2024年3月15日周五 19:20写道：

代码确实有点问题，不过貌似是触发了Chrome的bug。重启系统后还有这个问题吗？
—
Reply to this email directly, view it on GitHub
https://github.com/alexhua/Aria2-Explorer/issues/188#issuecomment-1999449476,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQXSAQSBJXONZ7N46Y47OT3YYLKRBAVCNFSM6AAAAABEVT374SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJZGQ2DSNBXGY
.
You are receiving this because you authored the thread.Message ID:
@.***>

重启系统还是一样，又重装了扩展也是 Alex Hua @.***> 于 2024年3月15日周五 19:20写道：

v2.4.0版下载一个空的配置，会导致 AriaNG 无响应，但没法复现你这种情况。
IO error: .../LOCK: Access denied (ChromeMethodBFE: 15::LockFile::2) 是 Chrome 读取扩展的配置文件被拒绝，更像是文件权限问题，这个不是扩展本身的问题。你可以回想一下当时做了哪些操作，导致了 Chrome 读取文件被拒。
另外，你可以试试卸载扩展后，在 Chrome的 User Data\Default 搜索一下 mpkodccbngfoacfalldjimigbofkhgjn 看看有没有文件残留。

卸载扩展后，我看过没有扩展文件夹残留的，我反复装过几次都观察过了。
卸载后文件夹被删除，安装了又出现，看起来正常。
Alex Hua @.***> 于 2024年3月16日周六 11:29写道：

重启系统还是一样，又重装了扩展也是 Alex Hua @.***> 于 2024年3月15日周五 19:20写道：
v2.4.0版下载一个空的配置，会导致 AriaNG 无响应，但没法复现你这种情况。
IO error: .../LOCK: Access denied (ChromeMethodBFE: 15::LockFile::2) 是
Chrome 读取扩展的配置文件被拒绝，更像是文件权限问题，这个不是扩展本身的问题。你可以回想一下当时做了哪些操作，导致了 Chrome 读取文件被拒。
另外，你可以试试卸载扩展后，在 Chrome的 User Data\Default 搜索一下
mpkodccbngfoacfalldjimigbofkhgjn 看看有没有文件残留。
—
Reply to this email directly, view it on GitHub
https://github.com/alexhua/Aria2-Explorer/issues/188#issuecomment-2001423933,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AQXSAQVA4SLPIMAUES7OZ4LYYO4BRAVCNFSM6AAAAABEVT374SVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDAMBRGQZDGOJTGM
.
You are receiving this because you authored the thread.Message ID:
@.***>

卸载扩展后，我看过没有扩展文件夹残留的，我反复装过几次都观察过了。 卸载后文件夹被删除，安装了又出现，看起来正常。

看你的截图是Linux？我取消了 google-chrome/Defautl/Loal Extension Settings/mpkodccbngfoacfalldjimigbofkhgjn 的访问权限，能完美复现的你问题，所以你可以顺着权限管理的思路查查。这个issue我先关闭了。

报告一下，经过把所有相关文件夹手工删除，再重装插件，恢复正常了。

报告一下，经过把所有相关文件夹手工删除，再重装插件，恢复正常了。之前应该是删除时漏了一个文件夹。

OK

authors: alexhua easythd


text:
Image with scaleX not working

I have the following image:
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
        android:width="5dp"
        android:height="8dp"
        android:viewportHeight="8"
        android:viewportWidth="5">
    <group
        android:translateX="5.5"
        android:translateY="-22">
        <group
            android:scaleX="-1">
            <path
                android:fillColor="#acacac"
                android:pathData="M1.4543568 30L5.5 26 1.4543568 22 0.5 22.94359 3.5912863 26 0.5 29.05641 1.4543568 30Z"/>
        </group>
    </group>
</vector>

After converting:
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:width="5dp" android:height="8dp" android:viewportHeight="8" android:viewportWidth="5">
    <path android:fillColor="#acacac" android:pathData="M6.954-52L11-48l-4.046 4L6-44.944 9.091-48 6-51.056 6.954-52z"/>
</vector>

The new image is completely invisible. My guess is that the scaleX is causing the bug.

Sorry for the delay, will investigate!

Hmm, I've confirmed the bug... looks like an issue specific to the scaleX="-1"...

authors: alexjlockwood cristan

repo: alexjlockwood/avocado


text:
Error when using v-render-template with vue-class-component

https://github.com/padcom/v-runtime-template-example-with-poi
Problem description
In src/index.js there are 2 imports.
//import App from './components/App1'
import App from './components/App2'

App1 uses standard Vue component definition (object-literal syntax). App2 uses class components (the actual component is a class that extends Vue by using vue-class-component package).
App1 works but in dev mode throws an error when loading the page about template compiler not being available. However, there is no error in production build.
App2 does not work at all - see error message in the console.
Example application
The example application allows the user to edit the template and then to use it with v-render-template. To start the example application run
$ npm start

and navigate to http://localhost:4000
To do the production build run:
$ npm run build

As stated in the Readme, you need the with-compiler Vue version. You can see how to do it with Vue CLI and Nuxt.
So it'd be a matter of do the same in Poi, could you check that?

I also have the same problem with class based components. I have configured the project with the suggested vue.config.js, and when using a traditional component like this:
<template>

         <v-runtime-template :template="template"></v-runtime-template>

</template>

everything is working and i see the string. When using the class based component instead:
<template>

         <v-runtime-template :template="template"></v-runtime-template>

</template>

the template is not compiled/rendered and I get this error in the console:
[Vue warn]: Error in render: "TypeError: Cannot read property 'props' of undefined"

found in

---> <VRuntimeTemplate>
       <FreeListPanel> at src/components/FreeListPanel.vue
         <VCard>
           <Panel> at src/components/Panel.vue
             <Grid> at src/components/Grid.vue
               <VContent>
                 <VApp>
                   <App> at src/App.vue
                     <Root>
warn @ vue.common.js?5ee5:593
logError @ vue.common.js?5ee5:1739
globalHandleError @ vue.common.js?5ee5:1734
handleError @ vue.common.js?5ee5:1723
Vue._render @ vue.common.js?5ee5:4548
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
createChildren @ vue.common.js?5ee5:5684
createElm @ vue.common.js?5ee5:5586
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
patch @ vue.common.js?5ee5:6093
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
init @ vue.common.js?5ee5:4139
createComponent @ vue.common.js?5ee5:5610
createElm @ vue.common.js?5ee5:5557
patch @ vue.common.js?5ee5:6132
Vue._update @ vue.common.js?5ee5:2662
updateComponent @ vue.common.js?5ee5:2790
get @ vue.common.js?5ee5:3144
Watcher @ vue.common.js?5ee5:3133
mountComponent @ vue.common.js?5ee5:2797
Vue.$mount @ vue.common.js?5ee5:8542
Vue.$mount @ vue.common.js?5ee5:10941
Vue._init @ vue.common.js?5ee5:4642
Vue @ vue.common.js?5ee5:4731
(anonymous) @ main.ts?bc82:34
./src/main.ts @ app.js:12907
__webpack_require__ @ app.js:722
fn @ app.js:99
0 @ app.js:13028
__webpack_require__ @ app.js:722
(anonymous) @ app.js:789
(anonymous) @ app.js:792
vue.common.js?5ee5:1743 TypeError: Cannot read property 'props' of undefined
    at FreeListPanel.Component._init (vue-class-component.common.js?65d9:54)
    at FreeListPanel.Vue (vue.common.js?5ee5:4731)
    at new FreeListPanel (FreeListPanel.vue?ec28:47)
    at collectDataFromConstructor (vue-class-component.common.js?65d9:72)
    at Object.data (vue-class-component.common.js?65d9:135)
    at getKeysFromOptions (v-runtime-template.es.js?dd1e:7)
    at Proxy.render (v-runtime-template.es.js?dd1e:45)
    at VueComponent.Vue._render (vue.common.js?5ee5:4546)
    at VueComponent.updateComponent (vue.common.js?5ee5:2790)
    at Watcher.get (vue.common.js?5ee5:3144)

I found that i can use the class based component without problems if i add this line in the @Component decorator:
@Component({
components:{VRuntimeTemplate},
$options:{props:{}}
^^^^^^^^^^^^^^^^^^^^^^^^^^
})

I would add that after updating to 1.6 the fix needed is:
@Component({     props: {},     computed: {},     ... })
This is only necessary if the component isn't receiving any props and/or doesn't have computed properties. I think this is fixable with a check on parent in the VRuntimeTemplate component.

This issue is probably fixed already by #30. Could you guys check it out? Feel free to open it again if not

I have similar problem, just installed the latest version from master and the errors seem to persist :( I'm using Component decorator from vue-property-decorator, error appears if there are any properties defined in the component 🤔

authors: WhereBeTheDan Worie alexjoverm hariseldon78 padcom

repo: alexjoverm/v-runtime-template


text:
Error while publishing test results

@alexneo2003
getting this error

my TFS test case status is as below

could you please help me with what could be wrong

these are Automaiton Statuses available

@alexneo2003 , hey alex i was going through all the urls from specsync , and this sentence in your documentation "You must register an ID already existing test cases from Azure DevOps before running tests." means something , i need to link test cases which are written in typescript playwright framework first i need to associate with AzureDevOps test case workitems ? and then only i can use ?

read full text!

"must register an ID" - thats mean - add you TC ID from ADO to test title in you project - like
test('[1] First Test', () => {
    expect(true).toBe(true);
  });

[1] - this is part with you TC ID

sorry for blocking application names and company names i don't want violate policies hope you understand

So above screenshots i hope i'm following correctly

all looks fine but i can't understand what happened there
and your suiteId does'n make sense in config, reporter config doesn't containing suiteId parameters

@alexneo2003 , Hey Alex i removed that suiteId though it's not impacting anything. But after checking further many things
this is what i found , if you see below screenshot "automated = false" but workitem property automation status = Automated,
Let me try one thing i will try to update this value automated = true then if it works will let u know .. uffff

Hi @alexneo2003 , this is what i found  let me try and do something
i guess this value automated = true should be there is that correct ?

@alexneo2003 , no luck
So can you help me any of these 3 solution how to make it to work
Test result publishing fails with "Mismatch in automation status of test case and test run"
Azure DevOps (ADO) collects test execution results in Test Runs. Test runs can be either manual or automated. Automated test runs can only contain automated tests (Test Cases marked as "automated") while manual Test Runs can contain any Test Cases. The error message is provided by ADO when a non-automated Test Case is being added to the Test Run.
By default SpecSync sets both the Test Run and the Test Case automation status base on the configuration setting synchronization/automation/enabled. (see Mark Test Cases as Automated) This means that if the same scenarios were synchronized by SpecSync then the ones that were executed in the test result file, such conflict cannot happen.
Cause: It can happen that some scenarios are excluded from the "automated" status using the synchronization/automation/condition or synchronization/automation/skipForTagsconfiguration setting, but they were still included in the test result.
Solution 1: Make sure that the Test Cases the test result belongs to have been successfully synchronized before publishing the test results with the same automation setting.
Solution 2: Try excluding the non-automated scenarios from the test execution
Solution 3: Override the run type setting of the created Test Run using the publishTestResults/runType configuration setting. This setting is available from SpecSync v3.1. For earlier SpecSync versions, create a separate SpecSync config file for test result publishing that sets synchronization/automation/enabled to false. (You can use the toolSettings/parentConfig setting to make an inherited configuration file, so that you don't need to duplicate all configuration setting.)

@alexneo2003 , no luck
So can you help me any of these 3 solution how to make it to work

i'm don't understand why they not working
i'm have test runs where TC wasn't automated but my run was successfulled

ok sure let me keep trying, if i find a solution will ping 👍


text:
How can we add parameters to the OpenAI::Messages list call

The list messages call in the OpenAI API takes some optional parameters like limit, order, after and before.
It would be good to be able to pass these in:
def list(thread_id:)
@client.get(path: "/threads/#{thread_id}/messages")
end
---->
def list(thread_id:, parameters: {})
@client.get(path: "/threads/#{thread_id}/messages").  (TODO add the parameters)
end
Thanks

Agreed. I see the current list messages function always returns the first 20 messages in the thread and there are almost no ways to retrieve the latest message of a thread.

Do we know when this PR will be merged https://github.com/alexrudall/ruby-openai/pull/388 ?

Any luck merging this https://github.com/alexrudall/ruby-openai/pull/388? @alexrudall

I can merge this weekend :)

OK THIS weekend ;) Released in v7

authors: alexrudall chuducandev davidpenso mibock

repo: alexrudall/ruby-openai


text:
How can i control the witdh of the list and that a line is on one row

Hi
Can i set some CSS to get the searchlist wider that the actual search field ?
Best Carsten

standard bootstrap col-md.. utility functions don't work on the inputClass

repo: alexurquhart/vue-bootstrap-typeahead


text:
BUG in isForest

Bitte fixen, falls noch Zeit und Lust:
Für graphtoolGui -iml "[0 1 1 1 1 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 0 0 0 0; 1 0 0 0 0 0 0 1 1 1 0; 1 0 0 0 0 1 1 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 0 1 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 0; 0 0 0 1 0 0 0 0 0 0 1; 0 0 0 0 0 0 0 0 0 1 0]" -na  gibt die Function hasCycle() true statt false aus (siehe #57. Das führt dazu, dass auch deine Funktion nicht gut funktioniert.
Im Codeteil

    if(hasCycle() || !isDirected()) {
        isForestFlag = false;
        return false;
    }

bin ich mir nicht ganz sicher, ob !isDirected() an der Stelle richtig ist. Warum sollte ein ungerichteter Graph ohne weitere Überprüfung kein Wald sein (siehe Beispiel oben)?

Ein ungerichteter Graph kann kein Wald sein, der Wald ist auch nur "gerichtet" definiert. Ungerichtet wäre jede Kante ein Zyklus (der wird bloß nicht gezählt nach der Definition eines Zyklus in ungerichteten Graphen).
Der Fehler wäre also wenn in hasCycle, getForest prüft nur, ob es sich um einen gerichteten Wald handelt. Soll ich die vielleicht umbenennen, damit es klarer ist?

Doch kann er schon (siehe https://de.wikipedia.org/wiki/Wald_(Graphentheorie) oder Kapitel III, Folie 5, Ezparza/TUM/WS13/14)

Definition: Ein ungerichteter Graph heißt Baum, falls G zusammenhängend und kreisfrei ist. Die Knoten von mit Grad 1 heißen Blätter (leaves).

und

Wälder Definition: Ein Graph, dessen (Zusammenhangs-) Komponenten jeweils Bäume sind, heißt Wald.

Oh.. ok, dann ist das nur in unserem Skript so definiert. In dem Fall könnte ich das rausnehmen, aber dann stimmt hasCycle nicht... Was meinst du? Ich hab ja eigentlich auch überall geschrieben, dass die Methode prüft ob es sich um einen gerichteten Wald handelt.

Dann nehmen wir die beiden (hasCycle() und isForest()) raus.


text:
refactor: remove StunError

Currently, StunError has two variants: Parse and Io.
I'd suggest to remove StunError in favor of using io::Error::custom with a string. That makes the public API smaller.

I think that's going the wrong way, losing semantics. I think instead we should make specific Parse error codes for the various problems instead of relying on a string description.

I think instead we should make specific Parse error codes for the various problems instead of relying on a string description.

Is that really useful? It is not like a parse error can be corrected, i.e. matched upon. Modelling each error out as a variant is very desxriptive but as a user, you just end up logging / bubbling it up anyway. Hence the thinking of making the API simpler.

It makes for better testing. No text matching.

It makes for better testing. No text matching.

It looks ugly to compare err.to_string I agree. But it only the test compares it, I don't really see a difference. YMMV :)

I prefer to keep this for now.

authors: algesten thomaseizinger


text:
Re-work IceAgent::accepts_message and IceAgent::handle_receive

In preparation for making IceAgent public, we re-work parts of its public API to make the process easier. In particular, we remove StunMessage from the public API by changing the signature of accepts_message to take a net::Receive instead. net::Receive is already part of str0m's public API and can be easily constructed by end-users.
To align the two APIs further, we also return a bool from handle_receive, indicating whether or not the message was actually handled.

To align the two APIs further, we also return a bool from handle_receive, indicating whether or not the message was actually handled.

For my usecase, having handle_receive with a bool return value is good enough. I simply iterate through all agents until one of them says that it handled the message. Because we call accepts_message internally, I think this is safe. This might extend to APIs further up the stack in str0m as well or is there a usecase where you first call accepts but then don't actually want the agent to handle the message?

Closing this in favor of https://github.com/algesten/str0m/pull/422.

This might extend to APIs further up the stack in str0m as well or is there a usecase where you first call accepts but then don't actually want the agent to handle the message?

@algesten I am curious what you think of this. In the IceAgent, we use accepts_message also internally to guard, which data can actually modify the state of the agent. Instead of having a separate Rtc::accepts function, I think we should:

Extend Rtc::handle_input and all handle_receive functions with a check whether they actually want the given data.
Extend those functions with a bool return value that indicates whether they handled the data.

I believe the combination of the above would allow us to remove Rtc::accepts entirely. Instead, users would iterate over all Rtc instances and simply attempt to handle the given message. Perhaps we should rename the function to Rtc::try_handle_receive? Assuming that we have sufficiently efficient enough guards at the top of all handle_receive functions, this should be equivalent from a performance PoV but provides a simpler API to users.
If you agree, then I can build the above on top of https://github.com/algesten/str0m/pull/422.

@algesten I am curious what you think of this. In the IceAgent, we use accepts_message also internally to guard, which data can actually modify the state of the agent. Instead of having a separate Rtc::accepts function, I think we should:

Extend Rtc::handle_input and all handle_receive functions with a check whether they actually want the given data.
Extend those functions with a bool return value that indicates whether they handled the data.

I believe the combination of the above would allow us to remove Rtc::accepts entirely. Instead, users would iterate over all Rtc instances and simply attempt to handle the given message. Perhaps we should rename the function to Rtc::try_handle_receive? Assuming that we have sufficiently efficient enough guards at the top of all handle_receive functions, this should be equivalent from a performance PoV but provides a simpler API to users.

We're building a larger server (we do an SFU), and we multiplex all client communication from a single UDP port (mainly for instructing our clients about firewalls "open udp traffic for port x"). We also got each Rtc running in it's own async task. Incoming UDP data is read centrally, and dispatched to the correct task. Figuring out which task will accept newly discovered remote addresses is a distinctly different activity to dispatching. This is also why .accept(&self, input: &Input) takes a reference vs .handle_input(&self, input: Input) takes ownership.
On balance I think this distinction makes more sense than merging the two operations.

Thank you for your answer! I have a couple of questions if you don't mind :)

We also got each Rtc running in it's own async task. Incoming UDP data is read centrally, and dispatched to the correct task.

How do you share the Rtc instance between the UDP socket and the individual task? I am assuming you are calling Rtc::accepts next to the socket and then dispatch it to the correct task? If yes, doesn't that require Arc<Mutex>? If not, then I am not sure I understand the point of accepts yet.
In either case, doesn't dispatching to a separate task require copying the memory? I am curious if you've done any performance measurement on this, i.e. comparing the (potential) contention of the lock + copying memory with the ability to dispatch incoming packets quicker.

This is also why .accept(&self, input: &Input) takes a reference vs .handle_input(&self, input: Input) takes ownership.

But Input always has a reference to the data so having ownership over Input doesn't really mean anything, does it? The current modelling of StunMessage uses a Vec for attributes so it is not Copy. But because we only support a limited set of attributes anyway, we could have them all as Option<Username> etc, thereby avoid the Vec and make StunMessage and consequently Input implement Copy! Alternatively, we could also use a fixed-sized array.

On balance I think this distinction makes more sense than merging the two operations.

Would you be open to extend handle_input to
a) also perform this check internally like we do for the IceAgent
b) return a boolean to check whether it has been handled
This would allow the use without accepts but if certain usecases require it, they can still use accepts.

In either case, doesn't dispatching to a separate task require copying the memory? I am curious if you've done any performance measurement on this, i.e. comparing the (potential) contention of the lock + copying memory with the ability to dispatch incoming packets quicker.

We do this via bidirectional tokio mpsc channels (think RPC). When unknown data arrives at the UdpSocket, we send messages with Arc<Vec<u8>> to all tasks. The data is parsed in each task (at least that lifetime on Receive<'a> comes in handy 😄). Which leads us on to:

But Input always has a reference to the data so having ownership over Input doesn't really mean anything, does it?

Very true. And thinking about it, the Vec over the STUN options this means quite a few unnecessary allocations, mitigated somewhat by that having unidentified traffic is quite rare.

Would you be open to extend handle_input to

Let me try another motivation why it feels awkward. Str0m is Sans-IO. That is by no means a rigid design pattern (though I sincerely wish more Rustaceans obsessed over figuring out Sans-IO patterns instead of async!), though there is some loose precedence.
The original inspiration for Sans-IO was quinn-proto but also see this blog post. quinn-proto has a split handle_event/handle_timout – I combined them to get the symmetry handle_input(Input)/poll_output -> Output. However in both referenced examples, the handle_<whatever> are void returns.
Sans-IO is obviously no standard (yet?), and even if it was, no design pattern is a rule. I'm sure we can also find examples doing this differently in other places. Overall though, I'm not unhappy with splitting out the accepts() – it seems clean to me. Not overload the semantics of handle_input.

In either case, doesn't dispatching to a separate task require copying the memory? I am curious if you've done any performance measurement on this, i.e. comparing the (potential) contention of the lock + copying memory with the ability to dispatch incoming packets quicker.

We do this via bidirectional tokio mpsc channels (think RPC). When unknown data arrives at the UdpSocket, we send messages with Arc<Vec<u8>> to all tasks.

Interesting! Have you done any performance measurement on the impact of allocating each packet in order to parallelize the processing? What I am currently going for is to have a single loop that reads a packet into a re-used buffer, iterates over all agents and optionally sends out any generated packets at the end before reading the next one (to drop the mutable reference to the read buffer).

Sans-IO is obviously no standard (yet?), and even if it was, no design pattern is a rule. I'm sure we can find examples doing this differently in other places. Overall though, I'm not unhappy with splitting out the accepts() – it seems clean to me. Not overload the semantics of handle_input.

What bugs me is that the API isn't as misuse-resistant as it could be: In my opinion, the handle_input function should not depend on the user calling accept first because we cannot guarantee that. Hence, we should really call it internally at the top and exit early to be safe. At that point, it feels silly to even provide accept because why tell the user to call it if we are gonna call it anyway? Returning a boolean to tell the user whether we handled the data is the final conclusion to allow for a small optimisation to stop iterating over the list of agents.
The situation would be different if the pass-by-value of handle_input would matter. It does at the moment because StunMessage is not Copy but that can be fixed as pointed out above. With that being out of the way, I don't really see the value that accepts provides.
All this being said, the API as is works fine for me / us. The design of the library I am building on top of str0m is heavily inspired by its API and patterns and initially, I also made an accepts function. However, I quickly noticed that I don't need it so I removed it in favor of a unified API and a loop that stops iterating once the packet is handled.

I combined them to get the symmetry handle_input(Input)/poll_output -> Output.

Side note on this: I think this is actually not ideal. Being able to send data depends on our socket being ready. if you are running over a protocol with backpressure, you'd want to delay reading more packets until you've sent all buffered ones. From that PoV, it would be better to be able to poll for Transmit separately. Informational events typically don't need to be backpressured so those could still be handled whereas the call to poll_transmit can be delayed until the socket is ready to accept more data.


text:
Bug v1.1.3 - Collection and Subcollenction with same name

I have these collections:
events
users > events
Algolia is getting the users/events instead of getting events

Edit: This only occurs in existing records. New records do not experience this issue

Can you provide step by step details when it works and when it doesn't work?

This just happened with me too.
my collection path: 'customers/{uid}/referreds'
documents getting indexed from 'customers/{uid}/imports/{importid}/referreds'
I still didn't notice if it happens with new records but with existing it surely do.

unfortunately there is no api available to target a sub-collection.  in order to support sub-collections indexing, Firebase team recommended I use the collectionGroup api which grabs all collections with the collection name, e.g. users.  if Firebase team enables better targeting of subcollections, i will implement it.  for now, i am closing this since there is not an approach to resolve this issue.

Taking a look through the full indexing feature - it does appear that the collectionGroup search is used when the Collection Path doesn't begin with a /.
It would be helpful to update the documentation for the collection path to indicate that it will use a collectionGroup query if the Collection Path does not start with a slash.

authors: fringley guskuma maiconkf smomin smomin-bd

repo: algolia/firestore-algolia-search


text:
docs(dynamicWidgets): implement tsdoc for parameters

Summary

Adds tsdoc documentation for the widget parameters of dynamic widgets
Result

No undocumented parameters

@sarahdayan we can add link tags, but in a separate PR, as it would be inconsistent with the other documentation


text:
UI breaks with AppCompat

The UI of the components breaks when used with an AppCompat theme. Had to change my theme to the MaterialComponents one for it to work well.

Hi @jd-alexander, thanks for sharing this and sorry for the slow reply! We'll investigate this in our next sprint and will keep you updated.

authors: PLNech jd-alexander

repo: algolia/voice-overlay-android


text:
Implementation of Euclideans Algorithm in Kotlin.

This is my first time contributing to this project.
Hopefully, I've done everything correctly.
Otherwise, let me know, and I will fix it as fast as possible 🚂🚋🚋
Thank you for creating such an inspiring project🌦

Oh, there is one other thing I noticed that isn't something you need to change for this PR. I see that you're making the PR from the master branch of your fork. Once you start making multiple PRs for a project (not just this one, any one), or if you want to update your fork's master from the upstream master, your life will become hell. You should make a branch for your code and do the PR from there: https://github.com/algorithm-archivists/algorithm-archive/wiki/How-to-Contribute#step-32---branching

Thank you for the improvements and advice😄 I greatly appreaciate it.
I believe everything is resolved with #589. If not, let me know.

Looks good, thanks again! I'm even gonna leave all the emoji in the commit log.

authors: berquist olaven

repo: algorithm-archivists/algorithm-archive


text:
Turkish Letters

Turkish letters are not supported, can you fix this. thank you

Should be fixed in this commit.
If not:
Can you post the output/screenshot?

Thank you 👍

:)

authors: alias-rahil xlegendryx

repo: alias-rahil/lyrics-finder


text:
developerkit不知如何操作key, led

Is your feature request related to a problem? Please describe.
文档不够详细, 想控制key, led都有点麻烦.
Describe the solution you'd like
完善文档, 按照硬件原理, alios接口介绍, 代码试例讲述硬件操作过程.  把developerkit打造成alios things最佳开发板.
Additional context

谢谢你的建议。关于key、led的操作可以参考这篇文档哈：https://mp.weixin.qq.com/s/Fk_eMhukdFF_esZiMszHwA

authors: riyuezhixing xiaowenxia

repo: alibaba/AliOS-Things


text:
Not found exported service

resin+dubbo 停机时报：
[2017-05-04 14:04:38.442](14:04:38.442 [New I/O worker #7]) INFO  c.a.d.r.p.d.CallbackServiceCodec 50 -  [DUBBO] Not found exported service com.xxxxxxxxxxxxxxx
发现在之前spring已经有这样的destroy：
[2017-05-04 14:04:38.103](14:04:38.103 [resin-destroy]) INFO  o.s.b.f.s.DefaultListableBeanFactory 444 - Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@7f0ab78a: defining beans [...........com.xxxxxxxxxxxxxxx]
用另外一个ContextLoaderListener方式先销毁dubbo，再销毁spring容器：
@Override 	public void contextDestroyed(ServletContextEvent event) { 		ProtocolConfig.destroyAll(); 		super.contextDestroyed(event); 	}
由于ServiceBean会实现了destroy()方法，unregister会执行有两次，第二次会报：
[2017-05-04 12:19:04.821]java.lang.IllegalStateException: Failed to unregister dubbo://....................., cause: ZkClient already closed! [2017-05-04 12:19:04.821]       at com.alibaba.dubbo.registry.support.FailbackRegistry.unregister(FailbackRegistry.java:173) ~[FailbackRegistry.class:2.5.4-SNAPSHOT] [2017-05-04 12:19:04.821]       at com.alibaba.dubbo.registry.integration.RegistryProtocol$1.unexport(RegistryProtocol.java:130) ~[RegistryProtocol$1.class:2.5.4-SNAPSHOT] [2017-05-04 12:19:04.821]       at com.alibaba.dubbo.config.ServiceConfig.unexport(ServiceConfig.java:270) [ServiceConfig.class:2.5.4-SNAPSHOT] [2017-05-04 12:19:04.821]       at com.alibaba.dubbo.config.spring.ServiceBean.destroy(ServiceBean.java:255) [ServiceBean.class:2.5.4-SNAPSHOT] [2017-05-04 12:19:04.821]       at org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:239) [DisposableBeanAdapter.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:510) [DefaultSingletonBeanRegistry.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:486) [DefaultSingletonBeanRegistry.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.beans.factory.support.DefaultListableBeanFactory.destroySingleton(DefaultListableBeanFactory.java:751) [DefaultListableBeanFactory.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:455) [DefaultSingletonBeanRegistry.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:1096) [AbstractApplicationContext.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:1070) [AbstractApplicationContext.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:1016) [AbstractApplicationContext.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.web.context.ContextLoader.closeWebApplicationContext(ContextLoader.java:586) [ContextLoader.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at org.springframework.web.context.ContextLoaderListener.contextDestroyed(ContextLoaderListener.java:143) [ContextLoaderListener.class:3.2.16.RELEASE] [2017-05-04 12:19:04.821]       at com.zongheng.service.book.DubboContextLoaderListener.contextDestroyed(DubboContextLoaderListener.java:15) [classes:na] [2017-05-04 12:19:04.821]       at com.caucho.server.webapp.WebApp.stop(WebApp.java:2773) [resin.jar:3.1.0]
大家有没有别的好的方法？

spring的bean销毁线程：ServiceBean.destroy（）
与
dubboshutdownhook线程: AbstractConfig中的ProtocolConfig.destroyAll();
并发执行导致

参考 #333 .
我们这边的做法是由自动部署系统触发一个停机消息，然后应用主动调用销毁方法进行优雅停机的。
大致步骤为
//1.开始断开注册中心连接
AbstractRegistryFactory.destroyAll();

//2.连接检测
...

//3.销毁dubbo protocol
static void destroyProtocol() {
        ExtensionLoader<Protocol> loader = ExtensionLoader.getExtensionLoader(Protocol.class);
        for (String protocolName : loader.getLoadedExtensions()) {
            try {
                Protocol protocol = loader.getLoadedExtension(protocolName);
                if (protocol != null) {
                    protocol.destroy();
                }
            } catch (Exception t) {
                LOGGER.warn("调用dubbo Protocol.destroy 失败.", t);
            }
        }
    }

//4.-销毁dubbo protocol结束, 开始释放 NettyClientChannelFactory
/**
     * 销毁netty client的线程资源.
     * */
    static void destroyNetty() throws NoSuchFieldException {
        final Field field = NettyClient.class.getDeclaredField("channelFactory");

        AccessController.doPrivileged(new PrivilegedAction<Object>() {

            @Override
            public Object run() {
                field.setAccessible(true);
                ChannelFactory channelFactory;
                try {
                    channelFactory = (ChannelFactory) field.get(NettyClient.class);
                    channelFactory.shutdown();
                } catch (IllegalAccessException e) {
                    LOGGER.info("销毁netty client线程资源失败.", e);
                }
                return null;
            }
        });
    }

authors: chickenlj modowei wuwen5

repo: alibaba/dubbo


text:
@JSONType注解的serialzeFeatures属性无效

@JSONType(serialzeFeatures = {SerializerFeature.WriteNullStringAsEmpty,SerializerFeature.WriteMapNullValue})
public class Apple {

    // @JSONField(serialzeFeatures = {SerializerFeature.WriteNullStringAsEmpty, SerializerFeature.WriteMapNullValue})
    private String color;
    private String productCity;
    private int size;

    public String getColor() {
        return color;
    }

    public Apple setColor(String color) {
        this.color = color;
        return this;
    }

    public int getSize() {
        return size;
    }

    public Apple setSize(int size) {
        this.size = size;
        return this;
    }

    public String getProductCity() {
        return productCity;
    }

    public Apple setProductCity(String productCity) {
        this.productCity = productCity;
        return this;
    }

    @Override
    public String toString() {
        return JSON.toJSONString(this);
    }

    public static void main(String[] args) {
        System.out.println(JSON.toJSONString(new Apple()));
    }
}

在类上加上@JSONType注解，注释掉字段color的注解，serialzeFeatures没生效。

https://github.com/alibaba/fastjson/releases/tag/1.2.43
问题已修复，请使用新版本

authors: ChanZz wenshao

repo: alibaba/fastjson


text:
把对象转为json字符串，不要json对象

JSONObject.toJSONString(xxx)转换后是一个json对象，我只想要json字符串
{
"propValue": [{"min": 6.0,"max": 6.0,"step": 1.0}]
}
想要这样的
{
"propValue": "[{"min": 6.0,"max": 6.0,"step": 1.0}]"
}

您好,根据JSON定义
[{"min": 6.0,"max": 6.0,"step": 1.0}]

这一块代码表示的是你实体上的propValue字段是一个数组包含了对象,大概class是这样的
public @Data class TestClass{
   private List<Info> propValue;
}

class  @Data class Info{
    private double min;
    private double max;
    private double step;
}

// 这样的实体结构转换一定是一个JSON格式如果您非要采用字符串格式那么可改变实体对象

public @Data class TestClass{
   private String propValue;
}
// 将propValue类型编程String类型即可

如果不想采用改变实体的方式来,可以使用JSONObject方法put一个propValue 值为JSON.toJSONString(xxx.getPropValue()) 然后在转换成一个JSON就是你想要的JSON对象了

@hi1027  如果这对您有所帮助,或者解决了您的问题,是否可以关闭此问题?


text:
mavn install error

When running with mvn -DskipTests=true clean install. I got such an error. Have anyone met such an error.
[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:exec (install-pip) on project flink-ml-framework: Result of /bin/sh -c cd /workdir/flink-ai-extended/flink-ml-framework/sbin && bash pip_install_packages.sh execution is: '127'. -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.1:exec (install-pip) on project flink-ml-framework: Result of /bin/sh -c cd /workdir/flink-ai-extended/flink-ml-framework/sbin && bash pip_install_packages.sh execution is: '127'.
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Result of /bin/sh -c cd /workdir/flink-ai-extended/flink-ml-framework/sbin && bash pip_install_packages.sh execution is: '127'.
    at org.codehaus.mojo.exec.ExecMojo.execute (ExecMojo.java:260)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
    at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
    at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
    at org.apache.maven.cli.MavenCli.execute (MavenCli.java:957)
    at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:289)
    at org.apache.maven.cli.MavenCli.main (MavenCli.java:193)
    at sun.reflect.NativeMethodAccessorImpl.invoke0 (Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke (NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke (DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke (Method.java:498)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced (Launcher.java:282)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
[ERROR]
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <args> -rf :flink-ml-framework

Fixed by flink docker

repo: alibaba/flink-ai-extended


text:
Any documents or demo use of the communicator for bulk data exchange?

Hi,
As the document mentioned in the architecture , which is linked below,
https://v6d.io/notes/divein.html#architecture
the communicator seems to act like a data manager for the bulk exchange between different vineyard nodes
But i did not  find any API or demo use of this class to exchange data
between different vineyard instance.
And it seems that  i can't find this class in the source release of libvineyard
wish for your aid

Thanks for your interest on that part. As described in your question, the "communicator" in the picture is a "driver" for object migration (on need).
Part of such functionality is already available in the source repo. More of the usage of migration when integrated with vineyard will be added to the repo in the next one or two weeks. I will post in this thread at that time.

Thanks for your interest on that part. As described in your question, the "communicator" in the picture is a "driver" for object migration (on need).
Part of such functionality is already available in the source repo. More of the usage of migration when integrated with vineyard will be added to the repo in the next one or two weeks. I will post in this thread at that time.

HI, sighingnow:
Looking highly forward to the new feature's release :) , however, i still got  2 questions relate to it:
Q1.In my concern, Can the communicator (which is in the future release) help to get buffers(not the meta data) from remote vineyard instance?
Q2.I suppose the vineyard as  a distributed and enhanced version of Apache Arrow's plasma,
So did the data stored in buffers are kept the same format as Apache Arrow's memory layout?

HI, sighingnow:
Looking highly forward to the new feature's release :) , however, i still got  2 questions relate to it:
Q1.In my concern, Can the communicator (which is in the future release) help to get buffers(not the meta data) from remote vineyard instance?
Q2.I suppose the vineyard as  a distributed and enhanced version of Apache Arrow's plasma,
So did the data stored in buffers are kept the same format as Apache Arrow's memory layout?

For Q1, yes. There would be a "MigrateObject" API on client.
For Q2, no. we made no assumption on the arrow's memory layout. The implementation of Blob exposes a arrow::Buffer just for convenience. See also issue #56. Users can define arbiraty data structures and vineyard just requires it can be represents as a set of blobs and a metadata (the metadata determines the interpretation of those blobs).

For Q1, yes. There would be a "MigrateObject" API on client.
For Q2, no. we made no assumption on the arrow's memory layout. The implementation of Blob exposes a arrow::Buffer just for convenience. See also issue #56. Users can define arbiraty data structures and vineyard just requires it can be represents as a set of blobs and a metadata (the metadata determines the interpretation of those blobs).

Yes, I appreciate your help and I'm really interested in defining my own data format stored into vineyard,
As for the Q2 , So you mean that the Blob can contain not only arrow's data but also any other data defined by my self?
And as I walk through the source code of the latest release(0.1.6), I noticed that the  demo shows in the link below:
https://v6d.io/notes/divein.html#vineyard-object
indicate that the str type is stored as a vineyard:Blob, however,  in the source :
https://github.com/alibaba/libvineyard/blob/02f7a47286d7d77448f934707fbe50154b360693/python/vineyard/data/base.py#L143
seem to show the str type is stored as a vineyard:Scalar?
Sorry but i doubt that Is it a temporary bug or maybe i just misunderstood it.

Yes, I appreciate your help and I'm really interested in defining my own data format stored into vineyard,
As for the Q2 , So you mean that the Blob can contain not only arrow's data but also any other data defined by my self?
And as I walk through the source code of the latest release(0.1.6), I noticed that the  demo shows in the link below:
https://v6d.io/notes/divein.html#vineyard-object
indicate that the str type is stored as a vineyard:Blob, however,  in the source :
https://github.com/alibaba/libvineyard/blob/02f7a47286d7d77448f934707fbe50154b360693/python/vineyard/data/base.py#L143
seem to show the str type is stored as a vineyard:Scalar?
Sorry but i doubt that Is it a temporary bug or maybe i just misunderstood it.

That is not a bug, that is just an optimization in implementation. You know, strings may be usually small, and could be fit into the metadata.
You could refer the implementation of Tensor: builder/resolver in python and corresponding implementation in c++ for how to sharing abstracted data structures between different languages and runtimes. See also the implementation of DataFrame as well.
The documentation at https://v6d.io is kept to be consistent with our codebase of the main branch.

That is not a bug, that is just an optimization in implementation. You know, strings may be usually small, and could be fit into the metadata.
You could refer the implementation of Tensor: builder/resolver in python and corresponding implementation in c++ for how to sharing abstracted data structures between different languages and runtimes. See also the implementation of DataFrame as well.
The documentation at https://v6d.io is kept to be consistent with our codebase of the main branch.

authors: Zarca sighingnow

repo: alibaba/libvineyard


text:
SlotSetter如何设置默认开启插槽，不用每次手动点击switch去开启

SlotSetter如何设置默认开启插槽，不用每次手动点击switch去开启
在组件描述文件meta.ts中设置组件属性为SlotSetter，如何设置可以将SlotSetter设置为默认开启，不用每次在组件属性设置中点击Switch开关开启才能往Slot中拖组件
To Reproduce (required) / 如何复现 bug？（必填，非常重要）
SlotSetter设置
{
    name: 'children4',
    title: 'children4',
    setter: {
      componentName: 'SlotSetter',
      isRequired: true,
      title: 'children4',
      initialValue: {
        type: 'JSSlot',
        value: [],
      },
    }
  }

Environments (please complete the following information) (required): / 请提供如下信息（必填）

AliLowCodeEngineExt version: [e.g. 1.0.6] / 低代码引擎扩展包版本

配置如下 initialValue，具体的 value 可以看默认插槽的内容是什么来设置即可
 initialValue: {
    type: 'JSSlot',
    params: [''],
    value: [
      {
        componentName: 'Box',
      },
    ],
  },

authors: ChiZng liujuping

repo: alibaba/lowcode-engine


text:
数据源面板 切换到 大纲树面板，会导致 Slot 叠加

Describe the bug (required) / 详细描述 bug（必填）

To Reproduce (required) / 如何复现 bug？（必填，非常重要）

打开https://lowcode-engine.cn/demo/index.html
来回切换 数据源面板 和 大纲树面板，会发现 slot 越来越多

https://github.com/alibaba/lowcode-plugins/commit/02ccfcca9b9eac51414f612077c072ea551cd654

+1

参考：https://github.com/alibaba/lowcode-engine/issues/416
@xingmolu

pr 已提 https://github.com/alibaba/lowcode-plugins/pull/13

Fixed as of:

@alilc/lowcode-plugin-datasource-pane 1.0.5

authors: alvarto haoziqaq twinkle77


text:
urls不能带参数

详细描述 bug（必填）
{
      "title": "自定义组件",
      "package": "ly-materials",
      "version": "0.0.3",
      "urls": [
        "./fixtures/ly-materials/view.css?v=0.0.3",
        "./fixtures/ly-materials/view.js?v=0.0.3"
      ],
      "library": "LYMaterials"
 },

下面对是否是css的判断感觉范围过小
https://github.com/alibaba/lowcode-engine/blob/main/packages/utils/src/is-css-url.ts
如何复现 bug？（必填，非常重要）
Expected behavior (required) / 预期行为（必填，非常重要）
正常加载带参数的url链接(主要是css)
Screenshots (optional) / bug 截图（可选）

Environments (please complete the following information) (required): / 请提供如下信息（必填）

AliLowCodeEngine version: [e.g. 1.0.0] / 低代码引擎版本
AliLowCodeEngineExt version: [e.g. 1.0.0] / 低代码引擎扩展包版本
Browser [e.g. chrome, safari] / 浏览器版本
materials / plugins / tools / 其他物料 / 插件 / 工具链版本

(this information can be collected via the manual plugin / 版本信息可通过低代码用户手册插件收集)

Additional context (optional) / 更多额外信息（可选）
Any other context of the problem here. / 可以追加更多的额外信息，帮助定位问题

.css(?:?|$)


text:
[feature required] need network APIs

Ⅰ. Issue Description
The following network APIs are needed:

[ ] /networks/(id or name)/disconnect

[ ] /networks/(id or name)/connect

Ⅱ. Describe what happened
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)

Ⅴ. Anything else we need to know?
Ⅵ. Environment:

pouch version (use pouch version):
OS (e.g. from /etc/os-release):
Kernel (e.g. uname -a):
Install tools:
Others:

i will finish the feature:

/networks/(id or name)/disconnect

fixes https://github.com/alibaba/pouch/pull/1187

authors: HusterWan Letty5411 rudyfly

repo: alibaba/pouch


text:
test: aggregate deveice r/w bps/iops cases to reduce time

Signed-off-by: Allen Sun allensun.shl@alibaba-inc.com

Ⅰ. Describe what this PR did
I found that in the cli integration test of travis CI, PouchRunDeviceSuite test suite would cost lots of time. Then I try to aggregate some similar test cases into a single one to see if we could make to save time in test.
Four cases takes about 1min, and we need to check if the aggregation would reduce 3/4 of it.
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:59: PouchRunDeviceSuite.TestRunDevicePermissions	3.987s
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:140: PouchRunDeviceSuite.TestRunDeviceReadBps	14.241s
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:220: PouchRunDeviceSuite.TestRunDeviceReadIops	14.296s
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:123: PouchRunDeviceSuite.TestRunDeviceWithBadDevice	0.918s
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:180: PouchRunDeviceSuite.TestRunDeviceWriteBps	14.303s
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:261: PouchRunDeviceSuite.TestRunDeviceWriteIops	14.330s

In addition, in the test case, I try to use the same format and use fmt.Sprintf() to combine strings.
Ⅱ. Does this pull request fix one issue?

this is related to https://github.com/alibaba/pouch/issues/1184.
Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗？)
just refactor test cases, no need to add case.
Ⅳ. Describe how to verify it
pass the CI
Ⅴ. Special notes for reviews
none

After this pull request, the test case PouchRunDeviceSuite.TestRunDeviceReadWriteBpsIops only takes about 14s reducing 42s.
PASS: /home/travis/gopath/src/github.com/alibaba/pouch/test/cli_run_device_test.go:157: PouchRunDeviceSuite.TestRunDeviceReadWriteBpsIops	14.302s

LGTM

Thanks for your review. @chuanchang I will merge this.

authors: allencloud chuanchang


text:
NameError: name 'Middleware'is not defined, Did you mean: 'CoRsMiddleware'?

2024-03-01
按照readme的方式装完环境后，执行命令如下
CUDA_VISIBLE_DEVICES=0 MODEL_TYPE=qwen_7b TOKENIZER_PATH=/home/models/Qwen/qwen-7b-chat/ CHECKPOINT_PATH=/home/models/Qwen/qwen-7b-chat/ FT_SERVER_TEST=1 python3 -m maga_transformer.start_server
报错如下：

翻看maga-transformers源码发现start_server.py 中的Middleware确实没有引入，如图所示：

maga-transformers版本是v0.1.4
请问是我的环境问题吗

中间版本确实有点问题了，现在最新版本应该可以了吧。

authors: xinfeishi zzhdbw

repo: alibaba/rtp-llm


text:
vlayout支持GridlayoutHelper同一行显示两个adpter的数据吗

两个adapter，都是GridLayout，并且spancount都是2，第一个只有一个元素，span为1，第二个也只有一个元素span为1，这两个可以排列到同一行吗

不可以啊，要么你做到同一个layoutHelper里，我们的原则是按行布局的

authors: MoonRune longerian

repo: alibaba/vlayout


text:
IOS下Vue2，playground扫描不能正常显示,Android正常显示。

我们现在用vue2.0开发的weex，在Android下都正常，但是在IOS下，即使下载git上的playground自己编译，也不能正常显示，不能不显示有列表中的内容.

自己解决了，是CSS 样式影响的，前提是git上最新的playground编译后扫描通过的

repo: alibaba/weex


text:
Getting 404 in gtag.js

I am getting a 404 error in the js included by this package

@samueldervis
I was just doing the same thing about 1 hour ago.
You must send the version to be published on the google tag manager page

Thanks

authors: herel samueldervis

repo: alinemorelli/react-gtm


text:
Update version

fix #33

Pull Request Test Coverage Report for Build 144

0 of 0 (NaN%) changed or added relevant lines in 0 files are covered.
No unchanged relevant lines lost coverage.
Overall coverage increased (+0.02%) to 31.648%

Totals

Change from base Build 142:
0.02%

Covered Lines:
1089

Relevant Lines:
3441

💛  - Coveralls

authors: QilongZhang coveralls

repo: alipay/sofa-ark


text:
How to Include Links in Django Admin HTMLField?

I use the HTMLField in django admin but I can't seem to find anywhere that mentions how to include links (entering link text, and link url).
Here is the editor I see in django admin:

Does anyone know how can I include links?

The solution was to press Ctrl + K

repo: aljosa/django-tinymce


text:
大佬，请教一个问题关于浏览器插件项目

大佬，您好，我按照您的教程部署的时候，其他两个项目没有问题能跑起来，但是浏览器插件项目遇到一个问题，就是我直接http://localhost:8099/本地访问的时候，没有问题的，但是我换一个网站，再去访问插件就报错了，如下图

请问一下 如何修改呢

Debug by searching Google or ChatGPT.

repo: all-in-aigc/gpts-works


text:
Migrate from Travis to Github Actions

Migrations should be quite easy, it should be enough to reimplement same steps in travis.yml to Github Actions config.
PLEASE if you're going to start working on this issue, comment below, to discuss the solution, thanks in advance.

Hello, I'm interested on this issue. Can I do it? I'll start by reimplement from the travis.yml

@gnomeria yep, good luck

I was having an issue with uploading the cover results to the coverall using goverall. Do you think we could switch to Codedov @cristaloleg ?

@gnomeria yeah, coverall returns 5xx last weeks as I see (other projects too). I'll make an issue regarding migration (let's make it in separate PRs, please)

Fixed in #180

authors: cristaloleg gnomeria

repo: allegro/bigcache


text:
Removing release

@jkinkead : here it is

LGTM!

Although maybe @dirkgr knows why we had a publish here ever . . .

We had this because Satwant was using OKC as a library in his work.

authors: dirkgr jkinkead sbhaktha

repo: allenai/ike


text:
Issue with directions directive

I am trying to show the google suggested route on maps using directions directive.
Initial render always works fine but sometimes when the origin or destination is changed the path is not getting updated. Its still picking the old values.
Initial render

After Changing

This is my Plunker
Please help!

Update
-- This issue is happening only when both source and destination got changed. If only one of them is changed it is working as expected.

repo: allenhwkim/angularjs-google-maps


text:
cause unicode problem

i use the vite2.6.13 and vite-plugin-vue2,1.9.0,the files parsed unicode problem,and cannot correctly display
then output all the file just like this:
�4�ŒÔV7„‰«î§î§•œõž@º�¿ÕaÑ9å´�y�K+��«†ÎÙ��¡ben÷.µÓÆ§(&Žò�ªzU(�� Ñ�íP1gÛŽž� [rJ��Vð’��ƒk]/ó��r(ˆŸ!¢ÈJQì•ÿo#Áô�0ßUM5¾û™9�wU¬˜éØ*‰7”#!Z²�¹™�»I��^£Ô¤$¨yc�ëH¶6œ¤y7Û�¢eæ�«êj�:÷ëåö¹obSH;W{O£Õ…�P;bAHGQb]€�0—µ k45�X…!Å_�ihTQ¥0�’Í�õ&�'Y�+\°�L°Ú É¾-1ðþ/NGõ8’|ú±×zøEÙ2MÒ²Œfe��ßO~�¤¹Ó»Ç‹é&œgp� °'GÌ†g�´Æë�_;#9º�.Æìº÷4�F�£w®(×qh<ãøƒ�/�¼©}°/îým˜m‡ruoëH �"ƒ;”¥ªŠ0V�==hïC€’‘êPc…é½L�IÖôé1„®«RÛ#©�9�PÕ©�žc�ÊÀê-Ðºj€ø‘dãqÕ+ÆÏÇ4 ‹ÔÂ�PŠÄ²§cvÄM¾È�æô3×4p$Zëœp&^,{†±VÖT24oW?e=œú¸^ïh{¡='Eë)�¯;ãDõÈê•yéö…Ø{ám*¶�Ø3–aqZÇ…���}«hš®¶å‚Ù1Hi¶X:•í=³ÂgT�¥Þe‹�ÿ= c�“Þ�ÖÈ�¸®�Û»ÃbÉž…Ç�,Û,`��HøÛl‚xA3º�†�‡¤�Ÿ'|í7C:k�KŒñÈ&ˆ�t�Aë�÷�½+Z «CÅæ�ßï€±ëx,Y¶?â�e�¡ôš�òn ·±�IZá|µ,û8¼ò�! �7.D�Ge€BÍ«Ö†ÝªÓñt3�ÇÄ¦û—��§=”�Q[.YÓtRÏÆuôïà�Àn�¯îa§²Ÿ

I have met the same problem

me too

me too

Me too.
Any idea how to fix this?

Yeah, the problem is having no support for Gzip. Use https://github.com/vbenjs/vite-plugin-compression instead.

If you want this fixed, fork this repo and implement a minimal reproduction in its ./demo folder. Thank you

Got the same error, just installing compress and adding it to my vite project.

I get the same problem.
Windows 10
node 16.17
vite-plugin-compress 2.1.1
vite 3.0.7

authors: DemonGao Makio64 aleclarson andrecasal bestwestern manongLY tianjie326git webszy

repo: alloc/vite-plugin-compress


text:
Delete Comment from Work Item

Reference: 1603E004, 1608E138
Description
As a user, I want to delete a comment from a work item in detail view.
Functional Acceptance Criteria

The user can delete a comment from a work item by clicking on the delete button. Deleting a comment requires confirmation.
Comments can only be deleted by the original comment author (user).
The comment list updates immediately and in-place.

Non-functional Acceptance Criteria
None.
Dependencies

Userstory #298
Userstory #348
Userstory #349
Userstory #351

Does a work item have a history (analogous to a JIRA's history) where a user can track the changes made to a workitem?

This issue was moved to fabric8io/fabric8-planner#654

@michaelkleinhenz since the issue was moved, should we close it here ? Also, I would open a new issue to provide support for comment deletion on the platform since this has not been implemented yet. WDYT ?

closing after discussing about it with @michaelkleinhenz on chat.

authors: ldimaggi michaelkleinhenz xcoulon

repo: almighty/almighty-core


text:
WIP Allow make to control when generate needs to be called

Remove .PHONY dependency on 'internal' targets
Split generate up into multiple non .PHONY targets
Make generate a dependency of build/dev targets

TODO: Make non user called steps private?
TODO: call make generate on file change detection in fresh? Can't control the calls in fresh, maybe move to something like https://github.com/cespare/reflex ?
Fixes #265

Current coverage is 48.32% (diff: 100%)

Merging #287 into master will not change coverage

@@             master       #287   diff @@
==========================================
  Files            33         33
  Lines          1223       1223
  Methods           0          0
  Messages          0          0
  Branches          0          0
==========================================
  Hits            591        591
  Misses          592        592
  Partials         40         40

Powered by Codecov. Last update 571d7ff...d271a3b

@aslakknutsen
Should we also have make to control when deps is absolutely needed ? not sure if that would be over-engineering but could come handy whenever the dependencies list is updated, and a make pull is needed ?

@sbose78 hmm.. not sure about glide.yaml vs glide.lock. glide warns about those being out of sync, but they are normally in sync pr PR. It would need to compare the 'vendor/***' folder compared to glide.lock or something, not sure how well that will work.
Maybe just the vendor folders are required, not all files. I'll give it a try

@sbose78 Recreated "deps" target in a similar fashion. No longer any need to call "deps" or "generate",  "build" or "dev" should do.

Looks good @aslakknutsen .
I had another thought unrelated to this issue but related our Makefile.
Should we include clean in make all ?
Currently it has a
.PHONY: all
## Default target - fetch dependencies, generate code and build.
all: prebuild-check deps generate build

authors: aslakknutsen codecov-io sbose78


text:
Update ammonite-compiler_2.12.15, ... to 3.0.0-M1-19-a7973e17

About this PR
📦 Updates

com.lihaoyi:ammonite-compiler_2.12.15
com.lihaoyi:ammonite-compiler_2.12.16
com.lihaoyi:ammonite-compiler_2.12.17
com.lihaoyi:ammonite-compiler_2.12.18
com.lihaoyi:ammonite-compiler_2.13.10
com.lihaoyi:ammonite-compiler_2.13.11
com.lihaoyi:ammonite-compiler_2.13.12
com.lihaoyi:ammonite-compiler_2.13.9
com.lihaoyi:ammonite-compiler_3.3.0
com.lihaoyi:ammonite-compiler_3.3.1
com.lihaoyi:ammonite-repl-api_2.12.15
com.lihaoyi:ammonite-repl-api_2.12.16
com.lihaoyi:ammonite-repl-api_2.12.17
com.lihaoyi:ammonite-repl-api_2.12.18
com.lihaoyi:ammonite-repl-api_2.13.10
com.lihaoyi:ammonite-repl-api_2.13.11
com.lihaoyi:ammonite-repl-api_2.13.12
com.lihaoyi:ammonite-repl-api_2.13.9
com.lihaoyi:ammonite-repl_2.12.15
com.lihaoyi:ammonite-repl_2.12.16
com.lihaoyi:ammonite-repl_2.12.17
com.lihaoyi:ammonite-repl_2.12.18
com.lihaoyi:ammonite-repl_2.13.10
com.lihaoyi:ammonite-repl_2.13.11
com.lihaoyi:ammonite-repl_2.13.12
com.lihaoyi:ammonite-repl_2.13.9

from 3.0.0-M0-56-1bcbe7f6 to 3.0.0-M1-19-a7973e17
Usage
✅ Please merge!
I'll automatically update this PR to resolve conflicts as long as you don't change it yourself.
If you'd like to skip this version, you can just close this PR. If you have any feedback, just mention me in the comments below.
Configure Scala Steward for your repository with a .scala-steward.conf file.
Have a fantastic day writing Scala!

⚙ Adjust future updates
Add this to your .scala-steward.conf file to ignore future updates of this dependency:
updates.ignore = [ { groupId = "com.lihaoyi" } ]

Or, add this to slow down future updates of this dependency:
dependencyOverrides = [{
  pullRequests = { frequency = "30 days" },
  dependency = { groupId = "com.lihaoyi" }
}]

labels: library-update, early-semver-pre-release, semver-spec-pre-release, commit-count:1

Superseded by #1353.

repo: almond-sh/almond


text:
ariaActivedescendant = false not valid aria

Fixes #434
I've used this as the base code for DLUHC. Needed to make small changes to get it to work with plotly dash so migrated from classes to hooks. This is one of the changes we've made to ensure lighthouse was 100.
PS: Happy to push the react hooks changes too if you are interested.

Hi @Jordan-Hall, thanks for contributing this fix. The changes look fine, but there are a couple of logistics bits that need to happen before we can merge them:

the branch needs to be rebased on main
dist needs to be re-built to grab the changes
The GitHub workflows need to run (hopefully pushing the first two changes should trigger that)

Would you be up for doing this or would you prefer I did it (appreciate it took us a bit for us to get to review this, so very fine to do it, thanks for your patience, btw).
On the topics of React hooks, thanks for offering, but we don't have any plans to move towards this. But if you have an open repository at DLUHC, this could be a handy place we could look into for making future decisions 😊

Thank you @romaricpascal I'll update the branch later. I left DLUHC now I was only contracting for them but still keep an eye on the repo I started for them. I completely rewrote alot of this to use hooks without losing any functionality.
https://github.com/communitiesuk/gov-uk-dash-react-components/blob/main/src/lib/fragments/AutoComplete.react.js I hope this useful for you

Brill! Thanks for the links and offering to update the branch 😊

I've rebased all open PRs with main (where we're able to) including this one
We'd caused a few conflicts by merging https://github.com/alphagov/accessible-autocomplete/pull/600 first so that's all sorted now

Not related to this pr, but also sort of related, but thanks for getting this going again!
I'm gonna see if there's anything I can add from my fork when this is all done.

Needs a 2nd approval on this one @romaricpascal if you're happy that https://github.com/alphagov/accessible-autocomplete/pull/553#issuecomment-1888931397 is complete?

authors: Jordan-Hall colinrotherham nicholasgriffintn romaricpascal

repo: alphagov/accessible-autocomplete


text:
Allow Asset Manager to send location of asset on S3 to nginx

We want to be able to request an asset from Asset Manager and have the app respond with the S3 location of the asset in the X-Accel-Redirect header. This will allow us to configure nginx to serve the file from S3 while keeping the location of the file on S3 hidden.
We're planning to keep the assets on S3 private so we should send a signed URL from Asset Manager.
There's a spike of this in PR #126.

I'm working on this now with the aim of getting PR #126 tidied up.

We've now made this change and it's been automatically deployed to integration.
Closing.

repo: alphagov/asset-manager


text:
GOV.UK styled pagination

trello
https://trello.com/c/bwNfIegw/98-3-make-pagination-use-gov-uk-styling-and-conventions
Description
To allow the user to navigate through paged content items using existing gov.uk conventions e.g.
http://govuk-component-guide.herokuapp.com/components/previous_and_next_navigation
This feature adds a Kaminari theme to the views folder to add the gov-uk style hooks to previous and next links. There are new styles ported from govuk_components which should be removed once / if slimmer is added to the application.
Preview

@leebrigs (cc/ @selfthinker).
Thank you for your work on this.
I would moved the feature tests into the view tests.
Integration tests are slow and are not intended for exhaustive testing. I would prefer to test the label of the pagination component within the view.
If you run
$ bundle exec spec --profile

You can see how the pagination spec is taking 50% of the testing time.
Top 10 slowest examples (1.53 seconds, 66.5% of total time):
  Content Item's Pagination When user navigates to the next page from page 1 the next page number is 3
    0.70708 seconds ./spec/features/pagination_spec.rb:45`

View tests are not creating anything in the database, hence, they will perform much faster.

@theleebrigs sorry I didn't tell you but we have a guideline for commits.
I'd try to use imperative / present tense for the commit title, instead of past tense (tell what applying the commit will do, rather than what you did)

What's blocking using static (slimmer) currently?

@nickcolley (cc/ @selfthinker) As far as I know nothing is blocking us using static at the moment it was more that we'd started with govuk-elements having enough for us to use and we wanted to test if the pagination included in static worked for users with the content in this app or if we'd need a new pattern. I'll check with @selfthinker on this.

@nickcolley, when we were talking about using slimmer/static we didn't merge its implementation in the end because we thought it would be wrong to make this app look like it's part of mainstream.
Additionally, this was the first (and likely to be only) instance where we needed something from static.
Otherwise the implementation of static would be ready and we could potentially use it in case we needed another component. The only thing sort of blocking that is that this app isn't yet set up the way other gov.uk apps are set up (which can be bowled with dependencies etc).

Had a chat with @theleebriggs and @selfthinker, who said they're going to stay as is for now since they're still prototyping, when the application is stabler can look at using static.

@theleebriggs, I have just force pushed some changes. I separated my main commit into 3 smaller commits (which I planned to do before I got ill) and I incorporated your test fixes into those commits accordingly.
I didn't plan to change any of the code but ended up simplifying the selector in the test. I changed e.g. the original .govuk-previous-and-next-navigation .next-page .pagination-label to .govuk-previous-and-next-navigation [rel=next]. That makes it more flexible and easier to change in case the markup changes.
(I'm not sure how much of that will change when those tests get moved to view tests.)

authors: nickcolley pmanrubia selfthinker theleebriggs

repo: alphagov/content-performance-manager


text:
Store content - final batch

EPIC: Store content from all 45 formats
This is the final batch of content schemas that has been extracted to enable us to apply content quality calculations. Store content from 4 formats (batch 6 - final)

 (5) Store content from 4 formats (batch 6 - final)


text:
Perform integrity check on the change_history during migration

Trello

Update the integrity checker to ensure that the change notes we are replacing match the ones in the Publishing API

Note to reviewer: I still need to run the import locally or on integration. This may effect whether the timestamps need to match exactly or within a range, but I wanted to open for an initial review.

Thanks @emmabeynon and @kevindew. I have made the changes and amended. I am not sure about two things...

@emmabeynon, you said to write in the commit as to why we don't check that public_timestamp matches for the first item in the change history for draft editions... I think it is due to how it is set in the History class as the note is hardcoded and the first_published_at  method depends on wether backdated_to has been set... but I am a bit lost... will speak to you about it tomorrow.

Probably related to my above confusion... in order to check that the first mis matched time stamps for draft documents still cause the check to pass, I have to convert the time to rfc3339... this doesn't seem right but I haven't quite figured out what is happening there :(

Thanks @emmabeynon. I have updated the commit message.

Thank you @emmabeynon :) Have amended the changes.

repo: alphagov/content-publisher


text:
BTM-486 enable partitioning

Sets a flag that will hopefully enable partitioning.

🤞


text:
Fix malformed arrays in finder params

Facebook (among others) sometimes mangles the URL of finders, from foo[]=bar&foo[]=baz into foo[0]=bar&foo[1]=baz.
This is forwarded incorrectly to rummager, causing an error there. This commit cleans the params in the controller.
This change is conceptually similar to https://github.com/alphagov/whitehall/blob/master/lib/whitehall/document_filter/cleaned_params.rb#L45-L52, which was added in https://github.com/alphagov/whitehall/pull/1342.
Trello: https://trello.com/c/BDz61VGO
This will solve errors like:
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56faec2265786342c57a1200
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56faec2465786342b8a61200
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56e8fe41657863326a955000
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56fcaa2a65786342b8d31700
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56fb929965786342c5271600
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56fad3de65786342b8911200
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56eb74fe6578632750c90200
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56fa01d765786342b8080d00
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56e6fca56578633265eb0100
https://errbit.publishing.service.gov.uk/apps/54088bad0da1152a9f001417/problems/56f2a5b16578637df1ea0000

:+1: merging

:+1:

authors: Davidslv bishboria tijmenb

repo: alphagov/finder-frontend


text:
GH Actions

Rspec & that

Thanks @danielburnley for unblocking this, turns out that https://github.com/ruby/setup-ruby/issues/319

But also https://github.com/actions/starter-workflows/pull/1542

repo: alphagov/forms-api


text:
Inconsistant guidance on skip link placement

Related documentation
The Skip Link Component
The problem
In the section titled: "When to use this component" the content reads:

All GOV.UK pages must include a skip link in the header.

This implies that the Skip Link should be inside the <header> tag, but in the full page examples in the "patterns" section, such as the question page example the skip link sits outside of all top level landmarks and is just an anchor tag on it's own at the top of the <body> tag.
We expect the correct implementation is for it to sit on its own outside of the header tag, but the documentation on the skip link component itself suggests otherwise.
Issues witnessed
We have seen some teams who have perhaps taken the guidance on the Skip Link component literally, and putting the skip link inside the <header> tag, and this creates some weird behaviour on some screen reader features.
For example, on Voiceover if you use the option to go back to the start of the page, which is the following command, the screen reader jumps to the first item in the <body> tag.
CONTROL + OPTION + FUNCTION  + SHIFT + LEFT ARROW
On GOV.UK and the question page example, this is the Skip Link component. Because it's the first item, the skip-link takes the keyboard focus and the skip link appears visually at the top of the page due to its CSS focus styles. If you press tab from this point, the focus moves from the top of the page down the elements in order as you would expect it to.
However, if the skip link is inside of the <header> tag, when you use the screen reader functionality to jump back to the start of the page, it selects the header itself, so it just announces "banner." And, as the banner itself is not focusable, the keyboard focus stays where it was before you used the command.
So, now if you press tab, unlike the previous example where the keyboard focus had been moved to the top, now, it remains where you left it on the page because the banner element did not take the focus with it due to it being an unfocusable element. If the user is used to the way GOVUK services work and expects them to be consistent, they may think they're at the top of the page, but they are continuing from part way down because the focus did not move.
Suggestion
Make the guidance on where to put the skip link clear and align the patterns to use that guidance. So, whether you look at the skip link component in isolation, or you inspect the code in the pattern, there is no ambiguity for where the skip link should sit.
If the guidance is indeed to have the skip link on its own as the first element in the body, it would also be good to include guidance around the fact that Axe will flag it as a failure, because Axe expects all elements to be inside of a landmark. We know this to be a false flag, but we've seen teams wrap the skip link in <nav> tags and all sorts just to shut Axe up.
Having strong guidance on why GDS built the skip link in the way that they have, will make it easier to explain to teams who are doing weird solutions to silence Axe failures.

Thanks @abbott567 - this is a really detailed and helpful issue!

@abbott567 We've now published a fix for this. Thanks for taking the time to share those details, they were very helpful!

authors: EoinShaughnessy abbott567 timpaul

repo: alphagov/govuk-design-system


text:
Use a custom markdown renderer to avoid scoped styling.

Following on from the conversation at https://github.com/alphagov/govuk-design-system/pull/324#discussion_r195431793
We currently have scoped styling the default markdown output does not add anything we can hook onto for styling.
If we added a custom renderer we could add the classes we require and avoid the need to use scoping.
To see how this would work see an example of overriding headings to make them anchorable: https://github.com/alphagov/govuk-design-system/compare/markdown-heading-ids-linkable
We would add a lightweight custom renderer for each element that adds a class.

made a similar thing for the Prototype kit that uses highlightjs (liek the DS)
var hljs = require('highlight.js')
  var renderer = new marked.Renderer()

  // add highlight classes to code block
  renderer.code = function (code, language) {
    language = language || 'bash'
    return '
' +
      hljs.highlight(language, code).value +
      '
'
  }
  return marked(document, { renderer: renderer })

Going to close this for now.
I did managed to successfully do this: https://govuk-frontend-markdown.glitch.me/

authors: igloosi nickcolley