Comments (8)
This could be a general property that could be added to all plugins or specific to the lens plugin, all plugins currently take a namespace
property in the myriad.toml file. I forget what happens if thats empty...
from myriad.
Ah, lens plugin gets a namespace named UnknownNamespace
is its empty
from myriad.
Same with the fields and DU's plugin, there could be a hierarchy, namespace, module, if both of those are empty then the generation occurs in the root, which might potentially mean an invalid ast. I think namespace, module, then root would work as a rule though, its up to the plugin authors to enforce any rules currently as nothing is set or used in myriad.core etc.
from myriad.
I found an issue with generating with a module rather than a namespace.
Modules can be either top-level or nested, top-level modules cannot have comments above them and are defined with no =
on the definition. Nested modules are defined by using an =
after the module definition. Each plugin is independent and knows nothing about any previous plugins so it's not possible to know whether one plugin is defined at the top level and others are nested so this becomes a bit messy. Unless you generate plugins self-contained with their own namespace so the namespace requirement is by design, I rediscovered this on trying to implement modules rather than namespace generation.
from myriad.
Plugins could allow you to specify the exact string that appears there: "module Foo.Bar"
, "namespace Baz"
, etc. Facil does that.
from myriad.
The ast has two constructs one for top-level modules, which is one per file, and another for nested modules, which are any subsequent ones. there are also anonymous modules for script files, I'm still hacking away but it doesn't look like I'm getting anywhere.
from myriad.
Only top-level modules can have a path like module xxx.yyy
, nested ones are only allowed to be a simple path like module xxx =
from myriad.
Inline is probably different but there are issues with getting the indentation correctly aligned etc and knowing if you are inside a type or module or namespace already, complexity there.
from myriad.
Related Issues (20)
- Add batching API so state can be passed amongst plugins of the same type HOT 3
- [docs] How to build the docs pages locally? HOT 5
- TOSO: Rip Docsy theme the fuck out.
- Myriad di deploy di server mana? app.myriad.social HOT 1
- Did myriad letters are supported as superscript?
- Allow inline generation with custom placement HOT 15
- Memoise the calls to toml get configuration HOT 1
- Extensions like SynType.Option generate incorrect syntax HOT 1
- Upgrading from 0.5.0 to 0.8.1 removes keywords from many elements HOT 12
- Can we have a release please? ;) HOT 3
- Plugin path not quoted HOT 1
- Automatic generation of record variant types HOT 5
- Change log link in nugget has no version
- Readme missing from nugget package
- Working on invalid syntax HOT 2
- Generate output based on multiple input files HOT 6
- Documentation on how to create my own plugin? HOT 2
- The "Terms of use" in the README seems to violate the Open Source Definition. HOT 2
- New nuget version with Fantomas upgrade HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from myriad.