Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
cd972d64
Commit
cd972d64
authored
Jun 20, 2013
by
Calen Pennington
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'cale/standard-coffee-watch' into cale/stabilize-dev-env
Conflicts: CHANGELOG.rst rakelib/assets.rake
parents
f11900a8
2e480f64
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
17 deletions
+30
-17
CHANGELOG.rst
+2
-0
doc/development.md
+19
-0
rakelib/assets.rake
+9
-17
No files found.
CHANGELOG.rst
View file @
cd972d64
...
...
@@ -14,6 +14,8 @@ the associated javascript)
Common: Make asset watchers run as singletons (so they won't start if the
watcher is already running in another shell).
Common: Use coffee directly when watching for coffeescript file changes.
Common: Make rake provide better error messages if packages are missing.
Common: Repairs development documentation generation by sphinx.
...
...
doc/development.md
View file @
cd972d64
...
...
@@ -63,6 +63,25 @@ To get a full list of available rake tasks, use:
rake -T
### Troubleshooting
#### Reference Error: XModule is not defined (javascript)
This means that the javascript defining an xmodule hasn't loaded correctly. There are a number
of different things that could be causing this:
1.
See
`Error: watch EMFILE`
#### Error: watch EMFILE (coffee)
When running a development server, we also start a watcher process alongside to recompile coffeescript
and sass as changes are made. On Mac OSX systems, the coffee watcher process takes more file handles
than are allowed by default. This will result in
`EMFILE`
errors when coffeescript is running, and
will prevent javascript from compiling, leading to the error 'XModule is not defined'
To work around this issue, we use
`Process::setrlimit`
to set the number of allowed open files.
Coffee watches both directories and files, so you will need to set this fairly high (anecdotally,
8000 seems to do the trick on OSX 10.7.5, 10.8.3, and 10.8.4)
## Running Tests
See
`testing.md`
for instructions on running the test suite.
...
...
rakelib/assets.rake
View file @
cd972d64
...
...
@@ -6,6 +6,8 @@ if USE_CUSTOM_THEME
THEME_SASS
=
File
.
join
(
THEME_ROOT
,
"static"
,
"sass"
)
end
MINIMAL_DARWIN_NOFILE_LIMIT
=
8000
def
xmodule_cmd
(
watch
=
false
,
debug
=
false
)
xmodule_cmd
=
'xmodule_assets common/static/xmodule'
if
watch
...
...
@@ -21,24 +23,14 @@ def xmodule_cmd(watch=false, debug=false)
end
def
coffee_cmd
(
watch
=
false
,
debug
=
false
)
if
watch
# On OSx, coffee fails with EMFILE when
# trying to watch all of our coffee files at the same
# time.
#
# Ref: https://github.com/joyent/node/issues/2479
#
# So, instead, we use watchmedo, which works around the problem
"watchmedo shell-command "
+
"--command 'echo
\"
>>> Change detected to ${watch_src_path}
\"
&& node_modules/.bin/coffee -c ${watch_src_path}' "
+
"--recursive "
+
"--patterns '*.coffee' "
+
"--ignore-directories "
+
"--wait "
+
"."
else
'node_modules/.bin/coffee --compile .'
if
watch
&&
Launchy
::
Application
.
new
.
host_os_family
.
darwin?
available_files
=
Process
::
getrlimit
(
:NOFILE
)[
0
]
if
available_files
<
MINIMAL_DARWIN_NOFILE_LIMIT
Process
.
setrlimit
(
:NOFILE
,
MINIMAL_DARWIN_NOFILE_LIMIT
)
end
end
"node_modules/.bin/coffee --compile
#{
watch
?
'--watch'
:
''
}
."
end
def
sass_cmd
(
watch
=
false
,
debug
=
false
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment