Skip to content

Add a custom error message for values without attributes in a record#845

Merged
joshuafcole merged 1 commit into
witheve:masterfrom
cassiebeckley:feature/value-missing-attribute-error
Jun 16, 2017
Merged

Add a custom error message for values without attributes in a record#845
joshuafcole merged 1 commit into
witheve:masterfrom
cassiebeckley:feature/value-missing-attribute-error

Conversation

@cassiebeckley
Copy link
Copy Markdown
Contributor

This implements part of the feature request in #436. It adds a slightly friendlier error message that appears when a value without an attribute in a record. For example, this code

search
  twenty = [-20]
bind
  [#ui/text text: twenty]

will generate the error message "-20" needs to be labeled with an attribute.

After this, the attribute rule could be modified to take another argument specifying whether the record that is being parsed is part of a functionRecord. If so, the message could mention that function syntax requires arguments to be labeled, and include parameter names if it is a standard library function. I can work on that next, if this looks good to you.

Copy link
Copy Markdown
Contributor

@joshuafcole joshuafcole left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the help, looks great!

@joshuafcole joshuafcole self-assigned this Jun 16, 2017
@joshuafcole joshuafcole merged commit 739de60 into witheve:master Jun 16, 2017
@cassiebeckley cassiebeckley deleted the feature/value-missing-attribute-error branch June 16, 2017 18:39
@alexispurslane
Copy link
Copy Markdown

I'm working on the other part of this, but how do I test it out? Is there a way to get the eve-starter to run my modified code?

@joshuafcole
Copy link
Copy Markdown
Contributor

Hey @ChristopherDumas,
You should be able to build eve from source code by running npm install && npm run build within the eve repository assuming you have a relatively recent version of NodeJS and NPM installed.

You can then start this locally build version using npm start.

@alexispurslane
Copy link
Copy Markdown

alexispurslane commented Aug 29, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants