Skip to content

Commit 74df3f6

Browse files
committed
Changed Tool version to RelaxedSemver
A lot of tools are declared with invalid semver versioning. This RelaxedSemver patch will allow a soft transitioning to a strict semver compliance.
1 parent 6516e74 commit 74df3f6

File tree

106 files changed

+29965
-27
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+29965
-27
lines changed

Gopkg.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

arduino/cores/cores.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ type ToolDependencies []*ToolDependency
9494
// ToolDependency is a tuple that uniquely identifies a specific version of a Tool
9595
type ToolDependency struct {
9696
ToolName string
97-
ToolVersion *semver.Version
97+
ToolVersion *semver.RelaxedVersion
9898
ToolPackager string
9999
}
100100

arduino/cores/packageindex/index.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,15 +72,15 @@ type indexPlatformRelease struct {
7272

7373
// indexToolDependency represents a single dependency of a core from a tool.
7474
type indexToolDependency struct {
75-
Packager string `json:"packager,required"`
76-
Name string `json:"name,required"`
77-
Version *semver.Version `json:"version,required"`
75+
Packager string `json:"packager,required"`
76+
Name string `json:"name,required"`
77+
Version *semver.RelaxedVersion `json:"version,required"`
7878
}
7979

8080
// indexToolRelease represents a single Tool from package_index.json file.
8181
type indexToolRelease struct {
8282
Name string `json:"name,required"`
83-
Version *semver.Version `json:"version,required"`
83+
Version *semver.RelaxedVersion `json:"version,required"`
8484
Systems []indexToolReleaseFlavour `json:"systems,required"`
8585
}
8686

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package packageindex
2+
3+
import (
4+
"fmt"
5+
"testing"
6+
7+
"github.com/arduino/go-paths-helper"
8+
"github.com/stretchr/testify/require"
9+
semver "go.bug.st/relaxed-semver"
10+
)
11+
12+
func TestIndexParsing(t *testing.T) {
13+
semver.WarnInvalidVersionWhenParsingRelaxed = true
14+
15+
list, err := paths.New("testdata").ReadDir()
16+
require.NoError(t, err)
17+
for _, indexFile := range list {
18+
if indexFile.Ext() != ".json" {
19+
continue
20+
}
21+
fmt.Println("Loading:", indexFile)
22+
_, err := LoadIndex(indexFile)
23+
require.NoError(t, err)
24+
}
25+
}
Lines changed: 93 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,93 @@
1+
wget https://adafruit.github.io/arduino-board-index/package_adafruit_index.json
2+
wget https://github.com/raw/akafugu/akafugu_core/master/package_akafugu_index.json
3+
wget https://github.com/raw/AloriumTechnology/Arduino_Boards/master/package_aloriumtech_index.json
4+
wget https://github.com/Ameba8195/Arduino/raw/master/release/package_realtek.com_ameba_index.json
5+
wget http://downloads.arduino.cc/packages/package_mkr1000_index.json
6+
wget https://github.com/raw/arachnidlabs/arachnidlabs-boards/master/package_arachnidlabs.com_boards_index.json
7+
wget https://ardhat.github.io/ardhat-board-support/arduino/package_ardhat_index.json
8+
wget https://arduboy.github.io/board-support/package_arduboy_index.json
9+
wget https://per1234.github.io/Ariadne-Bootloader/package_codebendercc_ariadne-bootloader_index.json
10+
wget https://github.com/raw/ioteamit/smarteverything-core/master/package_arrow_index.json
11+
wget https://mesom.de/atflash/package_atflash_index.json
12+
wget http://www.leonardomiliani.com/repository/package_leonardomiliani.com_index.json
13+
wget https://thomasonw.github.io/ATmegaxxM1-C1/package_thomasonw_ATmegaxxM1-C1_index.json
14+
wget https://github.com/raw/damellis/attiny/ide-1.6.x-boards-manager/package_damellis_attiny_index.json
15+
wget http://drazzy.com/package_drazzy.com_index.json
16+
wget https://github.com/raw/avandalen/SAM15x15/master/package_avdweb_nl_index.json
17+
wget https://zevero.github.io/avr_boot/package_zevero_avr_boot_index.json
18+
wget https://github.com/raw/carlosefr/atmega/master/package_carlosefr_atmega_index.json
19+
wget https://github.com/raw/oshlab/Breadboard-Arduino/master/avr/boardsmanager/package_oshlab_breadboard_index.json
20+
wget https://resources.canique.com/ide/package_canique_index.json
21+
wget https://github.com/chipKIT32/chipKIT-core/raw/master/package_chipkit_index.json
22+
wget http://clkdiv8.com/download/package_clkdiv8_index.json
23+
wget https://github.com/raw/mikaelpatel/Cosa/master/package_cosa_index.json
24+
wget https://github.com/raw/CytronTechnologies/Cytron-Arduino-URL/master/package_cytron_index.json
25+
wget https://github.com/raw/DFRobot/DFRobotDuinoBoard/master/package_dfrobot_index.json
26+
wget https://github.com/raw/DFRobot/DFRobotDuinoBoard/master/package_dfrobot_iot_mainboard.json
27+
wget https://git.oschina.net/dfrobot/FireBeetle-ESP32/raw/master/package_esp32_index.json
28+
wget http://digistump.com/package_digistump_index.json
29+
wget http://www.dwengo.org/sites/default/files/package_dwengo.org_dwenguino_index.json
30+
wget https://github.com/raw/ElektorLabs/arduino/master/package_elektor-labs.com_ide-1.6.6_index.json
31+
wget https://github.com/raw/ElektorLabs/arduino/master/package_elektor-labs.com_ide-1.6.5_index.json
32+
wget https://engimusing.github.io/arduinoIDE/package_engimusing_modules_index.json
33+
wget http://arduino.esp8266.com/stable/package_esp8266com_index.json
34+
wget https://dl.espressif.com/dl/package_esp32_index.json
35+
wget https://github.com/raw/FemtoCow/ATTinyCore/master/Downloads/package_femtocow_attiny_index.json
36+
wget https://github.com/raw/harbaum/ftduino/master/package_ftduino_index.json
37+
wget https://github.com/raw/feilipu/feilipu.github.io/master/package_goldilocks_index.json
38+
wget http://hidnseek.github.io/hidnseek/package_hidnseek_boot_index.json
39+
wget http://library.radino.cc/Arduino_1_8/package_radino_radino32_index.json
40+
wget https://github.com/Infineon/Assets/releases/download/current/package_infineon_index.json
41+
wget https://github.com/IntoRobot/IntoRobotPackages-ArduinoIDE/releases/download/1.0.0/package_intorobot_index.json
42+
wget https://github.com/raw/sblyolcubal/arduino-iot2000/master/package_iot2000_index.json
43+
wget https://github.com/raw/ioteamit/ioteam-arduino-core/master/package_ioteam_index.json
44+
wget https://github.com/raw/udif/ITEADSW_Iteaduino-Lite-HSP/master/package/package_iteaduino_lite_index.json
45+
wget https://github.com/raw/Lauszus/Sanguino/master/package_lauszus_sanguino_index.json
46+
wget http://downloads.konekt.io/arduino/package_konekt_index.json
47+
wget https://github.com/raw/eightdog/laika_arduino/master/IDE_Board_Manager/package_project_laika.com_index.json
48+
wget http://fpgalibre.sf.net/Lattuino/package_lattuino_index.json
49+
wget http://download.labs.mediatek.com/package_mtk_linkit_index.json
50+
wget http://download.labs.mediatek.com/package_mtk_linkit_smart_7688_index.json
51+
wget https://macchina.cc/package_macchina_index.json
52+
wget https://www.mattairtech.com/software/arduino/package_MattairTech_index.json
53+
wget https://github.com/raw/MaximIntegratedMicros/arduino-collateral/master/package_maxim_index.json
54+
wget https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
55+
wget https://mcudude.github.io/MicroCore/package_MCUdude_MicroCore_index.json
56+
wget https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json
57+
wget https://mcudude.github.io/MiniCore/package_MCUdude_MiniCore_index.json
58+
wget https://lowpowerlab.github.io/MoteinoCore/package_LowPowerLab_index.json
59+
wget http://navspark.mybigcommerce.com/content/package_navspark_index.json
60+
wget https://github.com/raw/NicoHood/HoodLoader2/master/package_NicoHood_HoodLoader2_index.json
61+
wget https://sandeepmistry.github.io/arduino-nRF5/package_nRF5_boards_index.json
62+
wget https://github.com/raw/OLIMEX/Arduino_configurations/master/AVR/package_olimex_avr_index.json
63+
wget https://github.com/raw/OLIMEX/Arduino_configurations/master/PIC/package_olimex_pic_index.json
64+
wget https://github.com/chipKIT32/chipKIT-core/raw/master/package_chipkit_index.json
65+
wget https://github.com/raw/OLIMEX/Arduino_configurations/master/STM/package_olimex_stm_index.json
66+
wget https://github.com/raw/ThamesValleyReprapUserGroup/Beta-TVRRUG-Mendel90/master/Added-Documents/OMC/package_omc_index.json
67+
wget https://openpanzerproject.github.io/OpenPanzerBoards/package_openpanzer_index.json
68+
wget https://github.com/raw/geolink/opentracker-arduino-board/master/package_opentracker_index.json
69+
wget http://panstamp.org/arduino/package_panstamp_index.json
70+
wget https://s3.amazonaws.com/quirkbot-downloads-production/downloads/package_quirkbot.com_index.json
71+
wget http://rfduino.com/package_rfduino_index.json
72+
wget https://redbearlab.github.io/arduino/package_redbear_index.json
73+
wget https://redbearlab.github.io/arduino/package_redbearlab_index.json
74+
wget https://github.com/raw/RiddleAndCode/RnCAtmega256RFR2/master/Board_Manager/package_rnc_index.json
75+
wget http://rig.reka.com.my/package_rig_index.json
76+
wget https://github.com/raw/Seeed-Studio/Seeeduino-Boards/master/package_seeeduino_index.json
77+
wget https://github.com/raw/eerimoq/simba-releases/master/arduino/avr/package_simba_avr_index.json
78+
wget https://github.com/raw/eerimoq/simba-releases/master/arduino/esp/package_simba_esp_index.json
79+
wget https://github.com/raw/eerimoq/simba-releases/master/arduino/sam/package_simba_sam_index.json
80+
wget http://downloads.sodaq.net/package_sodaq_index.json
81+
wget http://downloads.sodaq.net/package_sodaq_samd_index.json
82+
wget https://github.com/raw/sparkfun/Arduino_Boards/master/IDE_Board_Manager/package_sparkfun_index.json
83+
wget https://github.com/raw/stm32duino/BoardManagerFiles/master/STM32/package_stm_index.json
84+
wget http://talk2arduino.wisen.com.au/master/package_talk2.wisen.com_index.json
85+
wget https://github.com/raw/TKJElectronics/Balanduino/master/package_tkj_balanduino_index.json
86+
wget https://rawgit.com/hunianhang/nufront_arduino_json/master/package_tl7788_index.json
87+
wget https://udooboard.github.io/arduino-board-package/package_udoo_index.json
88+
wget https://github.com/ms-iot/iot-utilities/raw/master/IotCoreAppDeployment/ArduinoIde/package_iotcore_ide-1.6.6_index.json
89+
wget https://per1234.github.io/wirino/package_per1234_wirino_index.json
90+
wget https://mcudude.github.io/MightyCore/package_MCUdude_MightyCore_index.json
91+
wget https://mcudude.github.io/MegaCore/package_MCUdude_MegaCore_index.json
92+
wget https://github.com/XMegaForArduino/IDE/raw/master/package_XMegaForArduino_index.json
93+
wget http://zoubworld.com/~zoubworld_Arduino/files/Release/package_Zoubworld_index.json

0 commit comments

Comments
 (0)