holochain / scaffolding Goto Github PK
View Code? Open in Web Editor NEWScaffolding tool to quickly generate and edit holochain applications
Home Page: https://docs.rs/holochain_scaffolding_cli
Scaffolding tool to quickly generate and edit holochain applications
Home Page: https://docs.rs/holochain_scaffolding_cli
Hi
After installing and compiling the scaffolding app, I get the following error when I run the npm test
.
I know that the issue is dispatched to the right team, but this issue is a tracker for us who wants to see when that bug is fixed.
The expected question of asking to add a field to the ui when selecting f3 (LIT UI) doesn't happen, but the float is added to the UI but in a broken way, i.e. without a type:
Here is the result of an entry type definition in the types.ts
file to which I added an option of f32 and and option f:
export interface Foo {
f_opt: | undefined;
f: ;
}
hc-scaffold version: 0.0.4
Hello
When I run npx @holochain/create@latest , in the selection of the zome name, I cannot change from the default name which is: zome_0_integrity. If I try and edit it, the button SCAFFOLD APP will not trigger.
Using svelte (not sure of Vue or Lit)
With plural entry-type
name
Creating a collection on that (plural-named) entry-type
results in an import statement for singular XDetail.svelte
filename
but the actual filename it appears to be looking for is plural XsDetail.svelte
It would be so clutch to create a scaffold config that can be edited and then passed back into hc scaffold
as a param so it creates all the things… and users don’t have to go back through all the questions again.
I found myself running the scaffolding tool multiple times for the same app after needing a minor change or just wanting to try again with a different option. It would be really really helpful to have some sort of config that can be edited then passed for a re-run.
Using svelte (not sure of Vue or Lit)
When a collection is not getting Global (all) entries but only author’s entries:
it could be really helpful to provide the user some guidance on ensuring the svelte collection HTML tag should have a required param:
author={client.myPubKey}
e.g. Instead of:
it needs:
The resulting error is a Deserialization error, which isn't totally intuitive as to why.
Upgrades
String
bool
u32
AgentPubKey
EntryHash
ActionHash
Option
Vec
Do you want to show this field in the UI? (y/n)
Which widget should we use for this field type?
TextField
TextArea
Do we really need this call to a CDN? I would prefer if the scaffolding tool's default templates were offline-first. Currently if an app with the scaffolding tool is opened offline, the screen turns blank until name resolution times out.
I installed Nix on my MacBook Pro with an M1 chip.
I ran the following command while following the instructions on the Holochain Developer documentation:
nix-shell https://holochain.love --run "hc scaffold example forum"
It did a bunch of stuff and then ended up erroring out in the following way:
Do I follow its instructions for allowing broken packages or is that something that needs to be addressed in the scaffolding itself?
Only remove backend, warn about it.
I tried to follow and recreate the scaffolding example from @guillemcordoba tutorial video (great video btw!). I chose the exact same settings and zome/dna definitions from the video. Everything seemed to work but when I run npm run start
or npm run network 3
I am not able to create wiki pages, the create
button is greyed out.
I suspect it has something to do with the console error I got, somehow it can't load the browser polyfil:
Failed to load resource: the server responded with a status of 404 (Not Found)
It would be nice if there were an option to explicitly scaffold a headless app (i.e. without UI). Currently one is forced to select a UI framework and have UI components generated in any case and then must delete the UI folder manually. It's merely a question of convenience though.
Hi
Right after I create a scaffolded app via the npx @holochain/create@latest, I added another zome, so that I have two zones in the DNA, I start nix-shell, I run npm test, I get an error.
Edit;
This bug does not exist if you create the only one zome in the DNA.
npm install
fails when svelte is selected as UI framework and an entry of date time type is added.
npm ERR! code 1
npm ERR! command failed
npm ERR! command sh -c npm run build
npm ERR! > [email protected] build
npm ERR! > rollup -c
npm ERR!
npm ERR! src/main.ts → public/build/bundle.js...
npm ERR! (!) `this` has been rewritten to `undefined`
npm ERR! https://rollupjs.org/guide/en/#error-this-is-undefined
npm ERR! ../node_modules/@type-craft/title/dist/definitions/title-detail.js
npm ERR! 1: var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
npm ERR! ^
npm ERR! 2: var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
npm ERR! 3: if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
npm ERR! ...and 1 other occurrence
npm ERR! ../node_modules/@type-craft/content/dist/definitions/content-detail.js
npm ERR! 1: var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
npm ERR! ^
npm ERR! 2: var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
npm ERR! 3: if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
npm ERR! ...and 1 other occurrence
npm ERR! ../node_modules/@type-craft/title/dist/definitions/create-title.js
npm ERR! 1: var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
npm ERR! ^
npm ERR! 2: var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
npm ERR! 3: if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
npm ERR! ...and 1 other occurrence
npm ERR!
npm ERR! ...and 15 other files
npm ERR! (!) Plugin replace: @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
npm ERR! (!) Plugin svelte: Unused CSS selector "h1"
npm ERR! src/App.svelte
npm ERR! 47: }
npm ERR! 48:
npm ERR! 49: h1 {
npm ERR! ^
npm ERR! 50: color: #ff3e00;
npm ERR! 51: text-transform: uppercase;
npm ERR! [!] (plugin commonjs) SyntaxError: Unexpected keyword 'this' (170:11) in ...
Attempting to add a zome to an existing repo with a ui folder structure other than the one generated with the scaffolding tool fails although hc-scaffold zome
does not seem to affect the package.json
anyway:
$ ~/code/holochain/lightningrodlabs/we$ hc-scaffold zome
Error: Path was not found: ui/package.json
With the current pattern of only returning hashes instead of records from the backend and then the frontend pattern being like this it is not possible to sort entries in the UI by properties of their records (for example creation time or any property of the entry or derived from it) without quite extensive rewriting of the generated UI code.
Maybe that's something that's outweighed by other advantages of the current pattern but it's probably worth having a closer look at whether there are better patterns.
Hi - have run this on a new project selecting Svelte as UI template.
After doing:
nix-shell
npm run build:happ
successfully,
npm start
fails with the message:
[1] [1] Could not find a config file at /data/holochain/radhis-tmp/radsvelte/ui/wds.config.mjs
[1] [1] wds --config wds.config.mjs exited with code 1
If you add a vec string you get bad code in:
create-X.ts
file: async createFoo() {
const cellData = this.appInfo.cell_data.find((c: InstalledCell) => c.role_id === 'test_app')!;
const foo: Foo = {
vec_str: this._vecStras Array<string>,,
};
note the as
is concatenated to the vecStr
and there is an extra comma a the end of the line.
update-X.ts
file: async updateFoo() {
const cellData = this.appInfo.cell_data.find((c: InstalledCell) => c.role_id === 'test_app')!;
const foo: Foo = {
vec_str: this._vecStr as Array<string,
};
note missing close >
edit-X.ts
file: The .value=${ el }
portion of the mwc widget reports the error: Type 'string | undefined' is not assignable to 'string'
Note this also happens for an option of string
field.hc-scaffold version: 0.0.4
It appears that adding numbers inside snake_case field names are not allowed. They probably should be?
hc-scaffold version: 0.0.4
Scaffold a vanilla web-app and run npm run start
:
Uncaught (in promise) ReferenceError: AppWebsocket is not defined
link-entry scaffold tool creates code that doesn’t compile
Compiling name_graph v0.0.1 (/Users/jmday/dev/holo/hello_link/dnas/name_graph/zomes/coordinator/name_graph)
error[E0124]: field name_entry_hash
is already declared
--> dnas/name_graph/zomes/coordinator/name_graph/src/name_entry_to_name_entries.rs:6:5
|
5 | pub name_entry_hash: ActionHash,
| ------------------------------- name_entry_hash
first declared here
6 | pub name_entry_hash: ActionHash,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ field already declared
Offer SerializedBytes
as entry-type field.
#93 proposes to use the nix built hc-scaffold
for the integration tests.
#95 proposes running cargo test
. instead of cargo test
we could add a crane-based test derivation so the dependencies could be shared between the tests and the CLI. this assume we can agree on using a common cargo profile. any objections to using "release" for the test derivation?
the script run_tests.sh
could be parallelized using a matrix on github actions.
I'm just playing around with the scaffold.
and I fail to build the .webhapp file and get this error.
After a little searching I found an option to skip the library check on @bable/types.
By adding:
"skipLibCheck": true
to the tsconfig.json file inside the ui directory.
Not sure if you want to update the scaffold to include this setting on the tsconfig.json so just documenting the issue here for you to process.
And if it's not need for other people why do I have to do this?
DnaHash is not available as field type. It would be useful to have it.
I followed the instructions on the readme for developer..
doing
npm install
and then
npm start
it seem to go into an infinite install loop .. i had to control c on it
It would be great to have an option for creating a private
entry-type.
I had the experience of realizing I made a mistake while adding a field, and had to ctrl-c out and start over. It would be really nice to be able to navigate through the fields you have created, maybe with a list of the created fields so far, or something like that.
Are there plans to integrat reactjs? :)
so in the readme it tells you to do:
nix-shell http://holochain.love
that takes you down an hour long "love hole"
faster way is :
nix run github:holochain/holochain#hc-scaffold -- example forum
secondly when you have scaffolded "the quick way"
there is no way to see what version of scaffold has been used
would be helpful if that was included in one of the text/script files
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.