How to use source maps with grunt-babel from grunt-contrib-concat - gruntjs

I have set up some automation via grunt, using grunt-contrib-concat (v 0.5.1) in the first and grunt-babel (v 6.0.0) in second step. If I use the option to generate source maps with concat, the options "embed" and "inline" raise the following error with babel and no further output is generated:
Warning: build/script-es6.concat.js: Invalid mapping: {"generated":{"line":88,"column":5,"lastColumn":null},"source":null,"original":{"line":null,"column":null},"name":null}
The option "link" apparently gets ignored, babel does its job and all code occurences in the console are displayed with the concatenated js file and line number.
Is there any workaround for this behaviour?

Related

Windows R CMD check top-level files: (README) [WARNING] This document format requires a nonempty <title> element

I have activated GitHub Action to CI for R on Win, OSX, and Linux. On Windows only happen the following warning (which is turned into an error).
* checking top-level files ... WARNING
Conversion of 'README.md' failed:
[WARNING] This document format requires a nonempty <title> element.
Please specify either 'title' or 'pagetitle' in the metadata,
e.g. by using --metadata pagetitle="..." on the command line.
Falling back to 'README'
here the full report.
It seems it is called by CMD check directly, hence I cannot change the call to pandoc.
On the other hand, I tried to include a pandoc argument into the README.Rmd header as it was suggested here:
output:
github_document:
pandoc_args: "--number-offset=1,0"
toc: true
pagetitle: covid19ita
It has no effect.
NOTE: I would not remove error_on = "warning" from CMD check.
What can I do to make the test pass on win too?
It seems that the main issue is related to the inability to fetch badges in the rendered document. That could be seen here (pass for R3.5 but not for R3.6), or here (pass for R3.6 but not for R3.5), and here (where the missing badge is no more the AppVeyor one but the CodeCov one).
So my current solution is to be sure all the badges are ready before or change after the check action takes place (eg using only gh-action).

Meson custom_target never executes despite sources and dependencies out of date

I've got this section in my project's root's meson.build:
if get_option('gen_py_bindings')
message('told to build py bindings')
custom_target('py_bindings',
command: ['env', '_MESON_MODULE_NAME=' + meson.project_name(), ',_MESON_MODULE_VERSION=' + meson.project_version(), './py3_bindings/setup.py', 'build'],
depends: [mainlib],
depend_files: files(['py3_bindings/module.c', 'py3_bindings/setup.py']),
input: ['py3_bindings/setup.py'],
install: false, output: 'sharedextension.so')
endif
It's a custom target that runs a setup.py script to build python bindings for my project's library.
The problem is that it is always seemingly up-to-date. I've used the depends keyword argument to specify that it depends on another build target in the project, and the depend_files keyword argument to specify that it depends on the C source file that the script uses to build the extension, as well the actual script that is being ran as the command. I've also used the input keyword argument even though I don't understand the difference between it and depend_files.
I can only get the custom target to regenerate if I make a change to meson.build (the message() call is displayed successfully).
No other change will do. I've tried updating all files listed in the custom target but it always results in: ninja: no work to do.. Even if other out-of-date targets get rebuilt/relinked/etc...
I'm using ninja 1.9.0 and meson 0.52.1 on linux.
I am also well aware of the build_always_stale keyword argument but I don't want to use it unless necessary. (update: setting it to true still doesn't result in the target rebuilding, looks like there's something more at play here but I can't figure it out).
By default, custom targets don't get built when running plain ninja and thus the build_by_default keyword argument needs to be passed and set to true, e.g.
custom_target('target', build_by_default: true)

command line lessc reports random syntax errors

We are experiencing a bizarre random behavior of the LESS compiler at the Windows Command Line. We are getting inconsistent syntax error messages like we were missing variables or mixins declarations. The thing is, if we LESS compile the same file a second time, the compiler works just fine and we get our beautiful CSS file. The same files work just fine using the client side less.js while running our solution in Visual Studio.
Some more details:
LESS compiler (less#1.4.0-b4) at the Windows7 Command Line.
Here is what I type on command line:
lessc --include-path="site/Css" Css\results-imports.less > fileoutput.comb.css --yui-compress
results-imports.less has a list of less files that should be imported and compiled into css files, some of the less files have nested imports as well.
we get errors like: NameError: variable #brand-color-14 is undefined in C:\Css\loadmask.less. This is one of the imported less files #brand-color-14 is declared in one of the less files that should have been imported before loadmask.less

Google closure variable window/event/console/... is undeclared error

I'm trying to compile one of my HTML5 project using Google Closure. I'm recieving several errors that I don't know how to solve. In fact, it's the same error but for different variables.
Here the errors messages:
variable window is undeclared
variable event is undeclared
variable console is undeclared
variable Audio is undeclared
These variables are Javascript built-in variables. If I compile this same project directly in command-line, it works. But, in my case, I need to compile this project using an ant file (build process). My ant build script is using the same jar file that I use in command-line. With the option warnings="verbose", it doesn't work. If I remove it, it works. If I would like to use the option warnings-"verbose", what I have to do? Please explain me the difference.
Could somebody help me please?
Thank you!
The option --warnings=verbose sets the compiler to "ninja mode"; i.e. every single variable in your file should be declared (an annotated!) correctly. For example, the window variable is unknown to the compiler, but Closure has an implementation of window (independent of the platform used). If your variables are included in some other file, use externs. If yo still want to use Verbose mode without the 'undeclared variable' error, use the flag --jscomp_off=checkVars

How does one compile single file Xcode 4?

While I used to compile a single source file with Cmd+K in prior versions of Xcode, how does one do the same in Xcode 4? (Note that this is different than preprocessing or showing the disassembly of the file.) If compiling from a command line is proposed then it must be such that the project's settings, include paths, preprocessor definitions, etc., are all included.
An example use case is where I make a header file change but only want to test the change's effect with respect to a single source file, not all of the files that depend upon that header.
The command has been moved to the Perform Action submenu. Look under
Product > Perform Action > Compile filename.cpp
To assign Cmd+K to it, go to
File > Preferences > Key Bindings > Product Menu group
and you'll find Compile File where you can assign a key. Cmd+K is assigned to Clear Console now by default, so be sure to remove that binding to avoid conflicts.
One way that I have found to do this is to using the following menu commands:
Product -> Generate Output -> Generate Preprocessed File
Product -> Generate Output -> Generate Assembly File
This may not be exactly what you want, but it will compile the single file.
When you build a project, xcode runs compilation command. You can check the log, search for your file and copy paste that command on Terminal. It'll compile only the file for which you copy/pasted on the terminal.
If your file is C (or C++) file, then simply open your terminal, go to the folder in which the file resides and type
gcc -o outputFile inputFile.c
I am not familar with Objective-c that much, but GCC might work since it's only a superset of C, just like C++.
Hope that was helpful :)
The keyboard shortcut Cmd+K on Xcode 3 and before has been remapped to Cmd+B on Xcode 4
Along the same lines, Cmd+Return was remapped to Cmd+R (in case you ever used that)
The common requirement for single file compilation is checking it for syntax errors. (atleast for me). Since xcode4 highlights syntax errors as you type. It seems apple removed that feature.

Resources